@@ -19,6 +19,7 @@ import {
1919import fastGlob from 'fast-glob' ;
2020import { performance } from 'perf_hooks' ;
2121import getFolderSize from 'get-folder-size' ;
22+ import { familySync as getLibcFamilySync } from 'detect-libc' ;
2223
2324const getAllDeps = ( json : Record < string , Record < string , string > > ) => ( {
2425 ...json . dependencies ,
@@ -99,7 +100,7 @@ const getPkgVersions = async (repoPath: string, pkgJsonPath: string) => {
99100
100101const setPkgVersion = async ( repoPath : string , pkgJsonPath : string ) => {
101102 const pkgVersions = await getPkgVersions ( repoPath , pkgJsonPath ) ;
102- const pkgJson = await readJson ( pkgJsonPath ) ;
103+ let pkgJson = await readJson ( pkgJsonPath ) ;
103104
104105 // override workspace protocol
105106 Object . keys ( pkgVersions ) . forEach ( key => {
@@ -111,11 +112,23 @@ const setPkgVersion = async (repoPath: string, pkgJsonPath: string) => {
111112 }
112113 } ) ;
113114
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+
114126 await outputJson ( pkgJsonPath , pkgJson , { spaces : 2 } ) ;
115127} ;
116128
117129const runInstall = async ( casePath : string ) => {
118130 const coldStartTime = performance . now ( ) ;
131+ await runCommand ( casePath , 'corepack enable && pnpm -v' ) ;
119132 await runCommand (
120133 casePath ,
121134 'pnpm install --registry https://registry.npmjs.org/' ,
@@ -165,6 +178,7 @@ const getDepCount = async (casePath: string) => {
165178} ;
166179
167180export const pnpmInstall = async ( productName : string , caseName : string ) => {
181+ console . log ( 'getLibcFamilySync: ' , getLibcFamilySync ( ) ) ;
168182 const repoPath = getRepoPath ( getRepoName ( productName ) ) ;
169183 const tempPath = getTempPath ( productName ) ;
170184 const casePath = join ( tempPath , caseName ) ;
@@ -192,6 +206,8 @@ export const pnpmInstall = async (productName: string, caseName: string) => {
192206 const installSize = await getInstallSize ( casePath ) ;
193207 const depCount = await getDepCount ( casePath ) ;
194208
209+ await runCommand ( join ( casePath , 'node_modules/@rspack' ) , 'ls -l' ) ;
210+
195211 return saveMetrics ( {
196212 coldInstallTime : coldInstallTime ,
197213 hotInstallTime : hotInstallTime ,
0 commit comments