Repository navigation
Drop sprintf-js from the dev dependency tree - #127
Merged
Merged
Conversation
- Override argparse to ^2.0.1 under js-yaml@3, which reaches us via ts-jest -> babel-plugin-istanbul -> @istanbuljs/load-nyc-config - js-yaml 3 only uses argparse in its CLI binary, not the library; argparse 2 has no sprintf-js and keeps camelCase shims, so that binary still runs (with deprecation warnings) - Clears the sprintf-js unbounded precision DoS advisory, which has no patched release - Lockfile also picks up the engines field (>=20.0.0) that package.json already declared
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Dependabot alert #70 (
sprintf-js<= 1.1.3, denial of service through unbounded precision specifiers). Dev-only: it never shipped in the package.Why an override, not a bump
Every published
sprintf-jsversion is affected, so there is nothing to upgrade to. It came in through Jest's coverage tooling:ts-jest → @jest/transform → babel-plugin-istanbul@6 → @istanbuljs/load-nyc-config → js-yaml@3 → argparse@1 → sprintf-jsjs-yaml@3only usesargparsein its command-line binary (bin/js-yaml.js), never in the library that loads the nyc config. A scoped override points that one dependency atargparse@2, which has nosprintf-js:Jest and ts-jest stay on 29. No runtime dependency changes. The lockfile also picks up
engines: >=20.0.0, whichpackage.jsonalready says.Verified
npm ls sprintf-jsis empty;npm ls argparseshows only 2.0.1.npm audit: 41 findings to 36, no moderates left.npm test: 83 suites, 1506 tests pass, also with--coverage(the path this touches).tsc --noEmitand lint are clean.npm pack --dry-run: the same 145 files as main.Not in this PR
npm auditstill listshandlebars(critical) andbraces(high), both dev-only through Jest 29. Clearing them means moving to Jest 30.