Skip to content

Commit cc79d02

Browse files
committed
Fix pnpm and old Browserslist
1 parent b19fc02 commit cc79d02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ module.exports = function updateDB(print = defaultPrint) {
298298
yarnCommand + ' up -R caniuse-lite baseline-browser-mapping'
299299
)
300300
} else if (lock.mode === 'pnpm') {
301-
updateWith(print, 'pnpm up --no-save caniuse-lite baseline-browser-mapping')
301+
let lockContent = readFileSync(lock.file).toString()
302+
let packages = lockContent.includes('baseline-browser-mapping')
303+
? 'caniuse-lite baseline-browser-mapping'
304+
: 'caniuse-lite'
305+
updateWith(print, 'pnpm up --no-save ' + packages)
302306
} else if (lock.mode === 'bun') {
303307
updateWith(print, 'bun update caniuse-lite baseline-browser-mapping')
304308
} else {

0 commit comments

Comments
 (0)