Skip to content

use externalTranspiler before doing diffs for status #751

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 1 commit into from
Nov 26, 2015

Conversation

laurelnaiad
Copy link

Create new function getRawOutputPostExternal with same interface
as getRawOutput except that it returns a <Promise<ts.EmitOutput>
instead of a ts.EmitOutput.

This function calls getRawOutut, then passes the result through
runExternalTranspiler so that babel, if configured, is applied.

Call/use this new function in getOutputJsStatus.

Net result: people using babel are not constantly being told their
JS is Outdated.

Create new function `getRawOutputPostExternal` with same interface
as getRawOutput except that it returns a <Promise<ts.EmitOutput>
instead of a ts.EmitOutput.

This function calls getRawOutut, then passes the result through
`runExternalTranspiler` so that babel, if configured, is applied.

Call/use this new function in `getOutputJsStatus`.

Net result: people using babel are not constantly being told their
JS is Outdated.

Closes TypeStrong#737
if (output.emitSkipped) {
if (output.outputFiles && output.outputFiles.length === 1) {
if (output.outputFiles[0].text === building.Not_In_Context) {
return getRawOutputPostExternal(project, query.filePath)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think it should only be called if the project config says that an external transpiler needs to be used 🌹 or am I misreading

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runExternalTranspiler (which is called by getRawOutputPostExternal) is kind of a misnomer. It's a no-op if an external transpiler isn't configured to run. Ref: https://github.com/laurelnaiad/atom-typescript/blob/iss737/lib/main/lang/modules/building.ts#L168

basarat added a commit that referenced this pull request Nov 26, 2015
use externalTranspiler before doing diffs for status
@basarat basarat merged commit 54ad038 into TypeStrong:master Nov 26, 2015
@basarat
Copy link
Member

basarat commented Nov 26, 2015

Cheers. Will publish with next release 🌹

@basarat
Copy link
Member

basarat commented Dec 3, 2015

@basarat
Copy link
Member

basarat commented Dec 4, 2015

Reversing this commit. Just because I'm lazy, its 9pm on a Friday :) and this causes #765 🌹

@TypeStrong TypeStrong locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants