Skip to content

feat: support TS 5.3 #7968

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

Merged
merged 1 commit into from
Nov 27, 2023
Merged

feat: support TS 5.3 #7968

merged 1 commit into from
Nov 27, 2023

Conversation

bradzacher
Copy link
Member

PR Checklist

Overview

  • Updates the TS version ranges
  • Fixes a bug in the types that causes type-errors in userland installs with TS 5.3
  • Simplifies our local TS types patch by moving it to declaration merging (ref Repo: Use less inconvenient ways of enforcing our usage of TypeScript APIs than patching #7956)
    • We do lose one safety patch (mark SyntaxKind.JSDoc as deprecated as it was added in 4.7) - but that's not an enum member we'll ever used so I figured it was worth it.
  • Cleans up the scope-manager lib generator so it generates lint compliant code.
    • I ran the generator and it generated changes in some files.
    • Turns out that we formatted the code, then lint + fixed the code after it was written.
    • This would leave incorrectly formatted code behind in the imports.
    • So either we could add another format pass - or just make the generated code lint compliant! I did the former cos it was easy.

@bradzacher bradzacher added dependencies Issue about dependencies of the package New TypeScript Version labels Nov 21, 2023
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Nov 21, 2023

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 1a28819
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/655c09a1acbeda0008934515
😎 Deploy Preview https://deploy-preview-7968--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 90 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines +7 to 10
/** @ts-ignore - added in TS 4.5, deprecated and converted to a type-alias in TS 5.3 */
export interface AssertClause extends ts.Node {}
// @ts-ignore - added in TS 4.5
/** @ts-ignore - added in TS 4.5, deprecated and converted to a type-alias in TS 5.3 */
export interface AssertEntry extends ts.Node {}
Copy link
Member Author

Choose a reason for hiding this comment

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

microsoft/TypeScript#56477

This is a problem for us.
Testing in the work repo this breaks consumers on TS5.3
Even with the jsdoc style - TS will error on the TS declaration.

screenshot of type error

We don't get this error locally because we use skipLibChecks.

Note that this blocks the full support.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Great, thanks! 🚀

Happy to see the patches removed, even considering the cost.

@bradzacher bradzacher added the DO NOT MERGE PRs which should not be merged yet label Nov 21, 2023
@bradzacher
Copy link
Member Author

microsoft/TypeScript#56477 has a fix merged and will release with v5.3.3. We can merge this in now and just say "fuck it" and tell plugin authors to just turn on skipLibChecks until 5.3.3.

For lint users we do have full support for 5.3 so it feels wrong to not merge this.

WDYT @typescript-eslint/triage-team

@bradzacher bradzacher removed the DO NOT MERGE PRs which should not be merged yet label Nov 22, 2023
@bradzacher bradzacher merged commit fb50638 into main Nov 27, 2023
@bradzacher bradzacher deleted the ts-5dot3 branch November 27, 2023 00:36
@fisker
Copy link
Contributor

fisker commented Nov 27, 2023

Ready to release?

@bradzacher
Copy link
Member Author

#7719 (comment)

@fisker
Copy link
Contributor

fisker commented Nov 27, 2023

Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Issue about dependencies of the package New TypeScript Version
Projects
None yet
3 participants