-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Bump minimum Node to 14.17, ES to 2020 for TS 5.1 #53291
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
Conversation
"lib": ["es2018"], | ||
"target": "es2018", | ||
"lib": ["es2020"], | ||
"target": "es2020", |
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.
Perhaps this should be set to ES2019 to be safe about the Node 14 problems.
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 set these to es2019 in an abundance of caution.
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.
Though, that feels inconsistent :(
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 just flipped it back. We'll k now if we have to do it but since we aren't using this output anyway I don't think the inconsistency is a good idea.
I could also back this down to Node 14.13, which is to Node 12.20 as Node 14.17 is to Node 12.22. Or, Node 14.18, for |
14.17 seems like the best bet; if we were to use glob v9 (which, I may send a PR for), that's its minimum. |
Silly question: does this PR change performance, since our emitted code could change to be closer to the source? @typescript-bot perf test this |
Heya @sandersn, I've started to run the perf test suite on this PR at 83e6114. You can monitor the build here. Update: The results are in! |
No, unfortunately the only new syntax we gain is optional catch bindings. We don't get We could just as easily just leave |
@sandersn Here they are:
CompilerComparison Report - main..53291
System
Hosts
Scenarios
TSServerComparison Report - main..53291
System
Hosts
Scenarios
StartupComparison Report - main..53291
System
Hosts
Scenarios
Developer Information: |
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 should go in before the beta, right?
Yes, though I'd like to bikeshed es2019/es2020. |
This reverts commit 0d96746.
ugh, i just realized that the perf runner is using 14.15.1 which is older. Maybe 14.13 is the right thing |
@typescript-bot perf test this faster |
Heya @jakebailey, I've started to run the abridged perf test suite on this PR at 49f70c2. You can monitor the build here. Update: The results are in! |
@jakebailey Here they are:Comparison Report - main..53291
System
Hosts
Scenarios
Developer Information: |
I have bumped the perf runner to 14.21.3 for its copy of Node 14. I may bump the others later but I don't want to break continuity too badly. I'm going to try and do this PR for 5.1; if people complain, we can easily roll it back. |
FWIW, AFAICT this PR broke compatibility with Visual Studio 2019, as the I've documented that in this issue: #54686 |
The minimum of TS 5.0 is Node 12.20, which has been EOL for about a year.
Per #53198, our "policy" is to try and support the previous EOL version, which will shortly become Node 14, before TS 5.1 is out.
This PR bumps our minimum Node version to Node 14.17, the first Node 14 release with stable ESM, as well as bumps our lib target to ES2020.
The esbuild config cannot be just ES2020, as it turns out that Node 14 only partially supports some ES2020 features. Notably, optional chaining has some broken edge cases which were not fixed until Node 16.1. See: evanw/esbuild#2940