From 4b7e83d55945e2380997af9edfb06a6194e94543 Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 17 Mar 2022 11:30:06 -0700 Subject: [PATCH] docs: fix unpublish docs to auto generate usage Also add explanation of what `--force` does for unpublish --- docs/content/commands/npm-audit.md | 1 + docs/content/commands/npm-init.md | 1 + docs/content/commands/npm-pkg.md | 1 + docs/content/commands/npm-unpublish.md | 22 ++++++++++--------- docs/content/using-npm/config.md | 1 + lib/utils/config/definitions.js | 1 + .../lib/utils/config/definitions.js.test.cjs | 1 + .../lib/utils/config/describe-all.js.test.cjs | 1 + 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/docs/content/commands/npm-audit.md b/docs/content/commands/npm-audit.md index ae2afa84032fe..24b700ff5abd8 100644 --- a/docs/content/commands/npm-audit.md +++ b/docs/content/commands/npm-audit.md @@ -246,6 +246,7 @@ mistakes, unnecessary performance degradation, and malicious input. * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set `--yes` during `npm init`. * Allow clobbering existing values in `npm pkg` +* Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! diff --git a/docs/content/commands/npm-init.md b/docs/content/commands/npm-init.md index d9c03aef41504..71109cd360511 100644 --- a/docs/content/commands/npm-init.md +++ b/docs/content/commands/npm-init.md @@ -199,6 +199,7 @@ mistakes, unnecessary performance degradation, and malicious input. * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set `--yes` during `npm init`. * Allow clobbering existing values in `npm pkg` +* Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! diff --git a/docs/content/commands/npm-pkg.md b/docs/content/commands/npm-pkg.md index c41f2a76d059d..576e1335efbba 100644 --- a/docs/content/commands/npm-pkg.md +++ b/docs/content/commands/npm-pkg.md @@ -199,6 +199,7 @@ mistakes, unnecessary performance degradation, and malicious input. * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set `--yes` during `npm init`. * Allow clobbering existing values in `npm pkg` +* Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! diff --git a/docs/content/commands/npm-unpublish.md b/docs/content/commands/npm-unpublish.md index 13589a03ee69f..a4c481ea5af7f 100644 --- a/docs/content/commands/npm-unpublish.md +++ b/docs/content/commands/npm-unpublish.md @@ -6,21 +6,22 @@ description: Remove a package from the registry ### Synopsis -To learn more about how the npm registry treats unpublish, see our unpublish policies - -#### Unpublishing a single version of a package + + + ```bash -npm unpublish [<@scope>/]@ +npm unpublish [<@scope>/][@] ``` -#### Unpublishing an entire package + + + + -```bash -npm unpublish [<@scope>/] --force -``` +To learn more about how the npm registry treats unpublish, see our unpublish policies ### Warning @@ -87,6 +88,7 @@ mistakes, unnecessary performance degradation, and malicious input. * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set `--yes` during `npm init`. * Allow clobbering existing values in `npm pkg` +* Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 9fbb614564df8..e4588d065c95f 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -616,6 +616,7 @@ mistakes, unnecessary performance degradation, and malicious input. * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set `--yes` during `npm init`. * Allow clobbering existing values in `npm pkg` +* Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index c5c129eb3d495..6b0c7191454c1 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -740,6 +740,7 @@ define('force', { * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set \`--yes\` during \`npm init\`. * Allow clobbering existing values in \`npm pkg\` + * Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs index d75d32d9b74ea..6c387f47a996a 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -659,6 +659,7 @@ mistakes, unnecessary performance degradation, and malicious input. * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set \`--yes\` during \`npm init\`. * Allow clobbering existing values in \`npm pkg\` +* Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs index 27b8278fd388e..cdbdd4bd152b6 100644 --- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs @@ -490,6 +490,7 @@ mistakes, unnecessary performance degradation, and malicious input. * Allow conflicting peerDependencies to be installed in the root project. * Implicitly set \`--yes\` during \`npm init\`. * Allow clobbering existing values in \`npm pkg\` +* Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!