diff --git a/README.md b/README.md index 4f16625..44120de 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ -[![NPM](https://img.shields.io/npm/v/@salesforce/command.svg)](https://www.npmjs.com/package/@salesforce/command) +# :stop_sign: deprecation notice + +This library is deprecated. You should migrate to https://github.com/salesforcecli/sf-plugins-core. + +A migration guide is provided in the `sf` wiki https://github.com/salesforcecli/cli/wiki/Migrate-Plugins-Built-For-Sfdx + +> [![NPM](https://img.shields.io/npm/v/@salesforce/command.svg)](https://www.npmjs.com/package/@salesforce/command) # Description diff --git a/src/sfdxCommand.ts b/src/sfdxCommand.ts index 09de509..42c4dc4 100644 --- a/src/sfdxCommand.ts +++ b/src/sfdxCommand.ts @@ -83,6 +83,9 @@ export type VarargsConfig = | boolean; /** + * + * @deprecated Use SfCommand from `@salesforce/sf-plugins-core` + * * A base command that provides convenient access to common SFDX flags, a logger, * CLI output formatting, scratch orgs, and devhubs. Extend this command and set * various static properties and a flag configuration to add SFDX behavior. diff --git a/src/sfdxFlags.ts b/src/sfdxFlags.ts index 0360059..7f975cd 100644 --- a/src/sfdxFlags.ts +++ b/src/sfdxFlags.ts @@ -114,6 +114,9 @@ function option( return merge(kind, flag, options); } +/** + * @deprecated Use Flags from `@salesforce/sf-plugins-core` instead + */ export namespace flags { export type Any = Omit>, 'deprecated'> & SfdxProperties; export type Array = Option & { delimiter?: string }; diff --git a/src/test/index.ts b/src/test/index.ts index 0a0ad4d..3412976 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -107,6 +107,12 @@ const withProject = (SfProjectJson?: JsonMap): Plugin => ({ }, }); +/** + * @deprecated We recommend unit tests test smaller units of code, not entire commands. + * For command-level tests, we recommend using NUTs (real-world tests, see https://github.com/salesforcecli/cli-plugins-testkit) + * If you have existing tests you want to maintain, import oclif/test directly and make use of TextContext from sfdx-core: https://github.com/forcedotcom/sfdx-core/tree/v3#using-testsetup + * + */ const test = oclifTest.test .register('withOrg', withOrg) .register('withConnectionRequest', withConnectionRequest) diff --git a/src/ux.ts b/src/ux.ts index bec90f3..a729122 100644 --- a/src/ux.ts +++ b/src/ux.ts @@ -41,6 +41,7 @@ import { Options as OclifActionOptions } from '@oclif/core/lib/cli-ux/action/bas import { IPromptOptions } from '@oclif/core/lib/cli-ux'; /** + * @deprecated Use Ux from `@salesforce/sf-plugins-core` instead * Utilities for interacting with terminal I/O. */ export class UX { @@ -394,6 +395,9 @@ export type Deprecation = { ); /** + * + * @deprecated use deprecation from oclif/core + * * A deprecation warning message configuration type. A typical instance can pass `name`, * `type`, and `version` for a standard message. Alternatively, the `messageOverride` can * be used as a special case deprecated message. Used when formatting a deprecation message. diff --git a/yarn.lock b/yarn.lock index 099f491..cb81b58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2151,37 +2151,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.19.5: - version "1.20.4" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861" - integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.1.3" - get-symbol-description "^1.0.0" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.2" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trimend "^1.0.5" - string.prototype.trimstart "^1.0.5" - unbox-primitive "^1.0.2" - -es-abstract@^1.20.4: +es-abstract@^1.19.0, es-abstract@^1.20.4: version "1.21.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== @@ -2899,7 +2869,7 @@ get-func-name@^2.0.0: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== @@ -3299,15 +3269,6 @@ inquirer@^7.0.0: strip-ansi "^6.0.0" through "^2.3.6" -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - internal-slot@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3" @@ -5166,15 +5127,6 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string.prototype.trimend@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" - integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" @@ -5184,15 +5136,6 @@ string.prototype.trimend@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" -string.prototype.trimstart@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" - integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4"