react-dev-utils
Advanced tools
Comparing version
@@ -16,8 +16,10 @@ /** | ||
const defaultBrowsers = [ | ||
'>0.2%', | ||
'not dead', | ||
'not ie <= 11', | ||
'not op_mini all', | ||
]; | ||
const defaultBrowsers = { | ||
production: ['>0.2%', 'not dead', 'not op_mini all'], | ||
development: [ | ||
'last 1 chrome version', | ||
'last 1 firefox version', | ||
'last 1 safari version', | ||
], | ||
}; | ||
@@ -24,0 +26,0 @@ function shouldSetBrowsers(isInteractive) { |
@@ -19,3 +19,3 @@ /** | ||
// eslint-disable-next-line no-unused-vars | ||
function formatMessage(message, isError) { | ||
function formatMessage(message) { | ||
let lines = message.split('\n'); | ||
@@ -22,0 +22,0 @@ |
{ | ||
"name": "react-dev-utils", | ||
"version": "8.0.0", | ||
"version": "9.0.0-next.b0cbf2ca", | ||
"description": "Webpack utilities used by Create React App", | ||
@@ -51,3 +51,3 @@ "repository": "facebook/create-react-app", | ||
"address": "1.0.3", | ||
"browserslist": "4.4.1", | ||
"browserslist": "4.4.2", | ||
"chalk": "2.4.2", | ||
@@ -64,3 +64,3 @@ "cross-spawn": "6.0.5", | ||
"immer": "1.10.0", | ||
"inquirer": "6.2.1", | ||
"inquirer": "6.2.2", | ||
"is-root": "2.0.0", | ||
@@ -70,7 +70,7 @@ "loader-utils": "1.2.3", | ||
"pkg-up": "2.0.0", | ||
"react-error-overlay": "^5.1.4", | ||
"react-error-overlay": "6.0.0-next.b0cbf2ca", | ||
"recursive-readdir": "2.2.2", | ||
"shell-quote": "1.6.1", | ||
"sockjs-client": "1.3.0", | ||
"strip-ansi": "5.0.0", | ||
"strip-ansi": "5.1.0", | ||
"text-table": "0.2.0" | ||
@@ -80,3 +80,3 @@ }, | ||
"cross-env": "^5.2.0", | ||
"jest": "^23.6.0" | ||
"jest": "^24.5.0" | ||
}, | ||
@@ -83,0 +83,0 @@ "scripts": { |
@@ -335,3 +335,3 @@ # react-dev-utils | ||
- **appName** `string`: The name that will be printed to the terminal. | ||
- **config** `Object`: The webpack configuration options to be provided to the webpack constructor. | ||
- **config** `Object`: The webpack configuration options to be provided to the webpack constructor. | ||
- **devSocket** `Object`: Required if `useTypeScript` is `true`. This object should include `errors` and `warnings` which are functions accepting an array of errors or warnings emitted by the type checking. This is useful when running `fork-ts-checker-webpack-plugin` with `async: true` to report errors that are emitted after the webpack build is complete. | ||
@@ -338,0 +338,0 @@ - **urls** `Object`: To provide the `urls` argument, use `prepareUrls()` described below. |
@@ -15,44 +15,41 @@ /** | ||
const types = { diagnostic: 'TypeScript', lint: 'TSLint' }; | ||
function formatter(message, useColors) { | ||
const hasGetters = typeof message.getFile === 'function'; | ||
const { type, severity, file, line, content, code, character } = | ||
typeof message.getFile === 'function' | ||
? { | ||
type: message.getType(), | ||
severity: message.getSeverity(), | ||
file: message.getFile(), | ||
line: message.getLine(), | ||
content: message.getContent(), | ||
code: message.getCode(), | ||
character: message.getCharacter(), | ||
} | ||
: message; | ||
const colors = new chalk.constructor({ enabled: useColors }); | ||
const messageColor = message.isWarningSeverity() ? colors.yellow : colors.red; | ||
const fileAndNumberColor = colors.bold.cyan; | ||
let source; | ||
const source = file && fs.existsSync(file) && fs.readFileSync(file, 'utf-8'); | ||
const frame = source | ||
? codeFrame( | ||
source, | ||
{ start: { line: line, column: character } }, | ||
{ highlightCode: useColors } | ||
) | ||
.split('\n') | ||
.map(str => ' ' + str) | ||
.join(os.EOL) | ||
: ''; | ||
if (hasGetters) { | ||
source = | ||
message.getFile() && | ||
fs.existsSync(message.getFile()) && | ||
fs.readFileSync(message.getFile(), 'utf-8'); | ||
} else { | ||
source = | ||
message.file && | ||
fs.existsSync(message.file) && | ||
fs.readFileSync(message.file, 'utf-8'); | ||
} | ||
let frame = ''; | ||
if (source) { | ||
frame = codeFrame( | ||
source, | ||
{ start: { line: message.line, column: message.character } }, | ||
{ highlightCode: useColors } | ||
) | ||
.split('\n') | ||
.map(str => ' ' + str) | ||
.join(os.EOL); | ||
} | ||
const severity = hasGetters ? message.getSeverity() : message.severity; | ||
const types = { diagnostic: 'TypeScript', lint: 'TSLint' }; | ||
return [ | ||
messageColor.bold(`${types[message.type]} ${severity.toLowerCase()}: `) + | ||
(hasGetters ? message.getContent() : message.content) + | ||
messageColor.bold(`${types[type]} ${severity.toLowerCase()} in `) + | ||
fileAndNumberColor(`${file}(${line},${character})`) + | ||
messageColor(':'), | ||
content + | ||
' ' + | ||
messageColor.underline( | ||
(message.type === 'lint' ? 'Rule: ' : 'TS') + message.code | ||
), | ||
messageColor.underline((type === 'lint' ? 'Rule: ' : 'TS') + code), | ||
'', | ||
@@ -59,0 +56,0 @@ frame, |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
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
108281
0.19%2489
0.04%2
100%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated