Skip to content

Commit 63368a6

Browse files
authored
Uses workspace:^ everywhere (#3431)
* Uses workspace:^ everywhere * Versions * Updates the lockfile
1 parent 93c785e commit 63368a6

File tree

45 files changed

+448
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+448
-439
lines changed

.yarn/versions/2c2e3081.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
declined:
2+
- "@yarnpkg/esbuild-plugin-pnp"
3+
- "@yarnpkg/plugin-compat"
4+
- "@yarnpkg/plugin-constraints"
5+
- "@yarnpkg/plugin-dlx"
6+
- "@yarnpkg/plugin-essentials"
7+
- "@yarnpkg/plugin-exec"
8+
- "@yarnpkg/plugin-file"
9+
- "@yarnpkg/plugin-git"
10+
- "@yarnpkg/plugin-github"
11+
- "@yarnpkg/plugin-http"
12+
- "@yarnpkg/plugin-init"
13+
- "@yarnpkg/plugin-interactive-tools"
14+
- "@yarnpkg/plugin-link"
15+
- "@yarnpkg/plugin-nm"
16+
- "@yarnpkg/plugin-npm"
17+
- "@yarnpkg/plugin-npm-cli"
18+
- "@yarnpkg/plugin-pack"
19+
- "@yarnpkg/plugin-patch"
20+
- "@yarnpkg/plugin-pnp"
21+
- "@yarnpkg/plugin-pnpm"
22+
- "@yarnpkg/plugin-stage"
23+
- "@yarnpkg/plugin-typescript"
24+
- "@yarnpkg/plugin-version"
25+
- "@yarnpkg/plugin-workspace-tools"
26+
- vscode-zipfs
27+
- "@yarnpkg/builder"
28+
- "@yarnpkg/cli"
29+
- "@yarnpkg/core"
30+
- "@yarnpkg/doctor"
31+
- "@yarnpkg/fslib"
32+
- "@yarnpkg/json-proxy"
33+
- "@yarnpkg/nm"
34+
- "@yarnpkg/pnp"
35+
- "@yarnpkg/pnpify"
36+
- "@yarnpkg/sdks"
37+
- "@yarnpkg/shell"

constraints.pro

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,11 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
2222
).
2323

2424
% This rule will prevent workspaces from depending on non-workspace versions of available workspaces
25-
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, WorkspaceRange, DependencyType) :-
25+
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:^', DependencyType) :-
2626
% Iterates over all dependencies from all workspaces
2727
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType),
2828
% Only consider those that target something that could be a workspace
29-
workspace_ident(DependencyCwd, DependencyIdent),
30-
% Obtain the version from the dependency
31-
workspace_field(DependencyCwd, 'version', DependencyVersion),
32-
% Quirk: we must discard the workspaces that don't declare a version
33-
atom(DependencyVersion),
34-
% Only proceed if the dependency isn't satisfied by a workspace
35-
\+ project_workspaces_by_descriptor(DependencyIdent, DependencyRange, DependencyCwd),
36-
% Derive the expected range from the version
37-
(
38-
DependencyType = 'peerDependencies' ->
39-
atom_concat('^', DependencyVersion, WorkspaceRange)
40-
;
41-
DependencyType = 'devDependencies' ->
42-
WorkspaceRange = 'workspace:*'
43-
;
44-
atom_concat('workspace:^', DependencyVersion, WorkspaceRange)
45-
).
46-
47-
% This rule enforces that all workspaces must depend on other workspaces using `workspace:*` in devDependencies
48-
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:*', 'devDependencies') :-
49-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, _, 'devDependencies'),
50-
% Only consider those that target something that could be a workspace
51-
workspace_ident(DependencyCwd, DependencyIdent).
52-
53-
% This rule enforces that all workspaces must depend on other workspaces using `workspace:^` in peerDependencies
54-
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:^', 'peerDependencies') :-
55-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, _, 'peerDependencies'),
56-
% Only consider those that target something that could be a workspace
57-
workspace_ident(DependencyCwd, DependencyIdent).
29+
workspace_ident(DependencyCwd, DependencyIdent).
5830

5931
% This rule enforces that all packages must not depend on inquirer - we use enquirer instead
6032
gen_enforced_dependency(WorkspaceCwd, 'inquirer', null, DependencyType) :-

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
"@types/emscripten": "^1.38.0",
2424
"@types/jest": "^24.0.25",
2525
"@types/node": "^13.7.0",
26-
"@yarnpkg/cli": "workspace:*",
27-
"@yarnpkg/core": "workspace:*",
28-
"@yarnpkg/eslint-config": "workspace:*",
29-
"@yarnpkg/sdks": "workspace:*",
26+
"@yarnpkg/cli": "workspace:^",
27+
"@yarnpkg/core": "workspace:^",
28+
"@yarnpkg/eslint-config": "workspace:^",
29+
"@yarnpkg/sdks": "workspace:^",
3030
"babel-jest": "^26.0.1",
3131
"clipanion": "^3.0.1",
3232
"eslint": "^7.32.0",

packages/acceptance-tests/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"pkg-tests-specs"
88
],
99
"devDependencies": {
10-
"@yarnpkg/cli": "workspace:*",
11-
"@yarnpkg/core": "workspace:*",
12-
"@yarnpkg/fslib": "workspace:*",
13-
"@yarnpkg/monorepo": "workspace:*",
10+
"@yarnpkg/cli": "workspace:^",
11+
"@yarnpkg/core": "workspace:^",
12+
"@yarnpkg/fslib": "workspace:^",
13+
"@yarnpkg/monorepo": "workspace:^",
1414
"is-wsl": "^2.1.1",
15-
"pkg-tests-core": "workspace:*"
15+
"pkg-tests-core": "workspace:^"
1616
},
1717
"scripts": {
1818
"test:integration": "run test:unit --config \"$(pwd)/jest.config.js\""

packages/acceptance-tests/pkg-tests-core/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
"@types/semver": "^7.1.0",
1313
"@types/serve-static": "1.13.3",
1414
"@types/tar-fs": "^1.16.1",
15-
"@yarnpkg/cli": "workspace:*",
16-
"@yarnpkg/core": "workspace:*",
17-
"@yarnpkg/fslib": "workspace:*",
18-
"@yarnpkg/parsers": "workspace:*",
15+
"@yarnpkg/cli": "workspace:^",
16+
"@yarnpkg/core": "workspace:^",
17+
"@yarnpkg/fslib": "workspace:^",
18+
"@yarnpkg/parsers": "workspace:^",
1919
"finalhandler": "^1.1.2",
2020
"invariant": "^2.2.4",
2121
"klaw": "^2.1.1",
2222
"minimatch": "^3.0.4",
2323
"pem": "^1.14.4",
24-
"pkg-tests-fixtures": "workspace:*",
24+
"pkg-tests-fixtures": "workspace:^",
2525
"semver": "^7.1.2",
2626
"serve-static": "^1.14.1",
2727
"super-resolve": "^1.0.0",

packages/acceptance-tests/pkg-tests-fixtures/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"license": "BSD-2-Clause",
55
"devDependencies": {
6-
"@yarnpkg/fslib": "workspace:*"
6+
"@yarnpkg/fslib": "workspace:^"
77
},
88
"scripts": {
99
"copy-index": "find packages -type d -mindepth 1 -maxdepth 1 | while read pkg; do cp default-index.js \"$pkg/index.js\"; done"

packages/acceptance-tests/pkg-tests-specs/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
"devDependencies": {
1212
"@types/lodash": "^4.14.136",
1313
"@types/tar": "^4.0.4",
14-
"@yarnpkg/cli": "workspace:*",
15-
"@yarnpkg/core": "workspace:*",
16-
"@yarnpkg/fslib": "workspace:*",
17-
"@yarnpkg/monorepo": "workspace:*",
18-
"@yarnpkg/parsers": "workspace:*",
14+
"@yarnpkg/cli": "workspace:^",
15+
"@yarnpkg/core": "workspace:^",
16+
"@yarnpkg/fslib": "workspace:^",
17+
"@yarnpkg/monorepo": "workspace:^",
18+
"@yarnpkg/parsers": "workspace:^",
1919
"fs-extra": "^7.0.1",
2020
"lodash": "^4.17.15",
21-
"pkg-tests-core": "workspace:*",
21+
"pkg-tests-core": "workspace:^",
2222
"semver": "^7.1.2",
2323
"tar": "^6.0.5"
2424
},

packages/esbuild-plugin-pnp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"esbuild": ">=0.8.36"
1111
},
1212
"devDependencies": {
13-
"@yarnpkg/pnp": "workspace:*",
13+
"@yarnpkg/pnp": "workspace:^",
1414
"esbuild": "npm:esbuild-wasm@^0.11.20"
1515
},
1616
"scripts": {

packages/gatsby/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/qs": "^6.9.7",
2121
"@types/react": "^16.8.0",
2222
"@types/react-helmet": "^6.1.0",
23-
"@yarnpkg/monorepo": "workspace:0.0.0",
23+
"@yarnpkg/monorepo": "workspace:^",
2424
"algoliasearch": "^4.2.0",
2525
"ansi-html": "^0.0.7",
2626
"buffer": "^5.6.0",

packages/plugin-compat/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"devDependencies": {
1111
"@types/lodash-es": "4.17.4",
1212
"@types/resolve": "^1.17.1",
13-
"@yarnpkg/cli": "workspace:*",
14-
"@yarnpkg/core": "workspace:*",
15-
"@yarnpkg/fslib": "workspace:*",
16-
"@yarnpkg/monorepo": "workspace:*",
17-
"@yarnpkg/plugin-npm": "workspace:*",
18-
"@yarnpkg/plugin-patch": "workspace:*",
13+
"@yarnpkg/cli": "workspace:^",
14+
"@yarnpkg/core": "workspace:^",
15+
"@yarnpkg/fslib": "workspace:^",
16+
"@yarnpkg/monorepo": "workspace:^",
17+
"@yarnpkg/plugin-npm": "workspace:^",
18+
"@yarnpkg/plugin-patch": "workspace:^",
1919
"resolve": "^1.17.0",
2020
"semver": "^7.1.2"
2121
},

0 commit comments

Comments
 (0)