Skip to content

Commit 818b36b

Browse files
authored
chore: fix inconsistent workspace prefixes (#13217)
1 parent 29562ef commit 818b36b

File tree

20 files changed

+96
-98
lines changed

20 files changed

+96
-98
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Chore & Maintenance
1212

13+
- `[*]` Fix inconsistent workspace prefixes ([#13217](https://github.com/facebook/jest/pull/13217))
14+
1315
### Performance
1416

1517
## 29.0.2

constraints.pro

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
1717
% Ignore peer dependencies
1818
DependencyType \= 'peerDependencies',
1919
DependencyType2 \= 'peerDependencies',
20-
% Ignore workspace:*: we use both `workspace:*` and real version such as `^28.0.0-alpha.8` to reference package in monorepo
21-
% TODO: in the future we should make it consistent and remove this ignore
22-
DependencyRange \= 'workspace:*',
23-
DependencyRange2 \= 'workspace:*',
2420
% A list of exception to same version rule
2521
\+ member(DependencyIdent, [
2622
% Allow enzyme example workspace use a older version react and react-dom, because enzyme don't support react 17

examples/angular/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"@babel/preset-env": "^7.1.0",
2525
"@babel/preset-typescript": "^7.0.0",
2626
"@types/jest": "^27.4.0",
27-
"babel-jest": "workspace:*",
27+
"babel-jest": "workspace:^",
2828
"babel-plugin-transform-typescript-metadata": "*",
29-
"jest": "workspace:*",
29+
"jest": "workspace:^",
3030
"jest-zone-patch": "*"
3131
}
3232
}

examples/async/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"devDependencies": {
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
8-
"babel-jest": "workspace:*",
9-
"jest": "workspace:*"
8+
"babel-jest": "workspace:^",
9+
"jest": "workspace:^"
1010
},
1111
"scripts": {
1212
"test": "jest"

examples/automatic-mocks/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"devDependencies": {
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
8-
"babel-jest": "workspace:*",
9-
"jest": "workspace:*"
8+
"babel-jest": "workspace:^",
9+
"jest": "workspace:^"
1010
},
1111
"scripts": {
1212
"test": "jest"

examples/enzyme/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"@babel/core": "^7.11.6",
1111
"@babel/preset-env": "^7.1.0",
1212
"@babel/preset-react": "^7.12.1",
13-
"babel-jest": "workspace:*",
13+
"babel-jest": "workspace:^",
1414
"enzyme": "*",
1515
"enzyme-adapter-react-16": "*",
16-
"jest": "workspace:*"
16+
"jest": "workspace:^"
1717
},
1818
"scripts": {
1919
"test": "jest"

examples/expect-extend/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
88
"@babel/preset-typescript": "^7.0.0",
9-
"@jest/globals": "workspace:*",
10-
"babel-jest": "workspace:*",
11-
"expect": "workspace:*",
12-
"jest": "workspace:*",
9+
"@jest/globals": "workspace:^",
10+
"babel-jest": "workspace:^",
11+
"expect": "workspace:^",
12+
"jest": "workspace:^",
1313
"typescript": "^4.8.2"
1414
},
1515
"scripts": {

examples/getting-started/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"devDependencies": {
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
8-
"babel-jest": "workspace:*",
9-
"jest": "workspace:*"
8+
"babel-jest": "workspace:^",
9+
"jest": "workspace:^"
1010
},
1111
"scripts": {
1212
"test": "jest"

examples/jquery/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"devDependencies": {
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
8-
"babel-jest": "workspace:*",
9-
"jest": "workspace:*"
8+
"babel-jest": "workspace:^",
9+
"jest": "workspace:^"
1010
},
1111
"dependencies": {
1212
"jquery": "^3.2.1"

examples/manual-mocks/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"devDependencies": {
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
8-
"babel-jest": "workspace:*",
9-
"jest": "workspace:*"
8+
"babel-jest": "workspace:^",
9+
"jest": "workspace:^"
1010
},
1111
"scripts": {
1212
"test": "jest"

examples/module-mock/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"devDependencies": {
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
8-
"babel-jest": "workspace:*",
9-
"jest": "workspace:*"
8+
"babel-jest": "workspace:^",
9+
"jest": "workspace:^"
1010
},
1111
"scripts": {
1212
"test": "jest"

examples/mongodb/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"main": "./index.js",
55
"private": true,
66
"dependencies": {
7-
"jest-environment-node": "workspace:*",
7+
"jest-environment-node": "workspace:^",
88
"mongodb": "^4.3.1",
99
"mongodb-memory-server": "^8.3.0"
1010
},
1111
"devDependencies": {
1212
"@babel/core": "^7.11.6",
1313
"@babel/preset-env": "^7.1.0",
14-
"babel-jest": "workspace:*",
15-
"jest": "workspace:*"
14+
"babel-jest": "workspace:^",
15+
"jest": "workspace:^"
1616
},
1717
"scripts": {
1818
"test": "jest"

examples/react-native/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"devDependencies": {
1414
"@babel/core": "^7.11.6",
1515
"@babel/preset-env": "^7.1.0",
16-
"babel-jest": "workspace:*",
17-
"jest": "workspace:*",
16+
"babel-jest": "workspace:^",
17+
"jest": "workspace:^",
1818
"metro-react-native-babel-preset": "0.70.3",
1919
"react-test-renderer": "18.0.0"
2020
}

examples/react-testing-library/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"@babel/preset-env": "^7.1.0",
1212
"@babel/preset-react": "^7.12.1",
1313
"@testing-library/react": "^12.1.5",
14-
"babel-jest": "workspace:*",
15-
"jest": "workspace:*"
14+
"babel-jest": "workspace:^",
15+
"jest": "workspace:^"
1616
},
1717
"scripts": {
1818
"test": "jest"

examples/react/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"@babel/core": "^7.11.6",
1111
"@babel/preset-env": "^7.1.0",
1212
"@babel/preset-react": "^7.12.1",
13-
"babel-jest": "workspace:*",
14-
"jest": "workspace:*"
13+
"babel-jest": "workspace:^",
14+
"jest": "workspace:^"
1515
},
1616
"scripts": {
1717
"test": "jest"

examples/snapshot/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"@babel/core": "^7.11.6",
1010
"@babel/preset-env": "^7.1.0",
1111
"@babel/preset-react": "^7.12.1",
12-
"babel-jest": "workspace:*",
13-
"jest": "workspace:*",
12+
"babel-jest": "workspace:^",
13+
"jest": "workspace:^",
1414
"react-test-renderer": "17.0.2"
1515
},
1616
"scripts": {

examples/timer/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"devDependencies": {
66
"@babel/core": "^7.11.6",
77
"@babel/preset-env": "^7.1.0",
8-
"babel-jest": "workspace:*",
9-
"jest": "workspace:*"
8+
"babel-jest": "workspace:^",
9+
"jest": "workspace:^"
1010
},
1111
"scripts": {
1212
"test": "jest"

examples/typescript/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"@babel/preset-react": "^7.12.1",
1414
"@babel/preset-typescript": "^7.0.0",
1515
"@types/jest": "^27.4.0",
16-
"babel-jest": "workspace:*",
17-
"jest": "workspace:*"
16+
"babel-jest": "workspace:^",
17+
"jest": "workspace:^"
1818
},
1919
"scripts": {
2020
"test": "jest"

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"@babel/preset-typescript": "^7.0.0",
1111
"@babel/register": "^7.0.0",
1212
"@crowdin/cli": "^3.5.2",
13-
"@jest/globals": "workspace:*",
14-
"@jest/test-utils": "workspace:*",
13+
"@jest/globals": "workspace:^",
14+
"@jest/test-utils": "workspace:^",
1515
"@lerna-lite/cli": "^1.10.0",
1616
"@microsoft/api-extractor": "^7.29.0",
1717
"@tsconfig/node14": "^1.0.3",
@@ -51,14 +51,14 @@
5151
"istanbul-lib-coverage": "^3.0.0",
5252
"istanbul-lib-report": "^3.0.0",
5353
"istanbul-reports": "^3.1.3",
54-
"jest": "workspace:*",
55-
"jest-changed-files": "workspace:*",
54+
"jest": "workspace:^",
55+
"jest-changed-files": "workspace:^",
5656
"jest-junit": "^14.0.0",
57-
"jest-mock": "workspace:*",
57+
"jest-mock": "workspace:^",
5858
"jest-runner-tsd": "^4.0.0",
5959
"jest-serializer-ansi-escapes": "^2.0.1",
6060
"jest-silent-reporter": "^0.5.0",
61-
"jest-snapshot": "workspace:*",
61+
"jest-snapshot": "workspace:^",
6262
"jest-watch-typeahead": "^2.1.1",
6363
"jquery": "^3.2.1",
6464
"js-yaml": "^4.1.0",
@@ -172,10 +172,10 @@
172172
"resolutions": {
173173
"@types/node": "~14.14.45",
174174
"ansi-escapes/type-fest": "^2.0.0",
175-
"babel-jest": "workspace:*",
175+
"babel-jest": "workspace:^",
176176
"enzyme/cheerio": "=1.0.0-rc.3",
177-
"jest": "workspace:*",
178-
"jest-environment-node": "workspace:*",
177+
"jest": "workspace:^",
178+
"jest-environment-node": "workspace:^",
179179
"[email protected]": "patch:react-native@npm:0.69.2#.yarn/patches/react-native-npm-0.68.1-8830b7be0d.patch"
180180
},
181181
"packageManager": "[email protected]"

0 commit comments

Comments
 (0)