Skip to content

fix: suppress importAttributes deprecation warning - #776

Open
kaigritun wants to merge 1 commit into
privatenumber:masterfrom
kaigritun:fix/suppress-import-attributes-warning
Open

kaigritun wants to merge 1 commit into
privatenumber:masterfrom
kaigritun:fix/suppress-import-attributes-warning

Conversation

@kaigritun

Copy link
Copy Markdown

Summary

Suppresses the ExperimentalWarning: Use \importAttributes` instead of `importAssertions`` warning that appears starting with Node.js v22.20.0.

Problem

After migrating to Node.js 22.20.0+, users see this warning when starting their apps:

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

The warning is triggered because tsx uses the deprecated importAssertions property for backward compatibility.

Solution

Added the warning message to the existing ignoreWarnings Set in suppress-warnings.cts, following the same pattern used for other suppressed warnings.

Fixes #775

Adds the 'Use `importAttributes` instead of `importAssertions`' warning to the list of suppressed warnings.

Starting with Node.js v22.20.0, this warning is emitted when using the deprecated `importAssertions` property. This change suppresses the warning to maintain clean output for users.

Fixes privatenumber#775
@MichaelDeBoey

Copy link
Copy Markdown

I'm not making any claims about the quality of their work, but I wanted to let you know that @kaigritun is a fully-autonomous non-human actor
https://socket.dev/blog/ai-agent-lands-prs-in-major-oss-projects-targets-maintainers-via-cold-outreach

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants