Socket
Socket
Sign inDemoInstall

@babel/preset-env

Package Overview
Dependencies
Maintainers
4
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/preset-env - npm Package Compare versions

Comparing version 7.21.4-esm.2 to 7.21.4-esm.3

292

lib/available-plugins.js

@@ -1,144 +0,151 @@

import syntaxAsyncGenerators from "@babel/plugin-syntax-async-generators";
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";
import syntaxNumericSeparator from "@babel/plugin-syntax-numeric-separator";
import syntaxObjectRestSpread from "@babel/plugin-syntax-object-rest-spread";
import syntaxOptionalCatchBinding from "@babel/plugin-syntax-optional-catch-binding";
import syntaxOptionalChaining from "@babel/plugin-syntax-optional-chaining";
import syntaxPrivatePropertyInObject from "@babel/plugin-syntax-private-property-in-object";
import syntaxTopLevelAwait from "@babel/plugin-syntax-top-level-await";
import proposalAsyncGeneratorFunctions from "@babel/plugin-proposal-async-generator-functions";
import proposalClassProperties from "@babel/plugin-proposal-class-properties";
import proposalClassStaticBlock from "@babel/plugin-proposal-class-static-block";
import proposalDynamicImport from "@babel/plugin-proposal-dynamic-import";
import proposalExportNamespaceFrom from "@babel/plugin-proposal-export-namespace-from";
import proposalJsonStrings from "@babel/plugin-proposal-json-strings";
import proposalLogicalAssignmentOperators from "@babel/plugin-proposal-logical-assignment-operators";
import proposalNullishCoalescingOperator from "@babel/plugin-proposal-nullish-coalescing-operator";
import proposalNumericSeparator from "@babel/plugin-proposal-numeric-separator";
import proposalObjectRestSpread from "@babel/plugin-proposal-object-rest-spread";
import proposalOptionalCatchBinding from "@babel/plugin-proposal-optional-catch-binding";
import proposalOptionalChaining from "@babel/plugin-proposal-optional-chaining";
import proposalPrivateMethods from "@babel/plugin-proposal-private-methods";
import proposalPrivatePropertyInObject from "@babel/plugin-proposal-private-property-in-object";
import proposalUnicodePropertyRegex from "@babel/plugin-proposal-unicode-property-regex";
import transformAsyncToGenerator from "@babel/plugin-transform-async-to-generator";
import transformArrowFunctions from "@babel/plugin-transform-arrow-functions";
import transformBlockScopedFunctions from "@babel/plugin-transform-block-scoped-functions";
import transformBlockScoping from "@babel/plugin-transform-block-scoping";
import transformClasses from "@babel/plugin-transform-classes";
import transformComputedProperties from "@babel/plugin-transform-computed-properties";
import transformDestructuring from "@babel/plugin-transform-destructuring";
import transformDotallRegex from "@babel/plugin-transform-dotall-regex";
import transformDuplicateKeys from "@babel/plugin-transform-duplicate-keys";
import transformExponentialOperator from "@babel/plugin-transform-exponentiation-operator";
import transformForOf from "@babel/plugin-transform-for-of";
import transformFunctionName from "@babel/plugin-transform-function-name";
import transformLiterals from "@babel/plugin-transform-literals";
import transformMemberExpressionLiterals from "@babel/plugin-transform-member-expression-literals";
import transformModulesAmd from "@babel/plugin-transform-modules-amd";
import transformModulesCommonjs from "@babel/plugin-transform-modules-commonjs";
import transformModulesSystemjs from "@babel/plugin-transform-modules-systemjs";
import transformModulesUmd from "@babel/plugin-transform-modules-umd";
import transformNamedCapturingGroupsRegex from "@babel/plugin-transform-named-capturing-groups-regex";
import transformNewTarget from "@babel/plugin-transform-new-target";
import transformObjectSuper from "@babel/plugin-transform-object-super";
import transformParameters from "@babel/plugin-transform-parameters";
import transformPropertyLiterals from "@babel/plugin-transform-property-literals";
import transformRegenerator from "@babel/plugin-transform-regenerator";
import transformReservedWords from "@babel/plugin-transform-reserved-words";
import transformShorthandProperties from "@babel/plugin-transform-shorthand-properties";
import transformSpread from "@babel/plugin-transform-spread";
import transformStickyRegex from "@babel/plugin-transform-sticky-regex";
import transformTemplateLiterals from "@babel/plugin-transform-template-literals";
import transformTypeofSymbol from "@babel/plugin-transform-typeof-symbol";
import transformUnicodeEscapes from "@babel/plugin-transform-unicode-escapes";
import transformUnicodeRegex from "@babel/plugin-transform-unicode-regex";
import bugfixAsyncArrowsInClass from "@babel/preset-modules/lib/plugins/transform-async-arrows-in-class/index.js";
import bugfixEdgeDefaultParameters from "@babel/preset-modules/lib/plugins/transform-edge-default-parameters/index.js";
import bugfixEdgeFunctionName from "@babel/preset-modules/lib/plugins/transform-edge-function-name/index.js";
import bugfixTaggedTemplateCaching from "@babel/preset-modules/lib/plugins/transform-tagged-template-caching/index.js";
import bugfixSafariBlockShadowing from "@babel/preset-modules/lib/plugins/transform-safari-block-shadowing/index.js";
import bugfixSafariForShadowing from "@babel/preset-modules/lib/plugins/transform-safari-for-shadowing/index.js";
import bugfixSafariIdDestructuringCollisionInFunctionExpression from "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression";
import bugfixV8SpreadParametersInOptionalChaining from "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining";
export default {
"bugfix/transform-async-arrows-in-class": () => bugfixAsyncArrowsInClass,
"bugfix/transform-edge-default-parameters": () => bugfixEdgeDefaultParameters,
"bugfix/transform-edge-function-name": () => bugfixEdgeFunctionName,
"bugfix/transform-safari-block-shadowing": () => bugfixSafariBlockShadowing,
"bugfix/transform-safari-for-shadowing": () => bugfixSafariForShadowing,
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": () => bugfixSafariIdDestructuringCollisionInFunctionExpression,
"bugfix/transform-tagged-template-caching": () => bugfixTaggedTemplateCaching,
"bugfix/transform-v8-spread-parameters-in-optional-chaining": () => bugfixV8SpreadParametersInOptionalChaining,
"syntax-async-generators": () => syntaxAsyncGenerators,
"syntax-class-properties": () => syntaxClassProperties,
"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,
"syntax-numeric-separator": () => syntaxNumericSeparator,
"syntax-object-rest-spread": () => syntaxObjectRestSpread,
"syntax-optional-catch-binding": () => syntaxOptionalCatchBinding,
"syntax-optional-chaining": () => syntaxOptionalChaining,
"syntax-private-property-in-object": () => syntaxPrivatePropertyInObject,
"syntax-top-level-await": () => syntaxTopLevelAwait,
"transform-arrow-functions": () => transformArrowFunctions,
"transform-async-generator-functions": () => proposalAsyncGeneratorFunctions,
"transform-async-to-generator": () => transformAsyncToGenerator,
"transform-block-scoped-functions": () => transformBlockScopedFunctions,
"transform-block-scoping": () => transformBlockScoping,
"transform-class-properties": () => proposalClassProperties,
"transform-class-static-block": () => proposalClassStaticBlock,
"transform-classes": () => transformClasses,
"transform-computed-properties": () => transformComputedProperties,
"transform-destructuring": () => transformDestructuring,
"transform-dotall-regex": () => transformDotallRegex,
"transform-duplicate-keys": () => transformDuplicateKeys,
"transform-dynamic-import": () => proposalDynamicImport,
"transform-exponentiation-operator": () => transformExponentialOperator,
"transform-export-namespace-from": () => proposalExportNamespaceFrom,
"transform-for-of": () => transformForOf,
"transform-function-name": () => transformFunctionName,
"transform-json-strings": () => proposalJsonStrings,
"transform-literals": () => transformLiterals,
"transform-logical-assignment-operators": () => proposalLogicalAssignmentOperators,
"transform-member-expression-literals": () => transformMemberExpressionLiterals,
"transform-modules-amd": () => transformModulesAmd,
"transform-modules-commonjs": () => transformModulesCommonjs,
"transform-modules-systemjs": () => transformModulesSystemjs,
"transform-modules-umd": () => transformModulesUmd,
"transform-named-capturing-groups-regex": () => transformNamedCapturingGroupsRegex,
"transform-new-target": () => transformNewTarget,
"transform-nullish-coalescing-operator": () => proposalNullishCoalescingOperator,
"transform-numeric-separator": () => proposalNumericSeparator,
"transform-object-rest-spread": () => proposalObjectRestSpread,
"transform-object-super": () => transformObjectSuper,
"transform-optional-catch-binding": () => proposalOptionalCatchBinding,
"transform-optional-chaining": () => proposalOptionalChaining,
"transform-parameters": () => transformParameters,
"transform-private-methods": () => proposalPrivateMethods,
"transform-private-property-in-object": () => proposalPrivatePropertyInObject,
"transform-property-literals": () => transformPropertyLiterals,
"transform-regenerator": () => transformRegenerator,
"transform-reserved-words": () => transformReservedWords,
"transform-shorthand-properties": () => transformShorthandProperties,
"transform-spread": () => transformSpread,
"transform-sticky-regex": () => transformStickyRegex,
"transform-template-literals": () => transformTemplateLiterals,
"transform-typeof-symbol": () => transformTypeofSymbol,
"transform-unicode-escapes": () => transformUnicodeEscapes,
"transform-unicode-property-regex": () => proposalUnicodePropertyRegex,
"transform-unicode-regex": () => transformUnicodeRegex
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.minVersions = exports.default = void 0;
var _pluginSyntaxAsyncGenerators = require("@babel/plugin-syntax-async-generators");
var _pluginSyntaxClassProperties = require("@babel/plugin-syntax-class-properties");
var _pluginSyntaxClassStaticBlock = require("@babel/plugin-syntax-class-static-block");
var _pluginSyntaxDynamicImport = require("@babel/plugin-syntax-dynamic-import");
var _pluginSyntaxExportNamespaceFrom = require("@babel/plugin-syntax-export-namespace-from");
var _pluginSyntaxImportAssertions = require("@babel/plugin-syntax-import-assertions");
var _pluginSyntaxJsonStrings = require("@babel/plugin-syntax-json-strings");
var _pluginSyntaxLogicalAssignmentOperators = require("@babel/plugin-syntax-logical-assignment-operators");
var _pluginSyntaxNullishCoalescingOperator = require("@babel/plugin-syntax-nullish-coalescing-operator");
var _pluginSyntaxNumericSeparator = require("@babel/plugin-syntax-numeric-separator");
var _pluginSyntaxObjectRestSpread = require("@babel/plugin-syntax-object-rest-spread");
var _pluginSyntaxOptionalCatchBinding = require("@babel/plugin-syntax-optional-catch-binding");
var _pluginSyntaxOptionalChaining = require("@babel/plugin-syntax-optional-chaining");
var _pluginSyntaxPrivatePropertyInObject = require("@babel/plugin-syntax-private-property-in-object");
var _pluginSyntaxTopLevelAwait = require("@babel/plugin-syntax-top-level-await");
var _pluginProposalAsyncGeneratorFunctions = require("@babel/plugin-proposal-async-generator-functions");
var _pluginProposalClassProperties = require("@babel/plugin-proposal-class-properties");
var _pluginProposalClassStaticBlock = require("@babel/plugin-proposal-class-static-block");
var _pluginProposalDynamicImport = require("@babel/plugin-proposal-dynamic-import");
var _pluginProposalExportNamespaceFrom = require("@babel/plugin-proposal-export-namespace-from");
var _pluginProposalJsonStrings = require("@babel/plugin-proposal-json-strings");
var _pluginProposalLogicalAssignmentOperators = require("@babel/plugin-proposal-logical-assignment-operators");
var _pluginProposalNullishCoalescingOperator = require("@babel/plugin-proposal-nullish-coalescing-operator");
var _pluginProposalNumericSeparator = require("@babel/plugin-proposal-numeric-separator");
var _pluginProposalObjectRestSpread = require("@babel/plugin-proposal-object-rest-spread");
var _pluginProposalOptionalCatchBinding = require("@babel/plugin-proposal-optional-catch-binding");
var _pluginProposalOptionalChaining = require("@babel/plugin-proposal-optional-chaining");
var _pluginProposalPrivateMethods = require("@babel/plugin-proposal-private-methods");
var _pluginProposalPrivatePropertyInObject = require("@babel/plugin-proposal-private-property-in-object");
var _pluginProposalUnicodePropertyRegex = require("@babel/plugin-proposal-unicode-property-regex");
var _pluginTransformAsyncToGenerator = require("@babel/plugin-transform-async-to-generator");
var _pluginTransformArrowFunctions = require("@babel/plugin-transform-arrow-functions");
var _pluginTransformBlockScopedFunctions = require("@babel/plugin-transform-block-scoped-functions");
var _pluginTransformBlockScoping = require("@babel/plugin-transform-block-scoping");
var _pluginTransformClasses = require("@babel/plugin-transform-classes");
var _pluginTransformComputedProperties = require("@babel/plugin-transform-computed-properties");
var _pluginTransformDestructuring = require("@babel/plugin-transform-destructuring");
var _pluginTransformDotallRegex = require("@babel/plugin-transform-dotall-regex");
var _pluginTransformDuplicateKeys = require("@babel/plugin-transform-duplicate-keys");
var _pluginTransformExponentiationOperator = require("@babel/plugin-transform-exponentiation-operator");
var _pluginTransformForOf = require("@babel/plugin-transform-for-of");
var _pluginTransformFunctionName = require("@babel/plugin-transform-function-name");
var _pluginTransformLiterals = require("@babel/plugin-transform-literals");
var _pluginTransformMemberExpressionLiterals = require("@babel/plugin-transform-member-expression-literals");
var _pluginTransformModulesAmd = require("@babel/plugin-transform-modules-amd");
var _pluginTransformModulesCommonjs = require("@babel/plugin-transform-modules-commonjs");
var _pluginTransformModulesSystemjs = require("@babel/plugin-transform-modules-systemjs");
var _pluginTransformModulesUmd = require("@babel/plugin-transform-modules-umd");
var _pluginTransformNamedCapturingGroupsRegex = require("@babel/plugin-transform-named-capturing-groups-regex");
var _pluginTransformNewTarget = require("@babel/plugin-transform-new-target");
var _pluginTransformObjectSuper = require("@babel/plugin-transform-object-super");
var _pluginTransformParameters = require("@babel/plugin-transform-parameters");
var _pluginTransformPropertyLiterals = require("@babel/plugin-transform-property-literals");
var _pluginTransformRegenerator = require("@babel/plugin-transform-regenerator");
var _pluginTransformReservedWords = require("@babel/plugin-transform-reserved-words");
var _pluginTransformShorthandProperties = require("@babel/plugin-transform-shorthand-properties");
var _pluginTransformSpread = require("@babel/plugin-transform-spread");
var _pluginTransformStickyRegex = require("@babel/plugin-transform-sticky-regex");
var _pluginTransformTemplateLiterals = require("@babel/plugin-transform-template-literals");
var _pluginTransformTypeofSymbol = require("@babel/plugin-transform-typeof-symbol");
var _pluginTransformUnicodeEscapes = require("@babel/plugin-transform-unicode-escapes");
var _pluginTransformUnicodeRegex = require("@babel/plugin-transform-unicode-regex");
var _transformAsyncArrowsInClass = require("@babel/preset-modules/lib/plugins/transform-async-arrows-in-class");
var _transformEdgeDefaultParameters = require("@babel/preset-modules/lib/plugins/transform-edge-default-parameters");
var _transformEdgeFunctionName = require("@babel/preset-modules/lib/plugins/transform-edge-function-name");
var _transformTaggedTemplateCaching = require("@babel/preset-modules/lib/plugins/transform-tagged-template-caching");
var _transformSafariBlockShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-block-shadowing");
var _transformSafariForShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-for-shadowing");
var _pluginBugfixSafariIdDestructuringCollisionInFunctionExpression = require("@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression");
var _pluginBugfixV8SpreadParametersInOptionalChaining = require("@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining");
var _default = {
"bugfix/transform-async-arrows-in-class": () => _transformAsyncArrowsInClass,
"bugfix/transform-edge-default-parameters": () => _transformEdgeDefaultParameters,
"bugfix/transform-edge-function-name": () => _transformEdgeFunctionName,
"bugfix/transform-safari-block-shadowing": () => _transformSafariBlockShadowing,
"bugfix/transform-safari-for-shadowing": () => _transformSafariForShadowing,
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": () => _pluginBugfixSafariIdDestructuringCollisionInFunctionExpression.default,
"bugfix/transform-tagged-template-caching": () => _transformTaggedTemplateCaching,
"bugfix/transform-v8-spread-parameters-in-optional-chaining": () => _pluginBugfixV8SpreadParametersInOptionalChaining.default,
"syntax-async-generators": () => _pluginSyntaxAsyncGenerators,
"syntax-class-properties": () => _pluginSyntaxClassProperties,
"syntax-class-static-block": () => _pluginSyntaxClassStaticBlock,
"syntax-dynamic-import": () => _pluginSyntaxDynamicImport,
"syntax-export-namespace-from": () => _pluginSyntaxExportNamespaceFrom,
"syntax-import-assertions": () => _pluginSyntaxImportAssertions.default,
"syntax-json-strings": () => _pluginSyntaxJsonStrings,
"syntax-logical-assignment-operators": () => _pluginSyntaxLogicalAssignmentOperators,
"syntax-nullish-coalescing-operator": () => _pluginSyntaxNullishCoalescingOperator,
"syntax-numeric-separator": () => _pluginSyntaxNumericSeparator,
"syntax-object-rest-spread": () => _pluginSyntaxObjectRestSpread,
"syntax-optional-catch-binding": () => _pluginSyntaxOptionalCatchBinding,
"syntax-optional-chaining": () => _pluginSyntaxOptionalChaining,
"syntax-private-property-in-object": () => _pluginSyntaxPrivatePropertyInObject,
"syntax-top-level-await": () => _pluginSyntaxTopLevelAwait,
"transform-arrow-functions": () => _pluginTransformArrowFunctions.default,
"transform-async-generator-functions": () => _pluginProposalAsyncGeneratorFunctions.default,
"transform-async-to-generator": () => _pluginTransformAsyncToGenerator.default,
"transform-block-scoped-functions": () => _pluginTransformBlockScopedFunctions.default,
"transform-block-scoping": () => _pluginTransformBlockScoping.default,
"transform-class-properties": () => _pluginProposalClassProperties.default,
"transform-class-static-block": () => _pluginProposalClassStaticBlock.default,
"transform-classes": () => _pluginTransformClasses.default,
"transform-computed-properties": () => _pluginTransformComputedProperties.default,
"transform-destructuring": () => _pluginTransformDestructuring.default,
"transform-dotall-regex": () => _pluginTransformDotallRegex.default,
"transform-duplicate-keys": () => _pluginTransformDuplicateKeys.default,
"transform-dynamic-import": () => _pluginProposalDynamicImport.default,
"transform-exponentiation-operator": () => _pluginTransformExponentiationOperator.default,
"transform-export-namespace-from": () => _pluginProposalExportNamespaceFrom.default,
"transform-for-of": () => _pluginTransformForOf.default,
"transform-function-name": () => _pluginTransformFunctionName.default,
"transform-json-strings": () => _pluginProposalJsonStrings.default,
"transform-literals": () => _pluginTransformLiterals.default,
"transform-logical-assignment-operators": () => _pluginProposalLogicalAssignmentOperators.default,
"transform-member-expression-literals": () => _pluginTransformMemberExpressionLiterals.default,
"transform-modules-amd": () => _pluginTransformModulesAmd.default,
"transform-modules-commonjs": () => _pluginTransformModulesCommonjs.default,
"transform-modules-systemjs": () => _pluginTransformModulesSystemjs.default,
"transform-modules-umd": () => _pluginTransformModulesUmd.default,
"transform-named-capturing-groups-regex": () => _pluginTransformNamedCapturingGroupsRegex.default,
"transform-new-target": () => _pluginTransformNewTarget.default,
"transform-nullish-coalescing-operator": () => _pluginProposalNullishCoalescingOperator.default,
"transform-numeric-separator": () => _pluginProposalNumericSeparator.default,
"transform-object-rest-spread": () => _pluginProposalObjectRestSpread.default,
"transform-object-super": () => _pluginTransformObjectSuper.default,
"transform-optional-catch-binding": () => _pluginProposalOptionalCatchBinding.default,
"transform-optional-chaining": () => _pluginProposalOptionalChaining.default,
"transform-parameters": () => _pluginTransformParameters.default,
"transform-private-methods": () => _pluginProposalPrivateMethods.default,
"transform-private-property-in-object": () => _pluginProposalPrivatePropertyInObject.default,
"transform-property-literals": () => _pluginTransformPropertyLiterals.default,
"transform-regenerator": () => _pluginTransformRegenerator.default,
"transform-reserved-words": () => _pluginTransformReservedWords.default,
"transform-shorthand-properties": () => _pluginTransformShorthandProperties.default,
"transform-spread": () => _pluginTransformSpread.default,
"transform-sticky-regex": () => _pluginTransformStickyRegex.default,
"transform-template-literals": () => _pluginTransformTemplateLiterals.default,
"transform-typeof-symbol": () => _pluginTransformTypeofSymbol.default,
"transform-unicode-escapes": () => _pluginTransformUnicodeEscapes.default,
"transform-unicode-property-regex": () => _pluginProposalUnicodePropertyRegex.default,
"transform-unicode-regex": () => _pluginTransformUnicodeRegex.default
};
export const minVersions = {
exports.default = _default;
const minVersions = {
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": "7.16.0",

@@ -148,3 +155,4 @@ "transform-class-static-block": "7.12.0",

};
exports.minVersions = minVersions;
//# sourceMappingURL=available-plugins.js.map

@@ -1,9 +0,15 @@

import { getInclusionReasons } from "@babel/helper-compilation-targets";
import compatData from "@babel/compat-data/plugins";
export const logPlugin = (item, targetVersions, list) => {
const filteredList = getInclusionReasons(item, targetVersions, list);
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.logPlugin = void 0;
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
var _plugins = require("@babel/compat-data/plugins");
const logPlugin = (item, targetVersions, list) => {
const filteredList = (0, _helperCompilationTargets.getInclusionReasons)(item, targetVersions, list);
const support = list[item];
if (item.startsWith("transform-")) {
const proposalName = `proposal-${item.slice(10)}`;
if (proposalName === "proposal-dynamic-import" || Object.prototype.hasOwnProperty.call(compatData, proposalName)) {
if (proposalName === "proposal-dynamic-import" || Object.prototype.hasOwnProperty.call(_plugins, proposalName)) {
item = proposalName;

@@ -27,3 +33,4 @@ }

};
exports.logPlugin = logPlugin;
//# sourceMappingURL=debug.js.map

@@ -1,5 +0,13 @@

import semver from "semver";
import { minVersions } from "./available-plugins.js";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.addProposalSyntaxPlugins = addProposalSyntaxPlugins;
exports.removeUnnecessaryItems = removeUnnecessaryItems;
exports.removeUnsupportedItems = removeUnsupportedItems;
var _semver = require("semver");
var _availablePlugins = require("./available-plugins");
const has = Function.call.bind(Object.hasOwnProperty);
export function addProposalSyntaxPlugins(items, proposalSyntaxPlugins) {
function addProposalSyntaxPlugins(items, proposalSyntaxPlugins) {
proposalSyntaxPlugins.forEach(plugin => {

@@ -9,3 +17,3 @@ items.add(plugin);

}
export function removeUnnecessaryItems(items, overlapping) {
function removeUnnecessaryItems(items, overlapping) {
items.forEach(item => {

@@ -16,5 +24,5 @@ var _overlapping$item;

}
export function removeUnsupportedItems(items, babelVersion) {
function removeUnsupportedItems(items, babelVersion) {
items.forEach(item => {
if (has(minVersions, item) && semver.lt(babelVersion, minVersions[item])) {
if (has(_availablePlugins.minVersions, item) && _semver.lt(babelVersion, _availablePlugins.minVersions[item])) {
items.delete(item);

@@ -21,0 +29,0 @@ }

@@ -0,3 +1,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
const defaultExcludesForLooseMode = ["transform-typeof-symbol"];
export default function ({
function _default({
loose

@@ -4,0 +10,0 @@ }) {

@@ -1,22 +0,30 @@

import semver from "semver";
import { logPlugin } from "./debug.js";
import getOptionSpecificExcludesFor from "./get-option-specific-excludes.js";
import { addProposalSyntaxPlugins, removeUnnecessaryItems, removeUnsupportedItems } from "./filter-items.js";
import moduleTransformations from "./module-transformations.js";
import normalizeOptions from "./normalize-options.js";
import { pluginSyntaxMap, proposalPlugins, proposalSyntaxPlugins } from "./shipped-proposals.js";
import { plugins as pluginsList, pluginsBugfixes as pluginsBugfixesList, overlappingPlugins } from "./plugins-compat-data.js";
import removeRegeneratorEntryPlugin from "./polyfills/regenerator.js";
import legacyBabelPolyfillPlugin from "./polyfills/babel-polyfill.js";
import _pluginCoreJS2 from "babel-plugin-polyfill-corejs2";
import _pluginCoreJS3 from "babel-plugin-polyfill-corejs3";
import _pluginRegenerator from "babel-plugin-polyfill-regenerator";
const pluginCoreJS2 = _pluginCoreJS2.default || _pluginCoreJS2;
const pluginCoreJS3 = _pluginCoreJS3.default || _pluginCoreJS3;
const pluginRegenerator = _pluginRegenerator.default || _pluginRegenerator;
import getTargets, { prettifyTargets, filterItems, isRequired } from "@babel/helper-compilation-targets";
import availablePlugins from "./available-plugins.js";
import { declarePreset } from "@babel/helper-plugin-utils";
export function isPluginRequired(targets, support) {
return isRequired("fake-name", targets, {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getPolyfillPlugins = exports.getModulesPluginNames = exports.default = void 0;
exports.isPluginRequired = isPluginRequired;
exports.transformIncludesAndExcludes = void 0;
var _semver = require("semver");
var _debug = require("./debug");
var _getOptionSpecificExcludes = require("./get-option-specific-excludes");
var _filterItems = require("./filter-items");
var _moduleTransformations = require("./module-transformations");
var _normalizeOptions = require("./normalize-options");
var _shippedProposals = require("./shipped-proposals");
var _pluginsCompatData = require("./plugins-compat-data");
var _regenerator = require("./polyfills/regenerator");
var _babelPolyfill = require("./polyfills/babel-polyfill");
var _babelPluginPolyfillCorejs = require("babel-plugin-polyfill-corejs2");
var _babelPluginPolyfillCorejs2 = require("babel-plugin-polyfill-corejs3");
var _babelPluginPolyfillRegenerator = require("babel-plugin-polyfill-regenerator");
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
var _availablePlugins = require("./available-plugins");
var _helperPluginUtils = require("@babel/helper-plugin-utils");
const pluginCoreJS2 = _babelPluginPolyfillCorejs.default || _babelPluginPolyfillCorejs;
const pluginCoreJS3 = _babelPluginPolyfillCorejs2.default || _babelPluginPolyfillCorejs2;
const pluginRegenerator = _babelPluginPolyfillRegenerator.default || _babelPluginPolyfillRegenerator;
function isPluginRequired(targets, support) {
return (0, _helperCompilationTargets.isRequired)("fake-name", targets, {
compatData: {

@@ -37,8 +45,8 @@ "fake-name": support

withProposals: {
withoutBugfixes: pluginsList,
withBugfixes: Object.assign({}, pluginsList, pluginsBugfixesList)
withoutBugfixes: _pluginsCompatData.plugins,
withBugfixes: Object.assign({}, _pluginsCompatData.plugins, _pluginsCompatData.pluginsBugfixes)
},
withoutProposals: {
withoutBugfixes: filterStageFromList(pluginsList, proposalPlugins),
withBugfixes: filterStageFromList(Object.assign({}, pluginsList, pluginsBugfixesList), proposalPlugins)
withoutBugfixes: filterStageFromList(_pluginsCompatData.plugins, _shippedProposals.proposalPlugins),
withBugfixes: filterStageFromList(Object.assign({}, _pluginsCompatData.plugins, _pluginsCompatData.pluginsBugfixes), _shippedProposals.proposalPlugins)
}

@@ -54,3 +62,3 @@ };

const getPlugin = pluginName => {
const plugin = availablePlugins[pluginName]();
const plugin = _availablePlugins.default[pluginName]();
if (!plugin) {

@@ -61,3 +69,3 @@ throw new Error(`Could not find plugin "${pluginName}". Ensure there is an entry in ./available-plugins.js for it.`);

};
export const transformIncludesAndExcludes = opts => {
const transformIncludesAndExcludes = opts => {
return opts.reduce((result, opt) => {

@@ -73,3 +81,4 @@ const target = opt.match(/^(es|es6|es7|esnext|web)\./) ? "builtIns" : "plugins";

};
export const getModulesPluginNames = ({
exports.transformIncludesAndExcludes = transformIncludesAndExcludes;
const getModulesPluginNames = ({
modules,

@@ -108,3 +117,4 @@ transformations,

};
export const getPolyfillPlugins = ({
exports.getModulesPluginNames = getModulesPluginNames;
const getPolyfillPlugins = ({
useBuiltIns,

@@ -135,7 +145,7 @@ corejs,

if (corejs.major === 2) {
polyfillPlugins.push([pluginCoreJS2, pluginOptions], [legacyBabelPolyfillPlugin, {
polyfillPlugins.push([pluginCoreJS2, pluginOptions], [_babelPolyfill.default, {
usage: true
}]);
} else {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [legacyBabelPolyfillPlugin, {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [_babelPolyfill.default, {
usage: true,

@@ -153,11 +163,11 @@ deprecated: true

if (corejs.major === 2) {
polyfillPlugins.push([legacyBabelPolyfillPlugin, {
polyfillPlugins.push([_babelPolyfill.default, {
regenerator
}], [pluginCoreJS2, pluginOptions]);
} else {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [legacyBabelPolyfillPlugin, {
polyfillPlugins.push([pluginCoreJS3, pluginOptions], [_babelPolyfill.default, {
deprecated: true
}]);
if (!regenerator) {
polyfillPlugins.push([removeRegeneratorEntryPlugin, pluginOptions]);
polyfillPlugins.push([_regenerator.default, pluginOptions]);
}

@@ -170,2 +180,3 @@ }

};
exports.getPolyfillPlugins = getPolyfillPlugins;
function getLocalTargets(optionsTargets, ignoreBrowserslistConfig, configPath, browserslistEnv) {

@@ -178,3 +189,3 @@ if (optionsTargets != null && optionsTargets.esmodules && optionsTargets.browsers) {

}
return getTargets(optionsTargets, {
return (0, _helperCompilationTargets.default)(optionsTargets, {
ignoreBrowserslistConfig,

@@ -197,3 +208,3 @@ configPath,

}
export default declarePreset((api, opts) => {
var _default = (0, _helperPluginUtils.declarePreset)((api, opts) => {
api.assertVersion(7);

@@ -220,5 +231,5 @@ const babelTargets = api.targets();

browserslistEnv
} = normalizeOptions(opts);
} = (0, _normalizeOptions.default)(opts);
let targets = babelTargets;
if (semver.lt(api.version, "7.13.0") || opts.targets || opts.configPath || opts.browserslistEnv || opts.ignoreBrowserslistConfig) {
if (_semver.lt(api.version, "7.13.0") || opts.targets || opts.configPath || opts.browserslistEnv || opts.ignoreBrowserslistConfig) {
{

@@ -241,3 +252,3 @@ var hasUglifyTarget = false;

const compatData = getPluginList(shippedProposals, bugfixes);
const shouldSkipExportNamespaceFrom = modules === "auto" && (api.caller == null ? void 0 : api.caller(supportsExportNamespaceFrom)) || modules === false && !isRequired("transform-export-namespace-from", transformTargets, {
const shouldSkipExportNamespaceFrom = modules === "auto" && (api.caller == null ? void 0 : api.caller(supportsExportNamespaceFrom)) || modules === false && !(0, _helperCompilationTargets.isRequired)("transform-export-namespace-from", transformTargets, {
compatData,

@@ -249,3 +260,3 @@ includes: include.plugins,

modules,
transformations: moduleTransformations,
transformations: _moduleTransformations.default,
shouldTransformESM: modules !== "auto" || !(api.caller != null && api.caller(supportsStaticESM)),

@@ -256,9 +267,9 @@ shouldTransformDynamicImport: modules !== "auto" || !(api.caller != null && api.caller(supportsDynamicImport)),

});
const pluginNames = filterItems(compatData, include.plugins, exclude.plugins, transformTargets, modulesPluginNames, getOptionSpecificExcludesFor({
const pluginNames = (0, _helperCompilationTargets.filterItems)(compatData, include.plugins, exclude.plugins, transformTargets, modulesPluginNames, (0, _getOptionSpecificExcludes.default)({
loose
}), pluginSyntaxMap);
removeUnnecessaryItems(pluginNames, overlappingPlugins);
removeUnsupportedItems(pluginNames, api.version);
}), _shippedProposals.pluginSyntaxMap);
(0, _filterItems.removeUnnecessaryItems)(pluginNames, _pluginsCompatData.overlappingPlugins);
(0, _filterItems.removeUnsupportedItems)(pluginNames, api.version);
if (shippedProposals) {
addProposalSyntaxPlugins(pluginNames, proposalSyntaxPlugins);
(0, _filterItems.addProposalSyntaxPlugins)(pluginNames, _shippedProposals.proposalSyntaxPlugins);
}

@@ -292,7 +303,7 @@ const polyfillPlugins = getPolyfillPlugins({

console.log("\nUsing targets:");
console.log(JSON.stringify(prettifyTargets(targets), null, 2));
console.log(JSON.stringify((0, _helperCompilationTargets.prettifyTargets)(targets), null, 2));
console.log(`\nUsing modules transform: ${modules.toString()}`);
console.log("\nUsing plugins:");
pluginNames.forEach(pluginName => {
logPlugin(pluginName, targets, compatData);
(0, _debug.logPlugin)(pluginName, targets, compatData);
});

@@ -307,3 +318,4 @@ if (!useBuiltIns) {

});
exports.default = _default;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,8 @@

export default {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = {
auto: "transform-modules-commonjs",

@@ -9,3 +15,4 @@ amd: "transform-modules-amd",

};
exports.default = _default;
//# sourceMappingURL=module-transformations.js.map

@@ -1,17 +0,27 @@

import semver from "semver";
import corejs2Polyfills from "@babel/compat-data/corejs2-built-ins";
import corejs3Polyfills from "../data/core-js-compat.js";
import { plugins as pluginsList } from "./plugins-compat-data.js";
import moduleTransformations from "./module-transformations.js";
import { TopLevelOptions, ModulesOption, UseBuiltInsOption } from "./options.js";
import { OptionValidator } from "@babel/helper-validator-option";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.checkDuplicateIncludeExcludes = void 0;
exports.default = normalizeOptions;
exports.normalizeCoreJSOption = normalizeCoreJSOption;
exports.validateUseBuiltInsOption = exports.validateModulesOption = exports.normalizePluginName = void 0;
var _semver = require("semver");
var _corejs2BuiltIns = require("@babel/compat-data/corejs2-built-ins");
var _coreJsCompat = require("../data/core-js-compat");
var _pluginsCompatData = require("./plugins-compat-data");
var _moduleTransformations = require("./module-transformations");
var _options = require("./options");
var _helperValidatorOption = require("@babel/helper-validator-option");
const corejs2DefaultWebIncludes = ["web.timers", "web.immediate", "web.dom.iterable"];
const v = new OptionValidator("@babel/preset-env");
const allPluginsList = Object.keys(pluginsList);
const modulePlugins = ["transform-dynamic-import", ...Object.keys(moduleTransformations).map(m => moduleTransformations[m])];
const getValidIncludesAndExcludes = (type, corejs) => Array.from(new Set([...allPluginsList, ...(type === "exclude" ? modulePlugins : []), ...(corejs ? corejs == 2 ? [...Object.keys(corejs2Polyfills), ...corejs2DefaultWebIncludes] : Object.keys(corejs3Polyfills) : [])]));
const v = new _helperValidatorOption.OptionValidator("@babel/preset-env");
const allPluginsList = Object.keys(_pluginsCompatData.plugins);
const modulePlugins = ["transform-dynamic-import", ...Object.keys(_moduleTransformations.default).map(m => _moduleTransformations.default[m])];
const getValidIncludesAndExcludes = (type, corejs) => Array.from(new Set([...allPluginsList, ...(type === "exclude" ? modulePlugins : []), ...(corejs ? corejs == 2 ? [...Object.keys(_corejs2BuiltIns), ...corejs2DefaultWebIncludes] : Object.keys(_coreJsCompat) : [])]));
function flatMap(array, fn) {
return Array.prototype.concat.apply([], array.map(fn));
}
export const normalizePluginName = plugin => plugin.replace(/^(@babel\/|babel-)(plugin-)?/, "");
const normalizePluginName = plugin => plugin.replace(/^(@babel\/|babel-)(plugin-)?/, "");
exports.normalizePluginName = normalizePluginName;
const expandIncludesAndExcludes = (filterList = [], type, corejs) => {

@@ -41,3 +51,3 @@ if (filterList.length === 0) return [];

};
export const checkDuplicateIncludeExcludes = (include = [], exclude = []) => {
const checkDuplicateIncludeExcludes = (include = [], exclude = []) => {
const duplicates = include.filter(opt => exclude.indexOf(opt) >= 0);

@@ -47,2 +57,3 @@ v.invariant(duplicates.length === 0, `The plugins/built-ins '${duplicates.join(", ")}' were found in both the "include" and

};
exports.checkDuplicateIncludeExcludes = checkDuplicateIncludeExcludes;
const normalizeTargets = targets => {

@@ -56,8 +67,9 @@ if (typeof targets === "string" || Array.isArray(targets)) {

};
export const validateModulesOption = (modulesOpt = ModulesOption.auto) => {
v.invariant(ModulesOption[modulesOpt.toString()] || modulesOpt === ModulesOption.false, `The 'modules' option must be one of \n` + ` - 'false' to indicate no module processing\n` + ` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'` + ` - 'auto' (default) which will automatically select 'false' if the current\n` + ` process is known to support ES module syntax, or "commonjs" otherwise\n`);
const validateModulesOption = (modulesOpt = _options.ModulesOption.auto) => {
v.invariant(_options.ModulesOption[modulesOpt.toString()] || modulesOpt === _options.ModulesOption.false, `The 'modules' option must be one of \n` + ` - 'false' to indicate no module processing\n` + ` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'` + ` - 'auto' (default) which will automatically select 'false' if the current\n` + ` process is known to support ES module syntax, or "commonjs" otherwise\n`);
return modulesOpt;
};
export const validateUseBuiltInsOption = (builtInsOpt = false) => {
v.invariant(UseBuiltInsOption[builtInsOpt.toString()] || builtInsOpt === UseBuiltInsOption.false, `The 'useBuiltIns' option must be either
exports.validateModulesOption = validateModulesOption;
const validateUseBuiltInsOption = (builtInsOpt = false) => {
v.invariant(_options.UseBuiltInsOption[builtInsOpt.toString()] || builtInsOpt === _options.UseBuiltInsOption.false, `The 'useBuiltIns' option must be either
'false' (default) to indicate no polyfill,

@@ -68,3 +80,4 @@ '"entry"' to indicate replacing the entry polyfill, or

};
export function normalizeCoreJSOption(corejs, useBuiltIns) {
exports.validateUseBuiltInsOption = validateUseBuiltInsOption;
function normalizeCoreJSOption(corejs, useBuiltIns) {
let proposals = false;

@@ -81,3 +94,3 @@ let rawVersion;

}
const version = rawVersion ? semver.coerce(String(rawVersion)) : false;
const version = rawVersion ? _semver.coerce(String(rawVersion)) : false;
if (!useBuiltIns && version) {

@@ -94,25 +107,25 @@ console.warn("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n");

}
export default function normalizeOptions(opts) {
v.validateTopLevelOptions(opts, TopLevelOptions);
function normalizeOptions(opts) {
v.validateTopLevelOptions(opts, _options.TopLevelOptions);
const useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);
const corejs = normalizeCoreJSOption(opts.corejs, useBuiltIns);
const include = expandIncludesAndExcludes(opts.include, TopLevelOptions.include, !!corejs.version && corejs.version.major);
const exclude = expandIncludesAndExcludes(opts.exclude, TopLevelOptions.exclude, !!corejs.version && corejs.version.major);
const include = expandIncludesAndExcludes(opts.include, _options.TopLevelOptions.include, !!corejs.version && corejs.version.major);
const exclude = expandIncludesAndExcludes(opts.exclude, _options.TopLevelOptions.exclude, !!corejs.version && corejs.version.major);
checkDuplicateIncludeExcludes(include, exclude);
return {
bugfixes: v.validateBooleanOption(TopLevelOptions.bugfixes, opts.bugfixes, false),
configPath: v.validateStringOption(TopLevelOptions.configPath, opts.configPath, process.cwd()),
bugfixes: v.validateBooleanOption(_options.TopLevelOptions.bugfixes, opts.bugfixes, false),
configPath: v.validateStringOption(_options.TopLevelOptions.configPath, opts.configPath, process.cwd()),
corejs,
debug: v.validateBooleanOption(TopLevelOptions.debug, opts.debug, false),
debug: v.validateBooleanOption(_options.TopLevelOptions.debug, opts.debug, false),
include,
exclude,
forceAllTransforms: v.validateBooleanOption(TopLevelOptions.forceAllTransforms, opts.forceAllTransforms, false),
ignoreBrowserslistConfig: v.validateBooleanOption(TopLevelOptions.ignoreBrowserslistConfig, opts.ignoreBrowserslistConfig, false),
loose: v.validateBooleanOption(TopLevelOptions.loose, opts.loose),
forceAllTransforms: v.validateBooleanOption(_options.TopLevelOptions.forceAllTransforms, opts.forceAllTransforms, false),
ignoreBrowserslistConfig: v.validateBooleanOption(_options.TopLevelOptions.ignoreBrowserslistConfig, opts.ignoreBrowserslistConfig, false),
loose: v.validateBooleanOption(_options.TopLevelOptions.loose, opts.loose),
modules: validateModulesOption(opts.modules),
shippedProposals: v.validateBooleanOption(TopLevelOptions.shippedProposals, opts.shippedProposals, false),
spec: v.validateBooleanOption(TopLevelOptions.spec, opts.spec, false),
shippedProposals: v.validateBooleanOption(_options.TopLevelOptions.shippedProposals, opts.shippedProposals, false),
spec: v.validateBooleanOption(_options.TopLevelOptions.spec, opts.spec, false),
targets: normalizeTargets(opts.targets),
useBuiltIns: useBuiltIns,
browserslistEnv: v.validateStringOption(TopLevelOptions.browserslistEnv, opts.browserslistEnv)
browserslistEnv: v.validateStringOption(_options.TopLevelOptions.browserslistEnv, opts.browserslistEnv)
};

@@ -119,0 +132,0 @@ }

@@ -1,2 +0,8 @@

export const TopLevelOptions = {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UseBuiltInsOption = exports.TopLevelOptions = exports.ModulesOption = void 0;
const TopLevelOptions = {
bugfixes: "bugfixes",

@@ -18,3 +24,4 @@ configPath: "configPath",

};
export const ModulesOption = {
exports.TopLevelOptions = TopLevelOptions;
const ModulesOption = {
false: false,

@@ -28,3 +35,4 @@ auto: "auto",

};
export const UseBuiltInsOption = {
exports.ModulesOption = ModulesOption;
const UseBuiltInsOption = {
false: false,

@@ -34,3 +42,4 @@ entry: "entry",

};
exports.UseBuiltInsOption = UseBuiltInsOption;
//# sourceMappingURL=options.js.map

@@ -1,13 +0,22 @@

import originalPlugins from "@babel/compat-data/plugins";
import originalPluginsBugfixes from "@babel/compat-data/plugin-bugfixes";
import originalOverlappingPlugins from "@babel/compat-data/overlapping-plugins";
import availablePlugins from "./available-plugins.js";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.pluginsBugfixes = exports.plugins = exports.overlappingPlugins = void 0;
var _plugins = require("@babel/compat-data/plugins");
var _pluginBugfixes = require("@babel/compat-data/plugin-bugfixes");
var _overlappingPlugins = require("@babel/compat-data/overlapping-plugins");
var _availablePlugins = require("./available-plugins");
const keys = Object.keys;
export const plugins = filterAvailable(originalPlugins);
export const pluginsBugfixes = filterAvailable(originalPluginsBugfixes);
export const overlappingPlugins = filterAvailable(originalOverlappingPlugins);
const plugins = filterAvailable(_plugins);
exports.plugins = plugins;
const pluginsBugfixes = filterAvailable(_pluginBugfixes);
exports.pluginsBugfixes = pluginsBugfixes;
const overlappingPlugins = filterAvailable(_overlappingPlugins);
exports.overlappingPlugins = overlappingPlugins;
function filterAvailable(data) {
const result = {};
for (const plugin of keys(data)) {
if (Object.hasOwnProperty.call(availablePlugins, plugin)) {
if (Object.hasOwnProperty.call(_availablePlugins.default, plugin)) {
result[plugin] = data[plugin];

@@ -14,0 +23,0 @@ }

@@ -1,2 +0,8 @@

import { getImportSource, getRequireSource, isPolyfillSource } from "./utils.js";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _utils = require("./utils");
const BABEL_POLYFILL_DEPRECATION = `

@@ -8,3 +14,3 @@ \`@babel/polyfill\` is deprecated. Please, use required parts of \`core-js\`

Please remove the direct import of \`SPECIFIER\` or use \`useBuiltIns: 'entry'\` instead.`;
export default function ({
function _default({
template

@@ -20,4 +26,4 @@ }, {

ImportDeclaration(path) {
const src = getImportSource(path);
if (usage && isPolyfillSource(src)) {
const src = (0, _utils.getImportSource)(path);
if (usage && (0, _utils.isPolyfillSource)(src)) {
console.warn(NO_DIRECT_POLYFILL_IMPORT.replace("SPECIFIER", src));

@@ -42,4 +48,4 @@ if (!deprecated) path.remove();

path.get("body").forEach(bodyPath => {
const src = getRequireSource(bodyPath);
if (usage && isPolyfillSource(src)) {
const src = (0, _utils.getRequireSource)(bodyPath);
if (usage && (0, _utils.isPolyfillSource)(src)) {
console.warn(NO_DIRECT_POLYFILL_IMPORT.replace("SPECIFIER", src));

@@ -46,0 +52,0 @@ if (!deprecated) bodyPath.remove();

@@ -1,9 +0,15 @@

import { getImportSource, getRequireSource } from "./utils.js";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _utils = require("./utils");
function isRegeneratorSource(source) {
return source === "regenerator-runtime/runtime" || source === "regenerator-runtime/runtime.js";
}
export default function () {
function _default() {
const visitor = {
ImportDeclaration(path) {
if (isRegeneratorSource(getImportSource(path))) {
if (isRegeneratorSource((0, _utils.getImportSource)(path))) {
this.regeneratorImportExcluded = true;

@@ -15,3 +21,3 @@ path.remove();

path.get("body").forEach(bodyPath => {
if (isRegeneratorSource(getRequireSource(bodyPath))) {
if (isRegeneratorSource((0, _utils.getRequireSource)(bodyPath))) {
this.regeneratorImportExcluded = true;

@@ -18,0 +24,0 @@ bodyPath.remove();

@@ -1,2 +0,10 @@

import * as _t from "@babel/types";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getImportSource = getImportSource;
exports.getRequireSource = getRequireSource;
exports.isPolyfillSource = isPolyfillSource;
var _t = require("@babel/types");
const {

@@ -8,3 +16,3 @@ isCallExpression,

} = _t;
export function getImportSource({
function getImportSource({
node

@@ -14,3 +22,3 @@ }) {

}
export function getRequireSource({
function getRequireSource({
node

@@ -26,3 +34,3 @@ }) {

}
export function isPolyfillSource(source) {
function isPolyfillSource(source) {
return source === "@babel/polyfill" || source === "core-js";

@@ -29,0 +37,0 @@ }

@@ -0,3 +1,11 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.proposalSyntaxPlugins = exports.proposalPlugins = exports.pluginSyntaxMap = void 0;
const proposalPlugins = new Set();
exports.proposalPlugins = proposalPlugins;
const proposalSyntaxPlugins = ["syntax-import-assertions"];
exports.proposalSyntaxPlugins = proposalSyntaxPlugins;
const pluginSyntaxObject = {

@@ -21,4 +29,4 @@ "transform-async-generator-functions": "syntax-async-generators",

const pluginSyntaxMap = new Map(pluginSyntaxEntries);
export { proposalPlugins, proposalSyntaxPlugins, pluginSyntaxMap };
exports.pluginSyntaxMap = pluginSyntaxMap;
//# sourceMappingURL=shipped-proposals.js.map

@@ -1,3 +0,20 @@

export { default, isBrowsersQueryValid } from "@babel/helper-compilation-targets";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _helperCompilationTargets.default;
}
});
Object.defineProperty(exports, "isBrowsersQueryValid", {
enumerable: true,
get: function () {
return _helperCompilationTargets.isBrowsersQueryValid;
}
});
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
//# sourceMappingURL=targets-parser.js.map
{
"name": "@babel/preset-env",
"version": "7.21.4-esm.2",
"version": "7.21.4-esm.3",
"description": "A Babel preset for each environment.",

@@ -19,23 +19,23 @@ "author": "The Babel Team (https://babel.dev/team)",

"dependencies": {
"@babel/compat-data": "7.21.4-esm.2",
"@babel/helper-compilation-targets": "7.21.4-esm.2",
"@babel/helper-plugin-utils": "7.21.4-esm.2",
"@babel/helper-validator-option": "7.21.4-esm.2",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "7.21.4-esm.2",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "7.21.4-esm.2",
"@babel/plugin-proposal-async-generator-functions": "7.21.4-esm.2",
"@babel/plugin-proposal-class-properties": "7.21.4-esm.2",
"@babel/plugin-proposal-class-static-block": "7.21.4-esm.2",
"@babel/plugin-proposal-dynamic-import": "7.21.4-esm.2",
"@babel/plugin-proposal-export-namespace-from": "7.21.4-esm.2",
"@babel/plugin-proposal-json-strings": "7.21.4-esm.2",
"@babel/plugin-proposal-logical-assignment-operators": "7.21.4-esm.2",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.21.4-esm.2",
"@babel/plugin-proposal-numeric-separator": "7.21.4-esm.2",
"@babel/plugin-proposal-object-rest-spread": "7.21.4-esm.2",
"@babel/plugin-proposal-optional-catch-binding": "7.21.4-esm.2",
"@babel/plugin-proposal-optional-chaining": "7.21.4-esm.2",
"@babel/plugin-proposal-private-methods": "7.21.4-esm.2",
"@babel/plugin-proposal-private-property-in-object": "7.21.4-esm.2",
"@babel/plugin-proposal-unicode-property-regex": "7.21.4-esm.2",
"@babel/compat-data": "7.21.4-esm.3",
"@babel/helper-compilation-targets": "7.21.4-esm.3",
"@babel/helper-plugin-utils": "7.21.4-esm.3",
"@babel/helper-validator-option": "7.21.4-esm.3",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "7.21.4-esm.3",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "7.21.4-esm.3",
"@babel/plugin-proposal-async-generator-functions": "7.21.4-esm.3",
"@babel/plugin-proposal-class-properties": "7.21.4-esm.3",
"@babel/plugin-proposal-class-static-block": "7.21.4-esm.3",
"@babel/plugin-proposal-dynamic-import": "7.21.4-esm.3",
"@babel/plugin-proposal-export-namespace-from": "7.21.4-esm.3",
"@babel/plugin-proposal-json-strings": "7.21.4-esm.3",
"@babel/plugin-proposal-logical-assignment-operators": "7.21.4-esm.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.21.4-esm.3",
"@babel/plugin-proposal-numeric-separator": "7.21.4-esm.3",
"@babel/plugin-proposal-object-rest-spread": "7.21.4-esm.3",
"@babel/plugin-proposal-optional-catch-binding": "7.21.4-esm.3",
"@babel/plugin-proposal-optional-chaining": "7.21.4-esm.3",
"@babel/plugin-proposal-private-methods": "7.21.4-esm.3",
"@babel/plugin-proposal-private-property-in-object": "7.21.4-esm.3",
"@babel/plugin-proposal-unicode-property-regex": "7.21.4-esm.3",
"@babel/plugin-syntax-async-generators": "^7.8.4",

@@ -46,3 +46,3 @@ "@babel/plugin-syntax-class-properties": "^7.12.13",

"@babel/plugin-syntax-export-namespace-from": "^7.8.3",
"@babel/plugin-syntax-import-assertions": "7.21.4-esm.2",
"@babel/plugin-syntax-import-assertions": "7.21.4-esm.3",
"@babel/plugin-syntax-json-strings": "^7.8.3",

@@ -57,36 +57,36 @@ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",

"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-transform-arrow-functions": "7.21.4-esm.2",
"@babel/plugin-transform-async-to-generator": "7.21.4-esm.2",
"@babel/plugin-transform-block-scoped-functions": "7.21.4-esm.2",
"@babel/plugin-transform-block-scoping": "7.21.4-esm.2",
"@babel/plugin-transform-classes": "7.21.4-esm.2",
"@babel/plugin-transform-computed-properties": "7.21.4-esm.2",
"@babel/plugin-transform-destructuring": "7.21.4-esm.2",
"@babel/plugin-transform-dotall-regex": "7.21.4-esm.2",
"@babel/plugin-transform-duplicate-keys": "7.21.4-esm.2",
"@babel/plugin-transform-exponentiation-operator": "7.21.4-esm.2",
"@babel/plugin-transform-for-of": "7.21.4-esm.2",
"@babel/plugin-transform-function-name": "7.21.4-esm.2",
"@babel/plugin-transform-literals": "7.21.4-esm.2",
"@babel/plugin-transform-member-expression-literals": "7.21.4-esm.2",
"@babel/plugin-transform-modules-amd": "7.21.4-esm.2",
"@babel/plugin-transform-modules-commonjs": "7.21.4-esm.2",
"@babel/plugin-transform-modules-systemjs": "7.21.4-esm.2",
"@babel/plugin-transform-modules-umd": "7.21.4-esm.2",
"@babel/plugin-transform-named-capturing-groups-regex": "7.21.4-esm.2",
"@babel/plugin-transform-new-target": "7.21.4-esm.2",
"@babel/plugin-transform-object-super": "7.21.4-esm.2",
"@babel/plugin-transform-parameters": "7.21.4-esm.2",
"@babel/plugin-transform-property-literals": "7.21.4-esm.2",
"@babel/plugin-transform-regenerator": "7.21.4-esm.2",
"@babel/plugin-transform-reserved-words": "7.21.4-esm.2",
"@babel/plugin-transform-shorthand-properties": "7.21.4-esm.2",
"@babel/plugin-transform-spread": "7.21.4-esm.2",
"@babel/plugin-transform-sticky-regex": "7.21.4-esm.2",
"@babel/plugin-transform-template-literals": "7.21.4-esm.2",
"@babel/plugin-transform-typeof-symbol": "7.21.4-esm.2",
"@babel/plugin-transform-unicode-escapes": "7.21.4-esm.2",
"@babel/plugin-transform-unicode-regex": "7.21.4-esm.2",
"@babel/plugin-transform-arrow-functions": "7.21.4-esm.3",
"@babel/plugin-transform-async-to-generator": "7.21.4-esm.3",
"@babel/plugin-transform-block-scoped-functions": "7.21.4-esm.3",
"@babel/plugin-transform-block-scoping": "7.21.4-esm.3",
"@babel/plugin-transform-classes": "7.21.4-esm.3",
"@babel/plugin-transform-computed-properties": "7.21.4-esm.3",
"@babel/plugin-transform-destructuring": "7.21.4-esm.3",
"@babel/plugin-transform-dotall-regex": "7.21.4-esm.3",
"@babel/plugin-transform-duplicate-keys": "7.21.4-esm.3",
"@babel/plugin-transform-exponentiation-operator": "7.21.4-esm.3",
"@babel/plugin-transform-for-of": "7.21.4-esm.3",
"@babel/plugin-transform-function-name": "7.21.4-esm.3",
"@babel/plugin-transform-literals": "7.21.4-esm.3",
"@babel/plugin-transform-member-expression-literals": "7.21.4-esm.3",
"@babel/plugin-transform-modules-amd": "7.21.4-esm.3",
"@babel/plugin-transform-modules-commonjs": "7.21.4-esm.3",
"@babel/plugin-transform-modules-systemjs": "7.21.4-esm.3",
"@babel/plugin-transform-modules-umd": "7.21.4-esm.3",
"@babel/plugin-transform-named-capturing-groups-regex": "7.21.4-esm.3",
"@babel/plugin-transform-new-target": "7.21.4-esm.3",
"@babel/plugin-transform-object-super": "7.21.4-esm.3",
"@babel/plugin-transform-parameters": "7.21.4-esm.3",
"@babel/plugin-transform-property-literals": "7.21.4-esm.3",
"@babel/plugin-transform-regenerator": "7.21.4-esm.3",
"@babel/plugin-transform-reserved-words": "7.21.4-esm.3",
"@babel/plugin-transform-shorthand-properties": "7.21.4-esm.3",
"@babel/plugin-transform-spread": "7.21.4-esm.3",
"@babel/plugin-transform-sticky-regex": "7.21.4-esm.3",
"@babel/plugin-transform-template-literals": "7.21.4-esm.3",
"@babel/plugin-transform-typeof-symbol": "7.21.4-esm.3",
"@babel/plugin-transform-unicode-escapes": "7.21.4-esm.3",
"@babel/plugin-transform-unicode-regex": "7.21.4-esm.3",
"@babel/preset-modules": "^0.1.5",
"@babel/types": "7.21.4-esm.2",
"@babel/types": "7.21.4-esm.3",
"babel-plugin-polyfill-corejs2": "^0.3.3",

@@ -102,6 +102,6 @@ "babel-plugin-polyfill-corejs3": "^0.6.0",

"devDependencies": {
"@babel/core": "7.21.4-esm.2",
"@babel/core": "7.21.4-esm.3",
"@babel/core-7.12": "npm:@babel/core@7.12.9",
"@babel/helper-plugin-test-runner": "7.21.4-esm.2",
"@babel/traverse": "7.21.4-esm.2"
"@babel/helper-plugin-test-runner": "7.21.4-esm.3",
"@babel/traverse": "7.21.4-esm.3"
},

@@ -108,0 +108,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc