Skip to content

Commit 48d0c8a

Browse files
authored
Merge pull request #907 from salesforcecli/devScripts2023-12-28
refactor: devScripts update
2 parents c7a958d + 1ab314e commit 48d0c8a

32 files changed

+167
-211
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
"devDependencies": {
1818
"@oclif/plugin-command-snapshot": "^5.0.5",
1919
"@salesforce/cli-plugins-testkit": "^5.1.3",
20-
"@salesforce/dev-scripts": "^8.1.2",
20+
"@salesforce/dev-scripts": "^8.1.3",
2121
"@salesforce/plugin-command-reference": "^3.0.51",
2222
"@salesforce/ts-sinon": "1.4.19",
2323
"@types/shelljs": "^0.8.14",
24-
"eslint-plugin-sf-plugin": "^1.16.15",
24+
"eslint-plugin-sf-plugin": "^1.17.0",
2525
"moment": "^2.29.1",
2626
"oclif": "^4.0.4",
2727
"shelljs": "^0.8.5",

src/commands/force/org/clone.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import { dirname } from 'node:path';
9-
import { fileURLToPath } from 'node:url';
8+
9+
1010
import {
1111
Flags,
1212
SfCommand,
@@ -31,7 +31,7 @@ import {
3131
import requestFunctions from '../../../shared/sandboxRequest.js';
3232
import { SandboxReporter } from '../../../shared/sandboxReporter.js';
3333

34-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
34+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
3535
const messages = Messages.loadMessages('@salesforce/plugin-org', 'clone');
3636

3737
export class OrgCloneCommand extends SfCommand<SandboxProcessObject> {

src/commands/force/org/create.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import { dirname } from 'node:path';
9-
import { fileURLToPath } from 'node:url';
8+
9+
1010
import { Interfaces } from '@oclif/core';
1111
import {
1212
Flags,
@@ -38,7 +38,7 @@ import {
3838
import requestFunctions from '../../../shared/sandboxRequest.js';
3939
import { SandboxReporter } from '../../../shared/sandboxReporter.js';
4040

41-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
41+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
4242
const messages = Messages.loadMessages('@salesforce/plugin-org', 'create');
4343

4444
export interface ScratchOrgProcessObject {

src/commands/force/org/delete.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import { dirname } from 'node:path';
8-
import { fileURLToPath } from 'node:url';
7+
8+
99
import { Flags, loglevel, orgApiVersionFlagWithDeprecations, SfCommand } from '@salesforce/sf-plugins-core';
1010
import { AuthInfo, AuthRemover, Messages, Org, StateAggregator } from '@salesforce/core';
1111
import { orgThatMightBeDeleted } from '../../../shared/flags.js';
1212

13-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
13+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
1414
const messages = Messages.loadMessages('@salesforce/plugin-org', 'delete');
1515

1616
export type DeleteResult = {

src/commands/force/org/status.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import { dirname } from 'node:path';
9-
import { fileURLToPath } from 'node:url';
8+
9+
1010
import {
1111
Flags,
1212
SfCommand,
@@ -28,7 +28,7 @@ import {
2828
} from '@salesforce/core';
2929
import { SandboxReporter } from '../../../shared/sandboxReporter.js';
3030

31-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
31+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
3232
const messages = Messages.loadMessages('@salesforce/plugin-org', 'status');
3333

3434
export class OrgStatusCommand extends SfCommand<SandboxProcessObject> {

src/commands/org/create/sandbox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import { dirname } from 'node:path';
9-
import { fileURLToPath } from 'node:url';
8+
9+
1010
import { Duration } from '@salesforce/kit';
1111
import { Flags } from '@salesforce/sf-plugins-core';
1212
import { Lifecycle, Messages, SandboxEvents, SandboxProcessObject, SandboxRequest, SfError } from '@salesforce/core';
@@ -16,7 +16,7 @@ import requestFunctions from '../../../shared/sandboxRequest.js';
1616
import { SandboxCommandBase } from '../../../shared/sandboxCommandBase.js';
1717
import { SandboxLicenseType } from '../../../shared/orgTypes.js';
1818

19-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
19+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
2020
const messages = Messages.loadMessages('@salesforce/plugin-org', 'create.sandbox');
2121

2222
const getLicenseTypes = (): string[] => Object.values(SandboxLicenseType);

src/commands/org/create/scratch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import { dirname } from 'node:path';
9-
import { fileURLToPath } from 'node:url';
8+
9+
1010
import {
1111
Messages,
1212
Lifecycle,
@@ -21,7 +21,7 @@ import { Duration } from '@salesforce/kit';
2121
import { buildScratchOrgRequest } from '../../../shared/scratchOrgRequest.js';
2222
import { buildStatus } from '../../../shared/scratchOrgOutput.js';
2323
import { ScratchCreateResponse } from '../../../shared/orgTypes.js';
24-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
24+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
2525
const messages = Messages.loadMessages('@salesforce/plugin-org', 'create_scratch');
2626

2727
export const secretTimeout = 60000;

src/commands/org/delete/sandbox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import { dirname } from 'node:path';
8-
import { fileURLToPath } from 'node:url';
7+
8+
99
import { AuthInfo, AuthRemover, Messages, Org, SfError, StateAggregator } from '@salesforce/core';
1010
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
1111
import { orgThatMightBeDeleted } from '../../../shared/flags.js';
1212

13-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
13+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
1414
const messages = Messages.loadMessages('@salesforce/plugin-org', 'delete_sandbox');
1515

1616
export interface SandboxDeleteResponse {

src/commands/org/delete/scratch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import { dirname } from 'node:path';
9-
import { fileURLToPath } from 'node:url';
8+
9+
1010
import { AuthInfo, AuthRemover, Messages, Org } from '@salesforce/core';
1111
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
1212
import { orgThatMightBeDeleted } from '../../../shared/flags.js';
1313

14-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
1515
const messages = Messages.loadMessages('@salesforce/plugin-org', 'delete_scratch');
1616

1717
export interface ScratchDeleteResponse {

src/commands/org/disable/tracking.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import { dirname } from 'node:path';
8-
import { fileURLToPath } from 'node:url';
7+
8+
99
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
1010
import { Messages } from '@salesforce/core';
1111

12-
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
12+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
1313
const messages = Messages.loadMessages('@salesforce/plugin-org', 'org.disable.tracking');
1414

1515
export type OrgDisableTrackingResult = {

0 commit comments

Comments
 (0)