committed by
GitHub
parent
20d2b4f98d
commit
e4f3964f67
11
node_modules/browserslist/node.js
generated
vendored
11
node_modules/browserslist/node.js
generated
vendored
@ -94,7 +94,12 @@ function pickEnv(config, opts) {
|
||||
}
|
||||
|
||||
function parsePackage(file) {
|
||||
var config = JSON.parse(fs.readFileSync(file))
|
||||
var config = JSON.parse(
|
||||
fs
|
||||
.readFileSync(file)
|
||||
.toString()
|
||||
.replace(/^\uFEFF/m, '')
|
||||
)
|
||||
if (config.browserlist && !config.browserslist) {
|
||||
throw new BrowserslistError(
|
||||
'`browserlist` key instead of `browserslist` in ' + file
|
||||
@ -380,9 +385,9 @@ module.exports = {
|
||||
if (latest !== 0 && latest < halfYearAgo) {
|
||||
console.warn(
|
||||
'Browserslist: caniuse-lite is outdated. Please run:\n' +
|
||||
' npx browserslist@latest --update-db\n' +
|
||||
' npx update-browserslist-db@latest\n' +
|
||||
' Why you should do it regularly: ' +
|
||||
'https://github.com/browserslist/browserslist#browsers-data-updating'
|
||||
'https://github.com/browserslist/update-db#readme'
|
||||
)
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user