Skip to content

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

Merged
ErwanRaulo merged 2 commits into
masterfrom
fix/treewalker-tests
Jul 23, 2026
Merged

fix(tree-walker): LocalDependencyTreeLoader fails resolving symlink l…#746
ErwanRaulo merged 2 commits into
masterfrom
fix/treewalker-tests

Conversation

@ErwanRaulo

@ErwanRauloErwanRaulo 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 ownerJuly 21, 2026 21:10
@changeset-bot

changeset-botBot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e07ba86

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

This PR includes changesets to release 1 package
NameType
@nodesecure/tree-walkerPatch

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
ErwanRauloforce-pushed the fix/treewalker-tests branch from c371b70 to 3d98954CompareJuly 21, 2026 21:14
@fraxken

Copy link
Copy Markdown
Member

CI doesn't look happy ^^

@ErwanRaulo
ErwanRauloforce-pushed the fix/treewalker-tests branch from 3d98954 to 52b28c7CompareJuly 22, 2026 18:34
should be more reliable by not testing files coming from npm registry
@ErwanRaulo
ErwanRaulo merged commit f5b8df2 into masterJul 23, 2026
8 checks passed
@ErwanRaulo
ErwanRaulo deleted the fix/treewalker-tests branch July 23, 2026 12:30
@github-actionsgithub-actionsBot mentioned this pull request Jul 23, 2026
Sign up for freeto 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

@ErwanRaulo@fraxken@clemgbld