Conversation
Use the same bin path derivation for regular and linked installs so both consume the defensive normalization from npm/bin-links#187. Add traversal and optional-cleanup regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Route linked-install bin cleanup paths through
bin-links#getPaths()instead of manually joining lockfile-provided bin keys. RegularNode.binPathsalready uses this API, so both strategies can share the defensive bin normalization introduced by npm/bin-links#187.This is the Arborist integration for CLI-CROW-GEN-002. It does not introduce an Arborist-owned normalizer or modify the bundled dependency.
Changes
bin-links#getPaths()using the dependency's consumer-facing installation path, not its store path.Node.binPathsregression coverage for traversal-bearing, absolute, Windows-style and invalid bin metadata, including preservation of the caller's metadata.Dependency and draft status
This change depends on npm CLI bundling a released
bin-linksartifact containing npm/bin-links#187. The currently bundledbin-links@7.0.0lacks that normalization, so this patch alone is not a complete fix and the new regressions are not expected to pass against the old dependency.Keep this PR in draft until the patched dependency is integrated and the targeted tests and lint are run. A corresponding
release/v11backport is also needed.Validation
git diff --checkpassed.tap,eslintand@npmcli/mock-registryare missing. No dependencies were installed and no snapshots were refreshed.