Socket
Socket
Sign inDemoInstall

@babel/core

Package Overview
Dependencies
15
Maintainers
4
Versions
183
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.22.11 to 7.22.15

4

lib/config/caching.js

@@ -18,4 +18,4 @@ "use strict";

}
var _async = require("../gensync-utils/async");
var _util = require("./util");
var _async = require("../gensync-utils/async.js");
var _util = require("./util.js");
const synchronize = gen => {

@@ -22,0 +22,0 @@ return _gensync()(gen).sync;

@@ -23,10 +23,10 @@ "use strict";

}
var _options = require("./validation/options");
var _patternToRegex = require("./pattern-to-regex");
var _printer = require("./printer");
var _rewriteStackTrace = require("../errors/rewrite-stack-trace");
var _configError = require("../errors/config-error");
var _files = require("./files");
var _caching = require("./caching");
var _configDescriptors = require("./config-descriptors");
var _options = require("./validation/options.js");
var _patternToRegex = require("./pattern-to-regex.js");
var _printer = require("./printer.js");
var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js");
var _configError = require("../errors/config-error.js");
var _index = require("./files/index.js");
var _caching = require("./caching.js");
var _configDescriptors = require("./config-descriptors.js");
const debug = _debug()("babel:config:config-chain");

@@ -66,5 +66,5 @@ function* buildPresetChain(arg, context) {

if (typeof opts.configFile === "string") {
configFile = yield* (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller);
configFile = yield* (0, _index.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller);
} else if (opts.configFile !== false) {
configFile = yield* (0, _files.findRootConfig)(context.root, context.envName, context.caller);
configFile = yield* (0, _index.findRootConfig)(context.root, context.envName, context.caller);
}

@@ -96,3 +96,3 @@ let {

if ((babelrc === true || babelrc === undefined) && typeof context.filename === "string") {
const pkgData = yield* (0, _files.findPackageData)(context.filename);
const pkgData = yield* (0, _index.findPackageData)(context.filename);
if (pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) {

@@ -102,3 +102,3 @@ ({

config: babelrcFile
} = yield* (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller));
} = yield* (0, _index.findRelativeConfig)(pkgData, context.envName, context.caller));
if (ignoreFile) {

@@ -328,3 +328,3 @@ fileChain.files.add(ignoreFile.filepath);

if (opts.extends === undefined) return true;
const file = yield* (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller);
const file = yield* (0, _index.loadConfig)(opts.extends, dirname, context.envName, context.caller);
if (files.has(file)) {

@@ -331,0 +331,0 @@ throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n"));

@@ -16,7 +16,7 @@ "use strict";

}
var _functional = require("../gensync-utils/functional");
var _files = require("./files");
var _item = require("./item");
var _caching = require("./caching");
var _resolveTargets = require("./resolve-targets");
var _functional = require("../gensync-utils/functional.js");
var _index = require("./files/index.js");
var _item = require("./item.js");
var _caching = require("./caching.js");
var _resolveTargets = require("./resolve-targets.js");
function isEqualDescriptor(a, b) {

@@ -136,3 +136,3 @@ var _a$file, _b$file, _a$file2, _b$file2;

}
const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset;
const resolver = type === "plugin" ? _index.loadPlugin : _index.loadPreset;
const request = value;

@@ -139,0 +139,0 @@ ({

@@ -47,10 +47,10 @@ "use strict";

}
var _caching = require("../caching");
var _configApi = require("../helpers/config-api");
var _utils = require("./utils");
var _moduleTypes = require("./module-types");
var _patternToRegex = require("../pattern-to-regex");
var _configError = require("../../errors/config-error");
var fs = require("../../gensync-utils/fs");
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace");
var _caching = require("../caching.js");
var _configApi = require("../helpers/config-api.js");
var _utils = require("./utils.js");
var _moduleTypes = require("./module-types.js");
var _patternToRegex = require("../pattern-to-regex.js");
var _configError = require("../../errors/config-error.js");
var fs = require("../../gensync-utils/fs.js");
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js");
const debug = _debug()("babel:config:loading:files:configuration");

@@ -61,3 +61,2 @@ const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"];

const BABELIGNORE_FILENAME = ".babelignore";
const LOADING_CONFIGS = new Set();
const runConfig = (0, _caching.makeWeakCache)(function* runConfig(options, cache) {

@@ -72,13 +71,3 @@ yield* [];

if (!_fs().existsSync(filepath)) return null;
if (LOADING_CONFIGS.has(filepath)) {
debug("Auto-ignoring usage of config %o.", filepath);
return buildConfigFileObject({}, filepath);
}
let options;
try {
LOADING_CONFIGS.add(filepath);
options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously.");
} finally {
LOADING_CONFIGS.delete(filepath);
}
let options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously.");
let cacheNeedsConfiguration = false;

@@ -85,0 +74,0 @@ if (typeof options === "function") {

@@ -7,3 +7,3 @@ "use strict";

exports.default = resolve;
var _importMetaResolve = require("../../vendor/import-meta-resolve");
var _importMetaResolve = require("../../vendor/import-meta-resolve.js");
let importMetaResolve;

@@ -10,0 +10,0 @@ {

@@ -72,5 +72,5 @@ "use strict";

});
var _package = require("./package");
var _configuration = require("./configuration");
var _plugins = require("./plugins");
var _package = require("./package.js");
var _configuration = require("./configuration.js");
var _plugins = require("./plugins.js");
({});

@@ -77,0 +77,0 @@ 0 && 0;

@@ -8,3 +8,3 @@ "use strict";

exports.supportsESM = void 0;
var _async = require("../../gensync-utils/async");
var _async = require("../../gensync-utils/async.js");
function _path() {

@@ -31,7 +31,15 @@ const data = require("path");

}
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace");
var _configError = require("../../errors/config-error");
var _transformFile = require("../../transform-file");
function _debug() {
const data = require("debug");
_debug = function () {
return data;
};
return data;
}
var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js");
var _configError = require("../../errors/config-error.js");
var _transformFile = require("../../transform-file.js");
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
const debug = _debug()("babel:config:loading:files:module-types");
let import_;

@@ -106,4 +114,3 @@ try {

try {
const module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath);
return module != null && module.__esModule ? module.default : module;
return loadCjsDefault(filepath);
} finally {

@@ -116,6 +123,18 @@ if (!hasTsSupport) {

}
const LOADING_CJS_FILES = new Set();
function loadCjsDefault(filepath) {
const module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath);
if (LOADING_CJS_FILES.has(filepath)) {
debug("Auto-ignoring usage of config %o.", filepath);
return {};
}
let module;
try {
LOADING_CJS_FILES.add(filepath);
module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath);
} finally {
LOADING_CJS_FILES.delete(filepath);
}
{
return module != null && module.__esModule ? module.default || (arguments[1] ? module : undefined) : module;
var _module;
return (_module = module) != null && _module.__esModule ? module.default || (arguments[1] ? module : undefined) : module;
}

@@ -122,0 +141,0 @@ }

@@ -14,4 +14,4 @@ "use strict";

}
var _utils = require("./utils");
var _configError = require("../../errors/config-error");
var _utils = require("./utils.js");
var _configError = require("../../errors/config-error.js");
const PACKAGE_FILENAME = "package.json";

@@ -18,0 +18,0 @@ const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => {

@@ -23,4 +23,4 @@ "use strict";

}
var _async = require("../../gensync-utils/async");
var _moduleTypes = require("./module-types");
var _async = require("../../gensync-utils/async.js");
var _moduleTypes = require("./module-types.js");
function _url() {

@@ -33,3 +33,3 @@ const data = require("url");

}
var _importMetaResolve = require("./import-meta-resolve");
var _importMetaResolve = require("./import-meta-resolve.js");
const debug = _debug()("babel:config:loading:files:plugins");

@@ -36,0 +36,0 @@ const EXACT_RE = /^module:/;

@@ -7,4 +7,4 @@ "use strict";

exports.makeStaticFileCache = makeStaticFileCache;
var _caching = require("../caching");
var fs = require("../../gensync-utils/fs");
var _caching = require("../caching.js");
var fs = require("../../gensync-utils/fs.js");
function _fs2() {

@@ -11,0 +11,0 @@ const data = require("fs");

@@ -14,9 +14,9 @@ "use strict";

}
var _async = require("../gensync-utils/async");
var _util = require("./util");
var context = require("../index");
var _plugin = require("./plugin");
var _item = require("./item");
var _configChain = require("./config-chain");
var _deepArray = require("./helpers/deep-array");
var _async = require("../gensync-utils/async.js");
var _util = require("./util.js");
var context = require("../index.js");
var _plugin = require("./plugin.js");
var _item = require("./item.js");
var _configChain = require("./config-chain.js");
var _deepArray = require("./helpers/deep-array.js");
function _traverse() {

@@ -29,8 +29,8 @@ const data = require("@babel/traverse");

}
var _caching = require("./caching");
var _options = require("./validation/options");
var _plugins = require("./validation/plugins");
var _configApi = require("./helpers/config-api");
var _partial = require("./partial");
var _configError = require("../errors/config-error");
var _caching = require("./caching.js");
var _options = require("./validation/options.js");
var _plugins = require("./validation/plugins.js");
var _configApi = require("./helpers/config-api.js");
var _partial = require("./partial.js");
var _configError = require("../errors/config-error.js");
var _default = _gensync()(function* loadFullConfig(inputOpts) {

@@ -37,0 +37,0 @@ var _opts$assumptions;

@@ -16,4 +16,4 @@ "use strict";

}
var _ = require("../../");
var _caching = require("../caching");
var _index = require("../../index.js");
var _caching = require("../caching.js");
function makeConfigAPI(cache) {

@@ -34,3 +34,3 @@ const env = value => cache.using(data => {

return {
version: _.version,
version: _index.version,
cache: cache.simple(),

@@ -70,3 +70,3 @@ env,

;
if (_semver().satisfies(_.version, range)) return;
if (_semver().satisfies(_index.version, range)) return;
const limit = Error.stackTraceLimit;

@@ -76,3 +76,3 @@ if (typeof limit === "number" && limit < 25) {

}
const err = new Error(`Requires Babel "${range}", but was loaded with "${_.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
const err = new Error(`Requires Babel "${range}", but was loaded with "${_index.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
if (typeof limit === "number") {

@@ -83,3 +83,3 @@ Error.stackTraceLimit = limit;

code: "BABEL_VERSION_UNSUPPORTED",
version: _.version,
version: _index.version,
range

@@ -86,0 +86,0 @@ });

@@ -28,6 +28,6 @@ "use strict";

}
var _full = require("./full");
var _partial = require("./partial");
var _item = require("./item");
var _rewriteStackTrace = require("../errors/rewrite-stack-trace");
var _full = require("./full.js");
var _partial = require("./partial.js");
var _item = require("./item.js");
var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js");
const loadPartialConfigRunner = _gensync()(_partial.loadPartialConfig);

@@ -34,0 +34,0 @@ function loadPartialConfigAsync(...args) {

@@ -16,3 +16,3 @@ "use strict";

}
var _configDescriptors = require("./config-descriptors");
var _configDescriptors = require("./config-descriptors.js");
function createItemFromDescriptor(desc) {

@@ -19,0 +19,0 @@ return new ConfigItem(desc);

@@ -15,10 +15,10 @@ "use strict";

}
var _plugin = require("./plugin");
var _util = require("./util");
var _item = require("./item");
var _configChain = require("./config-chain");
var _environment = require("./helpers/environment");
var _options = require("./validation/options");
var _files = require("./files");
var _resolveTargets = require("./resolve-targets");
var _plugin = require("./plugin.js");
var _util = require("./util.js");
var _item = require("./item.js");
var _configChain = require("./config-chain.js");
var _environment = require("./helpers/environment.js");
var _options = require("./validation/options.js");
var _index = require("./files/index.js");
var _resolveTargets = require("./resolve-targets.js");
const _excluded = ["showIgnoredFiles"];

@@ -32,3 +32,3 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

{
const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
const upwardRootDir = (0, _index.findConfigUpwards)(rootDir);
return upwardRootDir === null ? rootDir : upwardRootDir;

@@ -38,5 +38,5 @@ }

{
const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
const upwardRootDir = (0, _index.findConfigUpwards)(rootDir);
if (upwardRootDir !== null) return upwardRootDir;
throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_files.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_index.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
code: "BABEL_ROOT_NOT_FOUND",

@@ -66,3 +66,3 @@ dirname: rootDir

const filename = typeof args.filename === "string" ? _path().resolve(cwd, args.filename) : undefined;
const showConfigPath = yield* (0, _files.resolveShowConfigPath)(absoluteCwd);
const showConfigPath = yield* (0, _index.resolveShowConfigPath)(absoluteCwd);
const context = {

@@ -69,0 +69,0 @@ filename,

@@ -7,3 +7,3 @@ "use strict";

exports.default = void 0;
var _deepArray = require("./helpers/deep-array");
var _deepArray = require("./helpers/deep-array.js");
class Plugin {

@@ -10,0 +10,0 @@ constructor(plugin, options, key, externalDependencies = (0, _deepArray.finalize)([])) {

@@ -33,3 +33,3 @@ "use strict";

}
var _options = require("./options");
var _options = require("./options.js");
function msg(loc) {

@@ -36,0 +36,0 @@ switch (loc.type) {

@@ -9,5 +9,5 @@ "use strict";

exports.validate = validate;
var _removed = require("./removed");
var _optionAssertions = require("./option-assertions");
var _configError = require("../../errors/config-error");
var _removed = require("./removed.js");
var _optionAssertions = require("./option-assertions.js");
var _configError = require("../../errors/config-error.js");
const ROOT_VALIDATORS = {

@@ -14,0 +14,0 @@ cwd: _optionAssertions.assertString,

@@ -7,3 +7,3 @@ "use strict";

exports.validatePluginObject = validatePluginObject;
var _optionAssertions = require("./option-assertions");
var _optionAssertions = require("./option-assertions.js");
const VALIDATORS = {

@@ -10,0 +10,0 @@ name: _optionAssertions.assertString,

@@ -7,3 +7,3 @@ "use strict";

exports.default = void 0;
var _rewriteStackTrace = require("./rewrite-stack-trace");
var _rewriteStackTrace = require("./rewrite-stack-trace.js");
class ConfigError extends Error {

@@ -10,0 +10,0 @@ constructor(message, filename) {

@@ -7,3 +7,3 @@ "use strict";

exports.once = once;
var _async = require("./async");
var _async = require("./async.js");
function once(fn) {

@@ -10,0 +10,0 @@ let result;

@@ -22,3 +22,3 @@ "use strict";

get: function () {
return _config.createConfigItem;
return _index2.createConfigItem;
}

@@ -29,3 +29,3 @@ });

get: function () {
return _config.createConfigItemAsync;
return _index2.createConfigItemAsync;
}

@@ -36,3 +36,3 @@ });

get: function () {
return _config.createConfigItemSync;
return _index2.createConfigItemSync;
}

@@ -49,3 +49,3 @@ });

get: function () {
return _config.loadOptions;
return _index2.loadOptions;
}

@@ -56,3 +56,3 @@ });

get: function () {
return _config.loadOptionsAsync;
return _index2.loadOptionsAsync;
}

@@ -63,3 +63,3 @@ });

get: function () {
return _config.loadOptionsSync;
return _index2.loadOptionsSync;
}

@@ -70,3 +70,3 @@ });

get: function () {
return _config.loadPartialConfig;
return _index2.loadPartialConfig;
}

@@ -77,3 +77,3 @@ });

get: function () {
return _config.loadPartialConfigAsync;
return _index2.loadPartialConfigAsync;
}

@@ -84,3 +84,3 @@ });

get: function () {
return _config.loadPartialConfigSync;
return _index2.loadPartialConfigSync;
}

@@ -109,3 +109,3 @@ });

get: function () {
return _files.resolvePlugin;
return _index.resolvePlugin;
}

@@ -116,3 +116,3 @@ });

get: function () {
return _files.resolvePreset;
return _index.resolvePreset;
}

@@ -193,6 +193,6 @@ });

exports.version = exports.types = void 0;
var _file = require("./transformation/file/file");
var _buildExternalHelpers = require("./tools/build-external-helpers");
var _files = require("./config/files");
var _environment = require("./config/helpers/environment");
var _file = require("./transformation/file/file.js");
var _buildExternalHelpers = require("./tools/build-external-helpers.js");
var _index = require("./config/files/index.js");
var _environment = require("./config/helpers/environment.js");
function _types() {

@@ -232,10 +232,10 @@ const data = require("@babel/types");

}
var _config = require("./config");
var _transform = require("./transform");
var _transformFile = require("./transform-file");
var _transformAst = require("./transform-ast");
var _parse = require("./parse");
var thisFile = require("./index");
var _index2 = require("./config/index.js");
var _transform = require("./transform.js");
var _transformFile = require("./transform-file.js");
var _transformAst = require("./transform-ast.js");
var _parse = require("./parse.js");
var thisFile = require("./index.js");
;
const version = "7.22.11";
const version = "7.22.15";
exports.version = version;

@@ -249,3 +249,3 @@ const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);

init(opts) {
return (0, _config.loadOptionsSync)(opts);
return (0, _index2.loadOptionsSync)(opts);
}

@@ -252,0 +252,0 @@ };

@@ -16,12 +16,12 @@ "use strict";

}
var _config = require("./config");
var _parser = require("./parser");
var _normalizeOpts = require("./transformation/normalize-opts");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace");
var _index = require("./config/index.js");
var _index2 = require("./parser/index.js");
var _normalizeOpts = require("./transformation/normalize-opts.js");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
const parseRunner = _gensync()(function* parse(code, opts) {
const config = yield* (0, _config.default)(opts);
const config = yield* (0, _index.default)(opts);
if (config === null) {
return null;
}
return yield* (0, _parser.default)(config.passes, (0, _normalizeOpts.default)(config), code);
return yield* (0, _index2.default)(config.passes, (0, _normalizeOpts.default)(config), code);
});

@@ -28,0 +28,0 @@ const parse = function parse(code, opts, callback) {

@@ -21,3 +21,3 @@ "use strict";

}
var _missingPluginHelper = require("./util/missing-plugin-helper");
var _missingPluginHelper = require("./util/missing-plugin-helper.js");
function* parser(pluginPasses, {

@@ -24,0 +24,0 @@ parserOpts,

@@ -35,3 +35,3 @@ "use strict";

}
var _file = require("../transformation/file/file");
var _file = require("../transformation/file/file.js");
const {

@@ -38,0 +38,0 @@ arrayExpression,

@@ -16,10 +16,10 @@ "use strict";

}
var _config = require("./config");
var _transformation = require("./transformation");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace");
var _index = require("./config/index.js");
var _index2 = require("./transformation/index.js");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
const transformFromAstRunner = _gensync()(function* (ast, code, opts) {
const config = yield* (0, _config.default)(opts);
const config = yield* (0, _index.default)(opts);
if (config === null) return null;
if (!ast) throw new Error("No AST given");
return yield* (0, _transformation.run)(config, code, ast);
return yield* (0, _index2.run)(config, code, ast);
});

@@ -26,0 +26,0 @@ const transformFromAst = function transformFromAst(ast, code, optsOrCallback, maybeCallback) {

@@ -16,5 +16,5 @@ "use strict";

}
var _config = require("./config");
var _transformation = require("./transformation");
var fs = require("./gensync-utils/fs");
var _index = require("./config/index.js");
var _index2 = require("./transformation/index.js");
var fs = require("./gensync-utils/fs.js");
({});

@@ -25,6 +25,6 @@ const transformFileRunner = _gensync()(function* (filename, opts) {

});
const config = yield* (0, _config.default)(options);
const config = yield* (0, _index.default)(options);
if (config === null) return null;
const code = yield* fs.readFile(filename, "utf8");
return yield* (0, _transformation.run)(config, code);
return yield* (0, _index2.run)(config, code);
});

@@ -31,0 +31,0 @@ function transformFile(...args) {

@@ -16,9 +16,9 @@ "use strict";

}
var _config = require("./config");
var _transformation = require("./transformation");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace");
var _index = require("./config/index.js");
var _index2 = require("./transformation/index.js");
var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
const transformRunner = _gensync()(function* transform(code, opts) {
const config = yield* (0, _config.default)(opts);
const config = yield* (0, _index.default)(opts);
if (config === null) return null;
return yield* (0, _transformation.run)(config, code);
return yield* (0, _index2.run)(config, code);
});

@@ -25,0 +25,0 @@ const transform = function transform(code, optsOrCallback, maybeCallback) {

@@ -14,3 +14,3 @@ "use strict";

}
var _plugin = require("../config/plugin");
var _plugin = require("../config/plugin.js");
let LOADED_PLUGIN;

@@ -17,0 +17,0 @@ const blockHoistPlugin = {

@@ -21,3 +21,3 @@ "use strict";

}
var _mergeMap = require("./merge-map");
var _mergeMap = require("./merge-map.js");
function generateCode(pluginPasses, file) {

@@ -24,0 +24,0 @@ const {

@@ -14,8 +14,8 @@ "use strict";

}
var _pluginPass = require("./plugin-pass");
var _blockHoistPlugin = require("./block-hoist-plugin");
var _normalizeOpts = require("./normalize-opts");
var _normalizeFile = require("./normalize-file");
var _generate = require("./file/generate");
var _deepArray = require("../config/helpers/deep-array");
var _pluginPass = require("./plugin-pass.js");
var _blockHoistPlugin = require("./block-hoist-plugin.js");
var _normalizeOpts = require("./normalize-opts.js");
var _normalizeFile = require("./normalize-file.js");
var _generate = require("./file/generate.js");
var _deepArray = require("../config/helpers/deep-array.js");
function* run(config, code, ast) {

@@ -22,0 +22,0 @@ const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast);

@@ -42,5 +42,5 @@ "use strict";

}
var _file = require("./file/file");
var _parser = require("../parser");
var _cloneDeep = require("./util/clone-deep");
var _file = require("./file/file.js");
var _index = require("../parser/index.js");
var _cloneDeep = require("./util/clone-deep.js");
const {

@@ -65,3 +65,3 @@ file,

} else {
ast = yield* (0, _parser.default)(pluginPasses, options, code);
ast = yield* (0, _index.default)(pluginPasses, options, code);
}

@@ -68,0 +68,0 @@ let inputMap = null;

{
"name": "@babel/core",
"version": "7.22.11",
"version": "7.22.15",
"description": "Babel compiler core.",

@@ -50,11 +50,11 @@ "main": "./lib/index.js",

"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.22.10",
"@babel/generator": "^7.22.10",
"@babel/helper-compilation-targets": "^7.22.10",
"@babel/helper-module-transforms": "^7.22.9",
"@babel/helpers": "^7.22.11",
"@babel/parser": "^7.22.11",
"@babel/template": "^7.22.5",
"@babel/traverse": "^7.22.11",
"@babel/types": "^7.22.11",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.22.15",
"@babel/helper-compilation-targets": "^7.22.15",
"@babel/helper-module-transforms": "^7.22.15",
"@babel/helpers": "^7.22.15",
"@babel/parser": "^7.22.15",
"@babel/template": "^7.22.15",
"@babel/traverse": "^7.22.15",
"@babel/types": "^7.22.15",
"convert-source-map": "^1.7.0",

@@ -67,8 +67,8 @@ "debug": "^4.1.0",

"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "^7.22.11",
"@babel/helper-transform-fixture-test-runner": "^7.22.15",
"@babel/plugin-syntax-flow": "^7.22.5",
"@babel/plugin-transform-flow-strip-types": "^7.22.5",
"@babel/plugin-transform-modules-commonjs": "^7.22.11",
"@babel/preset-env": "^7.22.10",
"@babel/preset-typescript": "^7.22.11",
"@babel/plugin-transform-modules-commonjs": "^7.22.15",
"@babel/preset-env": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@jridgewell/trace-mapping": "^0.3.17",

@@ -75,0 +75,0 @@ "@types/convert-source-map": "^1.5.1",

@@ -8,5 +8,5 @@ import type { Handler } from "gensync";

FilePackageData,
} from "./types";
} from "./types.ts";
import type { CallerMetadata } from "../validation/options";
import type { CallerMetadata } from "../validation/options.ts";

@@ -13,0 +13,0 @@ export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };

@@ -8,3 +8,3 @@ type indexBrowserType = typeof import("./index-browser");

export { findPackageData } from "./package";
export { findPackageData } from "./package.ts";

@@ -18,3 +18,3 @@ export {

ROOT_CONFIG_FILENAMES,
} from "./configuration";
} from "./configuration.ts";
export type {

@@ -25,3 +25,3 @@ ConfigFile,

FilePackageData,
} from "./types";
} from "./types.ts";
export {

@@ -32,2 +32,2 @@ loadPlugin,

resolvePreset,
} from "./plugins";
} from "./plugins.ts";

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

import type { ValidatedOptions } from "./validation/options";
import type { ValidatedOptions } from "./validation/options.ts";
import getTargets, {

@@ -3,0 +3,0 @@ type InputTargets,

@@ -8,3 +8,3 @@ type browserType = typeof import("./resolve-targets-browser");

import type { ValidatedOptions } from "./validation/options";
import type { ValidatedOptions } from "./validation/options.ts";
import path from "path";

@@ -11,0 +11,0 @@ import getTargets, {

import gensync, { type Handler } from "gensync";
import loadConfig from "./config";
import type { InputOptions, ResolvedConfig } from "./config";
import { run } from "./transformation";
import type { FileResult, FileResultCallback } from "./transformation";
import * as fs from "./gensync-utils/fs";
import loadConfig from "./config/index.ts";
import type { InputOptions, ResolvedConfig } from "./config/index.ts";
import { run } from "./transformation/index.ts";
import type { FileResult, FileResultCallback } from "./transformation/index.ts";
import * as fs from "./gensync-utils/fs.ts";

@@ -9,0 +9,0 @@ type transformFileBrowserType = typeof import("./transform-file-browser");

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

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc