npm-deprecate.1 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. .TH "NPM\-DEPRECATE" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-deprecate\fR \- Deprecate a version of a package
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm deprecate <pkg>[@<version range>] <message>
  9. .fi
  10. .RE
  11. .P
  12. Note: This command is unaware of workspaces\.
  13. .SS Description
  14. .P
  15. This command will update the npm registry entry for a package, providing a
  16. deprecation warning to all who attempt to install it\.
  17. .P
  18. It works on version ranges \fIhttps://semver\.npmjs\.com/\fR as well as specific
  19. versions, so you can do something like this:
  20. .P
  21. .RS 2
  22. .nf
  23. npm deprecate my\-thing@"< 0\.2\.3" "critical bug fixed in v0\.2\.3"
  24. .fi
  25. .RE
  26. .P
  27. SemVer ranges passed to this command are interpreted such that they \fIdo\fR
  28. include prerelease versions\. For example:
  29. .P
  30. .RS 2
  31. .nf
  32. npm deprecate my\-thing@1\.x "1\.x is no longer supported"
  33. .fi
  34. .RE
  35. .P
  36. In this case, a version \fBmy\-thing@1\.0\.0\-beta\.0\fP will also be deprecated\.
  37. .P
  38. You must be the package owner to deprecate something\. See the \fBowner\fP and
  39. \fBadduser\fP help topics\.
  40. .P
  41. To un\-deprecate a package, specify an empty string (\fB""\fP) for the \fBmessage\fP
  42. argument\. Note that you must use double quotes with no space between them to
  43. format an empty string\.
  44. .SS Configuration
  45. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  46. <!\-\- automatically generated, do not edit manually \-\->
  47. <!\-\- see lib/utils/config/definitions\.js \-\->
  48. .SS \fBregistry\fP
  49. .RS 0
  50. .IP \(bu 2
  51. Default: "https://registry\.npmjs\.org/"
  52. .IP \(bu 2
  53. Type: URL
  54. .RE
  55. .P
  56. The base URL of the npm registry\.
  57. <!\-\- automatically generated, do not edit manually \-\->
  58. <!\-\- see lib/utils/config/definitions\.js \-\->
  59. .SS \fBotp\fP
  60. .RS 0
  61. .IP \(bu 2
  62. Default: null
  63. .IP \(bu 2
  64. Type: null or String
  65. .RE
  66. .P
  67. This is a one\-time password from a two\-factor authenticator\. It's needed
  68. when publishing or changing package permissions with \fBnpm access\fP\|\.
  69. .P
  70. If not set, and a registry response fails with a challenge for a one\-time
  71. password, npm will prompt on the command line for one\.
  72. <!\-\- automatically generated, do not edit manually \-\->
  73. <!\-\- see lib/utils/config/definitions\.js \-\->
  74. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  75. .SS See Also
  76. .RS 0
  77. .IP \(bu 2
  78. npm help publish
  79. .IP \(bu 2
  80. npm help registry
  81. .IP \(bu 2
  82. npm help owner
  83. .IP \(bu 2
  84. npm help adduser
  85. .RE