browserslist 4.18.0 → 4.18.1
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.
- package/index.js +5 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -209,7 +209,8 @@ function filterByYear(since, context) {
|
|
|
209
209
|
var data = byName(name, context)
|
|
210
210
|
if (!data) return selected
|
|
211
211
|
var versions = Object.keys(data.releaseDate).filter(function (v) {
|
|
212
|
-
|
|
212
|
+
var date = data.releaseDate[v]
|
|
213
|
+
return date !== null && date >= since
|
|
213
214
|
})
|
|
214
215
|
return selected.concat(versions.map(nameMapper(data.name)))
|
|
215
216
|
}, [])
|
|
@@ -642,7 +643,7 @@ function coverQuery(context, coverage, statMode) {
|
|
|
642
643
|
coverage = parseFloat(coverage)
|
|
643
644
|
var usage = browserslist.usage.global
|
|
644
645
|
if (statMode) {
|
|
645
|
-
if (statMode.match(/^my\s+stats$/)) {
|
|
646
|
+
if (statMode.match(/^my\s+stats$/i)) {
|
|
646
647
|
if (!context.customUsage) {
|
|
647
648
|
throw new BrowserslistError('Custom usage statistics was not provided')
|
|
648
649
|
}
|
|
@@ -916,11 +917,11 @@ var QUERIES = [
|
|
|
916
917
|
}
|
|
917
918
|
},
|
|
918
919
|
{
|
|
919
|
-
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)
|
|
920
|
+
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%$/i,
|
|
920
921
|
select: coverQuery
|
|
921
922
|
},
|
|
922
923
|
{
|
|
923
|
-
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)
|
|
924
|
+
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/i,
|
|
924
925
|
select: coverQuery
|
|
925
926
|
},
|
|
926
927
|
{
|