Skip to content

[v18.20.5 / next v20.x LTS version] NodeJS should provide some kind of warning when using import assertions as they are non-standard #55869

Closed
@alexsch01

Description

@alexsch01

Clarification

v18.20.4 (previous v18.x release) and v20.18.0 have a warning for both import assertions and import attributes

v18.20.5 removes this warning for both cases, I believe the import assertion warning should still be around

Seems to be caused by #55333

Version

v18.20.5

Platform

All

Subsystem

No response

What steps will reproduce the bug?

node --input-type=module -e 'import "data:application/json,{}" assert { type: "json" }'

How often does it reproduce? Is there a required condition?

Every time

What is the expected behavior? Why is that the expected behavior?

Regarding [What steps will reproduce the bug?]

It should provide some kind of warning since import assertions (not import attributes) are non-standard

Additional information

This also applies to the next v20.x LTS version

Metadata

Metadata

Assignees

No one assigned

    Labels

    v18.xIssues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.v20.xv20.x Issues that can be reproduced on v20.x or PRs targeting the v20.x-staging branch.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions