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

chore: run node-esmodule package.json test only in latest node LTS #621

Merged
merged 6 commits into from
Mar 17, 2022

Conversation

ctavan
Copy link
Member

@ctavan ctavan commented Mar 16, 2022

While ESM support has been stable in current versions of Node.js 14.x and 16.x, support for importing JSON files is still experimental and evolving.

Since we still want to cover the fact that the package is exporting it's package.json file, this test is now extracted to only run with the updated JSON import syntax which requires import assertions and which was introduced in Node.js 16.14.0.

Fixes #619

ctavan and others added 2 commits March 16, 2022 23:01
This should fix the breaking CI test.   Apparently node@16 now throws if you try to import a .json file with no import assertion.
Ref: nodejs/node#40250

cc: @ctavan  for sanity check to make sure this won't break anything.
@ctavan ctavan marked this pull request as draft March 16, 2022 22:06
@ctavan ctavan changed the title chore: test build chore: run node-esmodule test only in latest node LTS Mar 16, 2022
@ctavan ctavan force-pushed the test-esm-node-only-on-node-16 branch from c919cc3 to d6e151d Compare March 16, 2022 22:32
@ctavan ctavan force-pushed the test-esm-node-only-on-node-16 branch from d6e151d to e99c2f6 Compare March 16, 2022 22:42
@ctavan ctavan changed the title chore: run node-esmodule test only in latest node LTS chore: run node-esmodule package.json test only in latest node LTS Mar 16, 2022
@ctavan ctavan marked this pull request as ready for review March 16, 2022 22:51
@ctavan ctavan requested a review from broofa March 16, 2022 22:51
@ctavan ctavan merged commit e6e5412 into main Mar 17, 2022
@ctavan ctavan deleted the test-esm-node-only-on-node-16 branch March 17, 2022 07:43
@jonpulsifer jonpulsifer mentioned this pull request Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node@16.14 import assertions break examples/node-esmodules/example.mjs test
2 participants