Skip to content

chore(package): override load-nyc-config to js-yaml 4 - #204

Merged
luojiyin1987 merged 1 commit into
masterfrom
chore/js-yaml-4-override
Oct 19, 2026
Merged

luojiyin1987 merged 1 commit into
masterfrom
chore/js-yaml-4-override

Conversation

@luojiyin1987

Copy link
Copy Markdown
Contributor

What changed

  • Replace the global js-yaml override with a targeted override for @istanbuljs/load-nyc-config.
  • Resolve js-yaml@4.3.2 and argparse@2.0.1.
  • Remove sprintf-js from the dependency tree.

Before:

@istanbuljs/load-nyc-config@1.1.0
└─ js-yaml@3.15.2
   └─ argparse@1.0.10
      └─ sprintf-js@1.0.3

After:

@istanbuljs/load-nyc-config@1.1.0
└─ js-yaml@4.3.2
   └─ argparse@2.0.1

Why

npm audit reported 20 moderate vulnerabilities.
All 20 came from sprintf-js@1.0.3 (GHSA-hp3w-g68c-fv3c).
sprintf-js has no fixed release: the advisory covers <=1.1.3, and 1.1.3 is the latest version.

js-yaml@4 depends on argparse@2, which does not use sprintf-js.
@istanbuljs/load-nyc-config only calls js-yaml.load() for .yml and .yaml files.
load() exists in v4.

This chain is dev-only.
npm audit --omit=dev was already 0, and the published package does not include it.

Verification

  • npm audit reports 0 vulnerabilities.
  • npm audit --omit=dev reports 0 vulnerabilities.
  • npm ls sprintf-js is empty.
  • npm test passes: 27 suites and 238 tests.
  • npm run lint passes.
  • npm run test:package passes.
  • js-yaml CLI runs without deprecation warnings.

Closes #203.

@luojiyin1987
luojiyin1987 merged commit f5af268 into master Oct 19, 2026
7 checks passed
@luojiyin1987
luojiyin1987 deleted the chore/js-yaml-4-override branch October 19, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(deps): remove sprintf-js vulnerability from the Jest dev chain

1 participant