-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
update TypeScript dependancy #5485
Conversation
86b4b67
to
db01890
Compare
@chicoxyzzy updated the pull request. |
checker.emitFiles(); | ||
} | ||
var emitResult = program.emit(); | ||
var errors = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); |
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.
Can you double (triple?) check this by putting some invalid type info into jest.d.ts? I want to make sure tests still fail in that case. I remember having some issues in the past when I tried to upgrade TS to 1.5.
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.
Yes, seems like tests pass in that case. I'll try to fix it soon. TypeScript's documentation on Compiler API is not very helpful :(
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.
Yea, I gave up and just left it. Since our use is so minimal, I think the only real win we would get from upgrading is being able to use JSX
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.
... which in an alternative universe might have prevented the spreadgate. 😄
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.
@mhegazy says this should be fine.
Thank you for #104. Jorge |
Are you interested in coming back to this @chicoxyzzy? |
@zpao sure. I'll revisit this on Monday |
hmm.. #5646 is a bit outdated because current master has Jest 0.9.0-fb3 as a dependancy |
Just update typescript. Unless you really want to take over #5646, I haven't had a chance to come back to it in the last couple weeks (just rebased and pushed though) |
Ping @chicoxyzzy, would you mind changing this to only update TS? Thanks. |
@zpao why do we need our own compilerHost? I'd like to take update TS but I don't sure I understand all requirements. This information will be very helpful and I will be able to ask some help about compiler-related things in TS community. |
I have no idea how the typescript stuff works, so no clue if the compilerHost is important. There are 2 requirements:
|
@chicoxyzzy compilerHost is needed, in this particular case, in order to tell compiler API how to retrieve file contents by name etc., and in this particular case it's used in order to provide React libs from real files as well as contents being compiled in form of a "virtual file". |
I still have no time to work on this but AFAIK TypeScript 2 will be released in month or so as one guy from TypeScript team said here |
I said we were thinking of a beta, not an official release, and no promises on the date. It won't hurt to bump to 1.8. |
Yes I think it's not very hard to update |
I just renamed branch locally and remotely. I'll create new PR when and if I'll get how to debug jest tests =) |
ok I have some progress (I think). now I'm getting errors:
Trying to realise why resolving these modules has broken and how to fix that |
@chicoxyzzy Because https://github.com/facebook/react/blob/master/src/isomorphic/modern/class/__tests__/ReactTypeScriptClass-test.ts#L10 imports modules |
@RReverser there are definitions here https://github.com/facebook/react/tree/master/src/isomorphic/modern/class Definitions from You are right. I've add these references to
|
OK. Now tests pass even if I put invalid type info to jest definitions. Same as it was in November :/ |
see #6686 |
...and other deps except Babel