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

fix(ast-spec): NewExpression argument can be SpreadElement now #5422

Merged

Conversation

burtek
Copy link
Contributor

@burtek burtek commented Aug 4, 2022

PR Checklist

Overview

NewExpression argument can be SpreadElement now. See #5421 for details

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @burtek!

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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@nx-cloud
Copy link

nx-cloud bot commented Aug 4, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7542e59. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@netlify
Copy link

netlify bot commented Aug 4, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 7542e59
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/62fa74b147e8880008a729b1
😎 Deploy Preview https://deploy-preview-5422--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

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.

LGTM, thanks for the quick fix!

Is this technically a breaking change @bradzacher?

@burtek
Copy link
Contributor Author

burtek commented Aug 5, 2022

LGTM, thanks for the quick fix!

No problem, was surprised when I found this

Is this technically a breaking change @bradzacher?

If you don't mind, how would this change be a breaking change? I don't see any case how this might break existing code, but obviously I must be missing something?

@bradzacher
Copy link
Member

Technically it is breaking because someone could previously have code like

declare function acceptsExpr(node: Expression): void;

declare const newExpr: NewExpression;

acceptsExpr(newExpr);

Which will now have a TS error - thus breaking as the users build could break due to the new version.

Though in general we don't classify this sort of correctness change as breaking because the above code is already broken, and all we've done is expose that broken code to the user.

@burtek
Copy link
Contributor Author

burtek commented Aug 5, 2022

Right, thanks!

@burtek
Copy link
Contributor Author

burtek commented Aug 7, 2022

@JoshuaKGoldberg @bradzacher sooo, in terms of merging...? Don't wanna look like I'm making you hurry or something, just making sure you don't forget about this PR after the conversation 😆 as far as I know there is a release each monday?

@JoshuaKGoldberg
Copy link
Member

😄 no worries on the ping, you raise a good question! Per Brad's point on this generally only breaking already-broken code I think it's safe to go. But I'll defer to @bradzacher here, as Brad's done much more than me with the AST & managing technical breakage.

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready label Aug 7, 2022
@JoshuaKGoldberg
Copy link
Member

P.S. @burtek - I appreciate you keeping this branch up-to-date, but you don't have to if you don't want. 😄

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

lgtm - thanks for doing this!

@bradzacher bradzacher merged commit 3ced62f into typescript-eslint:main Aug 17, 2022
@burtek
Copy link
Contributor Author

burtek commented Aug 17, 2022

P.S. @burtek - I appreciate you keeping this branch up-to-date, but you don't have to if you don't want. 😄

Good to know :D Github said branch is out of date, I thought it's necessary xD

@burtek burtek deleted the fix-newexpression-spreadelement branch August 17, 2022 18:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: NewExpression doesn't allow SpreadElement as argument
3 participants