File tree Expand file tree Collapse file tree 4 files changed +3921
-3680
lines changed Expand file tree Collapse file tree 4 files changed +3921
-3680
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments