Fixes#5333
printFileSizesAfterBuild calls canReadAsset with an object containing
the file name while measureFileSizesBeforeBuild calls it with just the
name. When canReadAsset only receives the name it returns false since
accessing the `name` property results in undefined.
This commit fixes that by having canReadAssset instead expect only the
file name and making printFileSizesAfterBuild just like
measureFileSizesBeforeBuild only provide the name as argument.
Clicking Error overlay should feed the correct line number for gvim.
Added `gvim` in `COMMON_EDITORS_LINUX`, launches new gvim when it is running.
Tested with gvim 8.0.707 on a Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux VM
Relates to https://github.com/facebook/create-react-app/issues/2636.
* Only install react-scripts in CI mode
* Link locally
* Re-enable all output tests
* 💄 Polish webpack output
* Test sass support message
* Add more tests, but disabled
* Format missing default export error
* Format aliased import
* Why was node-sass required? Odd
* Format webpack rejection error
* Re-enable unknown package test
* Format file not found error and catch module scope plugin error
* Re-disable case sensitive paths
* Intercept and format case sensitive path errors
* Test out of scope message formatting
* Run behavior on macOS
* Run behavior on Node 8 and 10, only Node 8 for macOS
* Add some debugging
* Update matcher
* Only check stderr
* Remove old snapshot
* More debug
* Remove debug
* Add new debug
* Disable test on linux
* Add comment for future
* Run smoke tests with Jest
* Get a unique port for smoke test
* Upgrade verdaccio across the board
* Drop unneeded step
* Try latest instead
* Boot registry in home directory
* Correct config path
* Add mutex
* Test webpack message formatting
* Strip color
* Add browserslist to default
* Disable another broken feature
* Use file name whitelist to prevent RCE
Use a whitelist to validate user-provided file names. This doesn't cover
the entire range of valid filenames but should cover almost all of them
in practice. Allows letters, numbers, periods, dashes, and underscores.
Opting to use a whitelist instead of a blacklist because getting this
wrong leaves us vulnerable to a RCE attack.
* Allow alphabet characters from all languages
Updated the whitelist to /^[\p{L}0-9/.\-_]+$/u, which matches
alphanumeric characters, periods, dashes, and underscores. Unicode
property support is stage 4 so I've inlined the transpiled version.
* Only use file name whitelist on Windows
* Log error message if file name does not pass whitelist
- [x] Utilize webpack 4 development and production modes
- [x] Upgrade webpack dev server
- [x] Webpack 4 compatible release of thread-loader
- [x] Webpack 4 compatible release of HtmlWebpackPlugin
- [x] Webpack 4 compatible release of SwPrecacheWebpackPlugin
- [x] Webpack 4 compatible release of WebpackManifestPlugin
- [x] Update README
- [x] Update WebpackDevServerUtils
- [x] Update InterpolateHtmlPlugin
- [x] Update ModuleScopePlugin
- [x] Update WatchMissingNodeModulesPlugin
- [x] Move UglifyJS options to webpack 4 optimize
- [x] Move InterpolateHtmlPlugin to make it tapable on HtmlWebpackPlugin
- [x] vendor splitting via splitChunks.splitChunks (https://twitter.com/wSokra/status/969633336732905474)
- [x] long term caching via splitChunks.runtimeChunk (https://twitter.com/wSokra/status/969679223278505985)
- [x] Make sure process.env.NODE_ENV is proxied correctly to `react-error-overlay`
- [x] Implicit webpack.NamedModulesPlugin in dev config as its default in webpack 4
- [x] Disable webpack performance hints as we have our own filesize reporter
- [x] Replace ExtractTextPlugin with MiniCssExtractPlugin
- [x] Switch to css whole file minification via OptimizeCSSAssetsPlugin rather than per module css minification to gain performance