@@ -329,7 +329,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
329
329
await testCommand ?.( pkg . scripts )
330
330
}
331
331
332
- await applyPackageOverrides ( dir , pkg , overrides )
332
+ await applyPackageOverrides ( dir , pkg , overrides , options . release )
333
333
await beforeBuildCommand ?.( pkg . scripts )
334
334
await buildCommand ?.( pkg . scripts )
335
335
if ( test ) {
@@ -561,6 +561,7 @@ export async function applyPackageOverrides(
561
561
dir : string ,
562
562
pkg : any ,
563
563
overrides : Overrides = { } ,
564
+ useReleasedVersion ?: string ,
564
565
) {
565
566
const useFileProtocol = ( v : string ) =>
566
567
isLocalOverride ( v ) ? `file:${ path . resolve ( v ) } ` : v
@@ -643,15 +644,18 @@ export async function applyPackageOverrides(
643
644
// While `--registry` works for the `install` command,
644
645
// we still need to persist the registry in `.npmrc` for any possible
645
646
// subsequent commands that needs to connect to the registry.
646
- writeOrAppendNpmrc ( dir , `registry=${ REGISTRY_ADDRESS } \n` )
647
+ // Skip this step if we are using a released version of the vue package to avoid the overhead
648
+ if ( ! useReleasedVersion ) {
649
+ writeOrAppendNpmrc ( dir , `registry=${ REGISTRY_ADDRESS } \n` )
650
+ }
647
651
648
652
// use of `ni` command here could cause lockfile violation errors so fall back to native commands that avoid these
649
653
if ( pm === 'pnpm' ) {
650
- await $ `pnpm install --no-frozen-lockfile --no-strict-peer-dependencies --registry ${ REGISTRY_ADDRESS } `
654
+ await $ `pnpm install --no-frozen-lockfile --no-strict-peer-dependencies`
651
655
} else if ( pm === 'yarn' ) {
652
- await $ `yarn install --registry ${ REGISTRY_ADDRESS } `
656
+ await $ `yarn install`
653
657
} else if ( pm === 'npm' ) {
654
- await $ `npm install --registry ${ REGISTRY_ADDRESS } `
658
+ await $ `npm install`
655
659
}
656
660
}
657
661
0 commit comments