From f75c1743eb3a40868267fc3e0d983dd691b2ba44 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Fri, 14 Jun 2024 11:09:36 +0200 Subject: [PATCH 1/2] New JSON module script feature --- features/json-modules.yml | 8 ++++++++ features/json-modules.yml.dist | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 features/json-modules.yml create mode 100644 features/json-modules.yml.dist diff --git a/features/json-modules.yml b/features/json-modules.yml new file mode 100644 index 00000000000..5becc620bb4 --- /dev/null +++ b/features/json-modules.yml @@ -0,0 +1,8 @@ +name: JSON module scripts +description: 'JSON module scripts allow other modules to load JSON data by using `import ... with {type: "json"}`.' +spec: https://html.spec.whatwg.org/multipage/webappapis.html#json-module-script +compat_features: + # TODO: Include when https://github.com/web-platform-dx/web-features/issues/1173 + # is resolved. + # - javascript.statements.import + - javascript.statements.import.import_attributes.type_json diff --git a/features/json-modules.yml.dist b/features/json-modules.yml.dist new file mode 100644 index 00000000000..479958091a8 --- /dev/null +++ b/features/json-modules.yml.dist @@ -0,0 +1,11 @@ +# Generated from: json-modules.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "123" + chrome_android: "123" + edge: "123" + safari: "17.2" + safari_ios: "17.2" From 61887a58f9abcd1b3007ab6543e6885c42219714 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Wed, 26 Jun 2024 16:07:02 +0200 Subject: [PATCH 2/2] Addressed review comments --- features/css-modules.yml | 4 ++-- features/json-modules.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/css-modules.yml b/features/css-modules.yml index c34fc7aee97..b0560b6451e 100644 --- a/features/css-modules.yml +++ b/features/css-modules.yml @@ -1,4 +1,4 @@ -name: CSS module scripts -description: 'CSS module scripts allow CSS code to be organized into reusable units. Other modules use `import ... with {type: "css"}` to load CSS modules as constructable stylesheets.' +name: CSS import attributes +description: 'Module `import ... with { type: "css" } statements load CSS modules as constructable stylesheets. Also known as CSS module scripts and formerly known as import assertions.' spec: https://html.spec.whatwg.org/multipage/webappapis.html#css-module-script usage_stats: https://chromestatus.com/metrics/feature/timeline/popularity/3805 diff --git a/features/json-modules.yml b/features/json-modules.yml index 5becc620bb4..5a4dc4f424d 100644 --- a/features/json-modules.yml +++ b/features/json-modules.yml @@ -1,5 +1,5 @@ -name: JSON module scripts -description: 'JSON module scripts allow other modules to load JSON data by using `import ... with {type: "json"}`.' +name: JSON import attributes +description: 'Module `import ... with { type: "json" }` statements load JSON data. Also known as JSON module scripts and formerly known as import assertions.' spec: https://html.spec.whatwg.org/multipage/webappapis.html#json-module-script compat_features: # TODO: Include when https://github.com/web-platform-dx/web-features/issues/1173