update-browserslist-db 1.1.4 → 1.2.0

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 (3) hide show
  1. package/README.md +4 -0
  2. package/index.js +10 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -16,6 +16,10 @@ Or if using `pnpm`:
16
16
  ```sh
17
17
  pnpm exec update-browserslist-db latest
18
18
  ```
19
+ Or if using `yarn`:
20
+ ```sh
21
+ yarn dlx update-browserslist-db@latest
22
+ ```
19
23
 
20
24
  <a href="https://evilmartians.com/?utm_source=update-browserslist-db">
21
25
  <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
package/index.js CHANGED
@@ -227,11 +227,11 @@ function updatePackageManually(print, lock, latest) {
227
227
  lock.mode === 'yarn' ? yarnCommand + ' add -W' : lock.mode + ' install'
228
228
  print(
229
229
  'Installing new caniuse-lite version\n' +
230
- pico.yellow('$ ' + install + ' caniuse-lite') +
230
+ pico.yellow('$ ' + install + ' caniuse-lite baseline-browser-mapping') +
231
231
  '\n'
232
232
  )
233
233
  try {
234
- execSync(install + ' caniuse-lite')
234
+ execSync(install + ' caniuse-lite baseline-browser-mapping')
235
235
  } catch (e) /* c8 ignore start */ {
236
236
  print(
237
237
  pico.red(
@@ -251,10 +251,10 @@ function updatePackageManually(print, lock, latest) {
251
251
  lock.mode === 'yarn' ? yarnCommand + ' remove -W' : lock.mode + ' uninstall'
252
252
  print(
253
253
  'Cleaning package.json dependencies from caniuse-lite\n' +
254
- pico.yellow('$ ' + del + ' caniuse-lite') +
254
+ pico.yellow('$ ' + del + ' caniuse-lite baseline-browser-mapping') +
255
255
  '\n'
256
256
  )
257
- execSync(del + ' caniuse-lite')
257
+ execSync(del + ' caniuse-lite baseline-browser-mapping')
258
258
  }
259
259
 
260
260
  function updateWith(print, cmd) {
@@ -293,11 +293,14 @@ module.exports = function updateDB(print = defaultPrint) {
293
293
  print('Latest version: ' + pico.bold(pico.green(latest.version)) + '\n')
294
294
 
295
295
  if (lock.mode === 'yarn' && lock.version !== 1) {
296
- updateWith(print, yarnCommand + ' up -R caniuse-lite')
296
+ updateWith(
297
+ print,
298
+ yarnCommand + ' up -R caniuse-lite baseline-browser-mapping'
299
+ )
297
300
  } else if (lock.mode === 'pnpm') {
298
- updateWith(print, 'pnpm up --no-save caniuse-lite')
301
+ updateWith(print, 'pnpm up --no-save caniuse-lite baseline-browser-mapping')
299
302
  } else if (lock.mode === 'bun') {
300
- updateWith(print, 'bun update caniuse-lite')
303
+ updateWith(print, 'bun update caniuse-lite baseline-browser-mapping')
301
304
  } else {
302
305
  updatePackageManually(print, lock, latest)
303
306
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "update-browserslist-db",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config",
5
5
  "keywords": [
6
6
  "caniuse",