nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.37k stars 29.49k forks source link

What is status of JSON modules? #55508

Open VladimirMikulic opened 4 hours ago

VladimirMikulic commented 4 hours ago

Using import swaggJ from "./swagger.json" with { type: "json" } on Node..js 22 results in

(node:112166) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time

I thought JSON modules were stable? Why do I still get this warning?

RedYetiDev commented 1 hour ago

They are stage 4 as of two weeks ago, per https://github.com/tc39/proposals/commit/75f0d737402a5ab1cb3e1fd550a9c79358ee7f2f


It's up to the loaders team to decide whether the current implementation is stable.