summaryrefslogtreecommitdiff
path: root/node_modules/update-browserslist-db
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/update-browserslist-db')
-rw-r--r--node_modules/update-browserslist-db/README.md2
-rw-r--r--node_modules/update-browserslist-db/index.js10
l---------node_modules/update-browserslist-db/node_modules/.bin/browserslist1
-rw-r--r--node_modules/update-browserslist-db/package.json2
4 files changed, 12 insertions, 3 deletions
diff --git a/node_modules/update-browserslist-db/README.md b/node_modules/update-browserslist-db/README.md
index d7a4e2ab..c4155c9e 100644
--- a/node_modules/update-browserslist-db/README.md
+++ b/node_modules/update-browserslist-db/README.md
@@ -6,7 +6,7 @@
CLI tool to update `caniuse-lite` with browsers DB
from [Browserslist](https://github.com/browserslist/browserslist/) config.
-Some queries like `last 2 version` or `>1%` depends on actual data
+Some queries like `last 2 versions` or `>1%` depend on actual data
from `caniuse-lite`.
```sh
diff --git a/node_modules/update-browserslist-db/index.js b/node_modules/update-browserslist-db/index.js
index 9235d1fe..f13c6e66 100644
--- a/node_modules/update-browserslist-db/index.js
+++ b/node_modules/update-browserslist-db/index.js
@@ -42,9 +42,12 @@ function detectLockfile() {
let lockfileShrinkwrap = join(packageDir, 'npm-shrinkwrap.json')
let lockfileYarn = join(packageDir, 'yarn.lock')
let lockfilePnpm = join(packageDir, 'pnpm-lock.yaml')
+ let lockfileBun = join(packageDir, 'bun.lockb')
if (existsSync(lockfilePnpm)) {
return { file: lockfilePnpm, mode: 'pnpm' }
+ } else if (existsSync(lockfileBun)) {
+ return { file: lockfileBun, mode: 'bun' }
} else if (existsSync(lockfileNpm)) {
return { file: lockfileNpm, mode: 'npm' }
} else if (existsSync(lockfileYarn)) {
@@ -75,6 +78,11 @@ function getLatestInfo(lock) {
if (lock.mode === 'pnpm') {
return JSON.parse(execSync('pnpm info caniuse-lite --json').toString())
}
+ if (lock.mode === 'bun') {
+ // TO-DO: No 'bun info' yet. Created issue: https://github.com/oven-sh/bun/issues/12280
+ return JSON.parse(execSync(' npm info caniuse-lite --json').toString())
+ }
+
return JSON.parse(execSync('npm show caniuse-lite --json').toString())
}
@@ -287,6 +295,8 @@ module.exports = function updateDB(print = defaultPrint) {
updateWith(print, yarnCommand + ' up -R caniuse-lite')
} else if (lock.mode === 'pnpm') {
updateWith(print, 'pnpm up caniuse-lite')
+ } else if (lock.mode === 'bun') {
+ updateWith(print, 'bun update caniuse-lite')
} else {
updatePackageManually(print, lock, latest)
}
diff --git a/node_modules/update-browserslist-db/node_modules/.bin/browserslist b/node_modules/update-browserslist-db/node_modules/.bin/browserslist
deleted file mode 120000
index c4cc06e3..00000000
--- a/node_modules/update-browserslist-db/node_modules/.bin/browserslist
+++ /dev/null
@@ -1 +0,0 @@
-../../../browserslist/cli.js \ No newline at end of file
diff --git a/node_modules/update-browserslist-db/package.json b/node_modules/update-browserslist-db/package.json
index e0d7306a..6a577f78 100644
--- a/node_modules/update-browserslist-db/package.json
+++ b/node_modules/update-browserslist-db/package.json
@@ -1,6 +1,6 @@
{
"name": "update-browserslist-db",
- "version": "1.0.16",
+ "version": "1.1.0",
"description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config",
"keywords": [
"caniuse",