Skip to content

Re-flag assert syntax for import attributes in Node.js 22 #51622

Closed
@nicolo-ribaudo

Description

What is the problem this feature will solve?

The assert syntax has been replaced by with, and it's currently only shipped by Chrome and Node.js. Other browsers will only ship the with syntax.

Chrome will ship with unflagged in 123, and is planning to remove support for assert in 126: https://v8.dev/features/import-attributes#deprecation-and-eventual-removal-of-assert. According to https://chromiumdash.appspot.com/schedule, Chrome 126 will be released in May.

What is the feature you are proposing to solve the problem?

One year ago in #46830 there was a lot of support from TSC members to re-flag this syntax, but then nothing has been done. Node.js 22, which will be released in April, would be a good release to put assert back behind a flag.

What alternatives have you considered?

[node: I'm opening a new issue rather than commenting in #46830 because it was meant to be a place of discussion for Node.js collaborators, and as such it's locked]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.release-agendaIssues and PRs to discuss during the meetings of the Release team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions