Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions test/lib/commands/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ t.test('completion', async t => {
})
})

<<<<<<< HEAD
t.test('should install in workspace with unhoisted module', async t => {
const { npm, registry, assert } = await loadMockNpm(t, {
prefixDir: workspaceMock(t, {
Expand Down
11 changes: 11 additions & 0 deletions workspaces/arborist/lib/shrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,18 @@ class Shrinkwrap {
if (node === this.tree || node.isRoot || node.location === '') {
continue
}

const loc = relpath(this.path, node.path)

// extraneous ws node should not commit
if (node.extraneous && root.workspaces && root.workspaces.length) {
const wsIndex = root.workspaces.findIndex(ws => ws === loc)
if (wsIndex > -1) {
root.workspaces.splice(wsIndex, 1)
continue
}
}

this.data.packages[loc] = Shrinkwrap.metaFromNode(
node,
this.path,
Expand Down
Loading