update-browserslist-db 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -298,7 +298,11 @@ module.exports = function updateDB(print = defaultPrint) {
298
298
  yarnCommand + ' up -R caniuse-lite baseline-browser-mapping'
299
299
  )
300
300
  } 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)
302
306
  } else if (lock.mode === 'bun') {
303
307
  updateWith(print, 'bun update caniuse-lite baseline-browser-mapping')
304
308
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "update-browserslist-db",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config",
5
5
  "keywords": [
6
6
  "caniuse",