Skip to content

Import Assertions potential changes: request for feedback #46830

Closed
@GeoffreyBooth

Description

@GeoffreyBooth

Hi @nodejs/collaborators. In the last TC39 meeting, the committee voted to downgrade the Import Assertions proposal from Stage 3 to Stage 2. This is the proposal that permits syntax like import data from './data.json' assert { type: 'json' } that used to live behind --experimental-json-modules and was unflagged in January 2022. Because of the possible change in direction of the import assertions syntax, the Node TSC is considering requiring the flag once again for this syntax starting in Node 20.0.0 this April; unless we can get some assurance from TC39 that the syntax won’t change.

How do you feel about the potential reintroduction of this flag? How disruptive would restoring the flag be, and how disruptive would potential future import assertions syntax changes be?

(Locking this thread just to collaborators, so that we can have a discussion without involving TC39 members. Once this thread has run its course I’ll post something on a TC39 repo.) cc @nodejs/modules @nodejs/loaders

Metadata

Metadata

Assignees

No one assigned

    Labels

    loadersIssues and PRs related to ES module loadersmoduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions