Skip to content

Commit

Permalink
Move update DB script to another project
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jun 20, 2022
1 parent 1706a04 commit 7e019ce
Show file tree
Hide file tree
Showing 29 changed files with 21 additions and 9,200 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Run unit tests
run: pnpm unit:fast
run: pnpm unit
env:
FORCE_COLOR: 2
old:
Expand Down Expand Up @@ -77,6 +77,6 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Run unit tests
run: pnpm unit:fast
run: pnpm unit
env:
FORCE_COLOR: 2
5 changes: 2 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node

var updateDb = require('update-browserslist-db')
var fs = require('fs')

var browserslist = require('./')
var updateDb = require('./update-db')
var pkg = require('./package.json')

var args = process.argv.slice(2)
Expand All @@ -20,8 +20,7 @@ var USAGE =
' npx browserslist --env="environment name defined in config"\n' +
' npx browserslist --stats="path/to/browserlist/stats/file"\n' +
' npx browserslist --mobile-to-desktop\n' +
' npx browserslist --ignore-unknown-versions\n' +
' npx browserslist --update-db'
' npx browserslist --ignore-unknown-versions\n'

function isArg(arg) {
return args.some(function (str) {
Expand Down
2 changes: 1 addition & 1 deletion node.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ module.exports = {
if (latest !== 0 && latest < halfYearAgo) {
console.warn(
'Browserslist: caniuse-lite is outdated. Please run:\n' +
' npx browserslist@latest --update-db\n' +
' npx update-browserslist-db@latest\n' +
' Why you should do it regularly: ' +
'https://github.com/browserslist/browserslist#browsers-data-updating'
)
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@
"repository": "browserslist/browserslist",
"scripts": {
"test": "c8 pnpm unit && eslint . && size-limit",
"unit": "NODE_ENV=test uvu test .test.js",
"unit:fast": "NODE_ENV=test uvu test '^[^/]+.test.js'"
"unit": "NODE_ENV=test uvu test .test.js"
},
"dependencies": {
"caniuse-lite": "^1.0.30001356",
"electron-to-chromium": "^1.4.161",
"escalade": "^3.1.1",
"node-releases": "^2.0.5",
"picocolors": "^1.0.0"
"update-browserslist-db": "github:browserslist/update-db"
},
"engines": {
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
Expand All @@ -53,7 +51,6 @@
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.0.0",
"fs-extra": "^10.1.0",
"nanoid": "^3.3.4",
"nanospy": "^0.5.0",
"size-limit": "^7.0.8",
"uvu": "^0.5.3"
Expand Down
18 changes: 12 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7e019ce

Please sign in to comment.