-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: move shipped-proposals to ts * preset-env * address review comments
- Loading branch information
Showing
16 changed files
with
134 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,2 @@ | ||
/* eslint sort-keys: "error" */ | ||
// These mappings represent the transform plugins that have been | ||
// shipped by browsers, and are enabled by the `shippedProposals` option. | ||
|
||
const proposalPlugins = new Set(); | ||
|
||
// proposal syntax plugins enabled by the `shippedProposals` option. | ||
// Unlike proposalPlugins above, they are independent of compiler targets. | ||
const proposalSyntaxPlugins = [ | ||
"syntax-import-assertions" | ||
] | ||
|
||
// use intermediary object to enforce alphabetical key order | ||
const pluginSyntaxObject = { | ||
"proposal-async-generator-functions": "syntax-async-generators", | ||
"proposal-class-properties": "syntax-class-properties", | ||
"proposal-class-static-block": "syntax-class-static-block", | ||
"proposal-json-strings": "syntax-json-strings", | ||
"proposal-nullish-coalescing-operator": "syntax-nullish-coalescing-operator", | ||
"proposal-numeric-separator": "syntax-numeric-separator", | ||
"proposal-object-rest-spread": "syntax-object-rest-spread", | ||
"proposal-optional-catch-binding": "syntax-optional-catch-binding", | ||
"proposal-optional-chaining": "syntax-optional-chaining", | ||
// note: we don't have syntax-private-methods | ||
"proposal-private-methods": "syntax-class-properties", | ||
"proposal-private-property-in-object": "syntax-private-property-in-object", | ||
"proposal-unicode-property-regex": null, | ||
}; | ||
|
||
const pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) { | ||
return [key, pluginSyntaxObject[key]]; | ||
}); | ||
|
||
const pluginSyntaxMap = new Map(pluginSyntaxEntries); | ||
|
||
const { pluginSyntaxMap, proposalPlugins, proposalSyntaxPlugins } = require("../lib/shipped-proposals"); | ||
module.exports = { pluginSyntaxMap, proposalPlugins, proposalSyntaxPlugins }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.