@@ -19,6 +19,7 @@ import {
19
19
import fastGlob from 'fast-glob' ;
20
20
import { performance } from 'perf_hooks' ;
21
21
import getFolderSize from 'get-folder-size' ;
22
+ import { familySync as getLibcFamilySync } from 'detect-libc' ;
22
23
23
24
const getAllDeps = ( json : Record < string , Record < string , string > > ) => ( {
24
25
...json . dependencies ,
@@ -99,7 +100,7 @@ const getPkgVersions = async (repoPath: string, pkgJsonPath: string) => {
99
100
100
101
const setPkgVersion = async ( repoPath : string , pkgJsonPath : string ) => {
101
102
const pkgVersions = await getPkgVersions ( repoPath , pkgJsonPath ) ;
102
- const pkgJson = await readJson ( pkgJsonPath ) ;
103
+ let pkgJson = await readJson ( pkgJsonPath ) ;
103
104
104
105
// override workspace protocol
105
106
Object . keys ( pkgVersions ) . forEach ( key => {
@@ -111,11 +112,23 @@ const setPkgVersion = async (repoPath: string, pkgJsonPath: string) => {
111
112
}
112
113
} ) ;
113
114
115
+ // use supportedArchitectures, see https://github.com/pnpm/pnpm/releases/tag/v8.10.0
116
+ pkgJson = {
117
+ ...pkgJson ,
118
+ packageManager :
'[email protected] ' ,
119
+ pnpm : {
120
+ supportedArchitectures : {
121
+ libc : [ 'musl' ] ,
122
+ } ,
123
+ } ,
124
+ } ;
125
+
114
126
await outputJson ( pkgJsonPath , pkgJson , { spaces : 2 } ) ;
115
127
} ;
116
128
117
129
const runInstall = async ( casePath : string ) => {
118
130
const coldStartTime = performance . now ( ) ;
131
+ await runCommand ( casePath , 'corepack enable && pnpm -v' ) ;
119
132
await runCommand (
120
133
casePath ,
121
134
'pnpm install --registry https://registry.npmjs.org/' ,
@@ -165,6 +178,7 @@ const getDepCount = async (casePath: string) => {
165
178
} ;
166
179
167
180
export const pnpmInstall = async ( productName : string , caseName : string ) => {
181
+ console . log ( 'getLibcFamilySync: ' , getLibcFamilySync ( ) ) ;
168
182
const repoPath = getRepoPath ( getRepoName ( productName ) ) ;
169
183
const tempPath = getTempPath ( productName ) ;
170
184
const casePath = join ( tempPath , caseName ) ;
@@ -192,6 +206,8 @@ export const pnpmInstall = async (productName: string, caseName: string) => {
192
206
const installSize = await getInstallSize ( casePath ) ;
193
207
const depCount = await getDepCount ( casePath ) ;
194
208
209
+ await runCommand ( join ( casePath , 'node_modules/@rspack' ) , 'ls -l' ) ;
210
+
195
211
return saveMetrics ( {
196
212
coldInstallTime : coldInstallTime ,
197
213
hotInstallTime : hotInstallTime ,
0 commit comments