Skip to content

deps: upgrade npm to 12.0.2 - #64882

Open
npm-cli-bot wants to merge 1 commit into
nodejs:mainfrom
npm:npm-v12.0.2-main
Open

deps: upgrade npm to 12.0.2#64882
npm-cli-bot wants to merge 1 commit into
nodejs:mainfrom
npm:npm-v12.0.2-main

Conversation

@npm-cli-bot

Copy link
Copy Markdown
Contributor

This PR contains changes from: npm@12.0.0 npm@12.0.1 npm@12.0.2


12.0.0

12.0.0 (2026-07-08)

⚠️ BREAKING CHANGES

  • npm view --json now always returns an array.
  • npm sbom --sbom-format=cyclonedx now reports the name field from each package's package.json instead of the on-disk directory name. The name, bom-ref, and purl of the root component and of aliased dependencies may change.
  • npm no longer registers man pages with the system when installed globally. man npm-install will no longer work, but npm help install is unaffected.
  • The npm pkg output is no longer forced to json. This means you can get single values without having to worry about wrapping of the values. It also outputs non-json content more similarly to npm view.
  • npm shrinkwrap is removed, the shrinkwrap config alias is removed, and npm-shrinkwrap.json is no longer loaded or honored at the project root or from inside dependency tarballs. Rename project-root npm-shrinkwrap.json to package-lock.json; use bundleDependencies if you need to ship a locked dependency tree.
  • The Twitter and Freenode profile fields have been removed from the npm registry. This means that users will no longer be able to set or view these fields in their npm profiles.
  • npm will no longer attempt to resolve the path to node via whichnode. process.execPath is already set by Node to the resolved real path of the node binary, so the lookup was redundant. Scripts that expected npm to override process.execPath with a PATH-resolved (potentially symlinked) node path may be affected.
  • the --json output of npm pack and npm publish have changed. They are now always consistent, and in the same format.
  • the star, stars and unstar commands have been removed
  • The npm adduser command has been removed. Create and manage user accounts on the npm website, and use npm login to authenticate on the command line.
  • Preserve https protocol when working with git (#8703)
  • The default license for npm init has been changed from "ISC" to an empty string. If not set, the license field will be omitted from new packages.
  • npm now supports node ^22.22.2 || ^24.15.0 || >=26.0.0
  • allow-git and allow-remote now default to "none"; set them to "all" (or "root") to install git or user-supplied tarball-URL dependencies.
  • root `preinstall` now runs before dependencies are installed.
  • unknown configs in .npmrc, unknown CLI flags, abbreviated flags, and single-hyphen multi-char shorthands now throw instead of warning.

Chores

Dependencies

12.0.1

12.0.1 (2026-07-10)

Bug Fixes

Dependencies

12.0.2

12.0.2 (2026-07-27)

Bug Fixes

Documentation

Chores

Dependencies

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. npm Issues and PRs related to the npm client dependency or the npm registry. labels Jul 31, 2026
@MikeMcC399 MikeMcC399 added dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v26.x PRs that should not land on the v26.x-staging branch and should not be released in v26.x. labels Aug 1, 2026
@MikeMcC399

This comment was marked as resolved.

@MikeMcC399 MikeMcC399 added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 1, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@MikeMcC399

This comment was marked as resolved.

@Renegade334 Renegade334 added semver-major PRs that contain breaking changes and should be released in the next major version. and removed dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v26.x PRs that should not land on the v26.x-staging branch and should not be released in v26.x. labels Aug 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@marco-ippolito

marco-ippolito commented Aug 1, 2026

Copy link
Copy Markdown
Member

Possibly this should just be labeled with semver-major PRs that contain breaking changes and should be released in the next major version.

Anyway, pending the outcome of nodejs/Release#1161

The outcome is that npm 12 wont be backported. That has been discussed and decided by the release wg
nodejs/Release#1161 (comment)

@MikeMcC399

This comment was marked as resolved.

@avivkeller avivkeller added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Aug 1, 2026
@marco-ippolito

marco-ippolito commented Aug 1, 2026

Copy link
Copy Markdown
Member

The outcome is that npm 12 wont be backported. That has been discussed and decided by the release wg nodejs/Release#1161 (comment)

I'm fine with that decision, but it should be clearly documented into that issue. The comment that you referred to, I interpreted as the decision still being open, even if the Releasers Team had formed a preferred opinion.

This does appear to be the consensus ...

is not the same as writing "We have decided ..."

Since the decision is owned by the release team, and the final consensus of the release team is to ship it as semver major, I think it is pretty much decided.

@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Aug 2, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/64882
✔  Done loading data for nodejs/node/pull/64882
----------------------------------- PR info ------------------------------------
Title      deps: upgrade npm to 12.0.2 (#64882)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     npm-cli-bot:npm-v12.0.2-main -> nodejs:main
Labels     semver-major, npm, author ready, needs-ci
Commits    1
 - deps: upgrade npm to 12.0.2
Committers 1
 - npm CLI robot <npm-cli+bot@github.com>
PR-URL: https://github.com/nodejs/node/pull/64882
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/64882
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Fri, 31 Jul 2026 20:17:08 GMT
   ✔  Approvals: 6
   ✔  - Jordan Harband (@ljharb): https://github.com/nodejs/node/pull/64882#pullrequestreview-4832185636
   ✔  - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/64882#pullrequestreview-4832322700
   ✔  - Colin Ihrig (@cjihrig): https://github.com/nodejs/node/pull/64882#pullrequestreview-4834841084
   ✔  - Mike McCready (@MikeMcC399): https://github.com/nodejs/node/pull/64882#pullrequestreview-4834975352
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/64882#pullrequestreview-4835142203
   ✔  - Trivikram Kamat (@trivikr): https://github.com/nodejs/node/pull/64882#pullrequestreview-4836771561
   ✘  semver-major requires at least 2 TSC approvals
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2026-08-01T14:25:21Z: https://ci.nodejs.org/job/node-test-pull-request/75367/
- Querying data for job/node-test-pull-request/75367/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/30766015471

@MikeMcC399

This comment was marked as resolved.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@MikeMcC399

Copy link
Copy Markdown
Contributor

@MikeMcC399

MikeMcC399 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

In nodejs/Release#1161 there is a statement from the npm team (@JamieMagee):

Testing

We'll hold npm 12 to the integrating-with-node guidelines: no new failures in Node's own test suite, no new failures installing or testing the citgm package set, and no backwards-incompatible changes to existing package-lock.json files.

As with npm 10, we'll run our node-integration workflow in GitHub Actions against every npm 12 prerelease so regressions show up early, and CI runs on every PR the npm team opens.

That sounds like it was supposed to be an acceptance test, so I ran it in my fork https://github.com/MikeMcC399/npm-cli against Node.js nightly

Comparing npm 11.19.0 with npm 12.0.2, there were 2 regressions:

  • JSONStream@1.3.5 which is deprecated since 2018
  • thread-sleep@2.2.0 marked as flaky

which both look like they can be ignored.

These are the test failures:

Test npm 11.19.0 npm 12.0.2
test npm fail fail
citgm - JSONStream@1.3.5 pass fail
citgm - binary-split@1.0.5 fail fail
citgm - leveldown@6.1.1 fail fail
citgm - microtime@3.1.1 fail fail
citgm - q@1.5.1 fail fail
citgm - thread-sleep@2.2.0 (flaky) pass fail

As a result of testing, I submitted 2 PRs to improve the test process:

npm/cli#9836 to update the actions used by node-integration workflow to supported versions (Edit: now landed) and
nodejs/citgm#1114 to drop the deprecated JSONStream from citgm

@ljharb

ljharb commented Aug 4, 2026

Copy link
Copy Markdown
Member

it is absolutely critical that npm forever continue to be able to install non-lowercased package names, both for legacy packages like JSONStream and for custom registries, so if that's revealing a real regression then it's a problem.

@MikeMcC399

MikeMcC399 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

it is absolutely critical that npm forever continue to be able to install non-lowercased package names, both for legacy packages like JSONStream and for custom registries, so if that's revealing a real regression then it's a problem.

I don't see any evidence that the mixed case of the package name is a problem. The package installs correctly from the npm@12.0.2 CLI. It only fails in citgm with:

warn: JSONStream npm-install:| npm error code EALLOWGIT
warn: JSONStream npm-install:| npm error Fetching packages of type "git" have been disabled

I didn't investigate that further, as JSONStream is unsupported since 2018.

One of npm@12's breaking changes is to disable git by default. allow-git defaults to none.

Edit: I did actually investigate further and the git dependency "fomatto": "git://github.com/BonsaiDen/Fomatto.git#468666f600b46f9067e3da7200fd9df428923ea6" comes from the assertions package, published 11 years ago with source repo archived on Mar 23, 2019. It's a transient of devDependencies of JSONStream.

Hopefully somebody from the citgm team can take a look at nodejs/citgm#1114 with a view to removing the obsolete JSONStream package from the list used by citgm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. needs-ci PRs that need a full CI run. npm Issues and PRs related to the npm client dependency or the npm registry. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.