Skip to content

fix(arborist): fix file dep making wrong link #8312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update test
  • Loading branch information
alexsch01 authored May 20, 2025
commit 992144d6357ac6a5a129812fb24298d9004e63bc
18 changes: 18 additions & 0 deletions workspaces/arborist/test/arborist/reify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3224,6 +3224,17 @@ t.test('root overrides with file: paths are visible to workspaces', async t => {
},
}),
},
nested: {
goodbye: {
'package.json': JSON.stringify({
name: 'second',
version: '1.0.0',
dependencies: {
print: '../print',
},
}),
},
},
print: {
'package.json': JSON.stringify({
name: 'print',
Expand All @@ -3237,6 +3248,7 @@ t.test('root overrides with file: paths are visible to workspaces', async t => {
await reify(path)

const printSymlink = fs.readlinkSync(resolve(path, 'node_modules/print'))
const secondSymlink = fs.readlinkSync(resolve(path, 'node_modules/second'))

// Create a platform-agnostic way to compare symlink targets
const normalizeLinkTarget = target => {
Expand All @@ -3254,6 +3266,12 @@ t.test('root overrides with file: paths are visible to workspaces', async t => {
'../print',
'print symlink points to ../print (normalized for platform)'
)

t.equal(
normalizeLinkTarget(secondSymlink),
'../second',
'print symlink points to ../second (normalized for platform)'
)
})

t.test('should preserve exact ranges, missing actual tree', async (t) => {
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy