react-dev-utils
Advanced tools
Comparing version
{ | ||
"name": "react-dev-utils", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Webpack utilities used by Create React App", | ||
@@ -5,0 +5,0 @@ "repository": "facebookincubator/create-react-app", |
@@ -12,8 +12,7 @@ /** | ||
const get = require('lodash/get'); | ||
const chalk = require('chalk'); | ||
module.exports = function printBuildError(err) { | ||
const message = get(err, 'message'); | ||
const stack = get(err, 'stack'); | ||
const message = err != null && err.message; | ||
const stack = err != null && err.stack; | ||
@@ -27,9 +26,5 @@ // Add more helpful message for UglifyJs error | ||
try { | ||
const matched = /Unexpected token:(.+)\[(.+):(.+),(.+)\]\[.+\]/.exec( | ||
stack | ||
); | ||
const matched = /(.+)\[(.+):(.+),(.+)\]\[.+\]/.exec(stack); | ||
if (!matched) { | ||
throw new Error( | ||
"The regex pattern is not matched. Maybe UglifyJs changed it's message?" | ||
); | ||
throw new Error('Using errors for control flow is bad.'); | ||
} | ||
@@ -41,7 +36,9 @@ const problemPath = matched[2]; | ||
'Failed to minify the code from this file: \n\n', | ||
chalk.yellow(`${problemPath} line ${line}:${column}`), | ||
chalk.yellow( | ||
`\t${problemPath}:${line}${column !== '0' ? ':' + column : ''}` | ||
), | ||
'\n' | ||
); | ||
} catch (ignored) { | ||
console.log('Failed to minify the code.', err); | ||
console.log('Failed to minify the bundle.', err); | ||
} | ||
@@ -48,0 +45,0 @@ console.log('Read more here: http://bit.ly/2tRViJ9'); |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
83530
-0.07%2034
-0.15%