browserslist 4.17.2 → 4.17.3

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/update-db.js +14 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserslist",
3
- "version": "4.17.2",
3
+ "version": "4.17.3",
4
4
  "description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
5
5
  "keywords": [
6
6
  "caniuse",
@@ -15,11 +15,11 @@
15
15
  "license": "MIT",
16
16
  "repository": "browserslist/browserslist",
17
17
  "dependencies": {
18
- "caniuse-lite": "^1.0.30001261",
19
- "electron-to-chromium": "^1.3.854",
18
+ "caniuse-lite": "^1.0.30001264",
19
+ "electron-to-chromium": "^1.3.857",
20
20
  "escalade": "^3.1.1",
21
- "nanocolors": "^0.2.12",
22
- "node-releases": "^1.1.76"
21
+ "node-releases": "^1.1.77",
22
+ "picocolors": "^0.2.1"
23
23
  },
24
24
  "engines": {
25
25
  "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
package/update-db.js CHANGED
@@ -1,16 +1,11 @@
1
1
  var childProcess = require('child_process')
2
- var nanocolors = require('nanocolors')
3
2
  var escalade = require('escalade/sync')
3
+ var pico = require('picocolors')
4
4
  var path = require('path')
5
5
  var fs = require('fs')
6
6
 
7
7
  var BrowserslistError = require('./error')
8
8
 
9
- var red = nanocolors.red
10
- var bold = nanocolors.bold
11
- var green = nanocolors.green
12
- var yellow = nanocolors.yellow
13
-
14
9
  function detectLockfile () {
15
10
  var packageDir = escalade('.', function (dir, names) {
16
11
  return names.indexOf('package.json') !== -1 ? dir : ''
@@ -97,9 +92,9 @@ function diffBrowsersLists (old, current) {
97
92
  return intersection.indexOf(version) === -1
98
93
  })
99
94
  return removedVersions.map(function (version) {
100
- return red('- ' + browser + ' ' + version)
95
+ return pico.red('- ' + browser + ' ' + version)
101
96
  }).concat(addedVersions.map(function (version) {
102
- return green('+ ' + browser + ' ' + version)
97
+ return pico.green('+ ' + browser + ' ' + version)
103
98
  }))
104
99
  })
105
100
  .reduce(function (result, array) {
@@ -212,8 +207,8 @@ function updatePackageManually (print, lock, latest) {
212
207
  if (caniuseVersions.length === 1 &&
213
208
  caniuseVersions[0] === latest.version) {
214
209
  print(
215
- 'Installed version: ' + bold(green(latest.version)) + '\n' +
216
- bold(green('caniuse-lite is up to date')) + '\n'
210
+ 'Installed version: ' + pico.bold(pico.green(latest.version)) + '\n' +
211
+ pico.bold(pico.green('caniuse-lite is up to date')) + '\n'
217
212
  )
218
213
  return
219
214
  }
@@ -224,7 +219,7 @@ function updatePackageManually (print, lock, latest) {
224
219
  print(
225
220
  'Installed version' +
226
221
  (caniuseVersions.length === 1 ? ': ' : 's: ') +
227
- bold(red(caniuseVersions.join(', '))) +
222
+ pico.bold(pico.red(caniuseVersions.join(', '))) +
228
223
  '\n' +
229
224
  'Removing old caniuse-lite from lock file\n'
230
225
  )
@@ -233,13 +228,13 @@ function updatePackageManually (print, lock, latest) {
233
228
  var install = lock.mode === 'yarn' ? 'yarn add -W' : lock.mode + ' install'
234
229
  print(
235
230
  'Installing new caniuse-lite version\n' +
236
- yellow('$ ' + install + ' caniuse-lite') + '\n'
231
+ pico.yellow('$ ' + install + ' caniuse-lite') + '\n'
237
232
  )
238
233
  try {
239
234
  childProcess.execSync(install + ' caniuse-lite')
240
235
  } catch (e) /* istanbul ignore next */ {
241
236
  print(
242
- red(
237
+ pico.red(
243
238
  '\n' +
244
239
  e.stack + '\n\n' +
245
240
  'Problem with `' + install + ' caniuse-lite` call. ' +
@@ -252,7 +247,7 @@ function updatePackageManually (print, lock, latest) {
252
247
  var del = lock.mode === 'yarn' ? 'yarn remove -W' : lock.mode + ' uninstall'
253
248
  print(
254
249
  'Cleaning package.json dependencies from caniuse-lite\n' +
255
- yellow('$ ' + del + ' caniuse-lite') + '\n'
250
+ pico.yellow('$ ' + del + ' caniuse-lite') + '\n'
256
251
  )
257
252
  childProcess.execSync(del + ' caniuse-lite')
258
253
  }
@@ -270,20 +265,20 @@ module.exports = function updateDB (print) {
270
265
  }
271
266
 
272
267
  print(
273
- 'Latest version: ' + bold(green(latest.version)) + '\n'
268
+ 'Latest version: ' + pico.bold(pico.green(latest.version)) + '\n'
274
269
  )
275
270
 
276
271
  if (lock.mode === 'yarn' && lock.version !== 1) {
277
272
  var update = 'yarn up -R'
278
273
  print(
279
274
  'Updating caniuse-lite version\n' +
280
- yellow('$ ' + update + ' caniuse-lite') + '\n'
275
+ pico.yellow('$ ' + update + ' caniuse-lite') + '\n'
281
276
  )
282
277
  try {
283
278
  childProcess.execSync(update + ' caniuse-lite')
284
279
  } catch (e) /* istanbul ignore next */ {
285
280
  print(
286
- red(
281
+ pico.red(
287
282
  '\n' +
288
283
  e.stack + '\n\n' +
289
284
  'Problem with `' + update + ' caniuse-lite` call. ' +
@@ -309,7 +304,7 @@ module.exports = function updateDB (print) {
309
304
 
310
305
  if (browsersListRetrievalError) {
311
306
  print(
312
- red(
307
+ pico.red(
313
308
  '\n' +
314
309
  browsersListRetrievalError.stack + '\n\n' +
315
310
  'Problem with browser list retrieval.\n' +
@@ -325,7 +320,7 @@ module.exports = function updateDB (print) {
325
320
  print('\nTarget browser changes:\n')
326
321
  print(targetBrowserChanges + '\n')
327
322
  } else {
328
- print('\n' + green('No target browser changes') + '\n')
323
+ print('\n' + pico.green('No target browser changes') + '\n')
329
324
  }
330
325
  }
331
326
  }