Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(*): fix crash on node v18.0 caused by Import Attribute syntax #395

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Dec 9, 2024

The latest refactoring (#392) caused this library to crash for node versions v18.0-v18.19 and 20.0-20.9.

These versions of node don't support "Import Attributes" (import ... from ... with ...), they only support "Import Assertions" (import ... from ... assert ...).


In a follow-up PR I'll update the test suite to run the oldest version of node that we support (v18.0.0). This is non-straightforward because esmock doesn't work well on this version of node

Copy link
Owner

@toddbluhm toddbluhm left a comment

Choose a reason for hiding this comment

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

Interesting...initially I was surprised this did not fail the test suite, but I guess the suite is using the latest versions of node v18 and v20. Great catch! We should probably add in a GitHub runner specifically for just v18.0.0 and v20.0.0 when you create the tests.

If you have a better suggestion over esmock, I am open to it...or a better way to handle the test cases.

@k-yle k-yle merged commit e1e0001 into master Dec 11, 2024
18 checks passed
@k-yle k-yle deleted the kh/crash branch December 11, 2024 07:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants