New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Exit status code for fatal Webpack exceptions #1754
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'preact-cli': patch | ||
--- | ||
|
||
Corrects status code when there is a fatal Webpack error in production builds |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,7 +127,7 @@ | |
"preact": "^10.5.13", | ||
"preact-render-to-string": "^5.1.19", | ||
"preact-router": "^3.0.1", | ||
"puppeteer": "^9.1.1", | ||
"puppeteer": "^13.7.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't be necessary, but our version of Puppeteer has turned super flakey recently. Updating seems to make it somewhat less so. |
||
"sass": "^1.34.0", | ||
"sass-loader": "^10.2.0", | ||
"shelljs": "^0.8.3", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,14 +78,14 @@ async function prodBuild(env) { | |
} | ||
|
||
function runCompiler(compiler) { | ||
return new Promise((res, rej) => { | ||
return new Promise(res => { | ||
compiler.run((err, stats) => { | ||
showStats(stats, true); | ||
|
||
if (err || (stats && stats.hasErrors())) { | ||
rej(`${red('\n\nBuild failed! \n\n')} ${err || ''}`); | ||
if (err) { | ||
error(err, 1); | ||
} | ||
|
||
showStats(stats, true); | ||
|
||
Comment on lines
-83
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
res(stats); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but for some (godforsaken) reason, puppeteer randomly never exits on the CI. I've seen no pattern for this, just that it occurs.
GitHub's default is 360 minutes, or 6 hours, which we definitely don't need. I just caught a run still going after an hour and had to manually kill it. 10 minutes should be plenty of time.