File tree 2 files changed +5
-11
lines changed
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -159,9 +159,9 @@ team.
159
159
160
160
- ` --use-yarn`
161
161
162
- By default, patch-package checks whether you use npm, yarn or bun based on
163
- which lockfile you have. If you have multiple lockfiles , it uses npm by
164
- default. Set this option to override that default and always use yarn.
162
+ By default, patch-package checks whether you use npm or yarn based on which
163
+ lockfile you have. If you have both , it uses npm by default. Set this option
164
+ to override that default and always use yarn.
165
165
166
166
- ` --exclude <regexp>`
167
167
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function printSelectingDefaultMessage() {
29
29
console . info (
30
30
`${ chalk . bold (
31
31
"patch-package" ,
32
- ) } : you have multiple lockfiles, e.g. yarn.lock and package-lock.json
32
+ ) } : you have both yarn.lock and package-lock.json
33
33
Defaulting to using ${ chalk . bold ( "npm" ) }
34
34
You can override this setting by passing --use-yarn or deleting
35
35
package-lock.json if you don't need it
@@ -54,13 +54,7 @@ export const detectPackageManager = (
54
54
const bunLockbExists = fs . existsSync (
55
55
join ( findWorkspaceRoot ( ) ?? appRootPath , "bun.lockb" ) ,
56
56
)
57
- if (
58
- [
59
- packageLockExists || shrinkWrapExists ,
60
- yarnLockExists ,
61
- bunLockbExists ,
62
- ] . filter ( Boolean ) . length > 1
63
- ) {
57
+ if ( ( packageLockExists || shrinkWrapExists ) && yarnLockExists ) {
64
58
if ( overridePackageManager ) {
65
59
return overridePackageManager
66
60
} else {
You can’t perform that action at this time.
0 commit comments