diff --git a/features/css-modules.yml b/features/css-modules.yml index b058602900b..58cdca49e58 100644 --- a/features/css-modules.yml +++ b/features/css-modules.yml @@ -1,3 +1,3 @@ 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.' +description: 'Module `import … with { type: "css" } statements load CSS modules as constructable stylesheets. Also known as CSS module scripts.' spec: https://html.spec.whatwg.org/multipage/webappapis.html#css-module-script diff --git a/features/import-assertions.yml b/features/import-assertions.yml new file mode 100644 index 00000000000..edffeb81c37 --- /dev/null +++ b/features/import-assertions.yml @@ -0,0 +1,13 @@ +name: Import assertions +description: 'Module `import … assert { type: "json" }` and `import … assert { type: "css" }` JavaScript statements load JSON and CSS data.' +spec: https://github.com/tc39/proposal-import-attributes/tree/abca60286360b47f9a6be25a28f489c2cb157beb +discouraged: + according_to: + - https://github.com/tc39/proposal-import-attributes/pull/131 + alternatives: + - css-modules + - json-modules +compat_features: + - javascript.statements.import.import_assertions + - javascript.statements.import.import_assertions.type_css + - javascript.statements.import.import_assertions.type_json diff --git a/features/import-assertions.yml.dist b/features/import-assertions.yml.dist new file mode 100644 index 00000000000..235a8e3a50a --- /dev/null +++ b/features/import-assertions.yml.dist @@ -0,0 +1,10 @@ +# Generated from: import-assertions.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: {} +compat_features: + - javascript.statements.import.import_assertions + - javascript.statements.import.import_assertions.type_css + - javascript.statements.import.import_assertions.type_json diff --git a/features/json-modules.yml b/features/json-modules.yml index bbb96fc0d23..f4033695e60 100644 --- a/features/json-modules.yml +++ b/features/json-modules.yml @@ -1,5 +1,5 @@ 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.' +description: 'Module `import … with { type: "json" }` statements load JSON data. Also known as JSON module scripts.' spec: https://html.spec.whatwg.org/multipage/webappapis.html#json-module-script group: json # TODO: Tag javascript.statements.import when https://github.com/web-platform-dx/web-features/issues/1173 is resolved. diff --git a/scripts/specs.ts b/scripts/specs.ts index ea8763aca1e..09cf695a7ba 100644 --- a/scripts/specs.ts +++ b/scripts/specs.ts @@ -96,6 +96,10 @@ const defaultAllowlist: allowlistItem[] = [ [ "https://immersive-web.github.io/webvr/spec/1.1/", "Allowed because this is the legacy spec that defines WebVR." + ], + [ + "https://github.com/tc39/proposal-import-attributes/tree/abca60286360b47f9a6be25a28f489c2cb157beb", + "Allowed because import assertions were replaced in-place by import attributes. Remove this exception when javascript.statements.import.import_assertions is dropped from BCD in June 2026." ] ];