@@ -12,7 +12,11 @@ import { cleanTestScript } from '../test/utils/script-cleaning.mjs'
1212import { testRunners } from '../test/utils/test-runners.mjs'
1313import { suppressMaxListenersWarning } from './utils/suppress-warnings.mjs'
1414import { filterPackagesByChanges } from './utils/git.mjs'
15- import { PNPM_INSTALL_ENV , PNPM_INSTALL_FLAGS } from './utils/package.mjs'
15+ import {
16+ PNPM_HOISTED_INSTALL_FLAGS ,
17+ PNPM_INSTALL_BASE_FLAGS ,
18+ PNPM_INSTALL_ENV ,
19+ } from './utils/package.mjs'
1620import constants from './constants.mjs'
1721import ENV from '../registry/dist/lib/constants/ENV.js'
1822import spinner from '../registry/dist/lib/constants/spinner.js'
@@ -444,26 +448,18 @@ async function installPackage(packageInfo) {
444448
445449 // Install any missing dependencies.
446450 // Unset NODE_ENV and CI to prevent pnpm from skipping devDependencies.
447- await runCommand ( 'pnpm' , [ 'install' , ...PNPM_INSTALL_FLAGS ] , {
451+ await runCommand ( 'pnpm' , [ 'install' , ...PNPM_HOISTED_INSTALL_FLAGS ] , {
448452 cwd : packageTempDir ,
449453 env : { ...process . env , ...PNPM_INSTALL_ENV } ,
450454 } )
451455
452456 // Explicitly install dependencies in the nested package to ensure test
453457 // runners (tape, mocha, ava, etc.) are available.
454458 // Use isolated mode (not hoisted) to avoid conflicts with parent installation.
455- await runCommand (
456- 'pnpm' ,
457- [
458- 'install' ,
459- '--config.confirmModulesPurge=false' ,
460- '--no-frozen-lockfile' ,
461- ] ,
462- {
463- cwd : installedPath ,
464- env : { ...process . env , ...PNPM_INSTALL_ENV } ,
465- } ,
466- )
459+ await runCommand ( 'pnpm' , [ 'install' , ...PNPM_INSTALL_BASE_FLAGS ] , {
460+ cwd : installedPath ,
461+ env : { ...process . env , ...PNPM_INSTALL_ENV } ,
462+ } )
467463
468464 // Apply Socket overrides to all nested dependencies recursively.
469465 await applyNestedSocketOverrides ( installedPath )
@@ -520,7 +516,7 @@ async function installPackage(packageInfo) {
520516 // Unset NODE_ENV and CI to prevent pnpm from skipping devDependencies.
521517 await pRetry (
522518 async ( ) => {
523- await runCommand ( 'pnpm' , [ 'install' , ...PNPM_INSTALL_FLAGS ] , {
519+ await runCommand ( 'pnpm' , [ 'install' , ...PNPM_HOISTED_INSTALL_FLAGS ] , {
524520 cwd : packageTempDir ,
525521 env : { ...process . env , ...PNPM_INSTALL_ENV } ,
526522 } )
@@ -741,22 +737,18 @@ async function installPackage(packageInfo) {
741737
742738 // Install dependencies to ensure devDependencies (test runners) are available.
743739 // Unset NODE_ENV and CI to prevent pnpm from skipping devDependencies.
744- await runCommand ( 'pnpm' , [ 'install' , ...PNPM_INSTALL_FLAGS ] , {
740+ await runCommand ( 'pnpm' , [ 'install' , ...PNPM_HOISTED_INSTALL_FLAGS ] , {
745741 cwd : packageTempDir ,
746742 env : { ...process . env , ...PNPM_INSTALL_ENV } ,
747743 } )
748744
749745 // Explicitly install dependencies in the nested package to ensure test
750746 // runners (tape, mocha, ava, etc.) are available.
751747 // Use isolated mode (not hoisted) to avoid conflicts with parent installation.
752- await runCommand (
753- 'pnpm' ,
754- [ 'install' , '--config.confirmModulesPurge=false' , '--no-frozen-lockfile' ] ,
755- {
756- cwd : installedPath ,
757- env : { ...process . env , ...PNPM_INSTALL_ENV } ,
758- } ,
759- )
748+ await runCommand ( 'pnpm' , [ 'install' , ...PNPM_INSTALL_BASE_FLAGS ] , {
749+ cwd : installedPath ,
750+ env : { ...process . env , ...PNPM_INSTALL_ENV } ,
751+ } )
760752
761753 // Apply Socket overrides to all nested dependencies recursively.
762754 await applyNestedSocketOverrides ( installedPath )
0 commit comments