Skip to content

Suppress warning "(node:1) ExperimentalWarning: Use importAttributes instead of importAssertions" #775

@kazvaggos

Description

@kazvaggos

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

Minimal reproduction URL

https://stackblitz.com/edit/node-huzszn?file=index.ts

Problem & expected behavior (under 200 words)

We recently migrated in node 22.20.0. This resulted in a warning when starting our app using tsx

(node:1) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`

We noticed that the package is already suppressing the warning when using assert instead of with when importing JSON. However, the message changed in node 22.20.0 to the above one, resulting to not being suppressed it anymore.

Is it possible to add the above warning in the suppressing warnings?

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $10 for financial support

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions