Unverified Commit 72c3d4eb authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Try to fix CI (#3806)

* Try to fix CI

* Bump Jest elsewhere

* Bump Babel elsewhere

* Fix CI on Windows by writing .cmd file back
parent 19e0bb18
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 39 additions and 25 deletions
+39 -25
......@@ -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",
......
......@@ -16,6 +16,6 @@
"index.js"
],
"devDependencies": {
"jest": "22.0.6"
"jest": "22.1.1"
}
}
......@@ -59,7 +59,7 @@
"text-table": "0.2.0"
},
"devDependencies": {
"jest": "22.0.6"
"jest": "22.1.1"
},
"scripts": {
"test": "jest"
......
......@@ -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",
......
......@@ -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",
......
......@@ -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'], {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment