Commit Graph

1723 Commits

Author SHA1 Message Date
Dan Abramov
ca88a69b77 Bump versions 2018-08-22 19:44:57 +01:00
Dan Abramov
96ba7bddc1 Bump versions 2018-08-22 19:44:29 +01:00
Andrew Clark
24b101d233 Use file name whitelist to prevent RCE (#4866)
* 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
2018-08-22 19:43:38 +01:00
Andrew Clark
577a274d8c Use file name whitelist to prevent RCE (#4866)
* 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
2018-08-22 17:35:24 +01:00
Terbiy
ca5998326d Fix link to the article about BEM (#4858) 2018-08-07 10:57:03 -04:00
Jed Fox
69c3d4b04c Update support info for service workers (#4825) 2018-07-26 13:50:29 -04:00
Ashley Otero
506b3f19f0 Update code of conduct link (#4814) 2018-07-23 09:26:46 -06:00
Jack Zhao
52449c34ee Only use safe options when packing CSS assets (#4706)
* support scoped packages for cra --scripts-version option

* enable safe option to cssnano processor

Fixes #4682
2018-07-23 01:22:05 -04:00
Vladimir Kutepov
8169a93e38 Bump babel-loader to fix npm warning (#4776) 2018-07-23 01:15:41 -04:00
Ian Sutherland
92d9c5ada4 Add Node 10 to CI config and remove Node 6 (#4383)
* Add Node 10 to Travis config. Remove Node 6.

* Add Node 10 to Appveyor config. Remove Node 6.

* Remove node 9 from travis config.

* Increase mocha timeout.

* Update minimum Node version to 8.

* Update yarn to latest on Travis.

* Update old-node test to use Node 4.

* Increase mocha timeout in kitchensink-eject tests.

* Update yarn to latest on Appveyor.
2018-07-15 22:26:42 -06:00
Jack Zhao
366e5d3475 [internal] Separate out kitchensink test into two (#4767)
* support scoped packages for cra --scripts-version option

* seperate out kitchensink test

* add eject to node 6 testing

* travis node 6 eject

* fix CI warnings
2018-07-15 12:21:32 -06:00
Mike Wilcox
706b319633 Fix typo (#4738) 2018-07-05 12:46:24 -04:00
Miguel Palau
4a87838f52 remove extra dot on devtool link comment (#4741) 2018-07-05 12:40:55 -04:00
Ideveloper
26f701fd60 Suggest reactstrap instead of react-bootstrap (#4703)
* Suggest `reactstrap` instead of `react-bootstrap`

* Update README.md
2018-06-29 21:24:38 -04:00
Kent C. Dodds
ea7b37414a add react-testing-library documentation/examples (#4679)
* add react-testing-library documentation/examples

* make react-testing-library a heading

* fix typo
2018-06-26 12:45:00 -04:00
Jack Zhao
d366039795 Support scoped packages for cra --scripts-version option (#4677) 2018-06-25 11:29:54 -04:00
Dan Abramov
1407287839 Add mode entry points to our preset (#4669) 2018-06-23 14:41:51 +01:00
Dan
8de0412c54 babel-preset-react-app@3.1.2 2018-06-23 13:38:59 +01:00
Dan Abramov
805ab399e1 Add modes to our Babel preset (1.x) (#4668) 2018-06-23 13:37:23 +01:00
Anton Rusinov
26febc5251 Add instructions on alternative methods of app creation (#4638) 2018-06-20 14:15:15 -06:00
Jack Zhao
e1ee8032a8 Fix node 10 npm login issue (#4626)
* node10

* token

* rerun tests
2018-06-18 13:00:55 -04:00
Alex Brazier
f26ed0f09a Use yarn in predeploy script if built using yarn (#4623) 2018-06-18 10:06:26 -06:00
Dmitriy Sadkovoy
3e165448a7 Added thread-loader config for application code entrypoint (#4582) 2018-06-07 01:06:47 -06:00
Dmitriy Sadkovoy
d0afe4b3b9 Configured the thread-loader to keeping workers alive in development mode (#4562) 2018-06-05 18:27:34 +02:00
Marius Gedminas
fffe909731 Move whitespace comment closer to where it applies (#4566) 2018-06-05 11:58:47 -04:00
Dan Abramov
6370e40aad Temporarily remove doc section on webpack analyzer (#4564) 2018-06-05 14:58:06 +02:00
Jack Zhao
a98c3df3bb Merge pull request #3945 from joshwcomeau/bundle-stats
Allow bundles to be analyzed with Webpack-specific tools
2018-06-04 01:10:47 -07:00
Josh Comeau
80b24d54d9 Remove outdated bit from README, update bundle-analyzer link 2018-06-03 09:04:11 -04:00
Reuben Antz
227c44f4fa Update file tree view (#4546)
Update file tree view
2018-06-01 08:19:33 -04:00
Jack Zhao
76ef9fadb6 Merge pull request #4014 from viankakrisna/enable-manifest-plugin-on-dev
enable manifest plugin on dev
2018-05-31 10:26:38 -07:00
Joshua Comeau
7c85938458 Create a --stats flag for react-scripts build. Update README.
To analyze Webpack bundles, a "stats" JSON is required.

This PR allows that file to be created and saved to the `build`
directory, so that users can use it with Webpack-specific insight
tools like `webpack-bundle-analyzer` without ejecting their
application.

Updated the README to include details for how to do this.
2018-05-31 07:23:13 -04:00
Jack Zhao
c1b0175253 Merge pull request #3929 from maciej-ka/remove-trailing-spaces-from-copyright
Remove trailing spaces from copyright
2018-05-30 21:46:43 -07:00
Joe Haddad
72906d9949 Adjust browser defaults (#4470) 2018-05-24 18:45:10 -04:00
Jack Zhao
581c453610 Scope hoisting in webpack 4 (#4504) 2018-05-24 18:32:06 -04:00
Graeme
61c864c38a Update paths.js, rename shadow path variable (#4435)
* Update paths.js, rename shadow path variable

This file requires the "path" module and sets it to a variable `path`. The function `ensureSlash` also has a variable `path` that then shadows the `path` module.

* Update paths.js
2018-05-22 21:11:20 -06:00
Saimon Moore
86a82b1626 Update docs about High Sierra npm test issues (#4497) 2018-05-22 10:19:25 -06:00
Luis Nell
0dfc6f6e07 Update node-sass-chokidar docs (#4205)
* Removes Chokidar Recursive Flag

According to the changelog it is not necessary anymore as it doesn't do anything.

* Removes initial build on SCSS watch

Chokidar now does this on it's own.

* Removes sass watch recursive, default include-path

as proposed by @michaelwayman

* Removes another left-over build-css
2018-05-20 23:31:26 +01:00
jamesvsshark
e645d3e879 Fix typo in createReactApp.js warning message (#4309) 2018-05-20 13:56:49 -06:00
Craig Mulligan
0e0f260e35 .mjs should not resolve before .js files (#4085) (#4318)
Support for .mjs files added in #3239 did not account for npm libraries which ship native mjs files alongside js files. This accounts for this by ensuring .js files resolve before their accompanying .mjs file. Note that this is not an ideal end state since selecting a .mjs over a .js extension should be the result of whether `import` was used instead of `require()` in a node environment with native ESM support (currently via `--experimental-modules`). Instead, this change just *always* selects a .js extension before the .mjs extension if it exists.

This unbreaks support for using GraphQL (relay, apollo, etc) within create-react-app projects.
2018-05-20 20:27:31 +01:00
Jack Zhao
d1454febd1 Webpack4 (#4490)
* - [x] Upgrade to webpack 4.8.X
- [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

* disable module concatenation

* fix cleanup

* fix optimization

* restore tmp removal

* preserve

* fix css tests

* fix test run

* fix svg test

* revert tmp dir

* fix import

* fix import

* help debugging

* fix tests

* fix sass test

* restore cleanup
2018-05-20 18:25:57 +01:00
Andreas Cederström
d72678fb0c - [x] Upgrade to webpack 4.8.X (#4077)
- [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
2018-05-20 18:22:24 +01:00
Mike Kusold
493a379c21 Map (css|sass|scss) modules to identity-obj-proxy in jest (#4419) 2018-05-15 21:03:22 -04:00
Ian Sutherland
69cc07f2e3 Update svgr (#4461)
* Update svgr to 1.9.2 in order to reduce install size
2018-05-14 14:43:47 -06:00
Jack Zhao
c2aa1632e6 Fix e2e:docker script (#4454)
* verdaccio configs

* verdaccio configs

* fix typo

* revert e2e-installs

* move config to tasks
2018-05-14 01:05:16 +01:00
shawn wang
0f84a4bcdb add create-react-app-parcel (#4449)
Add create-react-app-parcel to alternatives section in README
2018-05-11 22:33:59 -06:00
stereobooster
a8a64c3645 Update babel-plugin-macros (#4432)
Update babel-plugin-macros to 2.2.1.
2018-05-11 10:06:21 -06:00
Marco Fugaro
9843be53f5 Update the thread loader test in errors (#4420) 2018-05-09 00:37:19 -04:00
William Chargin
3aaddefc51 ensureSlash: Fix accidental string-to-NaN coercion (#4424)
Summary:
The `hasSlash` method uses `path.substr(path, path.length - 1)` to
remove the last character from `path`. Clearly, the first parameter is
suspect; it should be `0`. The code works as written, but only very
accidentally: the first parameter is coerced by `ToNumber` to `NaN`,
which is then coerced by `ToInteger` to `+0`, per [the spec][1].

[1]: https://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.substr

Test Plan:
Reading the spec should be sufficient. To verify in the Real World:
```js
const path = "has-slash-but-does-not-need-slash/"
const a = path.substr(path, path.length - 1);
const b = path.substr(0, path.length - 1);
console.log(a === b);  // true
console.log(a);        // has-slash-but-does-not-need-slash
```

wchargin-branch: ensureslash-accidental-coercion
2018-05-08 19:31:25 -04:00
arianon
e5e9f59a4e Update getCSSModuleLocalIdent to support Sass (#4391)
* Update getCSSModuleLocalIdent to support Sass

* Fix Sass/SCSS index module tests

Also make them more consistent with the non-index variants.
2018-05-08 13:07:41 -04:00
Trevor Brindle
7b2eae1745 Update envinfo and issue template (#4375)
* fix: update envinfo + implementation, update issue_template

* update envinfo to 5.4.0, add IE and Edge to —info command,
2018-04-30 10:44:43 -06:00