Skip to content

Commit

Permalink
chore: updates from devScripts
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-cli-bot committed Dec 31, 2023
1 parent 5e1c141 commit d8aec6d
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 163 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.15.1",
"@salesforce/core": "^6.4.0",
"@salesforce/core": "^6.4.2",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^5.0.13",
"got": "^13.0.0",
Expand All @@ -19,15 +19,15 @@
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5",
"@salesforce/cli-plugins-testkit": "^5",
"@salesforce/dev-scripts": "^8.1.2",
"@salesforce/dev-scripts": "^8.1.3",
"@salesforce/plugin-command-reference": "^3.0.58",
"@salesforce/ts-sinon": "^1.4.19",
"@salesforce/ts-types": "^2.0.9",
"@types/marked": "^4.0.8",
"@types/marked-terminal": "^3.1.3",
"@types/semver": "^7.5.6",
"@types/sinon-chai": "^3.2.12",
"eslint-plugin-sf-plugin": "^1.16.15",
"eslint-plugin-sf-plugin": "^1.17.0",
"oclif": "^4.1.0",
"shx": "0.3.4",
"sinon-chai": "^3.7.0",
Expand Down
6 changes: 3 additions & 3 deletions src/commands/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
*/

import { EOL } from 'node:os';
import { dirname, resolve as pathResolve, join } from 'node:path';
import { resolve as pathResolve, join } from 'node:path';
import { spawn } from 'node:child_process';
import { fileURLToPath } from 'node:url';

import { Flags, loglevel, SfCommand } from '@salesforce/sf-plugins-core';
import { Lifecycle, Messages, SfError } from '@salesforce/core';
import open from 'open';
Expand All @@ -17,7 +17,7 @@ import { ProxyAgent } from 'proxy-agent';
import { Doctor as SFDoctor, SfDoctor, SfDoctorDiagnosis } from '../doctor.js';
import { DiagnosticStatus } from '../diagnostics.js';

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-info', 'doctor');

export default class Doctor extends SfCommand<SfDoctorDiagnosis> {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/info/releasenotes/display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

import { EOL } from 'node:os';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { marked } from 'marked';
import TerminalRenderer from 'marked-terminal';
import { Env } from '@salesforce/kit';
Expand All @@ -17,7 +17,7 @@ import type { AnyJson, JsonMap } from '@salesforce/ts-types';
import shared from '../../../shared/index.js';

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)

const helpers = ['stable', 'stable-rc', 'latest', 'latest-rc', 'rc'];

Expand Down
6 changes: 3 additions & 3 deletions src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

import childProcess from 'node:child_process';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';


import { Interfaces } from '@oclif/core';
import { Lifecycle, Messages } from '@salesforce/core';
import { SfDoctor, SfDoctorDiagnosis } from './doctor.js';
Expand All @@ -24,7 +24,7 @@ export interface DiagnosticStatus {
status: 'pass' | 'fail' | 'warn' | 'unknown';
}

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-info', 'diagnostics');

/**
Expand Down
4 changes: 2 additions & 2 deletions src/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import fs from 'node:fs';
import { join, dirname, basename } from 'node:path';
import { fileURLToPath } from 'node:url';

import { Messages, SfError } from '@salesforce/core';
import { Env, omit } from '@salesforce/kit';
import type { AnyJson, KeyValue } from '@salesforce/ts-types';
Expand Down Expand Up @@ -48,7 +48,7 @@ export interface SfDoctorDiagnosis {
logFilePaths: string[];
}

Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-info', 'doctor');

const PINNED_SUGGESTIONS = [
Expand Down
4 changes: 2 additions & 2 deletions test/commands/doctor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import path from 'node:path';
import childProcess from 'node:child_process';
import { fileURLToPath } from 'node:url';

import fs from 'node:fs';
import Sinon from 'sinon';
import { expect } from 'chai';
Expand All @@ -19,7 +19,7 @@ import DoctorCmd from '../../src/commands/doctor.js';
import { Diagnostics, DiagnosticStatus, Doctor, SfDoctorDiagnosis } from '../../src/index.js';
import { formatPlugins } from '../../src/doctor.js';

Messages.importMessagesDirectory(path.dirname(fileURLToPath(import.meta.url)));
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
const messages = Messages.loadMessages('@salesforce/plugin-info', 'doctor');

let oclifConfig: Config;
Expand Down
Loading

0 comments on commit d8aec6d

Please sign in to comment.