You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #62603 is vendoring ata-validator into Node.js core for node.config.json validation. During that review, @TheOneTheOnlyJJ and @H4ad both asked whether ata could be exposed to user code once it's vendored in.
Every project that needs JSON Schema validation today pulls in a third-party dependency. If Node is already shipping a validator internally, it feels odd not to let user code reach it.
Opening this to check if the direction is something the project wants to pursue, and to collect thoughts on naming and scope before anyone writes a prototype PR.
What is the feature you are proposing to solve the problem?
Expose ata as a built-in node: module, using the same runtime that #62603 is vendoring.
Three names came up in discussion:
node:schema, focused on JSON Schema
node:jsonschema, more specific
node:json, wider, covering parse and validate together (ata already vendors simdjson)
Would probably land this behind an experimental flag first, the way node:test started. Happy to put together a prototype PR if the direction is one the project wants to pursue.
What is the problem this feature will solve?
PR #62603 is vendoring
ata-validatorinto Node.js core fornode.config.jsonvalidation. During that review, @TheOneTheOnlyJJ and @H4ad both asked whether ata could be exposed to user code once it's vendored in.Every project that needs JSON Schema validation today pulls in a third-party dependency. If Node is already shipping a validator internally, it feels odd not to let user code reach it.
Opening this to check if the direction is something the project wants to pursue, and to collect thoughts on naming and scope before anyone writes a prototype PR.
What is the feature you are proposing to solve the problem?
Expose ata as a built-in
node:module, using the same runtime that #62603 is vendoring.Three names came up in discussion:
node:schema, focused on JSON Schemanode:jsonschema, more specificnode:json, wider, covering parse and validate together (ata already vendors simdjson)Rough sketch:
Would probably land this behind an experimental flag first, the way
node:teststarted. Happy to put together a prototype PR if the direction is one the project wants to pursue.What alternatives have you considered?
Keep the vendor scoped to
node.config.jsononly (current deps: add ata JSON Schema validator for node.config.json #62603 plan). Downside: Node ships a validator user code can't reach.Schema-only module (
node:schema/node:jsonschema). Narrow scope, leaves simdjson for another issue.Combined
node:jsonmodule. Covers parse and validate together, bigger API surface.Third-party package that depends on Node internals. Ruled out, defeats the point of vendoring.
No strong preference between 2 and 3. Would rather hear from the Node collaborators and folks who already commented on #62603 before picking.