Skip to content

vm: use import attributes instead of import assertions

The old import assertions proposal has been renamed to "import attributes" with the following major changes:

  1. The keyword is now with instead of assert.
  2. Unknown assertions cause an error rather than being ignored.

This PR updates the documentation to encourage folks to use the new syntax, and add aliases to preserve backward compatibility.

This should likely land after https://github.com/nodejs/node/pull/50140, although both changes are independent. This change should be backported manually to 20.x the new V8 flag has not landed there.

Merge request reports

Loading