updated npm modules

This commit is contained in:
2019-05-20 20:43:45 -05:00
parent 2319197b81
commit f166b72b7d
1113 changed files with 8758 additions and 12227 deletions

View File

@@ -1,6 +1,31 @@
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 4.6
* Add `mobileToDesktop` option (by Nicolò Ribaudo).
## 4.5.6
* Make `Node > 5` and `node > 5` queries case insensitive.
## 4.5.5
* Fix CLI help (by Marcel Gerber).
* Add KaiOS browser to docs.
## 4.5.4
* Update docs (by Andrew Leedham and Dan Onoshko).
## 4.5.3
* Fix splitting string to queries.
## 4.5.2
* Show default browsers in CLI on project without config.
## 4.5.1
* Improve text for the warning about outdated `caniuse-lite`.
## 4.5
* Add `>=`, `>`, and `<=` support for Node.js version (by Mathspy Terabithian).
## 4.4.2
* Allow to have string in `package.json` (by @dmarkhas).

84
node_modules/browserslist/README.md generated vendored
View File

@@ -73,19 +73,51 @@ You can test Browserslist queries in [online demo].
* [`browserslist-ga`] downloads your website browsers statistics
to use it in `> 0.5% in my stats` query.
* [`browserslist-useragent`] checks browser by user agent string
to match Browserslist target browsers query.
* [`browserslist-useragent-regexp`] compiles Browserslist query to a RegExp
to test browser useragent.
* [`browserslist-useragent-ruby`] is a Ruby library to checks browser
by user agent string to match Browserslist.
* [`browserslist-browserstack`] runs BrowserStack tests for all browsers
in Browserslist config.
* [`caniuse-api`] returns browsers which support some specific feature.
* Run `npx browserslist` in your project directory to see projects
target browsers. This CLI tool is built-in and available in any project
with Autoprefixer.
[`browserslist-useragent-ruby`]: https://github.com/browserslist/browserslist-useragent-ruby
[`browserslist-useragent`]: https://github.com/pastelsky/browserslist-useragent
[`browserslist-ga`]: https://github.com/browserslist/browserslist-ga
[`caniuse-api`]: https://github.com/Nyalab/caniuse-api
[`browserslist-useragent-ruby`]: https://github.com/browserslist/browserslist-useragent-ruby
[`browserslist-useragent`]: https://github.com/pastelsky/browserslist-useragent
[`browserslist-useragent-regexp`]: https://github.com/browserslist/browserslist-useragent-regexp
[`browserslist-ga`]: https://github.com/browserslist/browserslist-ga
[`caniuse-api`]: https://github.com/Nyalab/caniuse-api
[`browserslist-browserstack`]: https://github.com/xeroxinteractive/browserslist-browserstack
## Best Practices
* Select browsers directly (`last 2 Chrome versions`) only if you are making
a web app for a kiosk with one browser. There are a lot of browsers
on the market. If you are making general web app you should respect
browsers diversity.
* There is a `defaults` query, which gives a reasonable configuration
for most users:
```json
"browserslist": [
"defaults"
]
```
* If you want to change the default set of browsers we recommend to combine
`last 1 version`, `not dead` with `> 0.2%` (or `> 1% in US`,
`> 1% in my stats`). `last n versions` adds too many dead browsers
and does not add popular old versions. Choosing a percentage above `0.2%`
will in the long run make popular browsers even more popular. We might run
into a monopoly and stagnation situation, as we had with Internet Explorer 6.
Please use this setting with caution.
* Dont remove browsers just because you dont know them. Opera Mini has
100 million users in Africa and it is more popular in the global market
than Microsoft Edge. Chinese QQ Browsers has more market share than Firefox
and desktop Safari altogether.
## Queries
@@ -128,25 +160,6 @@ _A quick way to test your query is to do `npx browserslist '> 0.5%, not IE 11'`
in your terminal._
### Best Practices
* Select browsers directly (`last 2 Chrome versions`) only if you are making
a web app for a kiosk with one browser. There are a lot of browsers
on the market. If you are making general web app you should respect
browsers diversity.
* If you want to change the default set of browsers we recommend to combine
`last 1 version`, `not dead` with `> 0.2%` (or `> 1% in US`,
`> 1% in my stats`). `last n versions` adds too many dead browsers
and does not add popular old versions. Choosing a percentage above `0.2%`
will in the long run make popular browsers even more popular. We might run
into a monopoly and stagnation situation, as we had with Internet Explorer 6.
Please use this setting with caution.
* Dont remove browsers just because you dont know them. Opera Mini has
100 million users in Africa and it is more popular in the global market
than Microsoft Edge. Chinese QQ Browsers has more market share than Firefox
and desktop Safari altogether.
### Full List
You can specify the browser and Node.js versions by queries (case insensitive):
@@ -169,7 +182,7 @@ You can specify the browser and Node.js versions by queries (case insensitive):
`browserslist-config-mycompany` npm package.
* `ie 6-8`: selects an inclusive range of versions.
* `Firefox > 20`: versions of Firefox newer than 20.
`>=`, `<` and `<=` work too.
`>=`, `<` and `<=` work too. It also works with Node.js.
* `iOS 7`: the iOS browser version 7 directly.
* `Firefox ESR`: the latest [Firefox ESR] version.
* `unreleased versions` or `unreleased Chrome versions`:
@@ -256,6 +269,7 @@ Names are case insensitive:
* `Safari` for desktop Safari.
* `Samsung` for Samsung Internet.
* `UCAndroid` or `and_uc` for UC Browser for Android.
* `kaios` for KaiOS Browser.
## `package.json`
@@ -485,6 +499,10 @@ Options:
Default is `false.`
* `dangerousExtend`: Disable security checks for `extend` query.
Default is `false.`
* `mobileToDesktop`: Use desktop browsers if Can I Use doesnt have data
about this mobile version. For instance, Browserslist will return
`chrome 20` on `and_chr 20` query (Can I Use has only data only about
latest versions of mobile browsers). Default is `false`.
For non-JS environment and debug purpose you can use CLI tool:
@@ -556,13 +574,9 @@ To disable the caching altogether, set the `BROWSERSLIST_DISABLE_CACHE`
environment variable.
## Contributors
## Security Contact
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/0" alt="" width="76" height="90" align="left">
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/1" alt="" width="76" height="90" align="left">
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/2" alt="" width="76" height="90" align="left">
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/3" alt="" width="76" height="90" align="left">
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/4" alt="" width="76" height="90" align="left">
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/5" alt="" width="76" height="90" align="left">
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/6" alt="" width="76" height="90" align="left">
<img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/7" alt="" width="76" height="90" align="left">
To report a security vulnerability, please use the [Tidelift security contact].
Tidelift will coordinate the fix and disclosure.
[Tidelift security contact]: https://tidelift.com/security

13
node_modules/browserslist/cli.js generated vendored
View File

@@ -13,7 +13,7 @@ var USAGE = 'Usage:\n' +
' ' + pkg.name + ' --config="path/to/browserlist/file"\n' +
' ' + pkg.name + ' --coverage "QUERIES"\n' +
' ' + pkg.name + ' --coverage=US "QUERIES"\n' +
' ' + pkg.name + ' --coverage=US,RU,world "QUERIES"\n' +
' ' + pkg.name + ' --coverage=US,RU,global "QUERIES"\n' +
' ' + pkg.name + ' --env="environment name defined in config"\n' +
' ' + pkg.name + ' --stats="path/to/browserlist/stats/file"'
@@ -72,17 +72,6 @@ if (isArg('--help') || isArg('-h')) {
var browsers
try {
if (!queries && !opts.config) {
if (browserslist.findConfig(process.cwd())) {
opts.path = process.cwd()
} else {
error(
'Browserslist config was not found. ' +
'Define queries or config path.' +
'\n\n' + USAGE
)
}
}
browsers = browserslist(queries, opts)
} catch (e) {
if (e.name === 'BrowserslistError') {

131
node_modules/browserslist/index.js generated vendored
View File

@@ -91,17 +91,73 @@ function generateFilter (sign, version) {
}
}
function compareStrings (a, b) {
function generateSemverFilter (sign, version) {
version = version.split('.').map(parseSimpleInt)
version[1] = version[1] || 0
version[2] = version[2] || 0
if (sign === '>') {
return function (v) {
v = v.split('.').map(parseSimpleInt)
return compareSemver(v, version) > 0
}
} else if (sign === '>=') {
return function (v) {
v = v.split('.').map(parseSimpleInt)
return compareSemver(v, version) >= 0
}
} else if (sign === '<') {
return function (v) {
v = v.split('.').map(parseSimpleInt)
return compareSemver(version, v) > 0
}
} else {
return function (v) {
v = v.split('.').map(parseSimpleInt)
return compareSemver(version, v) >= 0
}
}
}
function parseSimpleInt (x) {
return parseInt(x)
}
function compare (a, b) {
if (a < b) return -1
if (a > b) return +1
return 0
}
function normalizeVersion (data, version) {
function compareSemver (a, b) {
return (
compare(a[0], b[0]) ||
compare(a[1], b[1]) ||
compare(a[2], b[2])
)
}
function resolveVersion (data, version) {
if (data.versions.indexOf(version) !== -1) {
return version
} else if (browserslist.versionAliases[data.name][version]) {
return browserslist.versionAliases[data.name][version]
} else {
return false
}
}
function normalizeVersion (data, version, context) {
var resolved = resolveVersion(data, version)
if (
!resolved &&
context.mobileToDesktop &&
browserslist.desktopNames[data.name]
) {
var alias = checkName(browserslist.desktopNames[data.name])
resolved = resolveVersion(alias, version)
}
if (resolved) {
return resolved
} else if (data.versions.length === 1) {
return data.versions[0]
} else {
@@ -235,6 +291,9 @@ function resolve (queries, context) {
* version in direct query.
* @param {boolean} [opts.dangerousExtend] Disable security checks
* for extend query.
* @param {boolean} [opts.mobileToDesktop] Alias mobile browsers to the desktop
* version when Can I Use doesn't have
* data about the specified version.
* @returns {string[]} Array with browser names in Can I Use.
*
* @example
@@ -263,7 +322,8 @@ function browserslist (queries, opts) {
var context = {
ignoreUnknownVersions: opts.ignoreUnknownVersions,
dangerousExtend: opts.dangerousExtend
dangerousExtend: opts.dangerousExtend,
mobileToDesktop: opts.mobileToDesktop
}
env.oldDataWarning(browserslist.data)
@@ -282,10 +342,10 @@ function browserslist (queries, opts) {
if (FLOAT_RANGE.test(name1[1]) && FLOAT_RANGE.test(name2[1])) {
return parseFloat(name2[1]) - parseFloat(name1[1])
} else {
return compareStrings(name2[1], name1[1])
return compare(name2[1], name1[1])
}
} else {
return compareStrings(name1[0], name2[0])
return compare(name1[0], name2[0])
}
})
@@ -325,29 +385,26 @@ function doMatch (string, qs) {
var or = /^(?:,\s*|\s+OR\s+)(.*)/i
var and = /^\s+AND\s+(.*)/i
return find(
string,
function (parsed, n, max) {
if (and.test(parsed)) {
qs.unshift({ type: QUERY_AND, queryString: parsed.match(and)[1] })
return true
} else if (or.test(parsed)) {
qs.unshift({ type: QUERY_OR, queryString: parsed.match(or)[1] })
return true
} else if (n === max) {
qs.unshift({ type: QUERY_OR, queryString: parsed.trim() })
return true
}
return false
return find(string, function (parsed, n, max) {
if (and.test(parsed)) {
qs.unshift({ type: QUERY_AND, queryString: parsed.match(and)[1] })
return true
} else if (or.test(parsed)) {
qs.unshift({ type: QUERY_OR, queryString: parsed.match(or)[1] })
return true
} else if (n === max) {
qs.unshift({ type: QUERY_OR, queryString: parsed.trim() })
return true
}
)
return false
})
}
function find (string, predicate) {
for (var n = 1, max = string.length; n <= max; n++) {
var parsed = string.substr(-n, n)
if (predicate(parsed, n, max)) {
return string.replace(parsed, '')
return string.slice(0, -n)
}
}
return ''
@@ -391,6 +448,15 @@ browserslist.aliases = {
qqandroid: 'and_qq'
}
// Can I Use only provides a few versions for some browsers (e.g. and_chr).
// Fallback to a similar browser for unknown versions
browserslist.desktopNames = {
and_chr: 'chrome',
and_ff: 'firefox',
ie_mob: 'ie',
op_mob: 'opera'
}
// Aliases to work with joined versions like `ios_saf 7.0-7.1`
browserslist.versionAliases = { }
@@ -724,8 +790,8 @@ var QUERIES = [
regexp: /^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i,
select: function (context, name, from, to) {
var data = checkName(name)
from = parseFloat(normalizeVersion(data, from) || from)
to = parseFloat(normalizeVersion(data, to) || to)
from = parseFloat(normalizeVersion(data, from, context) || from)
to = parseFloat(normalizeVersion(data, to, context) || to)
function filter (v) {
var parsed = parseFloat(v)
@@ -745,6 +811,21 @@ var QUERIES = [
})
}
},
{
regexp: /^node\s*(>=?|<=?)\s*([\d.]+)$/i,
select: function (context, sign, version) {
var nodeVersions = jsReleases.filter(function (i) {
return i.name === 'nodejs'
}).map(function (i) {
return i.version
})
return nodeVersions
.filter(generateSemverFilter(sign, version))
.map(function (v) {
return 'node ' + v
})
}
},
{
regexp: /^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/,
select: function (context, name, sign, version) {
@@ -828,7 +909,7 @@ var QUERIES = [
select: function (context, name, version) {
if (/^tp$/i.test(version)) version = 'TP'
var data = checkName(name)
var alias = normalizeVersion(data, version)
var alias = normalizeVersion(data, version, context)
if (alias) {
version = alias
} else {
@@ -837,7 +918,7 @@ var QUERIES = [
} else {
alias = version.replace(/\.0$/, '')
}
alias = normalizeVersion(data, alias)
alias = normalizeVersion(data, alias, context)
if (alias) {
version = alias
} else if (context.ignoreUnknownVersions) {

4
node_modules/browserslist/node.js generated vendored
View File

@@ -291,6 +291,7 @@ module.exports = {
oldDataWarning: function oldDataWarning (agentsObj) {
if (dataTimeChecked) return
dataTimeChecked = true
if (process.env.BROWSERSLIST_IGNORE_OLD_DATA) return
var latest = latestReleaseTime(agentsObj)
var halfYearAgo = Date.now() - TIME_TO_UPDATE_CANIUSE
@@ -306,7 +307,8 @@ module.exports = {
})
console.warn(
'Browserslist: caniuse-lite is outdated. ' +
'Please run next command `' + command + ' caniuse-lite browserslist`')
'Please run next command `' + command + '`'
)
}
},

View File

@@ -1,24 +1,25 @@
{
"_from": "browserslist@^4.3.4",
"_id": "browserslist@4.4.2",
"_from": "browserslist@^4.5.2",
"_id": "browserslist@4.6.0",
"_inBundle": false,
"_integrity": "sha512-ISS/AIAiHERJ3d45Fz0AVYKkgcy+F/eJHzKEvv1j0wwKGKD9T3BrwKr/5g45L+Y4XIK5PlTqefHciRFcfE1Jxg==",
"_integrity": "sha512-Jk0YFwXBuMOOol8n6FhgkDzn3mY9PYLYGk29zybF05SbRTsMgPqmTNeQQhOghCxq5oFqAXE3u4sYddr4C0uRhg==",
"_location": "/browserslist",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "browserslist@^4.3.4",
"raw": "browserslist@^4.5.2",
"name": "browserslist",
"escapedName": "browserslist",
"rawSpec": "^4.3.4",
"rawSpec": "^4.5.2",
"saveSpec": null,
"fetchSpec": "^4.3.4"
"fetchSpec": "^4.5.2"
},
"_requiredBy": [
"/@babel/preset-env",
"/autoprefixer",
"/caniuse-api",
"/core-js-compat",
"/postcss-colormin",
"/postcss-merge-rules",
"/postcss-minify-params",
@@ -26,9 +27,9 @@
"/postcss-reduce-initial",
"/stylehacks"
],
"_resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.2.tgz",
"_shasum": "6ea8a74d6464bb0bd549105f659b41197d8f0ba2",
"_spec": "browserslist@^4.3.4",
"_resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.0.tgz",
"_shasum": "5274028c26f4d933d5b1323307c1d1da5084c9ff",
"_spec": "browserslist@^4.5.2",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\@babel\\preset-env",
"author": {
"name": "Andrey Sitnik",
@@ -46,18 +47,13 @@
},
"bundleDependencies": false,
"dependencies": {
"caniuse-lite": "^1.0.30000939",
"electron-to-chromium": "^1.3.113",
"node-releases": "^1.1.8"
"caniuse-lite": "^1.0.30000967",
"electron-to-chromium": "^1.3.133",
"node-releases": "^1.1.19"
},
"deprecated": false,
"description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
"homepage": "https://github.com/browserslist/browserslist#readme",
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"keywords": [
"caniuse",
"browsers",
@@ -69,5 +65,5 @@
"type": "git",
"url": "git+https://github.com/browserslist/browserslist.git"
},
"version": "4.4.2"
"version": "4.6.0"
}