update-browserslist-db 1.0.4 → 1.0.5

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.
@@ -0,0 +1,16 @@
1
+ let { execSync } = require('child_process')
2
+ let pico = require('picocolors')
3
+
4
+ try {
5
+ let version = parseInt(execSync('npm -v'))
6
+ if (version <= 6) {
7
+ process.stderr.write(
8
+ pico.red(
9
+ 'Update npm or call ' +
10
+ pico.yellow('npx browserslist@latest --update-db') +
11
+ '\n'
12
+ )
13
+ )
14
+ process.exit(1)
15
+ }
16
+ } catch (e) {}
package/cli.js CHANGED
@@ -3,6 +3,7 @@
3
3
  let { readFileSync } = require('fs')
4
4
  let { join } = require('path')
5
5
 
6
+ require('./check-npm-version')
6
7
  let updateDb = require('./')
7
8
 
8
9
  const ROOT = __dirname
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "update-browserslist-db",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config",
5
5
  "keywords": [
6
6
  "caniuse",