Skip to content

fix(scripts): skip overrides that are already direct bitgo deps#9255

Merged
danielpeng1 merged 1 commit into
masterfrom
mihirseth/wcn-604-bitgo-shrinkwrap
Jul 14, 2026
Merged

fix(scripts): skip overrides that are already direct bitgo deps#9255
danielpeng1 merged 1 commit into
masterfrom
mihirseth/wcn-604-bitgo-shrinkwrap

Conversation

@mihir-bitgo

Copy link
Copy Markdown
Contributor

Summary

  • When generating `npm-shrinkwrap.json`, flat overrides for packages already in bitgo's direct `dependencies` are redundant — filter them out
  • Nested (scoped) overrides are always kept since their top-level key is a parent context, not the pinned package
  • With the current overrides block this drops `lodash` and `bignumber.js` from the shrinkwrap's overrides

Test plan

  • Verify `BITGO_GENERATE_SHRINKWRAP=true npx ts-node scripts/generate-bitgo-shrinkwrap.ts` logs the skipped count
  • Confirm generated `npm-shrinkwrap.json` omits `lodash`/`bignumber.js` from its overrides block

TICKET: WCN-604

🤖 Generated with Claude Code

When generating npm-shrinkwrap.json, flat overrides for packages that
bitgo already declares as direct dependencies are redundant — npm pins
those versions directly and the override adds no value. Filter them out
so the shrinkwrap's overrides block only covers transitive-only pins.

Nested overrides (scoped to a parent package) are always kept since
their top-level key is a context scope, not the pinned package itself.

TICKET: WCN-604
@mihir-bitgo
mihir-bitgo requested a review from a team July 14, 2026 18:18
@mihir-bitgo
mihir-bitgo requested review from a team as code owners July 14, 2026 18:18
@linear-code

linear-code Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

WCN-604

@danielpeng1
danielpeng1 merged commit faef8c3 into master Jul 14, 2026
22 checks passed
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.

2 participants