Repository navigation
build: check Svelte on the native TypeScript API and lint in parallel #2227
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| diff --git a/dist/src/index.js b/dist/src/index.js | ||
| index 8eec91714c82eaba243e87e3a7b90863c8b7710d..e875707d66fbf26e3d3fcc9834fc8683cebe2419 100644 | ||
| --- a/dist/src/index.js | ||
| +++ b/dist/src/index.js | ||
| @@ -129483,10 +129483,26 @@ function runTypeScriptDiagnostics(tsconfigPath, useTsgo, incremental, cwd) { | ||
| proc.on('error', (err) => { | ||
| reject(err); | ||
| }); | ||
| - proc.on('close', () => { | ||
| + proc.on('close', (code, signal) => { | ||
| const output = `${stdout}\n${stderr}`; | ||
| try { | ||
| - resolve(parseDiagnostics(output, cwd)); | ||
| + const diagnostics = parseDiagnostics(output, cwd); | ||
| + // A non-zero exit can also mean the compiler reported diagnostics, so only | ||
| + // treat it as an error when nothing was parsed. A signal always is: the | ||
| + // run did not finish, so any diagnostics it printed are partial. A crash | ||
| + // reported as an exit code after a diagnostic was printed (e.g. on Windows, | ||
| + // where every kill is reported that way) still resolves. | ||
| + if (signal !== null || (code !== 0 && diagnostics.length === 0)) { | ||
| + const reason = signal !== null | ||
| + ? `was killed by signal ${signal}` | ||
| + : `exited with code ${code} without a parseable diagnostic`; | ||
| + // Include what the compiler printed. Unparsed output, such as a global | ||
| + // error or an unknown compiler option, is often the only explanation. | ||
| + const detail = stripAnsi(output).trim(); | ||
| + reject(new Error(`The TypeScript compiler process ${reason}.${detail ? `\n${detail.slice(0, 2000)}` : ''}`)); | ||
| + return; | ||
| + } | ||
| + resolve(diagnostics); | ||
| } | ||
| catch (e) { | ||
| reject(e); | ||
| @@ -130471,5 +130487,7 @@ parseOptions(async (opts) => { | ||
| catch (_err) { | ||
| console.error(_err); | ||
| console.error('svelte-check failed'); | ||
| + // A failed run must not look like a clean one to CI. | ||
| + exitAfterFlush(1); | ||
| } | ||
| }); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.