feat!: link-workspace-packages is false by default (#7485)

This commit is contained in:
Zoltan Kochan
2024-01-04 10:07:46 +01:00
parent cdd83654dd
commit e7481629fe
6 changed files with 13 additions and 7 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/config": major
"pnpm": major
---
The default value of the `link-workspace-packages` setting changed from `true` to `false`. This means that by default, dependencies will be linked from workspace packages only when they are specified using the [workspace protocol](https://pnpm.io/workspaces#workspace-protocol-workspace).

View File

@@ -233,7 +233,7 @@ export async function getConfig (
'hoist-workspace-packages': false,
'ignore-workspace-cycles': false,
'ignore-workspace-root-check': false,
'link-workspace-packages': true,
'link-workspace-packages': false,
'lockfile-include-tarball-url': false,
'modules-cache-max-age': 7 * 24 * 60, // 7 days
'node-linker': 'isolated',

View File

@@ -277,7 +277,7 @@ test('pnpm recursive exec --no-sort', async () => {
version: '1.0.0',
dependencies: {
'b-dependency': '1.0.0',
'b-dependency': 'workspace:*',
},
scripts: {
build: server.sendLineScript('a-dependent'),

View File

@@ -16,7 +16,7 @@ test.each([
{
name: 'project-1',
version: '1.0.0',
dependencies: { 'project-2': '1.0.0', 'project-3': '1.0.0' },
dependencies: { 'project-2': 'workspace:*', 'project-3': 'workspace:*' },
scripts: {
test: server.sendLineScript('project-1'),
},
@@ -32,7 +32,7 @@ test.each([
{
name: 'project-3',
version: '1.0.0',
dependencies: { 'project-2': '1.0.0' },
dependencies: { 'project-2': 'workspace:*' },
scripts: {
test: server.sendLineScript('project-3'),
},
@@ -41,7 +41,7 @@ test.each([
name: 'project-4',
version: '1.0.0',
dependencies: {},
devDependencies: { 'project-3': '1.0.0' },
devDependencies: { 'project-3': 'workspace:*' },
scripts: {
test: server.sendLineScript('project-4'),
},

View File

@@ -1306,7 +1306,7 @@ test("linking the package's bin to another workspace package in a monorepo", asy
version: '2.0.0',
dependencies: {
hello: '1.0.0',
hello: 'workspace:*',
},
},
], { manifestFormat: 'YAML' })

View File

@@ -288,7 +288,7 @@ test('recursive command with filter from config', async () => {
dependencies: {
'is-positive': '1.0.0',
'project-2': '1.0.0',
'project-2': 'workspace:*',
},
},
{