shipped-proposals.js 1.3 KB

123456789101112131415161718192021222324252627282930
  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. const proposalPlugins = new Set();
  5. // use intermediary object to enforce alphabetical key order
  6. const pluginSyntaxObject = {
  7. "proposal-async-generator-functions": "syntax-async-generators",
  8. "proposal-class-properties": "syntax-class-properties",
  9. "proposal-class-static-block": "syntax-class-static-block",
  10. "proposal-json-strings": "syntax-json-strings",
  11. "proposal-nullish-coalescing-operator": "syntax-nullish-coalescing-operator",
  12. "proposal-numeric-separator": "syntax-numeric-separator",
  13. "proposal-object-rest-spread": "syntax-object-rest-spread",
  14. "proposal-optional-catch-binding": "syntax-optional-catch-binding",
  15. "proposal-optional-chaining": "syntax-optional-chaining",
  16. // note: we don't have syntax-private-methods
  17. "proposal-private-methods": "syntax-class-properties",
  18. "proposal-private-property-in-object": "syntax-private-property-in-object",
  19. "proposal-unicode-property-regex": null,
  20. };
  21. const pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
  22. return [key, pluginSyntaxObject[key]];
  23. });
  24. const pluginSyntaxMap = new Map(pluginSyntaxEntries);
  25. module.exports = { pluginSyntaxMap, proposalPlugins };