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: custom instanceof Handler result should be cast to boolean #3728

Merged
merged 3 commits into from Feb 25, 2022

Conversation

liby
Copy link
Contributor

@liby liby commented Feb 24, 2022

Description:

  • helper.instanceof does not cast [Symbol.hasInstance] call to boolean

Related issue (if exists):

Also: If need to add a test case, please tell me how to do it, I may not know the situation.

@CLAassistant
Copy link

CLAassistant commented Feb 24, 2022

CLA assistant check
All committers have signed the CLA.

@liby liby force-pushed the bugfix/to-boolean-instanceof-handler branch from 9b9f915 to 8cd01c1 Compare February 24, 2022 17:47
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.

Thanks!


swc-bump:

  • swc_ecma_transforms_base

@kdy1 kdy1 enabled auto-merge (squash) February 25, 2022 01:42
@kdy1 kdy1 added this to the v1.2.146 milestone Feb 25, 2022
@liby liby force-pushed the bugfix/to-boolean-instanceof-handler branch from 8cd01c1 to 7d19049 Compare February 25, 2022 01:54
@kdy1 kdy1 disabled auto-merge February 25, 2022 02:03
@kdy1
Copy link
Member

kdy1 commented Feb 25, 2022

Please run UPDATE=1 cargo test in the swc crate directory

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.

Marking as change requested

@liby
Copy link
Contributor Author

liby commented Feb 25, 2022

Please run UPDATE=1 cargo test in the swc crate directory

I didn't get any fails:

test result: ok. 4185 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 16.71s

  Doc-tests swc

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

@liby liby requested a review from kdy1 February 25, 2022 02:49
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

@kdy1 kdy1 enabled auto-merge (squash) February 25, 2022 03:00
@kdy1 kdy1 disabled auto-merge February 25, 2022 03:00
@kdy1 kdy1 enabled auto-merge (squash) February 25, 2022 03:01
@liby
Copy link
Contributor Author

liby commented Feb 25, 2022

@kdy1 🙏 I would like to ask if I can run update-all to update the test after the fix is done? I don't see similar instructions in the contribution guide.

@kdy1
Copy link
Member

kdy1 commented Feb 25, 2022

Yes, I think the update-all script will update most of the fixtures.
It's not documented as it's added too recently.

@kdy1 kdy1 merged commit 72c9e6c into swc-project:main Feb 25, 2022
@liby liby deleted the bugfix/to-boolean-instanceof-handler branch February 25, 2022 07:31
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 28, 2022
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.

Instance Error Return Undefined
3 participants