From 63fa2d7a144cf088af037f7ef81fcc6e548f2196 Mon Sep 17 00:00:00 2001 From: Matthias Rolke Date: Fri, 12 Feb 2021 21:20:09 +0100 Subject: [PATCH] fix(deps): remove unused dependency @salesforce/core --- package.json | 1 - src/commands/auth-url/export.ts | 7 +++---- src/commands/auth-url/import.ts | 7 +++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 9c5049f..3c3f724 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "@oclif/config": "^1", "@oclif/errors": "^1", "@salesforce/command": "3.1.0", - "@salesforce/core": "2.18.4", "tmp": "^0.2.1", "tslib": "^2" }, diff --git a/src/commands/auth-url/export.ts b/src/commands/auth-url/export.ts index bafe50a..c78ea2b 100644 --- a/src/commands/auth-url/export.ts +++ b/src/commands/auth-url/export.ts @@ -1,16 +1,15 @@ -import { SfdxCommand } from '@salesforce/command'; -import { Messages } from '@salesforce/core'; +import { core, SfdxCommand } from '@salesforce/command'; import { AnyJson } from '@salesforce/ts-types'; import { promisify } from 'util'; import child_process = require('child_process'); const exec = promisify(child_process.exec); // Initialize Messages with the current plugin directory -Messages.importMessagesDirectory(__dirname); +core.Messages.importMessagesDirectory(__dirname); // Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core, // or any library that is using the messages framework can also be loaded this way. -const messages = Messages.loadMessages('sfdx-plugin-auth-url', 'export'); +const messages = core.Messages.loadMessages('sfdx-plugin-auth-url', 'export'); export default class ExportOrgUsingAuthUrlCommand extends SfdxCommand { public static description = messages.getMessage('commandDescription'); diff --git a/src/commands/auth-url/import.ts b/src/commands/auth-url/import.ts index fbf22bb..e58b52c 100644 --- a/src/commands/auth-url/import.ts +++ b/src/commands/auth-url/import.ts @@ -1,5 +1,4 @@ -import { flags, SfdxCommand } from '@salesforce/command'; -import { Messages } from '@salesforce/core'; +import { core, flags, SfdxCommand } from '@salesforce/command'; import { AnyJson } from '@salesforce/ts-types'; import { promises as fsPromises } from 'fs'; import { promisify } from 'util'; @@ -8,11 +7,11 @@ import tmp = require('tmp'); const exec = promisify(child_process.exec); // Initialize Messages with the current plugin directory -Messages.importMessagesDirectory(__dirname); +core.Messages.importMessagesDirectory(__dirname); // Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core, // or any library that is using the messages framework can also be loaded this way. -const messages = Messages.loadMessages('sfdx-plugin-auth-url', 'import'); +const messages = core.Messages.loadMessages('sfdx-plugin-auth-url', 'import'); export default class ImportOrgUsingAuthUrlCommand extends SfdxCommand { public static description = messages.getMessage('commandDescription');