diff --git a/packages/babel-preset-react-app/package.json b/packages/babel-preset-react-app/package.json index 0a13c707176..aedc079df35 100644 --- a/packages/babel-preset-react-app/package.json +++ b/packages/babel-preset-react-app/package.json @@ -14,7 +14,7 @@ "dependencies": { "@babel/core": "7.0.0-beta.37", "@babel/plugin-proposal-class-properties": "7.0.0-beta.37", - "@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.37", + "@babel/plugin-syntax-dynamic-import": "7.0.0-beta.37", "@babel/plugin-transform-classes": "7.0.0-beta.37", "@babel/plugin-transform-destructuring": "7.0.0-beta.37", "@babel/plugin-transform-react-constant-elements": "7.0.0-beta.37", diff --git a/packages/confusing-browser-globals/package.json b/packages/confusing-browser-globals/package.json index 211a2df30a9..7656213d4c1 100644 --- a/packages/confusing-browser-globals/package.json +++ b/packages/confusing-browser-globals/package.json @@ -16,6 +16,6 @@ "index.js" ], "devDependencies": { - "jest": "22.0.6" + "jest": "22.1.1" } } diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index 1f9cc58884e..da1a4e53329 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -59,7 +59,7 @@ "text-table": "0.2.0" }, "devDependencies": { - "jest": "22.0.6" + "jest": "22.1.1" }, "scripts": { "test": "jest" diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 33e6f651bc3..3a6275f9b39 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -30,13 +30,13 @@ "lib/index.js" ], "devDependencies": { - "@babel/code-frame": "7.0.0-beta.36", - "@babel/core": "7.0.0-beta.36", - "@babel/runtime": "7.0.0-beta.36", + "@babel/code-frame": "7.0.0-beta.37", + "@babel/core": "7.0.0-beta.37", + "@babel/runtime": "7.0.0-beta.37", "anser": "1.4.4", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^8.0.2", - "babel-jest": "^22.0.6", + "babel-jest": "^22.1.0", "babel-loader": "^8.0.0-beta.0", "babel-preset-react-app": "^3.1.1", "chalk": "^2.1.0", @@ -50,7 +50,7 @@ "eslint-plugin-react": "7.5.1", "flow-bin": "^0.63.1", "html-entities": "1.2.1", - "jest": "22.0.6", + "jest": "22.1.1", "jest-fetch-mock": "1.2.1", "object-assign": "4.1.1", "promise": "8.0.1", diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 84d0faf615e..d4d26b1d017 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -26,7 +26,7 @@ "autoprefixer": "7.2.5", "babel-core": "7.0.0-bridge.0", "babel-eslint": "8.2.1", - "babel-jest": "22.0.6", + "babel-jest": "22.1.0", "babel-loader": "8.0.0-beta.0", "babel-preset-react-app": "^3.1.1", "case-sensitive-paths-webpack-plugin": "2.1.1", @@ -45,7 +45,7 @@ "file-loader": "1.1.6", "fs-extra": "5.0.0", "html-webpack-plugin": "2.30.1", - "jest": "22.0.6", + "jest": "22.1.1", "object-assign": "4.1.1", "postcss-flexbugs-fixes": "3.2.0", "postcss-loader": "2.0.10", diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index 558aa0b0b96..f3826abb4eb 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -237,21 +237,35 @@ inquirer } if (fs.existsSync(paths.yarnLockFile)) { - // TODO: this is disabled for three reasons. - // - // 1. It produces garbage warnings on Windows on some systems: - // https://github.com/facebookincubator/create-react-app/issues/2030 - // - // 2. For the above reason, it breaks Windows CI: - // https://github.com/facebookincubator/create-react-app/issues/2624 - // - // 3. It is wrong anyway: re-running yarn will respect the lockfile - // rather than package.json we just updated. Instead we should have - // updated the lockfile. So we might as well not do it while it's broken. - // https://github.com/facebookincubator/create-react-app/issues/2627 - // - // console.log(cyan('Running yarn...')); - // spawnSync('yarnpkg', [], { stdio: 'inherit' }); + const windowsCmdFilePath = path.join( + appPath, + 'node_modules', + '.bin', + 'react-scripts.cmd' + ); + let windowsCmdFileContent; + if (process.platform === 'win32') { + // https://github.com/facebookincubator/create-react-app/pull/3806#issuecomment-357781035 + // Yarn is diligent about cleaning up after itself, but this causes the react-scripts.cmd file + // to be deleted while it is running. This trips Windows up after the eject completes. + // We'll read the batch file and later "write it back" to match npm behavior. + try { + windowsCmdFileContent = fs.readFileSync(windowsCmdFilePath); + } catch (err) { + // If this fails we're not worse off than if we didn't try to fix it. + } + } + + console.log(cyan('Running yarn...')); + spawnSync('yarnpkg', ['--cwd', process.cwd()], { stdio: 'inherit' }); + + if (windowsCmdFileContent && !fs.existsSync(windowsCmdFilePath)) { + try { + fs.writeFileSync(windowsCmdFilePath, windowsCmdFileContent); + } catch (err) { + // If this fails we're not worse off than if we didn't try to fix it. + } + } } else { console.log(cyan('Running npm install...')); spawnSync('npm', ['install', '--loglevel', 'error'], {