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 reify.js
  • Loading branch information
alexsch01 authored May 20, 2025
commit 4ebdc51a4b0574fac90a3a9f2a385d2f97e660ee
16 changes: 8 additions & 8 deletions workspaces/arborist/test/arborist/reify.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ t.test('malformed package.json should not be overwitten', async t => {
})

t.test('packageLockOnly does not work on globals', t => {
const path = t.testdir({ 'package.json': '{}' })
const path = t.testdir({ '': '{}' })
createRegistry(t, false)
return t.rejects(() => reify(path, { global: true, packageLockOnly: true }))
})
Expand Down Expand Up @@ -455,7 +455,7 @@ t.test('do not update shrinkwrapped deps', async t => {
})

t.test('tracks changes of shrinkwrapped dep correctly', async t => {
const path = t.testdir({ 'package.json': '{}' })
const path = t.testdir({ '': '{}' })
createRegistry(t, true)

const install1 = await printReified(path, { add: ['@nlf/shrinkwrapped-dep-updates-a@1.0.0'] })
Expand Down Expand Up @@ -556,7 +556,7 @@ t.test('reifying with shronk warp dep', t => {
})
t.matchSnapshot(tree)
const dep = `${path}/node_modules/@isaacs/shrinkwrapped-dependency`
t.equal(fs.statSync(`${dep}/package.json`).isFile(), true, 'has package.json')
t.equal(fs.statSync(`${dep}/`).isFile(), true, 'has ')
})
}
})
Expand Down Expand Up @@ -1038,9 +1038,9 @@ t.test('saving the ideal tree', t => {
const npa = require('npm-package-arg')
const kResolvedAdd = Symbol.for('resolvedAdd')
const path = t.testdir({
'package.json': JSON.stringify(pkg),
'': JSON.stringify(pkg),
e: {
'package.json': JSON.stringify({ name: 'e' }),
'': JSON.stringify({ name: 'e' }),
},
node_modules: {
e: t.fixture('symlink', '../e'),
Expand Down Expand Up @@ -1150,7 +1150,7 @@ t.test('saving the ideal tree', t => {
}).then(saved => {
t.ok(saved, 'true, because it was saved')
t.matchSnapshot(require(path + '/package-lock.json'), 'lock after save')
t.strictSame(require(path + '/package.json'), {
t.strictSame(require(path + '/'), {
bundleDependencies: ['a', 'b', 'c'],
dependencies: {
a: 'github:foo/bar#baz',
Expand Down Expand Up @@ -1220,7 +1220,7 @@ t.test('scoped registries', async t => {

t.test('bin links adding and removing', t => {
const path = t.testdir({
'package.json': JSON.stringify({}),
'': JSON.stringify({}),
})
const rbin = resolve(path, 'node_modules/.bin/rimraf')
return reify(path, { add: ['rimraf@2.7.1'] })
Expand Down Expand Up @@ -3209,7 +3209,7 @@ t.test('root overrides with file: paths are visible to workspaces', async t => {
const path = t.testdir({
'package.json': JSON.stringify({
name: 'root',
workspaces: ['hello'],
workspaces: ['hello', 'nested/goodbye'],
dependencies: {},
overrides: {
print: 'file:./print',
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