Repository navigation
fix(deps)!: update tar to 8 and pacote/arborist to the npm 11 stack - #6243
edusperoni wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
tar 7 is affected by a set of extraction advisories (symlink escapes, PAX header injection, memory amplification) that are fixed only in 8.x. pacote 21 and @npmcli/arborist 9 pull in sigstore, tuf-js, npm-packlist and ignore-walk releases affected by the minimatch DoS; pacote 22 and arborist 10 clear those. tar 8 replaces the stream API with promises, so extractPackage passes the tarball as the `input` option of tar.x() and awaits it. The extractPackage tests now extract a real tarball instead of a stubbed stream, and run instead of being skipped. All three packages require Node ^22.22.2 || ^24.15.0 || >=26.0.0, so the engines range, the test matrix and the release workflow move with them. The doctor package keeps its own Node 20 leg. BREAKING CHANGE: Node.js 20 is no longer supported. The CLI requires Node ^22.22.2 || ^24.15.0 || >=26.0.0.
9e409ac to
25492be
Compare
PR Checklist
I have read the CLA and I hereby sign the CLA).What is the current behavior?
Stacked on #6242. After that PR, a fresh install of the published manifest still reports 13 advisories:
tar7.5.22 (high). About 20 extraction advisories: symlink escapes, PAX header injection, path-reservation memory amplification and others. Almost all are fixed only in 8.x. The CLI extracts every template and platform package withtar.x()inPacoteService.extractPackage.pacote21 and@npmcli/arborist9 (moderate). They pull insigstore,tuf-js,@tufjs/models,npm-packlist,ignore-walkand@npmcli/metavuln-calculatorreleases that sit on the vulnerableminimatch10.What is the new behavior?
tar7.5.22 → 8.1.2,pacote21.5.1 → 22.0.2,@npmcli/arborist9.1.8 → 10.0.5. The lockfile changes stay inside npm's own package stack, and no dev dependencies change.extractPackagenow passes the tarball as theinputoption oftar.x()and awaits it, instead of piping into a writable stream. The previous version also kept going after a failedpacote.tarball(), which now just throws.extractPackagetests weredescribe.skip. They now run and extract a real tarball: the strip ofpackage/, thefilteroption, a fetch error and a corrupt archive.engines.nodebecomes^22.22.2 || ^24.15.0 || >=26.0.0, which matches whatpacote22 and@npmcli/arborist10 declare. The CLI test matrix drops 20.x. The CLI release workflow moves from Node 22.14.0, which is outside the range, to 22.23.5. The doctor package's jobs are unchanged and keep their Node 20 leg.Audit: a fresh consumer install goes from 13 to 3 (2 moderate, 1 high). All three come from npm's own packages and can only be fixed upstream:
tar7.5.24 (high), viapacote22 (^7.4.3) andnode-gyp13 (^7.5.4). The CLI's own extraction uses tar 8.minimatch10.2.6, via@npmcli/arborist10 and its workspace and package-json helpers (^10.0.3). This is also why@npmcli/arboristitself is flagged.Verification:
npm testpasses (141 files, 2450 passed, 0 skipped), and so doestsc -p tsconfig.release.json. I also ranns createend to end with the built CLI and@nativescript/template-blank-ts, which fetches and extracts throughpacote22 andtar8.Notes for review
IPacoteExtractOptions.filterinlib/definitions/pacote-service.d.tsnow receives atar.ReadEntryinstead oftar.FileStat, which tar 8 no longer exports. No caller in the CLI passes a filter.BREAKING CHANGES:
The CLI no longer supports Node.js 20, which reached end of life in April 2026. The supported range also excludes 22.x before 22.22.2, 24.x before 24.15.0, and the odd releases 23 and 25. On an unsupported version the CLI prints the "Support for Node.js … is not verified" warning, but it still runs. The hard floor in
verify-node-version.tsis unchanged.Migration steps:
Upgrade to Node.js 22.22.2 or later on 22.x, 24.15.0 or later on 24.x, or Node.js 26 and later.
Summary by CodeRabbit
packagedirectory and supports filtering entries with their full archive entry details.