-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 to TypeScript 3.8 #4100
Update to TypeScript 3.8 #4100
Conversation
In regards to top-level-await, TypeScript will throw if the input does not look like a module (as top-level-await is not supported in scripts). TypeScript recommends adding `export {};` to the file, which is the current idomatic way of identifying a module as a module that otherwise has no imports or exports. Resolves denoland#3937 Resolves denoland#3301 Resolves denoland#3391
There was a change/regression with eslint where it requires a symbolic link now to node_modules in order to resolve all the plugins.
Note on adding (back) a symbolic link for The error is like this:
We need to have more current version of eslint and associated plugins to make sure we are supporting things like TLA and private fields that were recently introduced to ECMAScript and supported in TypeScript. |
node_modules
Outdated
@@ -0,0 +1 @@ | |||
third_party/node_modules |
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.
:<
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.
Mentioned above #4100 (comment)
std/examples/cat.ts
Outdated
@@ -5,3 +5,4 @@ for (const filename of filenames) { | |||
await Deno.copy(Deno.stdout, file); | |||
file.close(); | |||
} | |||
export {}; |
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.
This seems very odd for the cat example. Why are these getting added everywhere?
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.
Sorry I didn't see your comment above.
The TypeScript error recommends adding export {}; to the file, which is the current idiomatic way of identifying a module as a module that otherwise has no imports or exports.
I want to find a way to work around this. export {}
doesn't make sense in these examples. I will look into it.
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.
I honestly don't think you can unless you really do something ugly behind the scenes. See: microsoft/TypeScript#18232. There is a Stage 1 proposal to try to fix it: https://github.com/tc39/proposal-modules-pragma.
Maybe we should just ignore the error again, because we never have non-modules.
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.
If we ignore it, we need to check the emit on bundles... as TypeScript might not emit an async function for the module, which it didn't do in TS 3.7.
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.
LGTM - thanks @kitsonk ~
* tag 'dm': (58 commits) Port permission_prompt_tests to Rust (denoland#4129) upgrade: TypeScript 3.8 (denoland#4100) Remove _async from method names since _sync are gone (denoland#4128) ci: Use fetch-depth: 5 (denoland#4127) fix: Resolve makeTemp* paths from CWD (denoland#4104) Clean up how we use opIds (denoland#4118) Fix issues with JavaScript importing JavaScript. (denoland#4120) fix: [http] Consume unread body and trailers before reading next request (denoland#3990) Remove ansi_term dependency (denoland#4116) port tools/repl_test.py to Rust (denoland#4096) Revert "Remove ansi_term dependency" fix: createSecKey logic (denoland#4063) Add Deno.Err change missing from previous commit (denoland#4113) rename Deno.Err -> Deno.errors (denoland#4093) doc: Remove old link to deno types output (denoland#4111) feat: Add Deno.formatDiagnostics (denoland#4032) disable std/examples/chat tests for windows (denoland#4109) update build instructions for windows (denoland#4027) Remove ansi_term dependency (denoland#4106) fix: add mutex guard for permission_prompt tests (denoland#4105) ...
This PR updates Deno to TypeScript 3.8.
In regards to top-level-await, TypeScript will throw if the input does not look like a module (as top-level-await is not supported in scripts). The TypeScript error recommends adding
export {};
to the file, which is the current idiomatic way of identifying a module as a module that otherwise has no imports or exports.Resolves #3937
Resolves #3301
Resolves #3391