From 518847cceb17ddf40270287d0696568d6d7f39dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Fri, 5 Feb 2021 13:35:25 +0100 Subject: [PATCH 1/4] Require that version_removed is either a string or true Setting it explicitly to null or false is meaningless. --- http/headers/x-xss-protection.json | 3 +-- schemas/compat-data-schema.md | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/http/headers/x-xss-protection.json b/http/headers/x-xss-protection.json index 34ae3e84ddac6e..6dcfc9df61728b 100644 --- a/http/headers/x-xss-protection.json +++ b/http/headers/x-xss-protection.json @@ -41,8 +41,7 @@ "version_added": true }, "samsunginternet_android": { - "version_added": true, - "version_removed": false + "version_added": true }, "webview_android": { "version_added": false diff --git a/schemas/compat-data-schema.md b/schemas/compat-data-schema.md index 24561de0c8b940..3c793e8353f211 100644 --- a/schemas/compat-data-schema.md +++ b/schemas/compat-data-schema.md @@ -217,14 +217,14 @@ entirely unknown. Examples: #### `version_removed` -Contains a string with the version number the sub-feature was -removed in. It may also be a Boolean value of (`true` or `false`), or the -`null` value. +Contains a string with the version number the sub-feature was removed in. +It may also be `true`, meaning that it is unknown in which version support +was removed. Default values: - If `version_added` is set to `true`, `false`, or a string, `version_removed` defaults to `false`. -- if `version_added` is set to `null`, the default value of `version_removed` is also `null`. +- If `version_added` is set to `null`, the default value of `version_removed` is also `null`. Examples: @@ -237,12 +237,12 @@ Examples: } ``` -- Not removed (default if `version_added` is not `null`): +- Removed in some version after 3.5: ```json { "version_added": "3.5", - "version_removed": false + "version_removed": true } ``` From cc33d2c5f197d31cbaa1d1ff85550403ccf72422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Sat, 6 Mar 2021 12:40:10 +0100 Subject: [PATCH 2/4] Update the schema (splits version_added/version_removed) --- schemas/compat-data.schema.json | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/schemas/compat-data.schema.json b/schemas/compat-data.schema.json index dc1895c7725cdc..f27697a4ae641a 100644 --- a/schemas/compat-data.schema.json +++ b/schemas/compat-data.schema.json @@ -43,8 +43,20 @@ "type": "boolean", "description": "A boolean value indicating whether or not the implementation of the sub-feature deviates from the specification in a way that may cause compatibility problems. It defaults to false (no interoperability problems expected). If set to true, it is recommended that you add a note explaining how it diverges from the standard (such as that it implements an old version of the standard, for example)." }, - "version_added": { "$ref": "#/definitions/version_value" }, - "version_removed": { "$ref": "#/definitions/version_value" }, + "version_added": { + "description": "A string the value true, indicating which browser version added this feature, or the value false indicating the feature is not supported, or the value null indicating support is unknown.", + "allOf": [ + { "type": ["string", "boolean", "null"] }, + { "not": { "enum": ["true", "false", "null"] } } + ] + }, + "version_removed": { + "description": "A string or the value true, indicating which browser version removed this feature.", + "allOf": [ + { "type": ["string", "boolean"] }, + { "not": { "enum": ["true", false] } } + ] + }, "notes": { "description": "A string or array of strings containing additional information.", "anyOf": [ @@ -64,7 +76,7 @@ "required": ["version_added"], "anyOf": [ { - "not": {"required": ["prefix","alternative_name"]} + "not": {"required": ["prefix", "alternative_name"]} }, { "oneOf": [ @@ -258,13 +270,6 @@ "^(?!__compat)[a-zA-Z_0-9-$@]*$" : { "$ref": "#/definitions/webextensions_identifier" } }, "additionalProperties": false - }, - - "version_value": { - "allOf": [ - { "type": ["string", "boolean", "null"] }, - { "not": { "enum": ["true", "false", "null"] } } - ] } }, From 64c0090d09cc3ad34df93d9e1de5ad3f77f0ca15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Sun, 7 Mar 2021 22:27:53 +0100 Subject: [PATCH 3/4] Update schemas/compat-data.schema.json Co-authored-by: Daniel D. Beck --- schemas/compat-data.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/compat-data.schema.json b/schemas/compat-data.schema.json index f27697a4ae641a..0ef9b76755eaed 100644 --- a/schemas/compat-data.schema.json +++ b/schemas/compat-data.schema.json @@ -44,7 +44,7 @@ "description": "A boolean value indicating whether or not the implementation of the sub-feature deviates from the specification in a way that may cause compatibility problems. It defaults to false (no interoperability problems expected). If set to true, it is recommended that you add a note explaining how it diverges from the standard (such as that it implements an old version of the standard, for example)." }, "version_added": { - "description": "A string the value true, indicating which browser version added this feature, or the value false indicating the feature is not supported, or the value null indicating support is unknown.", + "description": "A string (indicating which browser version added this feature), the value true (indicating support added in an unknown version), the value false (indicating the feature is not supported), or the value null (indicating support is unknown).", "allOf": [ { "type": ["string", "boolean", "null"] }, { "not": { "enum": ["true", "false", "null"] } } From 8b69ec1791b61367997c3ea20469fca09647a4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Sun, 7 Mar 2021 22:28:57 +0100 Subject: [PATCH 4/4] Update schemas/compat-data.schema.json Co-authored-by: Daniel D. Beck --- schemas/compat-data.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/compat-data.schema.json b/schemas/compat-data.schema.json index 0ef9b76755eaed..c57184963ba8ee 100644 --- a/schemas/compat-data.schema.json +++ b/schemas/compat-data.schema.json @@ -51,7 +51,7 @@ ] }, "version_removed": { - "description": "A string or the value true, indicating which browser version removed this feature.", + "description": "A string, indicating which browser version removed this feature, or the value true, indicating that the feature was removed in an unknown version.", "allOf": [ { "type": ["string", "boolean"] }, { "not": { "enum": ["true", false] } }