-
-
Notifications
You must be signed in to change notification settings - Fork 75
TypeScript upgrade breaks the world #15
Comments
Ran out of energy for this. It looks like the way tokens are represented changed, so the section that translates tokens needs to be updated to account for that. Basically, this function needs to be updated: https://github.com/eslint/typescript-eslint-parser/blob/master/lib/ast-converter.js#L278 If you run the tests now, you'll get a bunch of errors showing |
Thanks a lot for starting this, Nicolas. I am trying to investigate a bit today in between other things. So far I have managed to determine that this commit is the point at which TypeScript 1.7.x breaks the tests for this project: microsoft/TypeScript@85f0240 |
Just a guess at this point, but I think our reliance on internal SyntaxKind codes is a point of potential fragility right now. The TS authors (perhaps understandably) don't include such internal changes in release notes. Digging into that commit above I can see that the And in
So I would assume that first check above is what is now producing |
Sure enough, now that I have gone through the diff on that TS commit and amended the code ranges which are checked in Given this change unlocks the ability for us to start development with a working test suite on the latest version of TS, I figured it was worth submitting as a PR. If you have any thoughts as to how to mitigate the exposure to TS changing their internal codes, let me know. Might I suggest that once that PR goes in, we start enforcing linting and tests on PRs? |
Fix: SyntaxKind code checks, update TS peerDependency ^1.7.3 (fixes #15)
It looks like there were some changes in the TypeScript output between 1.6.x and 1.8.x that are causing identifiers to be labeled as keywords in the output. As such, most tests are failing right now.
I'm looking into this.
The text was updated successfully, but these errors were encountered: