Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add import-assertions to shippedProposals #14556

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/babel-preset-env/data/shipped-proposals.js
Expand Up @@ -2,7 +2,9 @@
// These mappings represent the syntax proposals that have been
// shipped by browsers, and are enabled by the `shippedProposals` option.

const proposalPlugins = new Set();
const proposalPlugins = new Set([
"syntax-import-assertions"
]);

// use intermediary object to enforce alphabetical key order
const pluginSyntaxObject = {
Expand Down
1 change: 1 addition & 0 deletions packages/babel-preset-env/package.json
Expand Up @@ -42,6 +42,7 @@
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3",
"@babel/plugin-syntax-import-assertions": "workspace:^",
"@babel/plugin-syntax-json-strings": "^7.8.3",
"@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-preset-env/src/available-plugins.ts
Expand Up @@ -5,6 +5,7 @@ import syntaxClassProperties from "@babel/plugin-syntax-class-properties";
import syntaxClassStaticBlock from "@babel/plugin-syntax-class-static-block";
import syntaxDynamicImport from "@babel/plugin-syntax-dynamic-import";
import syntaxExportNamespaceFrom from "@babel/plugin-syntax-export-namespace-from";
import syntaxImportAssertions from "@babel/plugin-syntax-import-assertions";
import syntaxJsonStrings from "@babel/plugin-syntax-json-strings";
import syntaxLogicalAssignmentOperators from "@babel/plugin-syntax-logical-assignment-operators";
import syntaxNullishCoalescingOperator from "@babel/plugin-syntax-nullish-coalescing-operator";
Expand Down Expand Up @@ -104,6 +105,7 @@ export default {
"syntax-class-static-block": () => syntaxClassStaticBlock,
"syntax-dynamic-import": () => syntaxDynamicImport,
"syntax-export-namespace-from": () => syntaxExportNamespaceFrom,
"syntax-import-assertions": () => syntaxImportAssertions,
"syntax-json-strings": () => syntaxJsonStrings,
"syntax-logical-assignment-operators": () => syntaxLogicalAssignmentOperators,
"syntax-nullish-coalescing-operator": () => syntaxNullishCoalescingOperator,
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Expand Up @@ -3372,6 +3372,7 @@ __metadata:
"@babel/plugin-syntax-class-static-block": ^7.14.5
"@babel/plugin-syntax-dynamic-import": ^7.8.3
"@babel/plugin-syntax-export-namespace-from": ^7.8.3
"@babel/plugin-syntax-import-assertions": "workspace:^"
"@babel/plugin-syntax-json-strings": ^7.8.3
"@babel/plugin-syntax-logical-assignment-operators": ^7.10.4
"@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3
Expand Down