Skip to content

Commit 7d45c34

Browse files
authoredApr 6, 2025··
doc: allow the $schema property in node.config.json
The documentation states people can use the `$schema` property, but the JSON schema forbids this. This change allows it. PR-URL: #57560 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 52425d2 commit 7d45c34

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
 

Diff for: ‎doc/node-config-schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"additionalProperties": false,
44
"properties": {
5+
"$schema": {
6+
"type": "string"
7+
},
58
"nodeOptions": {
69
"additionalProperties": false,
710
"properties": {

Diff for: ‎lib/internal/options.js

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ function generateConfigJsonSchema() {
4545
$schema: 'https://json-schema.org/draft/2020-12/schema',
4646
additionalProperties: false,
4747
properties: {
48+
$schema: {
49+
__proto__: null,
50+
type: 'string',
51+
},
4852
nodeOptions: {
4953
__proto__: null,
5054
additionalProperties: false,

0 commit comments

Comments
 (0)
Please sign in to comment.