From dcbd4669af25ad0547b6d57844d7b419dcd05299 Mon Sep 17 00:00:00 2001 From: Evan Wallace Date: Fri, 24 May 2024 22:38:24 -0400 Subject: [PATCH] add import attributes to js compat table --- src/content/content-types.yml | 58 ++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/src/content/content-types.yml b/src/content/content-types.yml index dbc8016..7b8e64f 100644 --- a/src/content/content-types.yml +++ b/src/content/content-types.yml @@ -44,31 +44,39 @@ body: These syntax features are conditionally transformed for older browsers depending on the configured language [target](/api/#target): - table: | - | Syntax transform | Transformed when `--target` is below | Example | - |---------------------------------------------------------------------------------------|--------------------------------------|-----------------------------| - | [Exponentiation operator](https://github.com/tc39/proposal-exponentiation-operator) | `es2016` | `a ** b` | - | [Async functions](https://github.com/tc39/ecmascript-asyncawait) | `es2017` | `async () => {}` | - | [Asynchronous iteration](https://github.com/tc39/proposal-async-iteration) | `es2018` | `for await (let x of y) {}` | - | [Async generators](https://github.com/tc39/proposal-async-iteration) | `es2018` | `async function* foo() {}` | - | [Spread properties](https://github.com/tc39/proposal-object-rest-spread) | `es2018` | `let x = {...y}` | - | [Rest properties](https://github.com/tc39/proposal-object-rest-spread) | `es2018` | `let {...x} = y` | - | [Optional catch binding](https://github.com/tc39/proposal-optional-catch-binding) | `es2019` | `try {} catch {}` | - | [Optional chaining](https://github.com/tc39/proposal-optional-chaining) | `es2020` | `a?.b` | - | [Nullish coalescing](https://github.com/tc39/proposal-nullish-coalescing) | `es2020` | `a ?? b` | - | [`import.meta`](https://github.com/tc39/proposal-import-meta) | `es2020` | `import.meta` | - | [Logical assignment operators](https://github.com/tc39/proposal-logical-assignment) | `es2021` | `a ??= b` | - | [Class instance fields](https://github.com/tc39/proposal-class-fields) | `es2022` | `class { x }` | - | [Static class fields](https://github.com/tc39/proposal-static-class-features) | `es2022` | `class { static x }` | - | [Private instance methods](https://github.com/tc39/proposal-private-methods) | `es2022` | `class { #x() {} }` | - | [Private instance fields](https://github.com/tc39/proposal-class-fields) | `es2022` | `class { #x }` | - | [Private static methods](https://github.com/tc39/proposal-static-class-features) | `es2022` | `class { static #x() {} }` | - | [Private static fields](https://github.com/tc39/proposal-static-class-features) | `es2022` | `class { static #x }` | - | [Ergonomic brand checks](https://github.com/tc39/proposal-private-fields-in-in) | `es2022` | `#x in y` | - | [Class static blocks](https://github.com/tc39/proposal-class-static-block) | `es2022` | `class { static {} }` | - | [Import assertions](https://github.com/tc39/proposal-import-assertions) | `esnext` | `import "x" assert {}` | - | [Auto-accessors](https://github.com/tc39/proposal-decorators#class-auto-accessors) | `esnext` | `class { accessor x }` | - | [`using` declarations](https://github.com/tc39/proposal-explicit-resource-management) | `esnext` | `using x = y` | - | [Decorators](https://github.com/tc39/proposal-decorators) | `esnext` | `@foo class Bar {}` | + | Syntax transform | Transformed when `--target` is below | Example | + |---------------------------------------------------------------------------------------|--------------------------------------|------------------------------------| + | [Exponentiation operator](https://github.com/tc39/proposal-exponentiation-operator) | `es2016` | `a ** b` | + | [Async functions](https://github.com/tc39/ecmascript-asyncawait) | `es2017` | `async () => {}` | + | [Asynchronous iteration](https://github.com/tc39/proposal-async-iteration) | `es2018` | `for await (let x of y) {}` | + | [Async generators](https://github.com/tc39/proposal-async-iteration) | `es2018` | `async function* foo() {}` | + | [Spread properties](https://github.com/tc39/proposal-object-rest-spread) | `es2018` | `let x = {...y}` | + | [Rest properties](https://github.com/tc39/proposal-object-rest-spread) | `es2018` | `let {...x} = y` | + | [Optional catch binding](https://github.com/tc39/proposal-optional-catch-binding) | `es2019` | `try {} catch {}` | + | [Optional chaining](https://github.com/tc39/proposal-optional-chaining) | `es2020` | `a?.b` | + | [Nullish coalescing](https://github.com/tc39/proposal-nullish-coalescing) | `es2020` | `a ?? b` | + | [`import.meta`](https://github.com/tc39/proposal-import-meta) | `es2020` | `import.meta` | + | [Logical assignment operators](https://github.com/tc39/proposal-logical-assignment) | `es2021` | `a ??= b` | + | [Class instance fields](https://github.com/tc39/proposal-class-fields) | `es2022` | `class { x }` | + | [Static class fields](https://github.com/tc39/proposal-static-class-features) | `es2022` | `class { static x }` | + | [Private instance methods](https://github.com/tc39/proposal-private-methods) | `es2022` | `class { #x() {} }` | + | [Private instance fields](https://github.com/tc39/proposal-class-fields) | `es2022` | `class { #x }` | + | [Private static methods](https://github.com/tc39/proposal-static-class-features) | `es2022` | `class { static #x() {} }` | + | [Private static fields](https://github.com/tc39/proposal-static-class-features) | `es2022` | `class { static #x }` | + | [Ergonomic brand checks](https://github.com/tc39/proposal-private-fields-in-in) | `es2022` | `#x in y` | + | [Class static blocks](https://github.com/tc39/proposal-class-static-block) | `es2022` | `class { static {} }` | + | [Import assertions](https://github.com/tc39/proposal-import-assertions) | `esnext` | `import "x" assert {}`1 | + | [Import attributes](https://github.com/tc39/proposal-import-attributes) | `esnext` | `import "x" with {}` | + | [Auto-accessors](https://github.com/tc39/proposal-decorators#class-auto-accessors) | `esnext` | `class { accessor x }` | + | [`using` declarations](https://github.com/tc39/proposal-explicit-resource-management) | `esnext` | `using x = y` | + | [Decorators](https://github.com/tc39/proposal-decorators) | `esnext` | `@foo class Bar {}` | + + - p: > + - p: > These syntax features are currently always passed through un-transformed: