From e0dfa30525743b569e506f68ce58d1423f54adf9 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sun, 25 Sep 2016 15:38:15 +0100 Subject: [PATCH 1/6] Mention the npm bug in migration instructions --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb0504cd644..bf0b3b178ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ Inside any created project that has not been ejected, run: npm install --save-dev --save-exact react-scripts@0.6.0 ``` +**Note: If the project fails to start, remove `node_modules`, ensure `react-scripts` is `0.6.0` in your `package.json`, and run `npm install` again. There seems to be an [npm bug](https://github.com/npm/npm/issues/14073) affecting this update.** + ## 0.5.1 (September 23, 2016) ### Build Dependency (`react-scripts`) From 1b6f58cf05e6ad11e14dcc436570f783fe7cb6fc Mon Sep 17 00:00:00 2001 From: Shubheksha Jalan Date: Mon, 26 Sep 2016 04:01:53 +0530 Subject: [PATCH 2/6] Forked react-scripts should retain the binary name (#754) * Forked react-scripts should retain the binary name * Forked react-scripts should retain the binary name -- fixed issue with regex * Forked react-scripts should retain the binary name -- fixed style nit --- packages/react-scripts/scripts/eject.js | 5 +---- packages/react-scripts/scripts/init.js | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index c0c498d12df..9eb6d4fd44c 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -94,10 +94,7 @@ prompt( delete appPackage.scripts['eject']; Object.keys(appPackage.scripts).forEach(function (key) { appPackage.scripts[key] = appPackage.scripts[key] - .replace( - new RegExp(ownPackageName + ' (\\w+)', 'g'), - 'node scripts/$1.js' - ); + .replace(/react-scripts (\w+)/g, 'node scripts/$1.js'); }); // Add Jest config diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index 222902a7413..cbefd413c29 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -24,10 +24,10 @@ module.exports = function(appPath, appName, verbose, originalDirectory) { // Setup the script rules appPackage.scripts = { - 'start': ownPackageName + ' start', - 'build': ownPackageName + ' build', - 'test': ownPackageName + ' test --env=jsdom', - 'eject': ownPackageName + ' eject' + 'start': 'react-scripts start', + 'build': 'react-scripts build', + 'test': 'react-scripts test --env=jsdom', + 'eject': 'react-scripts eject' }; fs.writeFileSync( From 4c183b729a1347f43a6fafdf6d6e249a373093ba Mon Sep 17 00:00:00 2001 From: Ville Immonen Date: Mon, 26 Sep 2016 01:32:08 +0300 Subject: [PATCH 3/6] Bump recursive-readdir (#756) Removes a deprecation warning: npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue See: https://github.com/jergason/recursive-readdir/pull/39 --- packages/react-scripts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 2ca1da5a57b..75ca1c3662a 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -58,7 +58,7 @@ "postcss-loader": "0.13.0", "promise": "7.1.1", "react-dev-utils": "^0.2.0", - "recursive-readdir": "2.0.0", + "recursive-readdir": "2.1.0", "rimraf": "2.5.4", "strip-ansi": "3.0.1", "style-loader": "0.13.1", From 52bc72fbde81a6e423a12af49f5fe274e668c36d Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Mon, 26 Sep 2016 02:22:55 -0700 Subject: [PATCH 4/6] Remove the `.` at the end of the init message (#760) Otherwise it makes it an invalid path :( --- packages/react-scripts/scripts/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index cbefd413c29..fa42f6dcee6 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -88,7 +88,7 @@ module.exports = function(appPath, appName, verbose, originalDirectory) { } console.log(); - console.log('Success! Created ' + appName + ' at ' + appPath + '.'); + console.log('Success! Created ' + appName + ' at ' + appPath); console.log('Inside that directory, you can run several commands:'); console.log(); console.log(chalk.cyan(' npm start')); From 7d0fd03b001ffe2eeb5b72a121edd9df0e9dfb8c Mon Sep 17 00:00:00 2001 From: Ville Immonen Date: Mon, 26 Sep 2016 12:29:55 +0300 Subject: [PATCH 5/6] Fix the right and bottom padding of the error overlay (#758) --- packages/react-dev-utils/webpackHotDevClient.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-dev-utils/webpackHotDevClient.js b/packages/react-dev-utils/webpackHotDevClient.js index b92a0059129..ad8560fa043 100644 --- a/packages/react-dev-utils/webpackHotDevClient.js +++ b/packages/react-dev-utils/webpackHotDevClient.js @@ -60,6 +60,7 @@ function addOverlayDivTo(iframe) { var div = iframe.contentDocument.createElement('div'); div.id = 'react-dev-utils-webpack-hot-dev-client-overlay-div'; div.style.position = 'fixed'; + div.style.boxSizing = 'border-box'; div.style.left = 0; div.style.top = 0; div.style.right = 0; From 37819ee8efba7940470e1fec8882c603540e502d Mon Sep 17 00:00:00 2001 From: vaibhav Date: Mon, 26 Sep 2016 18:36:46 +0530 Subject: [PATCH 6/6] added link to better visualizing tool (#764) issue here #762 --- packages/react-scripts/scripts/start.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 297507f18c6..5ce896568eb 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -174,7 +174,7 @@ function addMiddleware(devServer) { // - /index.html (served as HTML5 history API fallback) // - /*.hot-update.json (WebpackDevServer uses this too for hot reloading) // - /sockjs-node/* (WebpackDevServer uses this for hot reloading) - // Tip: use https://www.debuggex.com/ to visualize the regex + // Tip: use https://jex.im/regulex/ to visualize the regex var mayProxy = /^(?!\/(index\.html$|.*\.hot-update\.json$|sockjs-node\/)).*$/; devServer.use(mayProxy, // Pass the scope regex both to Express and to the middleware for proxying