Uh oh!
There was an error while loading. Please reload this page.
esm: drop support for import assertions - #52104
Conversation
nodejs-github-bot
commented
Mar 15, 2024
Review requested:
|
aduh95
commented
Mar 15, 2024
Worth noting that v18.x does not support |
richardlau
commented
Mar 15, 2024
As I mentioned in #51622 (comment) I'm open to landing #51136 on v18.x. |
There was a problem hiding this comment.
This currently throws "unexpected token 'assert" -- I submitted a patch to V8 to make the error explicitly recommend to use 'with' instead: https://chromium-review.googlesource.com/c/v8/v8/+/5376260
This patch removes support for the `assert` keyword for import attributes. It was an old variant of the proposal that was only shipped in V8 and no other engine, and that has then been replaced by the `with` keyword. Chrome is planning to remove support for `assert` in version 126, which will be released in June. Node.js already supports the `with` keyword for import attributes, and this patch does not change that.
462d735 to
4c227bdComparenodejs-github-bot
commented
Mar 18, 2024
Since V8 will remove assert and it’s stage 3 going back to stage 2 and then broken in the spec anyway, is it semver major?(To me it looks more like experimental features and not subject to semver and @aduh95 also said something similar in #52104 (comment) ). It would not be great to continue having assert lingering around in v22 and then V8 breaks it and we cannot upgrade V8 on v22. If it’s semver-major we should try getting it into v22 in time. Otherwise we can land it later on v22 (still nicer to have it in the beginning but I guess it’s not the end of the world to land it in 22.1.0 or something). cc @targos @nodejs/releasers |
nodejs-github-bot
commented
Apr 17, 2024
nicolo-ribaudo
commented
Apr 18, 2024
The CI failures don't seem related to my changes, but maybe I should try rebasing? Or could somebody re-trigger CI? The arm build is failing both on windows and OSX. For the test failures on Linux, one is a timeout and the other one is marked as flaky. |
nodejs-github-bot
commented
Apr 18, 2024
mcollina
commented
Apr 18, 2024
@RafaelGSS this should be in v22 |
Now the macOS failure is a flaky test ( The failure on linux is a timeout: (out of curiosity, when you have to re-run CI due to flaky tests, do you re-run everything or just the failed jobs?) |
targos
commented
Apr 18, 2024
When we use the "Resume build" button on Jenkins, it reruns all jobs that are either orange (only flaky failures) or red (at least one non-flaky failure). |
nodejs-github-bot
commented
Apr 18, 2024
mcollina
commented
Apr 18, 2024
@targos it does not seem I can rerun the GHA. |
targos
commented
Apr 18, 2024
It's probably too old to be re-runnable. |
nicolo-ribaudo
commented
Apr 18, 2024
Should I push an empty commit to retrigger it? |
mcollina
commented
Apr 18, 2024
let's see if the main CI passes first. |
mcollina
commented
Apr 18, 2024
Please push a fresh commit. |
* fix syntax error due to `assert` nodejs/node#52104 (comment) * fix missed assert thanks for pointing it out puxlit * bump nodejs version and regenerate package-lock.json per kocka's request
Description for changelog: #52104 (comment)
This patch removes support for the
assertkeyword for import attributes. It was an old variant of the proposal that was only shipped in V8 and no otherengine, and that has then been replaced by the
withkeyword.Chrome is planning to remove support for
assertin version 126, which will be released in June.
Node.js already supports the
withkeyword forimport attributes, and this patch does not change that.
Fixes#51622