From 34829f8df0653415e68f2752cde1e85ae65cf9ca Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Tue, 10 May 2022 10:00:36 -0700 Subject: [PATCH] feat: deprecated commands set-script and birthday --- docs/content/commands/npm-set-script.md | 2 ++ lib/commands/birthday.js | 4 +++- lib/commands/set-script.js | 3 ++- tap-snapshots/test/lib/load-all-commands.js.test.cjs | 4 ++-- tap-snapshots/test/lib/utils/npm-usage.js.test.cjs | 2 +- test/lib/commands/set-script.js | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/content/commands/npm-set-script.md b/docs/content/commands/npm-set-script.md index 0fc267f760c81..8695b43f14423 100644 --- a/docs/content/commands/npm-set-script.md +++ b/docs/content/commands/npm-set-script.md @@ -7,6 +7,8 @@ description: Set tasks in the scripts section of package.json ### Synopsis An npm command that lets you create a task in the `scripts` section of the `package.json`. +Deprecated. + diff --git a/lib/commands/birthday.js b/lib/commands/birthday.js index c7b5b31c54a62..3a36401cb8347 100644 --- a/lib/commands/birthday.js +++ b/lib/commands/birthday.js @@ -1,12 +1,14 @@ const BaseCommand = require('../base-command.js') +const log = require('../utils/log-shim') class Birthday extends BaseCommand { static name = 'birthday' - static description = 'Birthday' + static description = 'Birthday, deprecated' static ignoreImplicitWorkspace = true static isShellout = true async exec () { + log.warn('birthday', 'birthday is deprecated, and will be removed in a future version.') this.npm.config.set('yes', true) return this.npm.exec('exec', ['@npmcli/npm-birthday']) } diff --git a/lib/commands/set-script.js b/lib/commands/set-script.js index a6b7c3a50cdaf..f2ff9e47b8e6a 100644 --- a/lib/commands/set-script.js +++ b/lib/commands/set-script.js @@ -5,7 +5,7 @@ const log = require('../utils/log-shim') const BaseCommand = require('../base-command.js') class SetScript extends BaseCommand { - static description = 'Set tasks in the scripts section of package.json' + static description = 'Set tasks in the scripts section of package.json, deprecated' static params = ['workspace', 'workspaces', 'include-workspace-root'] static name = 'set-script' static usage = ['[