From 716f4f8f615cad1d5ede54b4ba458c2517bf8297 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 23 Aug 2023 15:10:34 -0600 Subject: [PATCH] fix: use getPluginsList to prep for oclif/core v3 (#377) --- package.json | 2 +- src/sfCommand.ts | 3 ++- yarn.lock | 38 +++++++++++++++++++++++++++++++++++++- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 402333f76..6084fb04b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "node": ">=16.0.0" }, "dependencies": { - "@oclif/core": "^2.11.7", + "@oclif/core": "^2.11.10", "@salesforce/core": "^5.2.1", "@salesforce/kit": "^3.0.9", "@salesforce/ts-types": "^2.0.7", diff --git a/src/sfCommand.ts b/src/sfCommand.ts index a029c7401..5e28a15d4 100644 --- a/src/sfCommand.ts +++ b/src/sfCommand.ts @@ -363,7 +363,8 @@ export abstract class SfCommand extends Command { commandId: this.id, }; // what hooks are there in the plugins? Subscribe to matching lifecycle events - this.config.plugins + this.config + .getPluginsList() // omit oclif and telemetry (which subscribes itself to events already) .filter((plugin) => !plugin.name.startsWith('@oclif/') && plugin.name !== '@salesforce/plugin-telemetry') .flatMap((p) => Object.entries(p.hooks)) diff --git a/yarn.lock b/yarn.lock index e547cb084..4b336e4f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -532,7 +532,7 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@oclif/core@^2.11.1", "@oclif/core@^2.11.7": +"@oclif/core@^2.11.1": version "2.11.8" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.11.8.tgz#780c4fdf53e8569cf754c2a8fefcc7ddeacf1747" integrity sha512-GILmztcHBzze45GvxRpUvqQI5nM26kSE/Q21Y+6DtMR+C8etM/hFW26D3uqIAbGlGtg5QEZZ6pjA/Fqgz+gl3A== @@ -568,6 +568,42 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" +"@oclif/core@^2.11.10": + version "2.11.10" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.11.10.tgz#638128034b8b4bdf4b23480a7278426f85130170" + integrity sha512-/7Umij3OU++6o+z4U+waJ5nP6IvK9KKEVzz+xsla68YoECLQwz43boUKqYizlNMtTfiwNkiYb5QE+OU/q5qEtA== + dependencies: + "@types/cli-progress" "^3.11.0" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" + chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.12.0" + debug "^4.3.4" + ejs "^3.1.8" + fs-extra "^9.1.0" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + semver "^7.5.3" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + ts-node "^10.9.1" + tslib "^2.5.0" + widest-line "^3.1.0" + wordwrap "^1.0.0" + wrap-ansi "^7.0.0" + "@oclif/test@^2.4.0": version "2.4.2" resolved "https://registry.yarnpkg.com/@oclif/test/-/test-2.4.2.tgz#5f14944ffe6ee44ee57584405e87b0e06118c0bf"