@@ -214,6 +214,34 @@ require("@babel/parser").parse("code", {
214214
215215#### ECMAScript [ proposals] ( https://github.com/babel/proposals )
216216
217+ ::: babel8
218+
219+ | Name | Code Example |
220+ | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
221+ | ` asyncDoExpressions ` ([ proposal] ( https://github.com/tc39/proposal-async-do-expressions ) ) | ` async do { await requestAPI().json() } ` |
222+ | ` decorators ` ([ proposal] ( https://github.com/tc39/proposal-decorators ) ) <br /> ` decorators-legacy ` | ` @a class A {} ` |
223+ | ` decoratorAutoAccessors ` ([ proposal] ( https://github.com/tc39/proposal-decorators ) ) | ` class Example { @reactive accessor myBool = false; } ` |
224+ | ` deferredImportEvaluation ` ([ proposal] ( https://github.com/tc39/proposal-defer-import-eval ) ) | ` import defer * as ns from "dep"; ` |
225+ | ` destructuringPrivate ` ([ proposal] ( https://github.com/tc39/proposal-destructuring-private ) ) | ` class Example { #x = 1; method() { const { #x: x } = this; } } ` |
226+ | ` doExpressions ` ([ proposal] ( https://github.com/tc39/proposal-do-expressions ) ) | ` var a = do { if (true) { 'hi'; } }; ` |
227+ | ` explicitResourceManagement ` ([ proposal] ( https://github.com/tc39/proposal-explicit-resource-management ) ) | ` using reader = getReader() ` |
228+ | ` exportDefaultFrom ` ([ proposal] ( https://github.com/tc39/ecmascript-export-default-from ) ) | ` export v from "mod" ` |
229+ | ` functionBind ` ([ proposal] ( https://github.com/zenparsing/es-function-bind ) ) | ` a::b ` , ` ::console.log ` |
230+ | ` functionSent ` ([ proposal] ( https://github.com/tc39/proposal-function.sent ) ) | ` function.sent ` |
231+ | ` importAttributes ` ([ proposal] ( https://github.com/tc39/proposal-import-attributes ) ) | ` import json from "./foo.json" with { type: "json" }; ` |
232+ | ` importReflection ` ([ proposal] ( https://github.com/tc39/proposal-import-reflection ) ) | ` import module foo from "./foo.wasm"; ` |
233+ | ` moduleBlocks ` ([ proposal] ( https://github.com/tc39/proposal-js-module-blocks ) ) | ` let m = module { export let y = 1; }; ` |
234+ | ` optionalChainingAssign ` ([ proposal] ( https://github.com/tc39/proposal-optional-chaining-assignment ) ) | ` x?.prop = 2 ` |
235+ | ` partialApplication ` ([ proposal] ( https://github.com/babel/proposals/issues/32 ) ) | ` f(?, a) ` |
236+ | ` pipelineOperator ` ([ proposal] ( https://github.com/babel/proposals/issues/29 ) ) | <code >a | ; > b</code > |
237+ | ` recordAndTuple ` ([ proposal] ( https://github.com/tc39/proposal-record-tuple ) ) | ` #{x: 1} ` , ` #[1, 2] ` |
238+ | ` sourcePhaseImports ` ([ proposal] ( https://github.com/tc39/proposal-source-phase-imports ) ) | ` import source x from "./x" ` |
239+ | ` throwExpressions ` ([ proposal] ( https://github.com/babel/proposals/issues/23 ) ) | ` () => throw new Error("") ` |
240+
241+ :::
242+
243+ ::: babel7
244+
217245<details >
218246 <summary >History</summary >
219247
@@ -236,28 +264,28 @@ require("@babel/parser").parse("code", {
236264
237265</details >
238266
239- | Name | Code Example |
240- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
241- | ` asyncDoExpressions ` ([ proposal] ( https://github.com/tc39/proposal-async-do-expressions ) ) | ` async do { await requestAPI().json() } ` |
242- | ` decimal ` ([ proposal] ( https://github.com/tc39/proposal-decimal ) ) | ` 0.3m ` |
243- | ` decorators ` ([ proposal] ( https://github.com/tc39/proposal-decorators ) ) <br /> ` decorators-legacy ` | ` @a class A {} ` |
244- | ` decoratorAutoAccessors ` ([ proposal] ( https://github.com/tc39/proposal-decorators ) ) | ` class Example { @reactive accessor myBool = false; } ` |
245- | ` deferredImportEvaluation ` ([ proposal] ( https://github.com/tc39/proposal-defer-import-eval ) ) | ` import defer * as ns from "dep"; ` |
246- | ` destructuringPrivate ` ([ proposal] ( https://github.com/tc39/proposal-destructuring-private ) ) | ` class Example { #x = 1; method() { const { #x: x } = this; } } ` |
247- | ` doExpressions ` ([ proposal] ( https://github.com/tc39/proposal-do-expressions ) ) | ` var a = do { if (true) { 'hi'; } }; ` |
248- | ` explicitResourceManagement ` ([ proposal] ( https://github.com/tc39/proposal-explicit-resource-management ) ) | ` using reader = getReader() ` |
249- | ` exportDefaultFrom ` ([ proposal] ( https://github.com/tc39/ecmascript-export-default-from ) ) | ` export v from "mod" ` |
250- | ` functionBind ` ([ proposal] ( https://github.com/zenparsing/es-function-bind ) ) | ` a::b ` , ` ::console.log ` |
251- | ` functionSent ` ([ proposal] ( https://github.com/tc39/proposal-function.sent ) ) | ` function.sent ` |
252- | ` importAttributes ` ([ proposal] ( https://github.com/tc39/proposal-import-attributes ) ) [ <br /> ` importAssertions ` (⚠️ deprecated)] ( :::babel7 ) | ` import json from "./foo.json" with { type: "json" }; ` |
253- | ` importReflection ` ([ proposal] ( https://github.com/tc39/proposal-import-reflection ) ) | ` import module foo from "./foo.wasm"; ` |
254- | ` moduleBlocks ` ([ proposal] ( https://github.com/tc39/proposal-js-module-blocks ) ) | ` let m = module { export let y = 1; }; ` |
255- | ` optionalChainingAssign ` ([ proposal] ( https://github.com/tc39/proposal-optional-chaining-assignment ) ) | ` x?.prop = 2 ` |
256- | ` partialApplication ` ([ proposal] ( https://github.com/babel/proposals/issues/32 ) ) | ` f(?, a) ` |
257- | ` pipelineOperator ` ([ proposal] ( https://github.com/babel/proposals/issues/29 ) ) | <code >a | ; > b</code > |
258- | ` recordAndTuple ` ([ proposal] ( https://github.com/tc39/proposal-record-tuple ) ) | ` #{x: 1} ` , ` #[1, 2] ` |
259- | ` sourcePhaseImports ` ([ proposal] ( https://github.com/tc39/proposal-source-phase-imports ) ) | ` import source x from "./x" ` |
260- | ` throwExpressions ` ([ proposal] ( https://github.com/babel/proposals/issues/23 ) ) | ` () => throw new Error("") ` |
267+ | Name | Code Example |
268+ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
269+ | ` asyncDoExpressions ` ([ proposal] ( https://github.com/tc39/proposal-async-do-expressions ) ) | ` async do { await requestAPI().json() } ` |
270+ | ` decimal ` ([ proposal] ( https://github.com/tc39/proposal-decimal ) ) | ` 0.3m ` |
271+ | ` decorators ` ([ proposal] ( https://github.com/tc39/proposal-decorators ) ) <br /> ` decorators-legacy ` | ` @a class A {} ` |
272+ | ` decoratorAutoAccessors ` ([ proposal] ( https://github.com/tc39/proposal-decorators ) ) | ` class Example { @reactive accessor myBool = false; } ` |
273+ | ` deferredImportEvaluation ` ([ proposal] ( https://github.com/tc39/proposal-defer-import-eval ) ) | ` import defer * as ns from "dep"; ` |
274+ | ` destructuringPrivate ` ([ proposal] ( https://github.com/tc39/proposal-destructuring-private ) ) | ` class Example { #x = 1; method() { const { #x: x } = this; } } ` |
275+ | ` doExpressions ` ([ proposal] ( https://github.com/tc39/proposal-do-expressions ) ) | ` var a = do { if (true) { 'hi'; } }; ` |
276+ | ` explicitResourceManagement ` ([ proposal] ( https://github.com/tc39/proposal-explicit-resource-management ) ) | ` using reader = getReader() ` |
277+ | ` exportDefaultFrom ` ([ proposal] ( https://github.com/tc39/ecmascript-export-default-from ) ) | ` export v from "mod" ` |
278+ | ` functionBind ` ([ proposal] ( https://github.com/zenparsing/es-function-bind ) ) | ` a::b ` , ` ::console.log ` |
279+ | ` functionSent ` ([ proposal] ( https://github.com/tc39/proposal-function.sent ) ) | ` function.sent ` |
280+ | ` importAttributes ` ([ proposal] ( https://github.com/tc39/proposal-import-attributes ) ) <br /> ` importAssertions ` (⚠️ deprecated) | ` import json from "./foo.json" with { type: "json" }; ` |
281+ | ` importReflection ` ([ proposal] ( https://github.com/tc39/proposal-import-reflection ) ) | ` import module foo from "./foo.wasm"; ` |
282+ | ` moduleBlocks ` ([ proposal] ( https://github.com/tc39/proposal-js-module-blocks ) ) | ` let m = module { export let y = 1; }; ` |
283+ | ` optionalChainingAssign ` ([ proposal] ( https://github.com/tc39/proposal-optional-chaining-assignment ) ) | ` x?.prop = 2 ` |
284+ | ` partialApplication ` ([ proposal] ( https://github.com/babel/proposals/issues/32 ) ) | ` f(?, a) ` |
285+ | ` pipelineOperator ` ([ proposal] ( https://github.com/babel/proposals/issues/29 ) ) | <code >a | ; > b</code > |
286+ | ` recordAndTuple ` ([ proposal] ( https://github.com/tc39/proposal-record-tuple ) ) | ` #{x: 1} ` , ` #[1, 2] ` |
287+ | ` sourcePhaseImports ` ([ proposal] ( https://github.com/tc39/proposal-source-phase-imports ) ) | ` import source x from "./x" ` |
288+ | ` throwExpressions ` ([ proposal] ( https://github.com/babel/proposals/issues/23 ) ) | ` () => throw new Error("") ` |
261289
262290#### Latest ECMAScript features
263291
@@ -285,6 +313,8 @@ You should enable these features only if you are using an older version.
285313| ` regexpUnicodeSets ` ([ proposal] ( https://github.com/tc39/proposal-regexp-set-notation ) ) | ` /[\p{Decimal_Number}--[0-9]]/v; ` |
286314| ` topLevelAwait ` ([ proposal] ( https://github.com/tc39/proposal-top-level-await/ ) ) | ` await promise ` in modules |
287315
316+ :::
317+
288318#### Plugins options
289319
290320<details >
@@ -310,7 +340,11 @@ When a plugin is specified multiple times, only the first options are considered
310340
311341 - ` deprecatedAssertSyntax ` (` boolean ` , defaults to ` false ` )
312342
313- When ` true ` , allow parsing an old version of the import attributes, which used the ` assert ` keyword instead of ` with ` . [ This matches the syntax originally supported by the ` importAssertions ` parser plugin.] ( :::babel7 )
343+ When ` true ` , allow parsing an old version of the import attributes, which used the ` assert ` keyword instead of ` with ` .
344+
345+ ::: babel7
346+ This matches the syntax originally supported by the `importAssertions` parser plugin.
347+ :::
314348
315349- ` decorators ` :
316350
0 commit comments