doc: remove esm no-json-module-loading section#40770
doc: remove esm no-json-module-loading section#40770dnalborczyk wants to merge 1 commit intonodejs:mainfrom
Conversation
|
I think it's a little too early to remove this, we should probably wait for the JSON module support to stabilize first. The most reasonable option is still to either use |
this is not true anymore, at least without mentioning import assertions: otherwise it implies that using this flag will allow json files to be imported by using "es6" module syntax. |
|
But both are still true:
I don't see how this implies it would be possible to import them without using an assertion. But more importantly, I don't understand how removing this section helps anyone at this point, we should wait for JSON imports to be no longer experimental, and supported without the |
aduh95
left a comment
There was a problem hiding this comment.
Marking it officially as requested change to make sure it doesn't land too soon. Before landing, we should ensure that:
- JSON imports are no longer experimental;
- JSON modules are no longer behind the
--experimental-json-modulesflag.
|
We could perhaps edit this section to mention both the current non-experimental methods as well as the experimental method. Then later on all we’d need to do is remove the text that says |
These are both true now, and have been for a long time; and almost a year has passed. Dunno how much longer we want to wait, but it’s probably safe by now. |
|
Only the latter is true, JSON imports are still experimental (
https://nodejs.org/api/esm.html#json-modules) – and probably need to be
until V8 ships a stable implementation of the Import Assertions proposal
and the TC39 actually merge the proposal in the official spec.
…On Thu, Oct 20, 2022, 2:10 PM Geoffrey Booth ***@***.***> wrote:
Marking it officially as requested change to make sure it doesn't land too
soon. Before landing, we should ensure that:
- JSON imports are no longer experimental;
- JSON modules are no longer behind the --experimental-json-modules
flag.
These are both true now, and have been for a long time; and almost a year
has passed. Dunno how much longer we want to wait, but it’s probably safe
by now.
—
Reply to this email directly, view it on GitHub
<#40770 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADNFTDKNJDLYR6ZWWUE3I33WEF4HFANCNFSM5HWVUZZQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Import assertions are going away. The proposal was replaced with import attributes. We're waiting on a V8 update to change on our side. I think it's better to keep the |
|
This PR can be closed, that part of the docs does not exist anymore. |
with
v17.1.0loading json behind the--experimental-json-modulesflag has been removed and requiresimport assertionsbehind the same flag.ref: #40758 (comment)