Skip to content
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

feat(cli): update to TypeScript 4.5 #12410

Merged
merged 13 commits into from
Dec 9, 2021
Merged

feat(cli): update to TypeScript 4.5 #12410

merged 13 commits into from
Dec 9, 2021

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Oct 12, 2021

This updates TypeScript 4.5 beta.

Release announcement: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/

Things we need to test/integrate:

@CLAassistant
Copy link

CLAassistant commented Oct 15, 2021

CLA assistant check
All committers have signed the CLA.

@kitsonk
Copy link
Contributor Author

kitsonk commented Nov 4, 2021

Updating to RC.

Announced here: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-rc/

The biggest change was the removal of the ESM support for Node12. This generally doesn't impact us, since we have our own resolution. It seems like the additional extensions (e.g. .mts) are still present. I will add the changes here to support those (already being supported in deno_graph) in a follow-up commit to this branch.

@kitsonk
Copy link
Contributor Author

kitsonk commented Nov 17, 2021

Updated to the released version. Want to create some tests for the new features that overlap with swc as well to make sure everything works fine as well as "enable" the other file types that are being introduced (e.g. .mts).

@bartlomieju
Copy link
Member

@kitsonk any chance we could land this PR this week? It blocks me in #12866

@kitsonk
Copy link
Contributor Author

kitsonk commented Nov 30, 2021

@kitsonk any chance we could land this PR this week? It blocks me in #12866

It is blocked by the swc upgrade (@dsherret)

@kitsonk
Copy link
Contributor Author

kitsonk commented Dec 9, 2021

@dsherret I think the tests will pass, but there is a bit of a catch-22 with dprint, in that dprint panics on the private field detection, which it is trying to do the ast parse, but can't see the // deno-fmt-ignore pragma to skip it, because it panics when parsing.

@dsherret
Copy link
Member

dsherret commented Dec 9, 2021

@kitsonk update the version of the typescript plugin in .dprint.json. I just forgot to update it in my PR.

@kitsonk
Copy link
Contributor Author

kitsonk commented Dec 9, 2021

@dsherret now dlint is updated as well, and there were some changes for the normal pass, but it seems now with the prefer-primordials pass, it is not only running that rule but every other rule as well, which it shouldn't (as well as ignoring the deno-ignore directives. (https://github.com/denoland/deno/runs/4466359324?check_suite_focus=true#step:24:37163)

@kitsonk kitsonk marked this pull request as ready for review December 9, 2021 19:23
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

cli/tests/unit/version_test.ts Show resolved Hide resolved
@bartlomieju
Copy link
Member

It seems cli/dts/lib.es2021.intl.d.ts was added in this PR, shouldn't STATIC_ASSETS in cli/tsc.rs be updated?

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM :D

@kitsonk
Copy link
Contributor Author

kitsonk commented Dec 9, 2021

There is a test for import { type A } from "a.ts" as well as tests checking the new media types. Testing import assertions will be done under the import assertion features.

@kitsonk
Copy link
Contributor Author

kitsonk commented Dec 9, 2021

It seems cli/dts/lib.es2021.intl.d.ts was added in this PR, shouldn't STATIC_ASSETS in cli/tsc.rs be updated?

No, only assets which are not included by default do not go there, as per the comment:

/// Contains static assets that are not preloaded in the compiler snapshot.

And lib.es2021.intl is included in the snapshot.

@kitsonk kitsonk merged commit 345f0fb into denoland:main Dec 9, 2021
@kitsonk kitsonk deleted the ts_45 branch December 9, 2021 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants