node icon indicating copy to clipboard operation
node copied to clipboard

module: allow JSONC imports

Open redyetidev opened this issue 9 months ago • 5 comments

This PR introduces the ability to import JSONC typed JSON files via the { type: 'jsonc' } import attribute.

redyetidev avatar Apr 26 '24 01:04 redyetidev

Review requested:

  • [ ] @nodejs/loaders

nodejs-github-bot avatar Apr 26 '24 01:04 nodejs-github-bot

When I get a change, Ill adjust the small prettification differences

redyetidev avatar Apr 26 '24 01:04 redyetidev

Do any other runtimes support JSONC or plan to?

GeoffreyBooth avatar Apr 26 '24 01:04 GeoffreyBooth

I know Deno supports it with its builtin standard library (https://deno.land/[email protected]/jsonc), but I'm not sure about importing

I'll need to check the other runtimes, and more about Denos imports

redyetidev avatar Apr 26 '24 01:04 redyetidev

  1. That is better handled by userland hooks.

If https://github.com/nodejs/node/pull/49704 ever gets revived, that could also facilitate this so users don't have to manually sort out something almost everyone wants.

JakobJingleheimer avatar Apr 27 '24 10:04 JakobJingleheimer