Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer "import attributes" to "import assertions" #52995

Closed
worstpractice opened this issue May 15, 2024 · 1 comment · Fixed by #52998
Closed

Prefer "import attributes" to "import assertions" #52995

worstpractice opened this issue May 15, 2024 · 1 comment · Fixed by #52998
Labels
doc Issues and PRs related to the documentations. loaders Issues and PRs related to ES module loaders

Comments

@worstpractice
Copy link

worstpractice commented May 15, 2024

Affected URL(s)

https://nodejs.org/docs/latest/api/packages.html#modules-loaders

Description of the problem

The ECMAScript module loader section (bottom) states:

It can load JSON modules, but an import assertion is required.

Here, we should likely:

  1. Prefer "import attributes" to "import assertions" (which are deprecated).
  2. Consider including a relevant link to v8.dev, as either term is otherwise used in the documentation without further explanation, despite their relative obscurity and general confusability (especially to someone googling this newfangled jargon for the first time).
@worstpractice worstpractice added the doc Issues and PRs related to the documentations. label May 15, 2024
@targos
Copy link
Member

targos commented May 15, 2024

#52998

@targos targos linked a pull request May 15, 2024 that will close this issue
@RedYetiDev RedYetiDev added the loaders Issues and PRs related to ES module loaders label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. loaders Issues and PRs related to ES module loaders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants