update-browserslist-db 1.0.16 → 1.1.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.
- package/README.md +1 -1
- package/index.js +10 -0
- package/package.json +1 -1
- package/.devcontainer.json +0 -42
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
CLI tool to update `caniuse-lite` with browsers DB
|
|
7
7
|
from [Browserslist](https://github.com/browserslist/browserslist/) config.
|
|
8
8
|
|
|
9
|
-
Some queries like `last 2
|
|
9
|
+
Some queries like `last 2 versions` or `>1%` depend on actual data
|
|
10
10
|
from `caniuse-lite`.
|
|
11
11
|
|
|
12
12
|
```sh
|
package/index.js
CHANGED
|
@@ -42,9 +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
46
|
|
|
46
47
|
if (existsSync(lockfilePnpm)) {
|
|
47
48
|
return { file: lockfilePnpm, mode: 'pnpm' }
|
|
49
|
+
} else if (existsSync(lockfileBun)) {
|
|
50
|
+
return { file: lockfileBun, mode: 'bun' }
|
|
48
51
|
} else if (existsSync(lockfileNpm)) {
|
|
49
52
|
return { file: lockfileNpm, mode: 'npm' }
|
|
50
53
|
} else if (existsSync(lockfileYarn)) {
|
|
@@ -75,6 +78,11 @@ function getLatestInfo(lock) {
|
|
|
75
78
|
if (lock.mode === 'pnpm') {
|
|
76
79
|
return JSON.parse(execSync('pnpm info caniuse-lite --json').toString())
|
|
77
80
|
}
|
|
81
|
+
if (lock.mode === 'bun') {
|
|
82
|
+
// TO-DO: No 'bun info' yet. Created issue: https://github.com/oven-sh/bun/issues/12280
|
|
83
|
+
return JSON.parse(execSync(' npm info caniuse-lite --json').toString())
|
|
84
|
+
}
|
|
85
|
+
|
|
78
86
|
return JSON.parse(execSync('npm show caniuse-lite --json').toString())
|
|
79
87
|
}
|
|
80
88
|
|
|
@@ -287,6 +295,8 @@ module.exports = function updateDB(print = defaultPrint) {
|
|
|
287
295
|
updateWith(print, yarnCommand + ' up -R caniuse-lite')
|
|
288
296
|
} else if (lock.mode === 'pnpm') {
|
|
289
297
|
updateWith(print, 'pnpm up caniuse-lite')
|
|
298
|
+
} else if (lock.mode === 'bun') {
|
|
299
|
+
updateWith(print, 'bun update caniuse-lite')
|
|
290
300
|
} else {
|
|
291
301
|
updatePackageManually(print, lock, latest)
|
|
292
302
|
}
|
package/package.json
CHANGED
package/.devcontainer.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"image": "localhost/ai-opensource:latest",
|
|
3
|
-
"forwardPorts": [],
|
|
4
|
-
"mounts": [
|
|
5
|
-
{
|
|
6
|
-
"source": "pnpm-store",
|
|
7
|
-
"target": "/home/ai/.local/share/pnpm/store",
|
|
8
|
-
"type": "volume"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"source": "shell-history",
|
|
12
|
-
"target": "/home/ai/.shell-history/",
|
|
13
|
-
"type": "volume"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"workspaceMount": "",
|
|
17
|
-
"runArgs": [
|
|
18
|
-
"--userns=keep-id:uid=1000,gid=1000",
|
|
19
|
-
"--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z"
|
|
20
|
-
],
|
|
21
|
-
"customizations": {
|
|
22
|
-
"vscode": {
|
|
23
|
-
"extensions": [
|
|
24
|
-
"connor4312.nodejs-testing",
|
|
25
|
-
"dbaeumer.vscode-eslint",
|
|
26
|
-
"esbenp.prettier-vscode",
|
|
27
|
-
"stylelint.vscode-stylelint",
|
|
28
|
-
"svelte.svelte-vscode",
|
|
29
|
-
"yoavbls.pretty-ts-errors",
|
|
30
|
-
"tamasfe.even-better-toml",
|
|
31
|
-
"streetsidesoftware.code-spell-checker",
|
|
32
|
-
"editorconfig.editorconfig",
|
|
33
|
-
"yzhang.markdown-all-in-one",
|
|
34
|
-
"streetsidesoftware.code-spell-checker-russian",
|
|
35
|
-
"christian-kohler.path-intellisense",
|
|
36
|
-
"christian-kohler.npm-intellisense",
|
|
37
|
-
"VisualStudioExptTeam.vscodeintellicode",
|
|
38
|
-
"davidlday.languagetool-linter"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|