File tree 1 file changed +7
-5
lines changed
packages/vite/src/node/optimizer
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1236,11 +1236,13 @@ function isSingleDefaultExport(exports: readonly string[]) {
1236
1236
}
1237
1237
1238
1238
const lockfileFormats = [
1239
- { name : 'package-lock.json' , checkPatches : true } ,
1240
- { name : 'yarn.lock' , checkPatches : true } , // Included in lockfile for v2+
1241
- { name : 'pnpm-lock.yaml' , checkPatches : false } , // Included in lockfile
1242
- { name : 'bun.lockb' , checkPatches : true } ,
1243
- ]
1239
+ { name : 'package-lock.json' , checkPatches : true , manager : 'npm' } ,
1240
+ { name : 'yarn.lock' , checkPatches : true , manager : 'yarn' } , // Included in lockfile for v2+
1241
+ { name : 'pnpm-lock.yaml' , checkPatches : false , manager : 'pnpm' } , // Included in lockfile
1242
+ { name : 'bun.lockb' , checkPatches : true , manager : 'bun' } ,
1243
+ ] . sort ( ( _ , { manager } ) => {
1244
+ return process . env . npm_config_user_agent ?. startsWith ( manager ) ? 1 : - 1
1245
+ } )
1244
1246
const lockfileNames = lockfileFormats . map ( ( l ) => l . name )
1245
1247
1246
1248
export function getDepHash ( config : ResolvedConfig , ssr : boolean ) : string {
You can’t perform that action at this time.
0 commit comments