Socket
Socket
Sign inDemoInstall

@babel/core

Package Overview
Dependencies
Maintainers
4
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/core - npm Package Compare versions

Comparing version 7.18.13 to 7.19.0

lib/config/cache-contexts.js.map

4

lib/config/cache-contexts.js

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

0 && 0;
0 && 0;
//# sourceMappingURL=cache-contexts.js.map

@@ -326,2 +326,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=caching.js.map

@@ -36,2 +36,6 @@ "use strict";

var _rewriteStackTrace = require("../errors/rewrite-stack-trace");
var _configError = require("../errors/config-error");
var _files = require("./files");

@@ -205,3 +209,3 @@

dirname: file.dirname,
options: (0, _options.validate)("configfile", file.options)
options: (0, _options.validate)("configfile", file.options, file.filepath)
}));

@@ -211,3 +215,3 @@ const validateBabelrcFile = (0, _caching.makeWeakCacheSync)(file => ({

dirname: file.dirname,
options: (0, _options.validate)("babelrcfile", file.options)
options: (0, _options.validate)("babelrcfile", file.options, file.filepath)
}));

@@ -217,3 +221,3 @@ const validateExtendFile = (0, _caching.makeWeakCacheSync)(file => ({

dirname: file.dirname,
options: (0, _options.validate)("extendsfile", file.options)
options: (0, _options.validate)("extendsfile", file.options, file.filepath)
}));

@@ -313,3 +317,3 @@ const loadProgrammaticChain = makeChainWalker({

}) {
return function* (input, context, files = new Set(), baseLogger) {
return function* chainWalker(input, context, files = new Set(), baseLogger) {
const {

@@ -321,3 +325,3 @@ dirname

if (configIsApplicable(rootOpts, dirname, context)) {
if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {
flattenedConfigs.push({

@@ -330,3 +334,3 @@ config: rootOpts,

if (envOpts && configIsApplicable(envOpts, dirname, context)) {
if (envOpts && configIsApplicable(envOpts, dirname, context, input.filepath)) {
flattenedConfigs.push({

@@ -342,3 +346,3 @@ config: envOpts,

if (configIsApplicable(overrideOps, dirname, context)) {
if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {
flattenedConfigs.push({

@@ -351,3 +355,3 @@ config: overrideOps,

if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) {
if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context, input.filepath)) {
flattenedConfigs.push({

@@ -504,9 +508,9 @@ config: overrideEnvOpts,

options
}, dirname, context) {
return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname));
}, dirname, context, configName) {
return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname, configName)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname, configName)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname, configName));
}
function configFieldIsApplicable(context, test, dirname) {
function configFieldIsApplicable(context, test, dirname, configName) {
const patterns = Array.isArray(test) ? test : [test];
return matchesPatterns(context, patterns, dirname);
return matchesPatterns(context, patterns, dirname, configName);
}

@@ -552,9 +556,9 @@

function matchesPatterns(context, patterns, dirname) {
return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context));
function matchesPatterns(context, patterns, dirname, configName) {
return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context, configName));
}
function matchPattern(pattern, dirname, pathToTest, context) {
function matchPattern(pattern, dirname, pathToTest, context, configName) {
if (typeof pattern === "function") {
return !!pattern(pathToTest, {
return !!(0, _rewriteStackTrace.endHiddenCallStack)(pattern)(pathToTest, {
dirname,

@@ -567,3 +571,3 @@ envName: context.envName,

if (typeof pathToTest !== "string") {
throw new Error(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`);
throw new _configError.default(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`, configName);
}

@@ -578,2 +582,4 @@

0 && 0;
0 && 0;
//# sourceMappingURL=config-chain.js.map

@@ -231,2 +231,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=config-descriptors.js.map

@@ -73,2 +73,4 @@ "use strict";

var _configError = require("../../errors/config-error");
var fs = require("../../gensync-utils/fs");

@@ -86,2 +88,4 @@

var _rewriteStackTrace = require("../../errors/rewrite-stack-trace");
const debug = _debug()("babel:config:loading:files:configuration");

@@ -151,3 +155,3 @@

if (config && previousConfig) {
throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`);
throw new _configError.default(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`);
}

@@ -181,3 +185,3 @@

if (!conf) {
throw new Error(`Config file ${filepath} contains no configuration data`);
throw new _configError.default(`Config file contains no configuration data`, filepath);
}

@@ -220,5 +224,2 @@

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.");
} catch (err) {
err.message = `${filepath}: Error while loading config - ${err.message}`;
throw err;
} finally {

@@ -232,3 +233,3 @@ LOADING_CONFIGS.delete(filepath);

yield* [];
options = options((0, _configApi.makeConfigAPI)(cache));
options = (0, _rewriteStackTrace.endHiddenCallStack)(options)((0, _configApi.makeConfigAPI)(cache));
assertCache = true;

@@ -238,10 +239,10 @@ }

if (!options || typeof options !== "object" || Array.isArray(options)) {
throw new Error(`${filepath}: Configuration should be an exported JavaScript object.`);
throw new _configError.default(`Configuration should be an exported JavaScript object.`, filepath);
}
if (typeof options.then === "function") {
throw new Error(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`);
throw new _configError.default(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`, filepath);
}
if (assertCache && !cache.configured()) throwConfigError();
if (assertCache && !cache.configured()) throwConfigError(filepath);
return {

@@ -258,3 +259,3 @@ filepath,

if (typeof babel !== "object" || Array.isArray(babel) || babel === null) {
throw new Error(`${file.filepath}: .babel property must be an object`);
throw new _configError.default(`.babel property must be an object`, file.filepath);
}

@@ -274,14 +275,13 @@

} catch (err) {
err.message = `${filepath}: Error while parsing config - ${err.message}`;
throw err;
throw new _configError.default(`Error while parsing config - ${err.message}`, filepath);
}
if (!options) throw new Error(`${filepath}: No config detected`);
if (!options) throw new _configError.default(`No config detected`, filepath);
if (typeof options !== "object") {
throw new Error(`${filepath}: Config returned typeof ${typeof options}`);
throw new _configError.default(`Config returned typeof ${typeof options}`, filepath);
}
if (Array.isArray(options)) {
throw new Error(`${filepath}: Expected config object but found array`);
throw new _configError.default(`Expected config object but found array`, filepath);
}

@@ -303,3 +303,3 @@

if (pattern[0] === "!") {
throw new Error(`Negation of file paths is not supported.`);
throw new _configError.default(`Negation of file paths is not supported.`, filepath);
}

@@ -333,4 +333,4 @@ }

function throwConfigError() {
throw new Error(`\
function throwConfigError(filepath) {
throw new _configError.default(`\
Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured

@@ -368,5 +368,7 @@ for various types of caching, using the first param of their handler functions:

return { };
};`);
};`, filepath);
}
0 && 0;
0 && 0;
//# sourceMappingURL=configuration.js.map

@@ -43,2 +43,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=import-meta-resolve.js.map

@@ -69,2 +69,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=index-browser.js.map

@@ -87,2 +87,4 @@ "use strict";

exports.resolvePreset = resolvePreset;
0 && 0;
0 && 0;
//# sourceMappingURL=index.js.map

@@ -51,2 +51,6 @@ "use strict";

var _rewriteStackTrace = require("../../errors/rewrite-stack-trace");
var _configError = require("../../errors/config-error");
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); } }

@@ -83,3 +87,3 @@

throw new Error(asyncError);
throw new _configError.default(asyncError, filepath);
}

@@ -102,4 +106,3 @@ }

function loadCjsDefault(filepath, fallbackToTranspiledModule) {
const module = require(filepath);
const module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath);
return module != null && module.__esModule ? module.default || (fallbackToTranspiledModule ? module : undefined) : module;

@@ -115,6 +118,6 @@ }

if (!import_) {
throw new Error("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n");
throw new _configError.default("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n", filepath);
}
const module = yield import_((0, _url().pathToFileURL)(filepath));
const module = yield (0, _rewriteStackTrace.endHiddenCallStack)(import_)((0, _url().pathToFileURL)(filepath));
return module.default;

@@ -125,2 +128,4 @@ });

0 && 0;
0 && 0;
//# sourceMappingURL=module-types.js.map

@@ -20,2 +20,4 @@ "use strict";

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

@@ -58,4 +60,3 @@

} catch (err) {
err.message = `${filepath}: Error while parsing JSON - ${err.message}`;
throw err;
throw new _configError.default(`Error while parsing JSON - ${err.message}`, filepath);
}

@@ -66,7 +67,7 @@

if (typeof options !== "object") {
throw new Error(`${filepath}: Config returned typeof ${typeof options}`);
throw new _configError.default(`Config returned typeof ${typeof options}`, filepath);
}
if (Array.isArray(options)) {
throw new Error(`${filepath}: Expected config object but found array`);
throw new _configError.default(`Expected config object but found array`, filepath);
}

@@ -80,2 +81,4 @@

});
0 && 0;
0 && 0;
//# sourceMappingURL=package.js.map

@@ -275,2 +275,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=plugins.js.map

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

0 && 0;
0 && 0;
//# sourceMappingURL=types.js.map

@@ -46,2 +46,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=utils.js.map

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

var Context = require("./cache-contexts");
var _configError = require("../errors/config-error");

@@ -206,3 +206,5 @@ var _default = _gensync()(function* loadFullConfig(inputOpts) {

if (!/^\[BABEL\]/.test(e.message)) {
e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`;
var _context$filename;
e.message = `[BABEL] ${(_context$filename = context.filename) != null ? _context$filename : "unknown file"}: ${e.message}`;
}

@@ -332,3 +334,3 @@

const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */";
throw new Error([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n"));
throw new _configError.default([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n"));
}

@@ -383,2 +385,4 @@ };

0 && 0;
0 && 0;
//# sourceMappingURL=full.js.map

@@ -24,4 +24,2 @@ "use strict";

var Context = require("../cache-contexts");
function makeConfigAPI(cache) {

@@ -110,2 +108,4 @@ const env = value => cache.using(data => {

0 && 0;
0 && 0;
//# sourceMappingURL=config-api.js.map

@@ -26,2 +26,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=deep-array.js.map

@@ -12,2 +12,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=environment.js.map

@@ -83,2 +83,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=index.js.map

@@ -77,2 +77,4 @@ "use strict";

Object.freeze(ConfigItem.prototype);
0 && 0;
0 && 0;
//# sourceMappingURL=item.js.map

@@ -198,2 +198,4 @@ "use strict";

Object.freeze(PartialConfig.prototype);
0 && 0;
0 && 0;
//# sourceMappingURL=partial.js.map

@@ -46,2 +46,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=pattern-to-regex.js.map

@@ -35,2 +35,4 @@ "use strict";

exports.default = Plugin;
0 && 0;
0 && 0;
//# sourceMappingURL=plugin.js.map

@@ -140,2 +140,4 @@ "use strict";

exports.ConfigPrinter = ConfigPrinter;
0 && 0;
0 && 0;
//# sourceMappingURL=printer.js.map

@@ -47,2 +47,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=resolve-targets-browser.js.map

@@ -73,2 +73,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=resolve-targets.js.map

@@ -33,2 +33,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=util.js.map

@@ -354,2 +354,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=option-assertions.js.map

@@ -10,4 +10,2 @@ "use strict";

var _plugin = require("../plugin");
var _removed = require("./removed");

@@ -17,2 +15,4 @@

var _configError = require("../../errors/config-error");
const ROOT_VALIDATORS = {

@@ -87,7 +87,13 @@ cwd: _optionAssertions.assertString,

function validate(type, opts) {
return validateNested({
type: "root",
source: type
}, opts);
function validate(type, opts, filename) {
try {
return validateNested({
type: "root",
source: type
}, opts);
} catch (error) {
const configError = new _configError.default(error.message, filename);
if (error.code) configError.code = error.code;
throw configError;
}
}

@@ -216,2 +222,4 @@

0 && 0;
0 && 0;
//# sourceMappingURL=options.js.map

@@ -73,2 +73,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=plugins.js.map

@@ -67,2 +67,4 @@ "use strict";

exports.default = _default;
0 && 0;
0 && 0;
//# sourceMappingURL=removed.js.map

@@ -114,2 +114,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=async.js.map

@@ -41,2 +41,4 @@ "use strict";

exports.stat = stat;
0 && 0;
0 && 0;
//# sourceMappingURL=fs.js.map

@@ -35,2 +35,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=functional.js.map

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

const version = "7.18.13";
const version = "7.19.0";
exports.version = version;

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

0 && (exports.types = exports.traverse = exports.tokTypes = exports.template = 0);
0 && (exports.types = exports.traverse = exports.tokTypes = exports.template = 0);
//# sourceMappingURL=index.js.map

@@ -6,3 +6,5 @@ "use strict";

});
exports.parseSync = exports.parseAsync = exports.parse = void 0;
exports.parse = void 0;
exports.parseAsync = parseAsync;
exports.parseSync = parseSync;

@@ -25,2 +27,4 @@ function _gensync() {

var _rewriteStackTrace = require("./errors/rewrite-stack-trace");
const parseRunner = _gensync()(function* parse(code, opts) {

@@ -44,14 +48,21 @@ const config = yield* (0, _config.default)(opts);

{
return parseRunner.sync(code, opts);
return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(code, opts);
}
}
parseRunner.errback(code, opts, callback);
(0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code, opts, callback);
};
exports.parse = parse;
const parseSync = parseRunner.sync;
exports.parseSync = parseSync;
const parseAsync = parseRunner.async;
exports.parseAsync = parseAsync;
0 && 0;
function parseSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args);
}
function parseAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.async)(...args);
}
0 && 0;
//# sourceMappingURL=parse.js.map

@@ -97,2 +97,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=index.js.map

@@ -325,2 +325,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=missing-plugin-helper.js.map

@@ -166,2 +166,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=build-external-helpers.js.map

@@ -6,3 +6,5 @@ "use strict";

});
exports.transformFromAstSync = exports.transformFromAstAsync = exports.transformFromAst = void 0;
exports.transformFromAst = void 0;
exports.transformFromAstAsync = transformFromAstAsync;
exports.transformFromAstSync = transformFromAstSync;

@@ -23,2 +25,4 @@ function _gensync() {

var _rewriteStackTrace = require("./errors/rewrite-stack-trace");
const transformFromAstRunner = _gensync()(function* (ast, code, opts) {

@@ -45,14 +49,21 @@ const config = yield* (0, _config.default)(opts);

{
return transformFromAstRunner.sync(ast, code, opts);
return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast, code, opts);
}
}
transformFromAstRunner.errback(ast, code, opts, callback);
(0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast, code, opts, callback);
};
exports.transformFromAst = transformFromAst;
const transformFromAstSync = transformFromAstRunner.sync;
exports.transformFromAstSync = transformFromAstSync;
const transformFromAstAsync = transformFromAstRunner.async;
exports.transformFromAstAsync = transformFromAstAsync;
0 && 0;
function transformFromAstSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args);
}
function transformFromAstAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args);
}
0 && 0;
//# sourceMappingURL=transform-ast.js.map

@@ -28,2 +28,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=transform-file-browser.js.map

@@ -6,3 +6,5 @@ "use strict";

});
exports.transformFileSync = exports.transformFileAsync = exports.transformFile = void 0;
exports.transformFile = transformFile;
exports.transformFileAsync = transformFileAsync;
exports.transformFileSync = transformFileSync;

@@ -37,8 +39,16 @@ function _gensync() {

const transformFile = transformFileRunner.errback;
exports.transformFile = transformFile;
const transformFileSync = transformFileRunner.sync;
exports.transformFileSync = transformFileSync;
const transformFileAsync = transformFileRunner.async;
exports.transformFileAsync = transformFileAsync;
0 && 0;
function transformFile(...args) {
return transformFileRunner.errback(...args);
}
function transformFileSync(...args) {
return transformFileRunner.sync(...args);
}
function transformFileAsync(...args) {
return transformFileRunner.async(...args);
}
0 && 0;
//# sourceMappingURL=transform-file.js.map

@@ -6,3 +6,5 @@ "use strict";

});
exports.transformSync = exports.transformAsync = exports.transform = void 0;
exports.transform = void 0;
exports.transformAsync = transformAsync;
exports.transformSync = transformSync;

@@ -23,2 +25,4 @@ function _gensync() {

var _rewriteStackTrace = require("./errors/rewrite-stack-trace");
const transformRunner = _gensync()(function* transform(code, opts) {

@@ -44,14 +48,21 @@ const config = yield* (0, _config.default)(opts);

{
return transformRunner.sync(code, opts);
return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(code, opts);
}
}
transformRunner.errback(code, opts, callback);
(0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.errback)(code, opts, callback);
};
exports.transform = transform;
const transformSync = transformRunner.sync;
exports.transformSync = transformSync;
const transformAsync = transformRunner.async;
exports.transformAsync = transformAsync;
0 && 0;
function transformSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(...args);
}
function transformAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.async)(...args);
}
0 && 0;
//# sourceMappingURL=transform.js.map

@@ -95,2 +95,4 @@ "use strict";

};
0 && 0;
0 && 0;
//# sourceMappingURL=block-hoist-plugin.js.map

@@ -255,2 +255,4 @@ "use strict";

exports.default = File;
0 && 0;
0 && 0;
//# sourceMappingURL=file.js.map

@@ -96,2 +96,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=generate.js.map

@@ -45,2 +45,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=merge-map.js.map

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

e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown"}: ${e.message}`;
e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown file"}: ${e.message}`;

@@ -61,3 +61,3 @@ if (!e.code) {

e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown"}: ${e.message}`;
e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown file"}: ${e.message}`;

@@ -131,2 +131,4 @@ if (!e.code) {

0 && 0;
0 && 0;
//# sourceMappingURL=index.js.map

@@ -169,2 +169,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=normalize-file.js.map

@@ -64,2 +64,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=normalize-opts.js.map

@@ -55,2 +55,4 @@ "use strict";

}
0 && 0;
0 && 0;
//# sourceMappingURL=plugin-pass.js.map

@@ -41,2 +41,4 @@ "use strict";

0 && 0;
0 && 0;
//# sourceMappingURL=clone-deep.js.map
{
"name": "@babel/core",
"version": "7.18.13",
"version": "7.19.0",
"description": "Babel compiler core.",

@@ -51,10 +51,10 @@ "main": "./lib/index.js",

"@babel/code-frame": "^7.18.6",
"@babel/generator": "^7.18.13",
"@babel/helper-compilation-targets": "^7.18.9",
"@babel/helper-module-transforms": "^7.18.9",
"@babel/helpers": "^7.18.9",
"@babel/parser": "^7.18.13",
"@babel/generator": "^7.19.0",
"@babel/helper-compilation-targets": "^7.19.0",
"@babel/helper-module-transforms": "^7.19.0",
"@babel/helpers": "^7.19.0",
"@babel/parser": "^7.19.0",
"@babel/template": "^7.18.10",
"@babel/traverse": "^7.18.13",
"@babel/types": "^7.18.13",
"@babel/traverse": "^7.19.0",
"@babel/types": "^7.19.0",
"convert-source-map": "^1.7.0",

@@ -69,5 +69,5 @@ "debug": "^4.1.0",

"@babel/plugin-syntax-flow": "^7.18.6",
"@babel/plugin-transform-flow-strip-types": "^7.18.9",
"@babel/plugin-transform-flow-strip-types": "^7.19.0",
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
"@babel/preset-env": "^7.18.10",
"@babel/preset-env": "^7.19.0",
"@jridgewell/trace-mapping": "^0.3.8",

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

@@ -17,11 +17,2 @@ import gensync, { type Handler } from "gensync";

type TransformFile = {
(filename: string, callback: FileResultCallback): void;
(
filename: string,
opts: InputOptions | undefined | null,
callback: FileResultCallback,
): void;
};
const transformFileRunner = gensync(function* (

@@ -40,4 +31,27 @@ filename: string,

export const transformFile = transformFileRunner.errback as TransformFile;
export const transformFileSync = transformFileRunner.sync;
export const transformFileAsync = transformFileRunner.async;
// @ts-expect-error TS doesn't detect that this signature is compatible
export function transformFile(
filename: string,
callback: FileResultCallback,
): void;
export function transformFile(
filename: string,
opts: InputOptions | undefined | null,
callback: FileResultCallback,
): void;
export function transformFile(
...args: Parameters<typeof transformFileRunner.errback>
) {
return transformFileRunner.errback(...args);
}
export function transformFileSync(
...args: Parameters<typeof transformFileRunner.sync>
) {
return transformFileRunner.sync(...args);
}
export function transformFileAsync(
...args: Parameters<typeof transformFileRunner.async>
) {
return transformFileRunner.async(...args);
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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