v1.0 with SW PWA enabled
This commit is contained in:
8
frontend/node_modules/update-browserslist-db/README.md
generated
vendored
8
frontend/node_modules/update-browserslist-db/README.md
generated
vendored
@ -12,6 +12,14 @@ from `caniuse-lite`.
|
||||
```sh
|
||||
npx update-browserslist-db@latest
|
||||
```
|
||||
Or if using `pnpm`:
|
||||
```sh
|
||||
pnpm exec update-browserslist-db latest
|
||||
```
|
||||
Or if using `yarn`:
|
||||
```sh
|
||||
yarn dlx update-browserslist-db@latest
|
||||
```
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=update-browserslist-db">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
|
||||
|
||||
0
frontend/node_modules/update-browserslist-db/cli.js
generated
vendored
Normal file → Executable file
0
frontend/node_modules/update-browserslist-db/cli.js
generated
vendored
Normal file → Executable file
24
frontend/node_modules/update-browserslist-db/index.js
generated
vendored
24
frontend/node_modules/update-browserslist-db/index.js
generated
vendored
@ -80,8 +80,7 @@ function getLatestInfo(lock) {
|
||||
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(' bun info caniuse-lite --json').toString())
|
||||
}
|
||||
|
||||
return JSON.parse(execSync('npm show caniuse-lite --json').toString())
|
||||
@ -227,11 +226,11 @@ function updatePackageManually(print, lock, latest) {
|
||||
lock.mode === 'yarn' ? yarnCommand + ' add -W' : lock.mode + ' install'
|
||||
print(
|
||||
'Installing new caniuse-lite version\n' +
|
||||
pico.yellow('$ ' + install + ' caniuse-lite') +
|
||||
pico.yellow('$ ' + install + ' caniuse-lite baseline-browser-mapping') +
|
||||
'\n'
|
||||
)
|
||||
try {
|
||||
execSync(install + ' caniuse-lite')
|
||||
execSync(install + ' caniuse-lite baseline-browser-mapping')
|
||||
} catch (e) /* c8 ignore start */ {
|
||||
print(
|
||||
pico.red(
|
||||
@ -251,10 +250,10 @@ function updatePackageManually(print, lock, latest) {
|
||||
lock.mode === 'yarn' ? yarnCommand + ' remove -W' : lock.mode + ' uninstall'
|
||||
print(
|
||||
'Cleaning package.json dependencies from caniuse-lite\n' +
|
||||
pico.yellow('$ ' + del + ' caniuse-lite') +
|
||||
pico.yellow('$ ' + del + ' caniuse-lite baseline-browser-mapping') +
|
||||
'\n'
|
||||
)
|
||||
execSync(del + ' caniuse-lite')
|
||||
execSync(del + ' caniuse-lite baseline-browser-mapping')
|
||||
}
|
||||
|
||||
function updateWith(print, cmd) {
|
||||
@ -293,11 +292,18 @@ module.exports = function updateDB(print = defaultPrint) {
|
||||
print('Latest version: ' + pico.bold(pico.green(latest.version)) + '\n')
|
||||
|
||||
if (lock.mode === 'yarn' && lock.version !== 1) {
|
||||
updateWith(print, yarnCommand + ' up -R caniuse-lite')
|
||||
updateWith(
|
||||
print,
|
||||
yarnCommand + ' up -R caniuse-lite baseline-browser-mapping'
|
||||
)
|
||||
} else if (lock.mode === 'pnpm') {
|
||||
updateWith(print, 'pnpm up caniuse-lite')
|
||||
let lockContent = readFileSync(lock.file).toString()
|
||||
let packages = lockContent.includes('baseline-browser-mapping')
|
||||
? 'caniuse-lite baseline-browser-mapping'
|
||||
: 'caniuse-lite'
|
||||
updateWith(print, 'pnpm up --depth=Infinity --no-save ' + packages)
|
||||
} else if (lock.mode === 'bun') {
|
||||
updateWith(print, 'bun update caniuse-lite')
|
||||
updateWith(print, 'bun update caniuse-lite baseline-browser-mapping')
|
||||
} else {
|
||||
updatePackageManually(print, lock, latest)
|
||||
}
|
||||
|
||||
2
frontend/node_modules/update-browserslist-db/package.json
generated
vendored
2
frontend/node_modules/update-browserslist-db/package.json
generated
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "update-browserslist-db",
|
||||
"version": "1.1.3",
|
||||
"version": "1.2.3",
|
||||
"description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config",
|
||||
"keywords": [
|
||||
"caniuse",
|
||||
|
||||
Reference in New Issue
Block a user