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(es/helpers): Add addInitializer to field decorators #8619

Merged
merged 5 commits into from
Feb 14, 2024

Conversation

phiresky
Copy link
Contributor

@phiresky phiresky commented Feb 7, 2024

Description:

At some point the spec text of ES decorators was changed to also have addInitializer for field decorators. This is already used e.g. in mobx. This simple change removes the special case that was present for field decorators and seems to fix the issue for me.

This change is backwards compatible since it only affects code that was broken before.

Related issue:

@phiresky phiresky requested a review from a team as a code owner February 7, 2024 15:40
Copy link

changeset-bot bot commented Feb 7, 2024

⚠️ No Changeset found

Latest commit: c90388e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Feb 7, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

@phiresky
Copy link
Contributor Author

phiresky commented Feb 8, 2024

Ah, I assumed that was auto copied somehow. I modified that file as well.

@kdy1 kdy1 self-assigned this Feb 11, 2024
@kdy1 kdy1 added this to the Planned milestone Feb 11, 2024
@kdy1 kdy1 changed the title fix(helpers): field decorators also have addInitializer now fix(es/helpers): Add addInitializer to field decorators Feb 11, 2024
@kdy1 kdy1 enabled auto-merge (squash) February 11, 2024 04:21
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_ecma_transforms_base

Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 disabled auto-merge February 11, 2024 04:56
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

CI failed. Can you fix it? Possibly by removing some obsolete tests

@phiresky
Copy link
Contributor Author

fixed the test case by now expecting function

@kdy1
Copy link
Member

kdy1 commented Feb 14, 2024

CI is still failing

@phiresky
Copy link
Contributor Author

sorry, there's so many checks that it looks so green

@kdy1
Copy link
Member

kdy1 commented Feb 14, 2024

No worries. I made similar mistakes at the past. 😄 And thank you!

@kdy1 kdy1 enabled auto-merge (squash) February 14, 2024 02:18
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 merged commit cd38ef3 into swc-project:main Feb 14, 2024
277 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.4.2 Feb 19, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

addInitializer missing on class field decorators
4 participants