update-browserslist-db 1.1.2 → 1.1.4

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 +4 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -12,6 +12,10 @@ from `caniuse-lite`.
12
12
  ```sh
13
13
  npx update-browserslist-db@latest
14
14
  ```
15
+ Or if using `pnpm`:
16
+ ```sh
17
+ pnpm exec update-browserslist-db latest
18
+ ```
15
19
 
16
20
  <a href="https://evilmartians.com/?utm_source=update-browserslist-db">
17
21
  <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
package/index.js CHANGED
@@ -42,11 +42,12 @@ function detectLockfile() {
42
42
  let lockfileShrinkwrap = join(packageDir, 'npm-shrinkwrap.json')
43
43
  let lockfileYarn = join(packageDir, 'yarn.lock')
44
44
  let lockfilePnpm = join(packageDir, 'pnpm-lock.yaml')
45
- let lockfileBun = join(packageDir, 'bun.lockb')
45
+ let lockfileBun = join(packageDir, 'bun.lock')
46
+ let lockfileBunBinary = join(packageDir, 'bun.lockb')
46
47
 
47
48
  if (existsSync(lockfilePnpm)) {
48
49
  return { file: lockfilePnpm, mode: 'pnpm' }
49
- } else if (existsSync(lockfileBun)) {
50
+ } else if (existsSync(lockfileBun) || existsSync(lockfileBunBinary)) {
50
51
  return { file: lockfileBun, mode: 'bun' }
51
52
  } else if (existsSync(lockfileNpm)) {
52
53
  return { file: lockfileNpm, mode: 'npm' }
@@ -294,7 +295,7 @@ module.exports = function updateDB(print = defaultPrint) {
294
295
  if (lock.mode === 'yarn' && lock.version !== 1) {
295
296
  updateWith(print, yarnCommand + ' up -R caniuse-lite')
296
297
  } else if (lock.mode === 'pnpm') {
297
- updateWith(print, 'pnpm up caniuse-lite')
298
+ updateWith(print, 'pnpm up --no-save caniuse-lite')
298
299
  } else if (lock.mode === 'bun') {
299
300
  updateWith(print, 'bun update caniuse-lite')
300
301
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "update-browserslist-db",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config",
5
5
  "keywords": [
6
6
  "caniuse",