mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-24 07:38:12 -05:00
6
.changeset/wise-starfishes-cover.md
Normal file
6
.changeset/wise-starfishes-cover.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/config": minor
|
||||
"pnpm": minor
|
||||
---
|
||||
|
||||
A new settig has been added called `dedupe-direct-deps`, which is disabled by default. When set to `true`, dependencies that are already symlinked to the root `node_modules` directory of the workspace will not be symlinked to subproject `node_modules` directories. This feature was enabled by default in v8.0.0 but caused issues, so it's best to disable it by default [#6299](https://github.com/pnpm/pnpm/issues/6299).
|
||||
@@ -41,6 +41,7 @@ export const types = Object.assign({
|
||||
'config-dir': String,
|
||||
'deploy-all-files': Boolean,
|
||||
'dedupe-peer-dependents': Boolean,
|
||||
'dedupe-direct-deps': Boolean,
|
||||
dev: [null, true],
|
||||
dir: String,
|
||||
'enable-modules-dir': Boolean,
|
||||
@@ -187,6 +188,7 @@ export async function getConfig (
|
||||
color: 'auto',
|
||||
'deploy-all-files': false,
|
||||
'dedupe-peer-dependents': true,
|
||||
'dedupe-direct-deps': false,
|
||||
'enable-modules-dir': true,
|
||||
'extend-node-path': true,
|
||||
'fetch-retries': 2,
|
||||
|
||||
@@ -62,6 +62,41 @@ test('shamefully-hoist: applied to all the workspace projects when set to true i
|
||||
|
||||
await execPnpm(['install'])
|
||||
|
||||
await projects.root.has('@pnpm.e2e/dep-of-pkg-with-1-dep')
|
||||
await projects.root.has('@pnpm.e2e/foo')
|
||||
await projects.root.has('@pnpm.e2e/foobar')
|
||||
await projects.project.hasNot('@pnpm.e2e/foo')
|
||||
await projects.project.has('@pnpm.e2e/foobar')
|
||||
})
|
||||
|
||||
test('shamefully-hoist: applied to all the workspace projects when set to true in the root .npmrc file (with dedupe-direct-deps=true)', async () => {
|
||||
const projects = preparePackages([
|
||||
{
|
||||
location: '.',
|
||||
package: {
|
||||
name: 'root',
|
||||
|
||||
dependencies: {
|
||||
'@pnpm.e2e/pkg-with-1-dep': '100.0.0',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'project',
|
||||
version: '1.0.0',
|
||||
|
||||
dependencies: {
|
||||
'@pnpm.e2e/foobar': '100.0.0',
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
await writeYamlFile('pnpm-workspace.yaml', { packages: ['**', '!store/**'] })
|
||||
await fs.writeFile('.npmrc', `shamefully-hoist=true
|
||||
dedupe-direct-deps=true`, 'utf8')
|
||||
|
||||
await execPnpm(['install'])
|
||||
|
||||
await projects.root.has('@pnpm.e2e/dep-of-pkg-with-1-dep')
|
||||
await projects.root.has('@pnpm.e2e/foo')
|
||||
await projects.root.has('@pnpm.e2e/foobar')
|
||||
|
||||
Reference in New Issue
Block a user