Skip to content

Commit 45b396d

Browse files
authored
Update Jest and deduplicate Babel deps in the lockfile (#160)
* Update Jest and deduplicate Babel deps in the lockfile * Update transitive `@types/istanbul-lib-report` dep
1 parent f9c0c1e commit 45b396d

File tree

6 files changed

+1103
-2780
lines changed

6 files changed

+1103
-2780
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"@changesets/cli": "^2.5.0",
2929
"@preconstruct/cli": "^2.2.2",
3030
"@types/fs-extra": "^8.0.1",
31-
"@types/jest": "^26.0.4",
31+
"@types/jest": "^29.2.4",
3232
"@types/normalize-path": "^3.0.0",
3333
"@types/parse-github-url": "^1.0.0",
3434
"@types/semver": "^6.0.1",
35-
"jest": "^26.1.0",
36-
"jest-watch-typeahead": "^0.6.0",
35+
"jest": "^29.3.1",
36+
"jest-watch-typeahead": "^2.2.1",
3737
"prettier": "^2.8.1",
3838
"prettier-plugin-packagejson": "^2.3.0",
3939
"typescript": "^4.9.4"

packages/cli/src/__snapshots__/run.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ hello start
1313
`;
1414

1515
exports[`Run command should execute "package start" and exit with 1: stderr 1`] = `
16-
"☔️ error an identifier must only match a single package but \\"package\\" matches the following packages:
16+
"☔️ error an identifier must only match a single package but "package" matches the following packages:
1717
☔️ error @manypkg/basic-fixture-pkg-one
1818
☔️ error @manypkg/basic-fixture-pkg-two
1919
☔️ error @manypkg/basic-fixture-pkg-two-one
@@ -54,7 +54,7 @@ exports[`Run command should execute "package-three start" and exit with 1: stder
5454
exports[`Run command should execute "package-three start" and exit with 1: stdout 1`] = `""`;
5555

5656
exports[`Run command should execute "package-two start" and exit with 1: stderr 1`] = `
57-
"☔️ error an identifier must only match a single package but \\"package-two\\" matches the following packages:
57+
"☔️ error an identifier must only match a single package but "package-two" matches the following packages:
5858
☔️ error @manypkg/basic-fixture-pkg-two
5959
☔️ error @manypkg/basic-fixture-pkg-two-one
6060
"
@@ -65,7 +65,7 @@ exports[`Run command should execute "package-two start" and exit with 1: stdout
6565
exports[`Run command should execute "package-two-one something" and exit with 1: stderr 1`] = `
6666
"warning package.json: No license field
6767
warning ../../package.json: No license field
68-
error Command \\"something\\" not found.
68+
error Command "something" not found.
6969
"
7070
`;
7171

@@ -111,7 +111,7 @@ hello start
111111
`;
112112

113113
exports[`Run command should execute "pkg-two start" and exit with 1: stderr 1`] = `
114-
"☔️ error an identifier must only match a single package but \\"pkg-two\\" matches the following packages:
114+
"☔️ error an identifier must only match a single package but "pkg-two" matches the following packages:
115115
☔️ error @manypkg/basic-fixture-pkg-two
116116
☔️ error @manypkg/basic-fixture-pkg-two-one
117117
"

packages/cli/src/checks/__tests__/EXTERNAL_MISMATCH.ts

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ it("should error if the ranges are valid and they are not equal", () => {
2020
errors = internalMismatch.validate(ws.get("pkg-1")!, ws, rootWorkspace, {});
2121
expect(errors.length).toEqual(1);
2222
expect(errors).toMatchInlineSnapshot(`
23-
Array [
24-
Object {
23+
[
24+
{
2525
"dependencyName": "something",
2626
"dependencyRange": "1.0.0",
2727
"mostCommonDependencyRange": "2.0.0",
2828
"type": "EXTERNAL_MISMATCH",
29-
"workspace": Object {
29+
"workspace": {
3030
"dir": "some/fake/dir/pkg-1",
31-
"packageJson": Object {
32-
"dependencies": Object {
31+
"packageJson": {
32+
"dependencies": {
3333
"something": "1.0.0",
3434
},
3535
"name": "pkg-1",
@@ -69,16 +69,16 @@ it("should error and return the correct mostCommonDependencyRange when the range
6969
errors = internalMismatch.validate(pkg2, ws, rootWorkspace, {});
7070
expect(errors.length).toEqual(1);
7171
expect(errors).toMatchInlineSnapshot(`
72-
Array [
73-
Object {
72+
[
73+
{
7474
"dependencyName": "something",
7575
"dependencyRange": "2.0.0",
7676
"mostCommonDependencyRange": "1.0.0",
7777
"type": "EXTERNAL_MISMATCH",
78-
"workspace": Object {
78+
"workspace": {
7979
"dir": "some/fake/dir/pkg-2",
80-
"packageJson": Object {
81-
"dependencies": Object {
80+
"packageJson": {
81+
"dependencies": {
8282
"something": "2.0.0",
8383
},
8484
"name": "pkg-2",
@@ -113,20 +113,19 @@ it("should error and return the correct mostCommonDependencyRange when the range
113113
rootWorkspace,
114114
{}
115115
);
116-
console.log(errors);
117116

118117
expect(errors.length).toEqual(1);
119118
expect(errors).toMatchInlineSnapshot(`
120-
Array [
121-
Object {
119+
[
120+
{
122121
"dependencyName": "something",
123122
"dependencyRange": "2.0.0",
124123
"mostCommonDependencyRange": "1.0.0",
125124
"type": "EXTERNAL_MISMATCH",
126-
"workspace": Object {
125+
"workspace": {
127126
"dir": "some/fake/dir/pkg-1",
128-
"packageJson": Object {
129-
"dependencies": Object {
127+
"packageJson": {
128+
"dependencies": {
130129
"something": "2.0.0",
131130
},
132131
"name": "pkg-1",
@@ -166,16 +165,16 @@ it("should error and return the correct mostCommonDependencyRange when the range
166165
);
167166
expect(errors.length).toEqual(1);
168167
expect(errors).toMatchInlineSnapshot(`
169-
Array [
170-
Object {
168+
[
169+
{
171170
"dependencyName": "something",
172171
"dependencyRange": "1.0.0",
173172
"mostCommonDependencyRange": "3.0.0",
174173
"type": "EXTERNAL_MISMATCH",
175-
"workspace": Object {
174+
"workspace": {
176175
"dir": "some/fake/dir/pkg-1",
177-
"packageJson": Object {
178-
"dependencies": Object {
176+
"packageJson": {
177+
"dependencies": {
179178
"something": "1.0.0",
180179
},
181180
"name": "pkg-1",
@@ -189,16 +188,16 @@ it("should error and return the correct mostCommonDependencyRange when the range
189188
errors = internalMismatch.validate(pkg2, ws, rootWorkspace, {});
190189
expect(errors.length).toEqual(1);
191190
expect(errors).toMatchInlineSnapshot(`
192-
Array [
193-
Object {
191+
[
192+
{
194193
"dependencyName": "something",
195194
"dependencyRange": "2.0.0",
196195
"mostCommonDependencyRange": "3.0.0",
197196
"type": "EXTERNAL_MISMATCH",
198-
"workspace": Object {
197+
"workspace": {
199198
"dir": "some/fake/dir/pkg-2",
200-
"packageJson": Object {
201-
"dependencies": Object {
199+
"packageJson": {
200+
"dependencies": {
202201
"something": "2.0.0",
203202
},
204203
"name": "pkg-2",

packages/cli/src/checks/__tests__/INCORRECT_REPOSITORY_FIELD.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ describe("incorrect repository field", () => {
2121
});
2222
expect(errors.map(({ workspace, ...x }: any) => x))
2323
.toMatchInlineSnapshot(`
24-
Array [
25-
Object {
26-
"correctRepositoryField": "https://github.com/Thinkmill/manypkg/tree/${defaultBranch}/packages/no-repository-field",
27-
"currentRepositoryField": undefined,
28-
"type": "INCORRECT_REPOSITORY_FIELD",
29-
},
30-
]
31-
`);
24+
[
25+
{
26+
"correctRepositoryField": "https://github.com/Thinkmill/manypkg/tree/${defaultBranch}/packages/no-repository-field",
27+
"currentRepositoryField": undefined,
28+
"type": "INCORRECT_REPOSITORY_FIELD",
29+
},
30+
]
31+
`);
3232

3333
check.fix(errors[0], {});
3434

@@ -54,14 +54,14 @@ describe("incorrect repository field", () => {
5454
});
5555
expect(errors.map(({ workspace, ...x }: any) => x))
5656
.toMatchInlineSnapshot(`
57-
Array [
58-
Object {
59-
"correctRepositoryField": "https://github.com/Thinkmill/manypkg",
60-
"currentRepositoryField": "https://github.com/Thinkmill/manypkg.git",
61-
"type": "INCORRECT_REPOSITORY_FIELD",
62-
},
63-
]
64-
`);
57+
[
58+
{
59+
"correctRepositoryField": "https://github.com/Thinkmill/manypkg",
60+
"currentRepositoryField": "https://github.com/Thinkmill/manypkg.git",
61+
"type": "INCORRECT_REPOSITORY_FIELD",
62+
},
63+
]
64+
`);
6565

6666
check.fix(errors[0], {});
6767

@@ -86,7 +86,7 @@ describe("incorrect repository field", () => {
8686
defaultBranch,
8787
});
8888
expect(errors.map(({ workspace, ...x }: any) => x)).toMatchInlineSnapshot(
89-
`Array []`
89+
`[]`
9090
);
9191

9292
expect((rootWorkspace.packageJson as any).repository).toBe(
@@ -113,14 +113,14 @@ describe("incorrect repository field", () => {
113113
});
114114
expect(errors.map(({ workspace, ...x }: any) => x))
115115
.toMatchInlineSnapshot(`
116-
Array [
117-
Object {
118-
"correctRepositoryField": "https://dev.azure.com/Thinkmill/monorepos/_git/manypkg?path=packages/no-repository-field&version=GB${defaultBranch}&_a=contents",
119-
"currentRepositoryField": undefined,
120-
"type": "INCORRECT_REPOSITORY_FIELD",
121-
},
122-
]
123-
`);
116+
[
117+
{
118+
"correctRepositoryField": "https://dev.azure.com/Thinkmill/monorepos/_git/manypkg?path=packages/no-repository-field&version=GB${defaultBranch}&_a=contents",
119+
"currentRepositoryField": undefined,
120+
"type": "INCORRECT_REPOSITORY_FIELD",
121+
},
122+
]
123+
`);
124124

125125
check.fix(errors[0], {});
126126

@@ -146,14 +146,14 @@ describe("incorrect repository field", () => {
146146
});
147147
expect(errors.map(({ workspace, ...x }: any) => x))
148148
.toMatchInlineSnapshot(`
149-
Array [
150-
Object {
151-
"correctRepositoryField": "https://dev.azure.com/Thinkmill/monorepos/_git/manypkg",
152-
"currentRepositoryField": "https://Thinkmill@dev.azure.com/Thinkmill/monorepos/_git/manypkg",
153-
"type": "INCORRECT_REPOSITORY_FIELD",
154-
},
155-
]
156-
`);
149+
[
150+
{
151+
"correctRepositoryField": "https://dev.azure.com/Thinkmill/monorepos/_git/manypkg",
152+
"currentRepositoryField": "https://Thinkmill@dev.azure.com/Thinkmill/monorepos/_git/manypkg",
153+
"type": "INCORRECT_REPOSITORY_FIELD",
154+
},
155+
]
156+
`);
157157

158158
check.fix(errors[0], {});
159159

@@ -178,7 +178,7 @@ describe("incorrect repository field", () => {
178178
defaultBranch,
179179
});
180180
expect(errors.map(({ workspace, ...x }: any) => x)).toMatchInlineSnapshot(
181-
`Array []`
181+
`[]`
182182
);
183183

184184
expect((rootWorkspace.packageJson as any).repository).toBe(

packages/cli/src/checks/__tests__/INTERNAL_MISMATCH.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@ describe("internal mismatch", () => {
5858
ws.set("depends-on-one", dependsOnOne);
5959
let errors = makeCheck.validate(dependsOnOne, ws, rootWorkspace, {});
6060
expect(errors).toMatchInlineSnapshot(`
61-
Array [
62-
Object {
61+
[
62+
{
6363
"dependencyRange": "^0.1.0",
64-
"dependencyWorkspace": Object {
64+
"dependencyWorkspace": {
6565
"dir": "some/fake/dir/pkg-1",
66-
"packageJson": Object {
66+
"packageJson": {
6767
"name": "pkg-1",
6868
"version": "1.0.0",
6969
},
7070
},
7171
"type": "INTERNAL_MISMATCH",
72-
"workspace": Object {
72+
"workspace": {
7373
"dir": "some/fake/dir/depends-on-one",
74-
"packageJson": Object {
75-
"devDependencies": Object {
74+
"packageJson": {
75+
"devDependencies": {
7676
"pkg-1": "^0.1.0",
7777
},
7878
"name": "depends-on-one",

0 commit comments

Comments
 (0)