Skip to content

Commit

Permalink
fixed #2734
Browse files Browse the repository at this point in the history
  • Loading branch information
bestander committed Jun 21, 2017
1 parent 73a758e commit b8282f0
Show file tree
Hide file tree
Showing 71 changed files with 2,355 additions and 0 deletions.
19 changes: 19 additions & 0 deletions __tests__/commands/install/integration-deduping.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,22 @@ test.concurrent('install should not hardlink repeated dependencies if linkDuplic
expect(b_a.ino).not.toEqual(c_a.ino);
});
});

test.concurrent('install should not copy node_modules when hardlinking', (): Promise<void> => {
// https://github.com/yarnpkg/yarn/issues/2734
return runInstall({linkDuplicates: true}, 'hardlink-collision', async config => {
const b_a = await fs.stat(
path.join(
config.cwd,
'node_modules/webpack-stream/node_modules/enhanced-resolve/node_modules/memory-fs/package.json',
),
);
const c_a = await fs.stat(
path.join(
config.cwd,
'node_modules/webpack-dev-middleware/node_modules/enhanced-resolve/node_modules/memory-fs/package.json',
),
);
expect(b_a.ino).toEqual(c_a.ino);
});
});
7 changes: 7 additions & 0 deletions __tests__/fixtures/install/hardlink-collision/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"dependencies": {
"webpack": "^3.0.0",
"webpack-dev-middleware": "^1.10.2",
"webpack-stream": "^3.2.0"
}
}
Loading

0 comments on commit b8282f0

Please sign in to comment.