From 10b71a26886d63128c82a4068c5adbfad5272dbf Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Thu, 2 Apr 2026 19:43:39 -0500 Subject: [PATCH 1/2] feat: support for experimetal property --- compile-to-definitions/index.js | 5 +++++ format-schemas/index.js | 2 ++ precompile-schemas/index.js | 1 + schemas-lint/index.js | 1 + 4 files changed, 9 insertions(+) diff --git a/compile-to-definitions/index.js b/compile-to-definitions/index.js index 3cb1ef2..8d63a93 100644 --- a/compile-to-definitions/index.js +++ b/compile-to-definitions/index.js @@ -101,6 +101,11 @@ const resolvePath = (root, ref) => { }; const preprocessSchema = (schema, root = schema, path = []) => { + if (schema.experimental) { + const experimental = typeof schema.experimental === "string" ? `@experimental ${schema.experimental}` : "@experimental"; + schema.description = schema.description ? `${schema.description}\n${experimental}` : experimental; + delete schema.experimental; + } if ("definitions" in schema) { for (const key of Object.keys(schema.definitions)) { preprocessSchema(schema.definitions[key], root, [key]); diff --git a/format-schemas/index.js b/format-schemas/index.js index 362f283..58d6c77 100644 --- a/format-schemas/index.js +++ b/format-schemas/index.js @@ -113,6 +113,8 @@ const PROPERTIES = [ "tsType", "deprecated", + + "experimental", ]; const processJson = processSchema.bind(null, { diff --git a/precompile-schemas/index.js b/precompile-schemas/index.js index 4898bd7..90b5949 100644 --- a/precompile-schemas/index.js +++ b/precompile-schemas/index.js @@ -110,6 +110,7 @@ const EXCLUDED_PROPERTIES = [ "title", "description", "deprecated", + "experimental", "cli", "implements", "tsType", diff --git a/schemas-lint/index.js b/schemas-lint/index.js index aeb321b..a1e7e96 100644 --- a/schemas-lint/index.js +++ b/schemas-lint/index.js @@ -51,6 +51,7 @@ for (const filename of schemas) { "not", "link", "deprecated", + "experimental", ]; const isReference = (schema) => { From 3731f91eab22bec3519fc1c09a7ebec45a31a6f2 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Thu, 2 Apr 2026 19:52:37 -0500 Subject: [PATCH 2/2] fix link! --- compile-to-definitions/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compile-to-definitions/index.js b/compile-to-definitions/index.js index 8d63a93..8388fdd 100644 --- a/compile-to-definitions/index.js +++ b/compile-to-definitions/index.js @@ -102,8 +102,13 @@ const resolvePath = (root, ref) => { const preprocessSchema = (schema, root = schema, path = []) => { if (schema.experimental) { - const experimental = typeof schema.experimental === "string" ? `@experimental ${schema.experimental}` : "@experimental"; - schema.description = schema.description ? `${schema.description}\n${experimental}` : experimental; + const experimental = + typeof schema.experimental === "string" + ? `@experimental ${schema.experimental}` + : "@experimental"; + schema.description = schema.description + ? `${schema.description}\n${experimental}` + : experimental; delete schema.experimental; } if ("definitions" in schema) {