Skip to content

docs: clarify versioned override parent behavior#9537

Open
ded-furby wants to merge 7 commits into
npm:latestfrom
ded-furby:docs/overrides-parent-key-clarity
Open

docs: clarify versioned override parent behavior#9537
ded-furby wants to merge 7 commits into
npm:latestfrom
ded-furby:docs/overrides-parent-key-clarity

Conversation

@ded-furby

Copy link
Copy Markdown
Contributor

Summary

Testing

  • docs-only change
  • attempted local validation, but the fresh clone does not have npm/cli dev dependencies bootstrapped (node ./scripts/resetdeps.js is required before broader checks can run)

@ded-furby ded-furby requested review from a team as code owners June 10, 2026 23:25
@owlstronaut

Copy link
Copy Markdown
Contributor

Nice clarification, and the core point checks out. I confirmed in the arborist code and with a real install that a versioned key like @npm/bar@2.0.0 really does pin the parent, not just gate the nested overrides. One thing to fix though: the $ reference needs the full scoped name, so ".": "$bar" actually errors with Unable to resolve reference $bar. It should be ".": "$@npm/bar". The same bug exists in the "@npm/foo": "$foo" example just below it, so it might be worth fixing both while you're here.

@owlstronaut owlstronaut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

see above

@ded-furby

Copy link
Copy Markdown
Contributor Author

Implemented the scoped override follow-up in docs: added explicit note that / are unscoped and do not match scoped packages, and kept the examples using full scoped refs (, ) in . Please re-review when convenient.

@ded-furby

Copy link
Copy Markdown
Contributor Author

Implemented the scoped override follow-up in docs: clarified that and are unscoped references and kept the examples using full scoped references (npm/foo, npm/bar) in package-json docs.

@ded-furby

Copy link
Copy Markdown
Contributor Author

Implemented the follow-up request on the override examples. The parent-key example now explicitly uses , and the direct dependency reference examples now show both unscoped-invalid and scoped-correct forms (/ vs /). Please feel free to re-review.

@ded-furby

Copy link
Copy Markdown
Contributor Author

Implemented the follow-up request on the $ override examples.
The parent-key example now explicitly uses "." : "$@npm/bar", and the direct dependency reference examples now include explicit bad scoped-unscoped pairs ("$foo" / "$bar" vs "$@npm/foo" / "$@npm/bar").
Please re-review when convenient.

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