add docs for delete and deprecate package
Talgat S committed
Jul 24, 2021 at 22:31 UTC
4881384bfe23c2c5277a8c14a7cfa65104e92a48
2 files changed
+77
-1
content/packages-and-modules/updating-and-managing-your-published-packages/deprecating-and-undeprecating-packages-or-package-versions.mdx
+39
@@ -2,6 +2,8 @@
2
title: Deprecating and undeprecating packages or package versions
3
---
4
5
+import shared from "../../../src/shared.js";
6
+
7
If you no longer wish to maintain a package, or if you would like to encourage users to update to a new or different version, you can [deprecate][deprecate-cli] it. Deprecating a package or version will print a message to the terminal when a user installs it.
8
9
A deprecation warning or message can say anything. You may wish to include a message encouraging users to update to a specific version, or an alternate, supported package.
@@ -44,6 +46,43 @@ The CLI will also accept version ranges for `<version>`.
46
47
If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
48
49
+### Deprecatiing package from the web
50
+
51
+Package can be deprecated from the web if does not meet requirements from [unpublishing packages rules](/unpublishing-packages-from-the-registry#how-to-unpublish).
52
+
53
+1. <>{shared["user-login"].text}</>
54
+
55
+ <>{shared["user-login"].image}</>
56
+
57
+2. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package:
58
+ `https://www.npmjs.com/package/<your-package-name>`.
59
+
60
+3. Click **Settings**.
61
+ <Screenshot
62
+ src="/packages-and-modules/securing-your-code/2fa-package-admin.png"
63
+ alt="Screenshot showing the admin tab on a package page"
64
+ />
65
+
66
+4. On this page find a button to Deprecate package. Click it.
67
+
68
+ <Screenshot
69
+ src="/packages-and-modules/deleting-deprecating/deprecate-package-settings.png"
70
+ alt="Screenshot showing the admin tab on a package page"
71
+ />
72
+
73
+<Note>
74
+
75
+**Note:** If you have instead "Delete package" button. You cannot deprecate the package for now from the Web. But you can still [delete the package](/unpublishing-packages-from-the-registry#unpublish-package-from-the-web).
76
+
77
+</Note>
78
+
79
+5. Confirmation modal appear. In order to continue type **package name**.
80
+
81
+ <Screenshot
82
+ src="/packages-and-modules/deleting-deprecating/deprecate-package-confirm.png"
83
+ alt="Screenshot showing the admin tab on a package page"
84
+ />
85
+
86
## Undeprecating a package or version
87
88
To undeprecate a package, replace `"<message>"` with `""` (an empty string) in one of the above commands.
content/packages-and-modules/updating-and-managing-your-published-packages/unpublishing-packages-from-the-registry.mdx
+38
-1
@@ -37,7 +37,44 @@ If you have [two-factor authentication][two-factor-auth] enabled for writes, you
37
38
**Note:** If you unpublish an entire package, you may not publish any new versions of that package until 24 hours have passed.
39
40
-</Note>
40
+</Note>
41
+
42
+### Unpublish package from the web
43
+
44
+Package can be deleted from the web if meets requirements from [unpublishing packages rules](#how-to-unpublish).
45
+
46
+1. <>{shared["user-login"].text}</>
47
+
48
+ <>{shared["user-login"].image}</>
49
+
50
+2. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package:
51
+ `https://www.npmjs.com/package/<your-package-name>`.
52
+
53
+3. Click **Settings**.
54
+ <Screenshot
55
+ src="/packages-and-modules/securing-your-code/2fa-package-admin.png"
56
+ alt="Screenshot showing the admin tab on a package page"
57
+ />
58
+
59
+4. On this page find a button to Delete package. Click it.
60
+
61
+ <Screenshot
62
+ src="/packages-and-modules/deleting-deprecating/delete-package-settings.png"
63
+ alt="Screenshot showing the admin tab on a package page"
64
+ />
65
+
66
+<Note>
67
+
68
+**Note:** If you have instead "Deprecate package" button. You cannot delete the package. Refer to the [rules](#how-to-unpublish). But you can still [deprecate the package](/deprecating-and-undeprecating-packages-or-package-versions#deprecatiing-package-from-the-web).
69
+
70
+</Note>
71
+
72
+5. Confirmation modal appear. In order to continue type **package name**.
73
+
74
+ <Screenshot
75
+ src="/packages-and-modules/deleting-deprecating/delete-package-confirm.png"
76
+ alt="Screenshot showing the admin tab on a package page"
77
+ />
78
79
## When to unpublish
80