File: //opt/code/node_modules/autoprefixer/node_modules/browserslist/package.json
{
"name": "browserslist",
"version": "2.11.3",
"description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
"keywords": [
"caniuse",
"browsers",
"target"
],
"author": {
"name": "Andrey Sitnik",
"email": "andrey@sitnik.ru"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/ai/browserslist"
},
"dependencies": {
"caniuse-lite": "^1.0.30000792",
"electron-to-chromium": "^1.3.30"
},
"bin": {
"browserslist": "./cli.js"
},
"devDependencies": {
"cross-spawn": "^5.1.0",
"eslint": "^4.15.0",
"eslint-ci": "^0.1.1",
"eslint-config-logux": "^17.0.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-es5": "^1.2.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.6.2",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-security": "^1.4.0",
"eslint-plugin-standard": "^3.0.1",
"jest": "^22.0.6",
"lint-staged": "^6.0.0",
"pre-commit": "^1.1.3",
"size-limit": "^0.14.0",
"yaspeller-ci": "^1.0.0"
},
"eslintConfig": {
"extends": "eslint-config-logux/browser",
"rules": {
"security/detect-unsafe-regex": "off",
"global-require": "off"
},
"overrides": {
"files": [
"*.test.js"
],
"rules": {
"es5/no-arrow-functions": "off"
}
}
},
"jest": {
"testEnvironment": "node",
"coverageThreshold": {
"global": {
"statements": 100
}
},
"modulePathIgnorePatterns": [
"<rootDir>/test/fixtures"
]
},
"size-limit": [
{
"path": "index.js",
"limit": "160 KB"
}
],
"scripts": {
"lint-staged": "lint-staged",
"spellcheck": "yaspeller-ci README.md CHANGELOG.md",
"lint": "eslint-ci *.js test/*.js __mocks__/*.js",
"test": "jest --coverage && yarn lint && yarn spellcheck && size-limit"
},
"lint-staged": {
"*.md": "yaspeller-ci",
"*.js": "eslint"
},
"browser": {
"./node.js": "./browser.js",
"path": false
},
"pre-commit": [
"lint-staged"
],
"readme": "# Browserslist\n\n<img align=\"right\" width=\"120\" height=\"120\"\n src=\"./logo.svg\" alt=\"Browserslist logo by Anton Lovchikov\">\n\nLibrary to share target browsers between different front-end tools.\nIt is used in:\n\n* [Autoprefixer]\n* [babel-preset-env]\n (external config in `package.json` or `browserslist` will be supported in 7.0)\n* [postcss-preset-env]\n* [eslint-plugin-compat]\n* [stylelint-no-unsupported-browser-features]\n* [postcss-normalize]\n\nAll tools that rely on Browserslist will find its config automatically,\nwhen you add the following to `package.json`:\n\n```json\n{\n \"browserslist\": [\n \"> 1%\",\n \"last 2 versions\"\n ]\n}\n```\n\nOr in `.browserslistrc` config:\n\n```yaml\n# Browsers that we support\n\n> 1%\nLast 2 versions\nIE 10 # sorry\n```\n\nDevelopers set browsers list in queries like `last 2 version`\nto be free from updating browser versions manually.\nBrowserslist will use [Can I Use] data for this queries.\n\nBrowserslist will take browsers queries from tool option,\n`browserslist` config, `.browserslistrc` config,\n`browserslist` section in `package.json` or environment variables.\n\nYou can test Browserslist queries in [online demo].\n\n<a href=\"https://evilmartians.com/?utm_source=browserslist\">\n <img src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\"\n alt=\"Sponsored by Evil Martians\"\n width=\"236\"\n height=\"54\"\n \\>\n</a>\n\n[stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features\n[eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat\n[postcss-preset-env]: https://github.com/jonathantneal/postcss-preset-env\n[babel-preset-env]: https://github.com/babel/babel/tree/master/packages/babel-preset-env\n[postcss-normalize]: https://github.com/jonathantneal/postcss-normalize\n[Autoprefixer]: https://github.com/postcss/autoprefixer\n[online demo]: http://browserl.ist/\n[Can I Use]: http://caniuse.com/\n\n## Tools\n\n* [`browserslist-useragent`] checks browser by user agent string\n to match Browserslist target browsers query.\n* [`caniuse-api`] returns browsers which support some specific feature.\n* Run `npx browserslist` in your project directory to see project’s\n target browsers. This CLI tool is built-in and available in any project\n with Autoprefixer.\n\n[`browserslist-useragent`]: https://github.com/pastelsky/browserslist-useragent\n[`caniuse-api`]: https://github.com/Nyalab/caniuse-api\n\n## Queries\n\nBrowserslist will use browsers query from one of this sources:\n\n1. Tool options. For example `browsers` option in Autoprefixer.\n2. `BROWSERSLIST` environment variable.\n3. `browserslist` config file in current or parent directories.\n3. `.browserslistrc` config file in current or parent directories.\n4. `browserslist` key in `package.json` file in current or parent directories.\n **We recommend this way.**\n5. If the above methods did not produce a valid result\n Browserslist will use defaults: `> 1%, last 2 versions, Firefox ESR`.\n\nYou can specify the versions by queries (case insensitive):\n\n* `last 2 versions`: the last 2 versions for each browser.\n* `last 2 Chrome versions`: the last 2 versions of Chrome browser.\n* `> 5%`: versions selected by global usage statistics.\n `>=`, `<` and `<=` work too.\n* `> 5% in US`: uses USA usage statistics. It accepts [two-letter country code].\n* `> 5% in alt-AS`: uses Asia region usage statistics. List of all region codes\n can be found at [`caniuse-lite/data/regions`].\n* `> 5% in my stats`: uses [custom usage data].\n* `extends browserslist-config-mycompany`: take queries from\n `browserslist-config-mycompany` npm package.\n* `ie 6-8`: selects an inclusive range of versions.\n* `Firefox > 20`: versions of Firefox newer than 20.\n `>=`, `<` and `<=` work too.\n* `iOS 7`: the iOS browser version 7 directly.\n* `Firefox ESR`: the latest [Firefox ESR] version.\n* `unreleased versions` or `unreleased Chrome versions`:\n alpha and beta versions.\n* `last 2 major versions` or `last 2 iOS major versions`:\n all minor/patch releases of last 2 major versions.\n* `since 2015` or `last 2 years`: all versions released since year 2015\n (also `since 2015-03` and `since 2015-03-10`).\n* `not ie <= 8`: exclude browsers selected by previous queries.\n\nYou can add `not ` to any query.\n\n### Debug\n\nRun `npx browserslist` in project directory to see what browsers was selected\nby your queries.\n\n```sh\n$ npx browserslist\nand_chr 61\nand_ff 56\nand_qq 1.2\nand_uc 11.4\nandroid 56\nbaidu 7.12\nbb 10\nchrome 62\nedge 16\nfirefox 56\nios_saf 11\nopera 48\nsafari 11\nsamsung 5\n```\n\n### Notes\n\nBrowserslist works with separated versions of browsers.\nYou should avoid queries like `Firefox > 0`.\n\nMultiple criteria are combined as a boolean `OR`. A browser version must match\nat least one of the criteria to be selected.\n\nAll queries are based on the [Can I Use] support table,\ne.g. `last 3 iOS versions` might select `8.4, 9.2, 9.3` (mixed major and minor),\nwhereas `last 3 Chrome versions` might select `50, 49, 48` (major only).\n\n[`caniuse-lite/data/regions`]: https://github.com/ben-eb/caniuse-lite/tree/master/data/regions\n[two-letter country code]: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements\n[custom usage data]: #custom-usage-data\n[Can I Use]: http://caniuse.com/\n\n### Browsers\n\nNames are case insensitive:\n\n* `Android` for Android WebView.\n* `Baidu` for Baidu Browser.\n* `BlackBerry` or `bb` for Blackberry browser.\n* `Chrome` for Google Chrome.\n* `ChromeAndroid` or `and_chr` for Chrome for Android\n* `Edge` for Microsoft Edge.\n* `Electron` for Electron framework. It will be converted to Chrome version.\n* `Explorer` or `ie` for Internet Explorer.\n* `ExplorerMobile` or `ie_mob` for Internet Explorer Mobile.\n* `Firefox` or `ff` for Mozilla Firefox.\n* `FirefoxAndroid` or `and_ff` for Firefox for Android.\n* `iOS` or `ios_saf` for iOS Safari.\n* `Opera` for Opera.\n* `OperaMini` or `op_mini` for Opera Mini.\n* `OperaMobile` or `op_mob` for Opera Mobile.\n* `QQAndroid` or `and_qq` for QQ Browser for Android.\n* `Safari` for desktop Safari.\n* `Samsung` for Samsung Internet.\n* `UCAndroid` or `and_uc` for UC Browser for Android.\n\n## `package.json`\n\nIf you want to reduce config files in project root, you can specify\nbrowsers in `package.json` with `browserslist` key:\n\n```json\n{\n \"private\": true,\n \"dependencies\": {\n \"autoprefixer\": \"^6.5.4\"\n },\n \"browserslist\": [\n \"> 1%\",\n \"last 2 versions\"\n ]\n}\n```\n\n## Config File\n\nBrowserslist config should be named `.browserslistrc` or `browserslist`\nand have browsers queries split by a new line. Comments starts with `#` symbol:\n\n```yaml\n# Browsers that we support\n\n> 1%\nLast 2 versions\nIE 8 # sorry\n```\n\nBrowserslist will check config in every directory in `path`.\nSo, if tool process `app/styles/main.css`, you can put config to root,\n`app/` or `app/styles`.\n\nYou can specify direct path in `BROWSERSLIST_CONFIG` environment variables.\n\n## Shareable Configs\n\nYou can use the following query to reference an exported Browserslist config\nfrom another package:\n\n```json\n \"browserslist\": [\n \"extends browserslist-config-mycompany\"\n ]\n```\n\nFor security reasons, external configuration only supports packages that have\nthe `browserslist-config-` prefix. npm scoped packages are also supported, by\nnaming or prefixing the module with `@scope/browserslist-config`, such as\n`@scope/browserslist-config` or `@scope/browserslist-config-mycompany`.\n\nIf you don’t accept Browserslist queries from users, you can disable the\nvalidation by using the `dangerousExtend` option:\n\n```js\nbrowserslist(queries, { path, dangerousExtend: true })\n```\n\nBecause this uses `npm`'s resolution, you can also reference specific files\nin a package:\n\n```json\n \"browserslist\": [\n \"extends browserslist-config-mycompany/desktop\",\n \"extends browserslist-config-mycompany/mobile\"\n ]\n```\n\nWhen writing a shared Browserslist package, just export an array.\n`browserslist-config-mycompany/index.js`:\n\n```js\nmodule.exports = [\n 'last 2 versions',\n 'ie 9'\n]\n```\n\n## Environment Variables\n\nIf some tool use Browserslist inside, you can change browsers settings\nby [environment variables]:\n\n* `BROWSERSLIST` with browsers queries.\n\n ```sh\n BROWSERSLIST=\"> 5%\" gulp css\n ```\n\n* `BROWSERSLIST_CONFIG` with path to config file.\n\n ```sh\n BROWSERSLIST_CONFIG=./config/browserslist gulp css\n ```\n\n* `BROWSERSLIST_ENV` with environments string.\n\n ```sh\n BROWSERSLIST_ENV=\"development\" gulp css\n ```\n\n* `BROWSERSLIST_STATS` with path to the custom usage data\n for `> 1% in my stats` query.\n\n ```sh\n BROWSERSLIST_STATS=./config/usage_data.json gulp css\n ```\n\n* `BROWSERSLIST_DISABLE_CACHE` if you want to disable config reading cache.\n\n ```sh\n BROWSERSLIST_DISABLE_CACHE=1 gulp css\n ```\n\n[environment variables]: https://en.wikipedia.org/wiki/Environment_variable\n\n## Environments\n\nYou can also specify different browser queries for various environments.\nBrowserslist will choose query according to `BROWSERSLIST_ENV` or `NODE_ENV`\nvariables. If none of them is declared, Browserslist will firstly look\nfor `development` queries and then use defaults.\n\nIn `package.json`:\n\n```js\n \"browserslist\": {\n \"production\": [\n \"last 2 version\",\n \"ie 9\"\n ],\n \"development\": [\n \"last 1 version\"\n ]\n }\n```\n\nIn `.browserslistrc` config:\n\n```ini\n[production]\nlast 2 version\nie 9\n\n[development]\nlast 1 version\n```\n\n## Custom Usage Data\n\nIf you have a website, you can query against the usage statistics of your site:\n\n1. Import your Google Analytics data into [Can I Use].\n Press `Import…` button in Settings page.\n2. Open browser DevTools on [Can I Use] and paste this snippet\n into the browser console:\n\n ```js\n var e=document.createElement('a');e.setAttribute('href', 'data:text/plain;charset=utf-8,'+encodeURIComponent(JSON.stringify(JSON.parse(localStorage['usage-data-by-id'])[localStorage['config-primary_usage']])));e.setAttribute('download','stats.json');document.body.appendChild(e);e.click();document.body.removeChild(e);\n ```\n3. Save the data to a `browserslist-stats.json` file in your project.\n\nOf course, you can generate usage statistics file by any other method.\nFile format should be like:\n\n```js\n{\n \"ie\": {\n \"6\": 0.01,\n \"7\": 0.4,\n \"8\": 1.5\n },\n \"chrome\": {\n …\n },\n …\n}\n```\n\nNote that you can query against your custom usage data\nwhile also querying against global or regional data.\nFor example, the query `> 1% in my stats, > 5% in US, 10%` is permitted.\n\n[Can I Use]: http://caniuse.com/\n\n## Webpack\n\nIf you plan to use Browserslist on client-side (e. g., tools like CodePen)\nBrowserslist could take big part of your bundle (150 KB).\n\nBut the biggest part of this size will be region usage statistics, which could\nbe useless for you. `IgnorePlugin` could cut it:\n\n```js\nconst webpackConfig = {\n …\n plugins: [\n new webpack.IgnorePlugin(/caniuse-lite\\/data\\/regions/)\n ]\n}\n```\n\nThis plugin will reduce Browserslist size from 150 KB to 6 KB. But you loose\n`> 1% in US` queries support.\n\n## JS API\n\n```js\nvar browserslist = require('browserslist');\n\n// Your CSS/JS build tool code\nvar process = function (source, opts) {\n var browsers = browserslist(opts.browsers, {\n stats: opts.stats,\n path: opts.file,\n env: opts.env\n });\n // Your code to add features for selected browsers\n}\n```\n\nQueries can be a string `\"> 5%, last 1 version\"`\nor an array `['> 5%', 'last 1 version']`.\n\nIf a query is missing, Browserslist will look for a config file.\nYou can provide a `path` option (that can be a file) to find the config file\nrelatively to it.\n\nFor non-JS environment and debug purpose you can use CLI tool:\n\n```sh\nbrowserslist \"> 1%, last 2 versions\"\n```\n\n## Coverage\n\nYou can get total users coverage for selected browsers by JS API:\n\n```js\nbrowserslist.coverage(browserslist('> 1%')) //=> 81.4\n```\n\n```js\nbrowserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1\n```\n\nOr by CLI:\n\n```sh\n$ browserslist --coverage \"> 1%\"\nThese browsers account for 81.4% of all users globally\n```\n\n```sh\n$ browserslist --coverage=US \"> 1% in US\"\nThese browsers account for 83.1% of all users in the US\n```\n\n## Cache\n\nBrowserslist caches the configuration it reads from `package.json` and\n`browserslist` files, as well as knowledge about the existence of files,\nfor the duration of the hosting process.\n\nTo clear these caches, use:\n\n```js\nbrowserslist.clearCaches();\n```\n\nTo disable the caching altogether, set the `BROWSERSLIST_DISABLE_CACHE`\nenvironment variable.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/ai/browserslist/issues"
},
"_id": "browserslist@2.11.3",
"dist": {
"shasum": "32969d0de20e4712aa46c5578af5474240850ec4"
},
"_from": "browserslist@^2.11.3",
"_resolved": "http://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz"
}