Skip to content

Commit df699c6

Browse files
authored
Update to pnpm 10 (DefinitelyTyped#74562)
1 parent 296256e commit df699c6

File tree

4 files changed

+58
-56
lines changed

4 files changed

+58
-56
lines changed

.npmrc

Lines changed: 0 additions & 53 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
"bugs": {
1212
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
1313
},
14-
"packageManager": "pnpm@9.14.4",
14+
"packageManager": "pnpm@10.30.1+sha512.3590e550d5384caa39bd5c7c739f72270234b2f6059e13018f975c313b1eb9fefcc09714048765d4d9efe961382c312e624572c0420762bdc5d5940cdf9be73a",
1515
"engines": {
16-
"pnpm": ">=9.14.4",
17-
"node": ">=18.12"
16+
"node": ">=20.17.0"
1817
},
1918
"scripts": {
2019
"preinstall": "npx only-allow pnpm",

pnpm-workspace.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
11
packages:
22
- 'scripts'
33
- 'types/**'
4+
5+
lockfile: false
6+
7+
# As of pnpm v8, the default is "lowest", selecting the minimum version
8+
# available in the package graph. But, on DT, we want to test the latest of
9+
# everything.
10+
resolutionMode: highest
11+
12+
# Do not delay installing things; we need to check the latest state.
13+
minimumReleaseAge: 0
14+
15+
# Prevent pnpm from hoisting eslint/prettier-ish packages.
16+
# The first two are the defaults, but we don't want to also hoist packages
17+
# like @types/eslint-scope (which exist in the types dir).
18+
publicHoistPattern:
19+
- '*eslint*'
20+
- '*prettier*'
21+
- '!@types/*'
22+
23+
# Match npm's behavior and ensure we get all deps.
24+
autoInstallPeers: true
25+
# Don't complain about peer dependencies; they're out of our control.
26+
strictPeerDependencies: false
27+
# Don't use the top-level package.json to resolve conflicts.
28+
resolvePeersFromWorkspaceRoot: false
29+
# https://github.com/pnpm/pnpm/issues/6300
30+
dedupePeerDependents: false
31+
32+
ignoreScripts: true
33+
34+
# Ensure that @types packages are resolved to this repo's packages where
35+
# available.
36+
preferWorkspacePackages: true
37+
# And also to transitive dependencies.
38+
linkWorkspacePackages: deep
39+
# For manual invocations of `pnpm add`, don't save deps as "workspace:...".
40+
saveWorkspaceProtocol: false
41+
# Ignore cycles; they are out of our control.
42+
ignoreWorkspaceCycles: true
43+
# Don't pull symlinks up out of workspace packages.
44+
dedupeDirectDeps: false
45+
# Don't allow every package to see every other package.
46+
hoistWorkspacePackages: false
47+
48+
# Remove once https://github.com/pnpm/pnpm/issues/6457 is fixed
49+
# and we can set a hoisting limit of "workspaces" like in Yarn.
50+
sharedWorkspaceLockfile: false
51+
52+
overrides:
53+
'@wordpress/vips': '-'

scripts/clean-node-modules.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ function rimraf(p) {
3535
for (const nodeModules of iterateNodeModules(repoRoot)) {
3636
console.log(path.relative(repoRoot, nodeModules));
3737
rimraf(nodeModules);
38+
39+
const lockfile = path.join(path.dirname(nodeModules), "pnpm-lock.yaml");
40+
if (fs.existsSync(lockfile)) {
41+
console.log(path.relative(repoRoot, lockfile));
42+
fs.unlinkSync(lockfile);
43+
}
3844
}

0 commit comments

Comments
 (0)