Skip to content

fix(tree-walker): LocalDependencyTreeLoader fails resolving symlink l…#746

Open
ErwanRaulo wants to merge 1 commit into
masterfrom
fix/treewalker-tests
Open

fix(tree-walker): LocalDependencyTreeLoader fails resolving symlink l…#746
ErwanRaulo wants to merge 1 commit into
masterfrom
fix/treewalker-tests

Conversation

@ErwanRaulo

@ErwanRaulo ErwanRaulo commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

bug

LocalDependencyTreeLoader.load() was failing on macOS by returning an empty dependency tree.

cause:

On macOS, os.tmpdir() returns /var/folders/..., which is a symlink to /private/var/folders/...

consequence:

two root nodes in the Arborist inventory, the incorrect one of which was referenced by arb.actualTree.

why this fix?

The only place where realpath should be used is in LocalDependencyTreeLoader, which communicates with Arborist. it is responsible for ensuring path consistency.

@ErwanRaulo
ErwanRaulo requested a review from a team as a code owner July 21, 2026 21:10
@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3d98954

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nodesecure/tree-walker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ErwanRaulo
ErwanRaulo force-pushed the fix/treewalker-tests branch from c371b70 to 3d98954 Compare July 21, 2026 21:14
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.

3 participants