Repository navigation
npm 12 npm view --json shape breaks npm backend version parsing #10887
Replies: 2 comments
|
Thanks for the report. I opened #10888 to normalize npm 12's This comment was generated by an AI coding assistant. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
I accidentally ended up with npm
12.0.0installed temporarily, and noticed mise's npm backend fails to resolve versions:This is not urgent for current Node releases, since recent Node builds still bundle npm 10/11. But it looks like mise may need npm 12 compatibility before Node eventually ships it.
Repro shape
With npm
12.0.0:npm view @director.run/cli versions time --jsonreturns a top-level array:
[ { "versions": ["..."], "time": {"...": "..."} } ]With npm
11.x, the same command returns a top-level object:{ "versions": ["..."], "time": {"...": "..."} }Suspected cause
The npm backend currently expects
versionsandtimeat the top level:Source: https://github.com/jdx/mise/blob/main/src/backend/npm.rs
So npm 12's single-item array wrapper means
data["versions"]is missing, causinginvalid versions.Related
npm view <pkg> versions time --jsoncall.All reactions