[BUG] Cannot undeprecate
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
I did a
npm deprecate mylib 3.6.0 "Please upgrade to latest"
which deprecated the whole package as I forgot the @ symbol between mylib and the version.
Now, if I try to undeprecate with:
npm deprecate mylib ""
or individually with
npm deprecate mylib@3.5.0 ""
I have got a "code EUSAGE" error.
I am using npm version 8.19.2
Expected Behavior
Following the npm documentation, It should un-deprecate when passing an empty message.
Steps To Reproduce
-
In this environment...
Windows 11
node v16.17.0
npm v8.19.2
...
- Run
npm deprecate mylib "Some deprecation message"
npm deprecate mylib ""
npm deprecate mylib@1.0.0 ""
- See error...
npm ERR! code EUSAGE
npm ERR!
npm ERR! Deprecate a version of a package
npm ERR!
npm ERR! Usage:
npm ERR! npm deprecate <package-spec> <message>
npm ERR!
npm ERR! Options:
npm ERR! [--registry <registry>] [--otp <otp>]
npm ERR!
npm ERR! Run "npm help deprecate" for more info
npm ERR! A complete log of this run can be found in:
Environment
- npm:
- Node.js:
- OS Name:
- System Model Name:
- npm config:
; copy and paste output from `npm config ls` here
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the npm deprecate commands shown in the issue, especially the empty-message cases, using npm 8.19.2 on the stated environment. Trace the deprecate command's argument validation and verify that both package-wide and version-specific empty messages complete without EUSAGE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100