Skip to content

Commit db89e4d

Browse files
committed
feat: update remainding deps, fix knip, fix typescript; fix tests
1 parent bb40696 commit db89e4d

File tree

20 files changed

+5851
-8304
lines changed

20 files changed

+5851
-8304
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ scratchings.js
88

99
# Yarn - https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
1010
.pnp.*
11-
.yarn/*
12-
!.yarn/patches
13-
!.yarn/plugins
14-
!.yarn/releases
15-
!.yarn/sdks
16-
!.yarn/versions
11+
**/.yarn/*
12+
!**/.yarn/patches
13+
!**/.yarn/plugins
14+
!**/.yarn/releases
15+
!**/.yarn/sdks
16+
!**/.yarn/versions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file is generated by running "yarn install" inside your project.
2+
# Manual changes might be lost - proceed with caution!
3+
4+
__metadata:
5+
version: 8
6+
cacheKey: 10c0
7+
8+
"@manypkg/basic-fixture-pkg-one@workspace:packages/package-one":
9+
version: 0.0.0-use.local
10+
resolution: "@manypkg/basic-fixture-pkg-one@workspace:packages/package-one"
11+
languageName: unknown
12+
linkType: soft
13+
14+
"@manypkg/basic-fixture-pkg-two-one@workspace:packages/package-two-one":
15+
version: 0.0.0-use.local
16+
resolution: "@manypkg/basic-fixture-pkg-two-one@workspace:packages/package-two-one"
17+
languageName: unknown
18+
linkType: soft
19+
20+
"@manypkg/basic-fixture-pkg-two@workspace:packages/package-two":
21+
version: 0.0.0-use.local
22+
resolution: "@manypkg/basic-fixture-pkg-two@workspace:packages/package-two"
23+
languageName: unknown
24+
linkType: soft
25+
26+
"@manypkg/basic-fixture@workspace:.":
27+
version: 0.0.0-use.local
28+
resolution: "@manypkg/basic-fixture@workspace:."
29+
languageName: unknown
30+
linkType: soft

knip.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,12 @@
66
"ignoreBinaries": ["gatsby", "packages/cli/bin.js"]
77
}
88
},
9-
"ignore": ["__fixtures__/**"]
9+
"jest": {
10+
"config": ["package.json"],
11+
"entry": [
12+
"**/__tests__/**/*.ts",
13+
"**/?(*.)+(test).ts",
14+
"**/__fixtures__/**/*.[jt]s"
15+
]
16+
}
1017
}

package.json

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,37 @@
1313
"postinstall": "preconstruct dev && NODE_OPTIONS=--experimental-strip-types packages/cli/bin.js check",
1414
"knip": "knip",
1515
"release": "preconstruct build && changeset publish",
16-
"test": "jest",
16+
"test": "NODE_OPTIONS='--disable-warning=ExperimentalWarning --experimental-vm-modules' jest",
1717
"test-gatsby": "cd test-gatsby && gatsby develop"
1818
},
1919
"jest": {
20+
"extensionsToTreatAsEsm": [
21+
".ts"
22+
],
2023
"watchPlugins": [
2124
"jest-watch-typeahead/filename",
2225
"jest-watch-typeahead/testname"
2326
]
2427
},
2528
"devDependencies": {
26-
"@babel/core": "^7.20.5",
27-
"@babel/plugin-transform-runtime": "^7.19.6",
28-
"@babel/preset-env": "^7.20.2",
29-
"@babel/preset-typescript": "^7.18.6",
30-
"@changesets/changelog-github": "^0.4.8",
31-
"@changesets/cli": "^2.26.0",
29+
"@babel/core": "^7.26.10",
30+
"@babel/plugin-transform-runtime": "^7.26.10",
31+
"@babel/preset-env": "^7.26.9",
32+
"@babel/preset-typescript": "^7.27.0",
33+
"@changesets/changelog-github": "^0.5.1",
34+
"@changesets/cli": "^2.29.2",
3235
"@preconstruct/cli": "^2.8.12",
33-
"@types/jest": "^29.2.4",
34-
"@types/normalize-path": "^3.0.0",
35-
"@types/parse-github-url": "^1.0.0",
36-
"@types/semver": "^6.0.1",
37-
"jest": "^29.3.1",
38-
"jest-watch-typeahead": "^2.2.1",
39-
"knip": "^5.33.3",
36+
"@types/jest": "^29.5.14",
37+
"@types/node": "^22.15.2",
38+
"@types/normalize-path": "^3.0.2",
39+
"@types/parse-github-url": "^1.0.3",
40+
"@types/semver": "^7.7.0",
41+
"jest": "^29.7.0",
42+
"jest-watch-typeahead": "^2.2.2",
43+
"knip": "^5.50.5",
4044
"prettier": "^3.5.3",
4145
"prettier-plugin-packagejson": "^2.5.10",
42-
"typescript": "^5.3.2"
46+
"typescript": "^5.8.3"
4347
},
4448
"packageManager": "[email protected]+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538",
4549
"preconstruct": {

packages/cli/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717
},
1818
"dependencies": {
1919
"@manypkg/get-packages": "^2.2.1",
20-
"detect-indent": "^6.0.0",
20+
"detect-indent": "^7.0.1",
2121
"normalize-path": "^3.0.0",
2222
"p-limit": "^6.2.0",
2323
"package-json": "^10.0.1",
24-
"parse-github-url": "^1.0.2",
25-
"picocolors": "^1.1.0",
24+
"parse-github-url": "^1.0.3",
25+
"picocolors": "^1.1.1",
2626
"sembear": "^0.7.0",
27-
"semver": "^7.6.3",
28-
"tinyexec": "^0.3.1",
27+
"semver": "^7.7.1",
28+
"tinyexec": "^1.0.1",
2929
"validate-npm-package-name": "^6.0.0"
3030
},
3131
"devDependencies": {
32-
"@changesets/types": "^5.2.1",
32+
"@changesets/types": "^6.1.0",
3333
"@types/validate-npm-package-name": "^4.0.2",
3434
"fixturez": "^1.1.0",
35-
"strip-ansi": "^6.0.0"
35+
"strip-ansi": "^7.1.0"
3636
},
3737
"engines": {
3838
"node": ">=18.0.0"
Lines changed: 18 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Run command should execute "@manypkg/basic-fixture-pkg-two start" and exit with 0: stderr 1`] = `
4-
"warning package.json: No license field
5-
warning ../../package.json: No license field
6-
"
7-
`;
3+
exports[`Run command should execute "@manypkg/basic-fixture-pkg-two start" and exit with 0: stderr 1`] = `""`;
84

95
exports[`Run command should execute "@manypkg/basic-fixture-pkg-two start" and exit with 0: stdout 1`] = `
10-
"$ echo hello start
11-
hello start
6+
"hello start
127
"
138
`;
149

@@ -22,27 +17,17 @@ exports[`Run command should execute "package start" and exit with 1: stderr 1`]
2217

2318
exports[`Run command should execute "package start" and exit with 1: stdout 1`] = `""`;
2419

25-
exports[`Run command should execute "package-one start" and exit with 0: stderr 1`] = `
26-
"warning package.json: No license field
27-
warning ../../package.json: No license field
28-
"
29-
`;
20+
exports[`Run command should execute "package-one start" and exit with 0: stderr 1`] = `""`;
3021

3122
exports[`Run command should execute "package-one start" and exit with 0: stdout 1`] = `
32-
"$ echo hello start
33-
hello start
23+
"hello start
3424
"
3525
`;
3626

37-
exports[`Run command should execute "package-one test" and exit with 0: stderr 1`] = `
38-
"warning package.json: No license field
39-
warning ../../package.json: No license field
40-
"
41-
`;
27+
exports[`Run command should execute "package-one test" and exit with 0: stderr 1`] = `""`;
4228

4329
exports[`Run command should execute "package-one test" and exit with 0: stdout 1`] = `
44-
"$ echo testing
45-
testing
30+
"testing
4631
"
4732
`;
4833

@@ -62,51 +47,33 @@ exports[`Run command should execute "package-two start" and exit with 1: stderr
6247

6348
exports[`Run command should execute "package-two start" and exit with 1: stdout 1`] = `""`;
6449

65-
exports[`Run command should execute "package-two-one something" and exit with 1: stderr 1`] = `
66-
"warning package.json: No license field
67-
warning ../../package.json: No license field
68-
error Command "something" not found.
69-
"
70-
`;
50+
exports[`Run command should execute "package-two-one something" and exit with 1: stderr 1`] = `""`;
7151

7252
exports[`Run command should execute "package-two-one something" and exit with 1: stdout 1`] = `
73-
"info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
74-
"
75-
`;
53+
"Usage Error: Couldn't find a script named "something".
7654
77-
exports[`Run command should execute "package-two-one start" and exit with 0: stderr 1`] = `
78-
"warning package.json: No license field
79-
warning ../../package.json: No license field
55+
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
8056
"
8157
`;
8258
59+
exports[`Run command should execute "package-two-one start" and exit with 0: stderr 1`] = `""`;
60+
8361
exports[`Run command should execute "package-two-one start" and exit with 0: stdout 1`] = `
84-
"$ echo hello start
85-
hello start
62+
"hello start
8663
"
8764
`;
8865
89-
exports[`Run command should execute "packages/package-two start" and exit with 0: stderr 1`] = `
90-
"warning package.json: No license field
91-
warning ../../package.json: No license field
92-
"
93-
`;
66+
exports[`Run command should execute "packages/package-two start" and exit with 0: stderr 1`] = `""`;
9467
9568
exports[`Run command should execute "packages/package-two start" and exit with 0: stdout 1`] = `
96-
"$ echo hello start
97-
hello start
69+
"hello start
9870
"
9971
`;
10072
101-
exports[`Run command should execute "pkg-one start" and exit with 0: stderr 1`] = `
102-
"warning package.json: No license field
103-
warning ../../package.json: No license field
104-
"
105-
`;
73+
exports[`Run command should execute "pkg-one start" and exit with 0: stderr 1`] = `""`;
10674
10775
exports[`Run command should execute "pkg-one start" and exit with 0: stdout 1`] = `
108-
"$ echo hello start
109-
hello start
76+
"hello start
11077
"
11178
`;
11279
@@ -119,14 +86,9 @@ exports[`Run command should execute "pkg-two start" and exit with 1: stderr 1`]
11986
12087
exports[`Run command should execute "pkg-two start" and exit with 1: stdout 1`] = `""`;
12188
122-
exports[`Run command should execute "pkg-two-one start" and exit with 0: stderr 1`] = `
123-
"warning package.json: No license field
124-
warning ../../package.json: No license field
125-
"
126-
`;
89+
exports[`Run command should execute "pkg-two-one start" and exit with 0: stderr 1`] = `""`;
12790
12891
exports[`Run command should execute "pkg-two-one start" and exit with 0: stdout 1`] = `
129-
"$ echo hello start
130-
hello start
92+
"hello start
13193
"
13294
`;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getFakeWS, getRootWS, getWS } from "../../test-helpers.ts";
2-
import makeCheck, { ErrorType } from "../INTERNAL_MISMATCH.ts";
2+
import makeCheck, { type ErrorType } from "../INTERNAL_MISMATCH.ts";
33

44
let rootWorkspace = getRootWS();
55

packages/cli/src/run.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import fixturez from "fixturez";
22
import stripAnsi from "strip-ansi";
33
import { exec } from "tinyexec";
4+
import { createRequire } from "node:module";
45

5-
const f = fixturez(__dirname);
6+
const f = fixturez(import.meta.url);
7+
const require = createRequire(import.meta.url);
68

79
function stripNodeWarnings(str: string) {
810
return str
@@ -35,7 +37,8 @@ describe("Run command", () => {
3537
cwd: f.find("basic-with-scripts"),
3638
env: {
3739
...process.env,
38-
NODE_OPTIONS: "--experimental-strip-types",
40+
NODE_OPTIONS:
41+
"--experimental-strip-types --disable-warning=ExperimentalWarning",
3942
},
4043
},
4144
}

packages/cli/src/test-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Who can say? ¯\_(ツ)_/¯
66

7-
import { Package } from "@manypkg/get-packages";
7+
import type { Package } from "@manypkg/get-packages";
88
import crypto from "node:crypto";
99

1010
export let getRootWS = (): Package => {

packages/find-root/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@manypkg/tools": "^1.1.2"
1717
},
1818
"devDependencies": {
19-
"@types/node": "^16.11.7",
19+
"@types/node": "^22.15.2",
2020
"fixturez": "^1.1.0"
2121
},
2222
"engines": {

packages/find-root/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { findRoot, findRootSync } from "./index.ts";
44

55
import { LernaTool, PnpmTool, RootTool, YarnTool } from "@manypkg/tools";
66

7-
let f = fixturez(__dirname);
7+
const f = fixturez(import.meta.url);
88

99
type FindRoot = typeof findRoot | typeof findRootSync;
1010

packages/gatsby-source-workspace/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
],
1414
"dependencies": {
1515
"find-workspaces-root": "^0.2.0",
16-
"fs-extra": "^8.1.0",
17-
"get-workspaces": "^0.6.0"
16+
"fs-extra": "^11.3.0",
17+
"get-workspaces": "^1.0.11"
1818
},
1919
"devDependencies": {
20-
"gatsby": "^2.15.28",
21-
"react": "^16.10.1",
22-
"react-dom": "^16.10.1"
20+
"gatsby": "^5.14.3",
21+
"react": "^19.1.0",
22+
"react-dom": "^19.1.0"
2323
},
2424
"peerDependencies": {
25-
"gatsby": "^2.15.28"
25+
"gatsby": "^5.14.3"
2626
},
2727
"engines": {
2828
"node": ">=14.18.0"

packages/get-packages/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fixturez from "fixturez";
22
import path from "node:path";
33
import { getPackages, getPackagesSync } from "./index.ts";
44

5-
const f = fixturez(__dirname);
5+
const f = fixturez(import.meta.url);
66

77
type GetPackages = typeof getPackages | typeof getPackagesSync;
88

packages/tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"tinyglobby": "^0.2.13"
1919
},
2020
"devDependencies": {
21-
"@types/jju": "^1.4.2",
21+
"@types/jju": "^1.4.5",
2222
"@types/js-yaml": "^4.0.9"
2323
},
2424
"engines": {

packages/tools/src/BoltTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from "./expandPackageGlobs.ts";
1313
import { readJson, readJsonSync } from "./utils.ts";
1414

15-
export interface BoltPackageJSON extends PackageJSON {
15+
interface BoltPackageJSON extends PackageJSON {
1616
bolt?: {
1717
workspaces?: string[];
1818
};

packages/tools/src/LernaTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from "./expandPackageGlobs.ts";
1313
import { readJson, readJsonSync } from "./utils.ts";
1414

15-
export interface LernaJson {
15+
interface LernaJson {
1616
useWorkspaces?: boolean;
1717
packages?: string[];
1818
}

packages/tools/src/YarnTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from "./expandPackageGlobs.ts";
1313
import { readJson, readJsonSync } from "./utils.ts";
1414

15-
export interface YarnPackageJSON extends PackageJSON {
15+
interface YarnPackageJSON extends PackageJSON {
1616
workspaces?: string[] | { packages: string[] };
1717
}
1818

0 commit comments

Comments
 (0)