diff --git a/doc/node-config-schema.json b/doc/node-config-schema.json index 22523a4868f..77020e4a8c3 100644 --- a/doc/node-config-schema.json +++ b/doc/node-config-schema.json @@ -118,6 +118,21 @@ "type": "boolean", "description": "allow use of child process when any permissions are set" }, + "allow-env": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + ], + "description": "allow access to environment variables when any permissions are set" + }, "allow-ffi": { "type": "boolean", "description": "allow use of FFI when any permissions are set" @@ -137,6 +152,10 @@ ], "description": "allow permissions to read the filesystem" }, + "allow-fs-vfs": { + "type": "boolean", + "description": "allow mounting a virtual file system when any permissions are set" + }, "allow-fs-write": { "oneOf": [ { @@ -296,6 +315,10 @@ "type": "boolean", "description": "enable FIPS crypto at startup" }, + "enable-fips-indicator-events": { + "type": "boolean", + "description": "publish FIPS indicator results to the crypto.fips.indicator diagnostics channel" + }, "enable-source-maps": { "type": "boolean", "description": "Source Map V3 support for stack traces" @@ -332,6 +355,10 @@ "type": "boolean", "description": "experimental ES Module import.meta.resolve() parentURL support" }, + "experimental-import-text": { + "type": "boolean", + "description": "experimental support for importing source as text with import attributes" + }, "experimental-loader": { "oneOf": [ { @@ -347,6 +374,10 @@ ], "description": "use the specified module as a custom loader" }, + "experimental-package-map": { + "type": "string", + "description": "use the specified file for package map resolution" + }, "experimental-print-required-tla": { "type": "boolean", "description": "Print pending top-level await. If --require-module is true, evaluate asynchronous graphs loaded by `require()` but do not run the microtasks, in order to find and print top-level await in the graph" @@ -367,13 +398,17 @@ "type": "boolean", "description": "experimental iterable streams API (node:stream/iter)" }, + "experimental-vfs": { + "type": "boolean", + "description": "experimental node:vfs module" + }, "experimental-vm-modules": { "type": "boolean", "description": "experimental ES Module support in vm module" }, - "experimental-websocket": { + "experimental-web-worker": { "type": "boolean", - "description": "experimental WebSocket API" + "description": "experimental Web Worker API" }, "experimental-webstorage": { "type": "boolean", @@ -393,7 +428,7 @@ }, "force-fips": { "type": "boolean", - "description": "force FIPS crypto (cannot be disabled)" + "description": "force FIPS crypto (optional mode: provider or strict)" }, "force-node-api-uncaught-exceptions-policy": { "type": "boolean", @@ -651,6 +686,10 @@ ], "description": "include files in coverage report that match this glob pattern" }, + "test-coverage-include-all": { + "type": "boolean", + "description": "include source files that were never loaded in the coverage report" + }, "test-coverage-lines": { "type": "number", "description": "the line coverage minimum threshold" @@ -857,7 +896,7 @@ }, "use-largepages": { "type": "string", - "description": "This option is no longer supported and a no-op. Options are 'off' (default), 'on' (report a warning to stderr), or 'silent' (same as 'off')." + "description": "This option is no longer supported and a no-op. It still accepts these values for compatibility: 'off' (default), 'on' (report a warning to stderr), or 'silent' (same as 'off')." }, "use-openssl-ca": { "type": "boolean", @@ -906,6 +945,10 @@ "type": "boolean", "description": "preserve outputs on watch mode restart" }, + "worker-snapshot": { + "type": "boolean", + "description": "start worker threads from the bootstrapped context in the built-in startup snapshot" + }, "zero-fill-buffers": { "type": "boolean", "description": "automatically zero-fill all newly allocated Buffer instances" @@ -929,6 +972,21 @@ "type": "boolean", "description": "allow use of child process when any permissions are set" }, + "allow-env": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + ], + "description": "allow access to environment variables when any permissions are set" + }, "allow-ffi": { "type": "boolean", "description": "allow use of FFI when any permissions are set" @@ -948,6 +1006,10 @@ ], "description": "allow permissions to read the filesystem" }, + "allow-fs-vfs": { + "type": "boolean", + "description": "allow mounting a virtual file system when any permissions are set" + }, "allow-fs-write": { "oneOf": [ { @@ -1002,6 +1064,21 @@ "type": "boolean", "description": "enable module mocking in the test runner" }, + "experimental-test-tag-filter": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + ], + "description": "run tests matching the given tag filter expression" + }, "test": { "type": "boolean", "description": "launch test runner on startup" @@ -1048,6 +1125,10 @@ ], "description": "include files in coverage report that match this glob pattern" }, + "test-coverage-include-all": { + "type": "boolean", + "description": "include source files that were never loaded in the coverage report" + }, "test-coverage-lines": { "type": "number", "description": "the line coverage minimum threshold" diff --git a/test/parallel/test-config-json-schema.js b/test/parallel/test-config-json-schema.js index 08973bd17ee..ef05181b50b 100644 --- a/test/parallel/test-config-json-schema.js +++ b/test/parallel/test-config-json-schema.js @@ -21,15 +21,17 @@ if (!common.hasIntl) { common.skip('missing Intl'); } -if (!common.hasQuic) { - common.skip('this test requires QUIC'); -} - if (process.config.variables.icu_small) { common.skip('this test assumes full ICU build'); } -if (process.config.variables.node_quic) { +if (!common.hasFFI) { + common.skip('missing FFI'); +} + +// The JSON schema is generated from a build with the default configuration +// options, where these are disabled and their options are not available. +if (common.hasQuic || common.hasDtls || common.hasV8Sandbox) { common.skip('this test assumes default configuration options'); } @@ -39,7 +41,9 @@ const { const schemaInDoc = require('../../doc/node-config-schema.json'); const assert = require('assert'); -const schema = generateConfigJsonSchema(); +// Round-trip through JSON so that the null-prototype objects returned by +// generateConfigJsonSchema() show up as plain objects in the diff. +const schema = JSON.parse(JSON.stringify(generateConfigJsonSchema())); // This assertion ensures that whenever we add a new env option, we also add it // to the JSON schema. The function getEnvOptionsInputType() returns all the available @@ -48,5 +52,5 @@ const schema = generateConfigJsonSchema(); // To regenerate the JSON schema, run: // out/Release/node --expose-internals tools/doc/generate-json-schema.mjs // And then run make doc to update the out/doc/node-config-schema.json file. -assert.strictEqual(JSON.stringify(schema), JSON.stringify(schemaInDoc), 'JSON schema is outdated.' + - 'Run `out/Release/node --expose-internals tools/doc/generate-json-schema.mjs` to update it.'); +assert.deepStrictEqual(schema, schemaInDoc, 'JSON schema is outdated. Run ' + + '`out/Release/node --expose-internals tools/doc/generate-json-schema.mjs` to update it.');