browserslist
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -0,1 +1,4 @@ | ||
## 1.7.1 | ||
* Fix unreleased browsers version detection. | ||
## 1.7 | ||
@@ -2,0 +5,0 @@ * Add `--config` and `--env` arguments to CLI (by Jarek Rencz). |
14
index.js
@@ -6,6 +6,9 @@ var path = require('path'); | ||
var caniuse = require('caniuse-db/data.json').agents; | ||
Object.keys(caniuse).forEach(function (key) { | ||
caniuse[key].versions = caniuse[key].versions.filter(Boolean); | ||
}); | ||
function normalize(versions) { | ||
return versions.filter(function (version) { | ||
return typeof version === 'string'; | ||
}); | ||
} | ||
var FLOAT_RANGE = /^\d+(\.\d+)?(-\d+(\.\d+)?)*$/; | ||
@@ -618,4 +621,4 @@ var IS_SECTION = /^\s*\[(.+)\]\s*$/; | ||
name: name, | ||
versions: browser.versions, | ||
released: browser.versions | ||
versions: normalize(caniuse[name].versions), | ||
released: normalize(caniuse[name].versions.slice(0, -3)) | ||
}; | ||
@@ -627,2 +630,3 @@ fillUsage(browserslist.usage.global, name, browser.usage_global); | ||
var full = browser.versions[i]; | ||
if (!full) continue; | ||
@@ -629,0 +633,0 @@ if ( full.indexOf('-') !== -1 ) { |
{ | ||
"name": "browserslist", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "Share browsers list between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset", | ||
@@ -21,3 +21,3 @@ "keywords": [ | ||
"jest": "^18.1.0", | ||
"lint-staged": "^3.2.8", | ||
"lint-staged": "^3.2.9", | ||
"pre-commit": "^1.1.3", | ||
@@ -24,0 +24,0 @@ "yaspeller": "^3.0.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35672
635