-
-
Notifications
You must be signed in to change notification settings - Fork 48
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 @babel/parser #75
Comments
@David-Else thanks for being on top of the latest features and letting us know, that really helps 👍 Yes, I guess upgrading the dependency should do the work. Maybe there's a new plugin to use here: abracadabra/src/ast/transformation.ts Lines 74 to 97 in 4981bfb
Hopefully, any regression should be caught by our unit tests, so it's a safe move to make. Can you take care of it? Otherwise, @fabien0102 and I will likely do it next week 😉 |
This article goes deep on what needs to be done: https://www.infoq.com/news/2020/01/babel-typescript-await/ I spent a while reading about how Babel works, and it seems I would need a few days to really get a grip on things. Would be cool is fabian sorted it :) In my reading I found https://github.com/alangpierce/sucrase which is 20x faster than babel and a drop in replacement. VS Code runs a fixed version of V8/Electron for long periods of time, so I don't quite know how babel stays updated with the latest typescript features, but 3.8 has |
Just as an update, VS Code 1.42 came out yesterday. It has support built in for TS 3.8 new features for JS and TS, but ships with TS 3.7.5. To use the new feature (inc top level await and JS private properties) you need to either:
settings.json (main global file, link will be different depending on your package manager)
|
I had a go at updating babel to the latest, so this was the only change I made:
On running the tests I get many failure which all relate to this function in
Here is the first error of many, I am afraid I don't know how to fix this problem.
|
The signature of |
VS Code with TypeScript 3.8 built in is out tomorrow... No pressure :) abracadabra is currently not working with any new TypeScript language features, TS 3.8 has been out a couple of weeks now: https://devblogs.microsoft.com/typescript/announcing-typescript-3-8/
As well as full support for top level await/private fields there is now a built in I won't keep hassling you I promise, this will be the last reminder. I don't think the next TS 3.9 will have any new language features, you should not have to deal with any out-dating for quite a long time :) |
That's fair. It's an important issue to tackle if we want to keep the extension useful. Fabien and I weren't available to work on this in the last few weeks for personal reasons (+ conferences on my side). I'm still busy next week but we might find some time to tackle this next Thursday! Otherwise we will tackle it in 2 weeks. Not ideal, but it will do. From what you said, we should upgrade the version and fix the compiler errors that happens (because some function we use have changed their signatures, hopefully just a few of them). |
Released in version 3.2.2. Thank you @David-Else 👍 |
Deno has top level await enabled, and so does TypeScript 3.8.
At the moment any code with this in stops abracadabra working. I think it could be cured by updating https://www.npmjs.com/package/@babel/parser to the latest, it seems it supports top level await now, but I don't know if you need to enable it? I have not used Babel. Cheers!
The text was updated successfully, but these errors were encountered: