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/base): Remove unnecessary parameters in helper_expr macro #7296

Merged
merged 7 commits into from
Apr 20, 2023

Conversation

magic-akari
Copy link
Member

Description:

We have move to snake_case, so the last parameter of helper_expr is unnecessary.

next step:
We have a copy of the swc/helpers directory in the swc_ecma_transforms_base directory, which has a subtle difference.
It is used for inline helpers.

Currently, it is manually maintained. Can it be generated automatically?

BREAKING CHANGE:

Related issue (if exists):

@kdy1
Copy link
Member

kdy1 commented Apr 19, 2023

Currently, it is manually maintained. Can it be generated automatically?

I was thinking something similar. Given that we now process it via a script, I think we can update inline helpers by running a script, too.

@@ -1,4 +1,4 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var _ts_decorate = (this && this._ts_decorate) || function (decorators, target, key, desc) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I found that I had to change export name in order to make the ts inline helpers work.
From my personal opinion, I don't particularly like this change. It makes our code look different from the ts helpers.

Copy link
Member

Choose a reason for hiding this comment

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

I agree witg you, but the problem was the SyntaxContext

@magic-akari magic-akari marked this pull request as ready for review April 19, 2023 15:25
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.

Thank you!


swc-bump:

  • swc_ecma_transforms_react

@kdy1 kdy1 enabled auto-merge (squash) April 20, 2023 07:13
@kdy1 kdy1 added this to the Planned milestone Apr 20, 2023
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

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 38dfb91 into swc-project:main Apr 20, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.53 Apr 21, 2023
@magic-akari magic-akari deleted the fix/swc-helpers branch April 25, 2023 02:50
@swc-project swc-project locked as resolved and limited conversation to collaborators May 25, 2023
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.

3 participants