@@ -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,25 @@ 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+ os : [ 'linux' ] ,
122+ cpu : [ 'x64' ] ,
123+ libc : [ 'glibc' ] ,
124+ } ,
125+ } ,
126+ } ;
127+
114128 await outputJson ( pkgJsonPath , pkgJson , { spaces : 2 } ) ;
115129} ;
116130
117131const runInstall = async ( casePath : string ) => {
118132 const coldStartTime = performance . now ( ) ;
133+ await runCommand ( casePath , 'corepack enable && pnpm -v' ) ;
119134 await runCommand (
120135 casePath ,
121136 'pnpm install --registry https://registry.npmjs.org/' ,
@@ -165,6 +180,7 @@ const getDepCount = async (casePath: string) => {
165180} ;
166181
167182export const pnpmInstall = async ( productName : string , caseName : string ) => {
183+ console . log ( 'getLibcFamilySync: ' , getLibcFamilySync ( ) ) ;
168184 const repoPath = getRepoPath ( getRepoName ( productName ) ) ;
169185 const tempPath = getTempPath ( productName ) ;
170186 const casePath = join ( tempPath , caseName ) ;
@@ -192,6 +208,8 @@ export const pnpmInstall = async (productName: string, caseName: string) => {
192208 const installSize = await getInstallSize ( casePath ) ;
193209 const depCount = await getDepCount ( casePath ) ;
194210
211+ await runCommand ( join ( casePath , 'node_modules/@rspack' ) , 'ls -l' ) ;
212+
195213 return saveMetrics ( {
196214 coldInstallTime : coldInstallTime ,
197215 hotInstallTime : hotInstallTime ,
0 commit comments