[6a3a178] | 1 | /* eslint sort-keys: "error" */
|
---|
| 2 | // These mappings represent the syntax proposals that have been
|
---|
| 3 | // shipped by browsers, and are enabled by the `shippedProposals` option.
|
---|
| 4 |
|
---|
| 5 | const proposalPlugins = new Set([
|
---|
| 6 | "proposal-class-static-block",
|
---|
| 7 | "proposal-private-property-in-object",
|
---|
| 8 | ]);
|
---|
| 9 |
|
---|
| 10 | // use intermediary object to enforce alphabetical key order
|
---|
| 11 | const pluginSyntaxObject = {
|
---|
| 12 | "proposal-async-generator-functions": "syntax-async-generators",
|
---|
| 13 | "proposal-class-properties": "syntax-class-properties",
|
---|
| 14 | "proposal-class-static-block": "syntax-class-static-block",
|
---|
| 15 | "proposal-json-strings": "syntax-json-strings",
|
---|
| 16 | "proposal-nullish-coalescing-operator": "syntax-nullish-coalescing-operator",
|
---|
| 17 | "proposal-numeric-separator": "syntax-numeric-separator",
|
---|
| 18 | "proposal-object-rest-spread": "syntax-object-rest-spread",
|
---|
| 19 | "proposal-optional-catch-binding": "syntax-optional-catch-binding",
|
---|
| 20 | "proposal-optional-chaining": "syntax-optional-chaining",
|
---|
| 21 | // note: we don't have syntax-private-methods
|
---|
| 22 | "proposal-private-methods": "syntax-class-properties",
|
---|
| 23 | "proposal-private-property-in-object": "syntax-private-property-in-object",
|
---|
| 24 | "proposal-unicode-property-regex": null,
|
---|
| 25 | };
|
---|
| 26 |
|
---|
| 27 | const pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
|
---|
| 28 | return [key, pluginSyntaxObject[key]];
|
---|
| 29 | });
|
---|
| 30 |
|
---|
| 31 | const pluginSyntaxMap = new Map(pluginSyntaxEntries);
|
---|
| 32 |
|
---|
| 33 | module.exports = { pluginSyntaxMap, proposalPlugins };
|
---|