Skip to content

Commit 01b9e2f

Browse files
committed
DEV: Switch to use pnpm
1 parent 3bb3861 commit 01b9e2f

File tree

5 files changed

+3923
-3680
lines changed

5 files changed

+3923
-3680
lines changed

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
engine-strict = true
2+
auto-install-peers = false

.pnpmfile.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const fs = require("fs");
2+
const { execSync } = require("child_process");
3+
4+
const currRoot = __dirname;
5+
6+
if (fs.existsSync(`${currRoot}/node_modules/.yarn-integrity`)) {
7+
console.log(
8+
"Detected yarn-managed node_modules. Performing one-time cleanup..."
9+
);
10+
11+
// Delete entire contents of all node_modules directories
12+
// But keep the directories themselves, in case they are volume mounts (e.g. in devcontainer)
13+
execSync(
14+
`find ${currRoot}/node_modules -mindepth 1 -maxdepth 1 -exec rm -rf {} +`
15+
);
16+
17+
console.log("cleanup done");
18+
}

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55
"ember-template-lint": "6.0.0",
66
"eslint": "8.57.0",
77
"prettier": "2.8.8"
8+
},
9+
"engines": {
10+
"node": ">= 18",
11+
"npm": "please-use-pnpm",
12+
"yarn": "please-use-pnpm",
13+
"pnpm": ">= 9"
814
}
915
}

0 commit comments

Comments
 (0)