From 396128bbe845b3906c33425423cba933efaa5cb5 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Tue, 5 Nov 2024 09:40:46 -0800 Subject: [PATCH] message_fmt2: Make schema more consistent with schema in WG repo (#337) * Add `bidiIsolation` property that was recently added * Remove `expCleanSrc` property that is no longer used * Add "Bidi isolation part" variant to `expParts` * Remove `unsupported-statement` and `unsupported-expression` from enum in `expErrors` --- schema/message_fmt2/testgen_schema.json | 49 ++++++++++++++++--------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/schema/message_fmt2/testgen_schema.json b/schema/message_fmt2/testgen_schema.json index 149230a6..18715ccc 100644 --- a/schema/message_fmt2/testgen_schema.json +++ b/schema/message_fmt2/testgen_schema.json @@ -119,15 +119,15 @@ "src": { "$ref": "#/$defs/src" }, + "bidiIsolation": { + "$ref": "#/$defs/bidiIsolation" + }, "params": { "$ref": "#/$defs/params" }, "exp": { "$ref": "#/$defs/exp" }, - "expCleanSrc": { - "$ref": "#/$defs/expCleanSrc" - }, "expParts": { "$ref": "#/$defs/expParts" }, @@ -150,6 +150,9 @@ "src": { "$ref": "#/$defs/src" }, + "bidiIsolation": { + "$ref": "#/$defs/bidiIsolation" + }, "params": { "$ref": "#/$defs/params" }, @@ -159,9 +162,6 @@ "exp": { "$ref": "#/$defs/exp" }, - "expCleanSrc": { - "$ref": "#/$defs/expCleanSrc" - }, "expParts": { "$ref": "#/$defs/expParts" }, @@ -203,6 +203,10 @@ } ] }, + "bidiIsolation": { + "description": "The bidi isolation strategy.", + "enum": ["default", "none"] + }, "params": { "description": "Parameters to pass in to the formatter for resolving external variables.", "type": "array", @@ -256,10 +260,6 @@ "description": "The expected result of formatting the message to a string.", "type": "string" }, - "expCleanSrc": { - "description": "The expected normalized form of `src`, for testing stringifiers.", - "type": "string" - }, "expParts": { "description": "The expected result of formatting the message to parts.", "type": "array", @@ -282,6 +282,23 @@ } } }, + { + "description": "Bidi isolation part.", + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "const": "bidiIsolation" + }, + "value": { + "enum": ["\u2066", "\u2067", "\u2068", "\u2069"] + } + } + }, { "description": "Message markup part.", "type": "object", @@ -308,6 +325,9 @@ "name": { "type": "string" }, + "id": { + "type": "string" + }, "options": { "type": "object" } @@ -384,12 +404,10 @@ "duplicate-variant", "unresolved-variable", "unknown-function", - "unsupported-expression", "bad-selector", "bad-operand", "bad-option", - "bad-variant-key", - "unsupported-statement" + "bad-variant-key" ] } } @@ -418,11 +436,6 @@ "exp" ] }, - { - "required": [ - "expCleanSrc" - ] - }, { "required": [ "expParts"