Socket
Socket
Sign inDemoInstall

@babel/cli

Package Overview
Dependencies
85
Maintainers
4
Versions
122
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.19.3 to 7.20.7

13

lib/babel-external-helpers.js

@@ -5,24 +5,17 @@ "use strict";

const data = require("commander");
_commander = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function collect(value, previousValue) {
if (typeof value !== "string") return previousValue;
const values = value.split(",");
if (previousValue) {

@@ -32,16 +25,10 @@ previousValue.push(...values);

}
return values;
}
_commander().option("-l, --whitelist [whitelist]", "Whitelist of helpers to ONLY include", collect);
_commander().option("-t, --output-type [type]", "Type of output (global|umd|var)", "global");
_commander().usage("[options]");
_commander().parse(process.argv);
console.log((0, _core().buildExternalHelpers)(_commander().whitelist, _commander().outputType));
//# sourceMappingURL=babel-external-helpers.js.map

@@ -7,41 +7,27 @@ "use strict";

exports.default = _default;
function _slash() {
const data = require("slash");
_slash = function () {
return data;
};
return data;
}
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
var util = require("./util");
var watcher = require("./watcher");
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 FILE_TYPE = Object.freeze({

@@ -53,3 +39,2 @@ NON_COMPILABLE: "NON_COMPILABLE",

});
function outputFileSync(filePath, data) {

@@ -59,10 +44,7 @@ (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "10.12") ? _fs().mkdirSync : require("make-dir").sync)(_path().dirname(filePath), {

});
_fs().writeFileSync(filePath, data);
}
function _default(_x) {
return _ref.apply(this, arguments);
}
function _ref() {

@@ -76,14 +58,10 @@ _ref = _asyncToGenerator(function* ({

}
function _write() {
_write = _asyncToGenerator(function* (src, base) {
let relative = _path().relative(base, src);
if (!util.isCompilableExtension(relative, cliOptions.extensions)) {
return FILE_TYPE.NON_COMPILABLE;
}
relative = util.withExtension(relative, cliOptions.keepFileExtension ? _path().extname(relative) : cliOptions.outFileExtension);
const dest = getDest(relative, base);
try {

@@ -94,6 +72,4 @@ const res = yield util.compile(src, Object.assign({}, babelOptions, {

if (!res) return FILE_TYPE.IGNORED;
if (res.map) {
let outputMap = false;
if (babelOptions.sourceMaps && babelOptions.sourceMaps !== "inline") {

@@ -104,10 +80,7 @@ outputMap = "external";

}
if (outputMap) {
const mapLoc = dest + ".map";
if (outputMap === "external") {
res.code = util.addSourceMappingUrl(res.code, mapLoc);
}
res.map.file = _path().basename(relative);

@@ -117,10 +90,7 @@ outputFileSync(mapLoc, JSON.stringify(res.map));

}
outputFileSync(dest, res.code);
util.chmod(src, dest);
if (cliOptions.verbose) {
console.log(_path().relative(process.cwd(), src) + " -> " + dest);
}
return FILE_TYPE.COMPILED;

@@ -132,3 +102,2 @@ } catch (err) {

}
throw err;

@@ -139,3 +108,2 @@ }

}
function getDest(filename, base) {

@@ -145,17 +113,12 @@ if (cliOptions.relative) {

}
return _path().join(cliOptions.outDir, filename);
}
function handleFile(_x4, _x5) {
return _handleFile.apply(this, arguments);
}
function _handleFile() {
_handleFile = _asyncToGenerator(function* (src, base) {
const written = yield write(src, base);
if (cliOptions.copyFiles && written === FILE_TYPE.NON_COMPILABLE || cliOptions.copyIgnored && written === FILE_TYPE.IGNORED) {
const filename = _path().relative(base, src);
const dest = getDest(filename, base);

@@ -165,3 +128,2 @@ outputFileSync(dest, _fs().readFileSync(src));

}
return written === FILE_TYPE.COMPILED;

@@ -171,13 +133,9 @@ });

}
function handle(_x6) {
return _handle.apply(this, arguments);
}
function _handle() {
_handle = _asyncToGenerator(function* (filenameOrDir) {
if (!_fs().existsSync(filenameOrDir)) return 0;
const stat = _fs().statSync(filenameOrDir);
if (stat.isDirectory()) {

@@ -187,10 +145,7 @@ const dirname = filenameOrDir;

const files = util.readdir(dirname, cliOptions.includeDotfiles);
for (const filename of files) {
const src = _path().join(dirname, filename);
const written = yield handleFile(src, dirname);
if (written) count += 1;
}
return count;

@@ -205,3 +160,2 @@ } else {

}
let compiledFiles = 0;

@@ -213,3 +167,2 @@ let startTime = null;

}
const diff = process.hrtime(startTime);

@@ -223,3 +176,2 @@ console.log(`Successfully compiled ${compiledFiles} ${compiledFiles !== 1 ? "files" : "file"} with Babel (${diff[0] * 1e3 + Math.round(diff[1] / 1e6)}ms).`);

});
if (!cliOptions.skipInitialBuild) {

@@ -229,3 +181,2 @@ if (cliOptions.deleteDirOnStart) {

}
(((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "10.12") ? _fs().mkdirSync : require("make-dir").sync)(cliOptions.outDir, {

@@ -235,7 +186,5 @@ recursive: true

startTime = process.hrtime();
for (const filename of cliOptions.filenames) {
compiledFiles += yield handle(filename);
}
if (!cliOptions.quiet) {

@@ -246,3 +195,2 @@ logSuccess();

}
if (cliOptions.watch) {

@@ -254,8 +202,5 @@ let processing = 0;

let getBase;
if (filenames.length === 1) {
const base = filenames[0];
const absoluteBase = _path().resolve(base);
getBase = filename => {

@@ -267,3 +212,2 @@ return filename === absoluteBase ? _path().dirname(base) : base;

const absoluteFilename = _path().resolve(filename);
return [absoluteFilename, _path().dirname(filename)];

@@ -273,17 +217,12 @@ }));

const absoluteFilename = _path().resolve(filename);
return [absoluteFilename, filename];
}));
const {
sep
} = _path();
getBase = filename => {
const base = filenameToBaseMap.get(filename);
if (base !== undefined) {
return base;
}
for (const [absoluteFilenameOrDir, relative] of absoluteFilenames) {

@@ -295,7 +234,5 @@ if (filename.startsWith(absoluteFilenameOrDir + sep)) {

}
return "";
};
}
filenames.forEach(filenameOrDir => {

@@ -308,3 +245,2 @@ watcher.watch(filenameOrDir);

if (startTime === null) startTime = process.hrtime();
try {

@@ -316,3 +252,2 @@ const written = yield Promise.all(filenames.map(filename => handleFile(filename, getBase(filename))));

}
processing--;

@@ -319,0 +254,0 @@ if (processing === 0 && !cliOptions.quiet) logSuccess();

@@ -7,65 +7,44 @@ "use strict";

exports.default = _default;
function _convertSourceMap() {
const data = require("convert-source-map");
_convertSourceMap = function () {
return data;
};
return data;
}
function _traceMapping() {
const data = require("@jridgewell/trace-mapping");
_traceMapping = function () {
return data;
};
return data;
}
function _slash() {
const data = require("slash");
_slash = function () {
return data;
};
return data;
}
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
var util = require("./util");
var watcher = require("./watcher");
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); }); }; }
function _default(_x) {
return _ref.apply(this, arguments);
}
function _ref() {

@@ -81,3 +60,2 @@ _ref = _asyncToGenerator(function* ({

let hasRawMap = false;
for (const result of fileResults) {

@@ -101,3 +79,2 @@ if (!result) continue;

}
const map = new (_traceMapping().AnyMap)({

@@ -113,3 +90,2 @@ version: 3,

}
return {

@@ -121,17 +97,12 @@ map: map,

}
function countNewlines(code) {
let count = 0;
let index = -1;
while ((index = code.indexOf("\n", index + 1)) !== -1) {
count++;
}
return count;
}
function output(fileResults) {
const result = buildResult(fileResults);
if (cliOptions.outFile) {

@@ -142,3 +113,2 @@ (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "10.12") ? _fs().mkdirSync : require("make-dir").sync)(_path().dirname(cliOptions.outFile), {

let outputMap = false;
if (babelOptions.sourceMaps && babelOptions.sourceMaps !== "inline") {

@@ -149,13 +119,9 @@ outputMap = "external";

}
if (outputMap) {
const mapLoc = cliOptions.outFile + ".map";
if (outputMap === "external") {
result.code = util.addSourceMappingUrl(result.code, mapLoc);
}
_fs().writeFileSync(mapLoc, JSON.stringify((0, _traceMapping().encodedMap)(result.map)));
}
_fs().writeFileSync(cliOptions.outFile, result.code);

@@ -166,3 +132,2 @@ } else {

}
function readStdin() {

@@ -182,7 +147,5 @@ return new Promise((resolve, reject) => {

}
function stdin() {
return _stdin.apply(this, arguments);
}
function _stdin() {

@@ -198,7 +161,5 @@ _stdin = _asyncToGenerator(function* () {

}
function walk(_x2) {
return _walk.apply(this, arguments);
}
function _walk() {

@@ -209,5 +170,3 @@ _walk = _asyncToGenerator(function* (filenames) {

if (!_fs().existsSync(filename)) return;
const stat = _fs().statSync(filename);
if (stat.isDirectory()) {

@@ -224,9 +183,6 @@ const dirname = filename;

let sourceFilename = filename;
if (cliOptions.outFile) {
sourceFilename = _path().relative(_path().dirname(cliOptions.outFile), sourceFilename);
}
sourceFilename = _slash()(sourceFilename);
try {

@@ -241,3 +197,2 @@ return yield util.compile(filename, Object.assign({}, babelOptions, {

}
console.error(err);

@@ -251,7 +206,5 @@ return null;

}
function files(_x3) {
return _files.apply(this, arguments);
}
function _files() {

@@ -264,7 +217,5 @@ _files = _asyncToGenerator(function* (filenames) {

}
if (!cliOptions.skipInitialBuild) {
yield walk(filenames);
}
if (cliOptions.watch) {

@@ -276,7 +227,5 @@ filenames.forEach(watcher.watch);

if (!actionableChange) return;
if (cliOptions.verbose) {
console.log(`${event} ${cause}`);
}
walk(filenames).catch(err => {

@@ -290,3 +239,2 @@ console.error(err);

}
if (cliOptions.filenames.length) {

@@ -293,0 +241,0 @@ yield files(cliOptions.filenames);

4

lib/babel/index.js

@@ -5,9 +5,5 @@ #!/usr/bin/env node

var _options = require("./options");
var _dir = require("./dir");
var _file = require("./file");
const opts = (0, _options.default)(process.argv);
if (opts) {

@@ -14,0 +10,0 @@ const fn = opts.cliOptions.outDir ? _dir.default : _file.default;

@@ -7,61 +7,40 @@ "use strict";

exports.default = parseArgv;
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
function _commander() {
const data = require("commander");
_commander = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _glob() {
const data = require("glob");
_glob = function () {
return data;
};
return data;
}
_commander().option("-f, --filename [filename]", "The filename to use when reading from stdin. This will be used in source-maps, errors etc.");
_commander().option("--presets [list]", "A comma-separated list of preset names.", collect);
_commander().option("--plugins [list]", "A comma-separated list of plugin names.", collect);
_commander().option("--config-file [path]", "Path to a .babelrc file to use.");
_commander().option("--env-name [name]", "The name of the 'env' to use when loading configs and plugins. " + "Defaults to the value of BABEL_ENV, or else NODE_ENV, or else 'development'.");
_commander().option("--root-mode [mode]", "The project-root resolution mode. " + "One of 'root' (the default), 'upward', or 'upward-optional'.");
_commander().option("--source-type [script|module]", "");
_commander().option("--no-babelrc", "Whether or not to look up .babelrc and .babelignore files.");
_commander().option("--ignore [list]", "List of glob paths to **not** compile.", collect);
_commander().option("--only [list]", "List of glob paths to **only** compile.", collect);

@@ -72,26 +51,16 @@

_commander().option("--no-comments", "Write comments to generated output. (true by default)");
_commander().option("--retain-lines", "Retain line numbers. This will result in really ugly code.");
_commander().option("--compact [true|false|auto]", "Do not include superfluous whitespace characters and line terminators.", booleanify);
_commander().option("--minified", "Save as many bytes when printing. (false by default)");
_commander().option("--auxiliary-comment-before [string]", "Print a comment before any injected non-user code.");
_commander().option("--auxiliary-comment-after [string]", "Print a comment after any injected non-user code.");
_commander().option("-s, --source-maps [true|false|inline|both]", "", booleanify, undefined);
_commander().option("--source-map-target [string]", "Set `file` on returned source map.");
_commander().option("--source-file-name [string]", "Set `sources[0]` on returned source map.");
_commander().option("--source-root [filename]", "The root from which all sources are relative.");
{
_commander().option("--module-root [filename]", "Optional prefix for the AMD module formatter that will be prepended to the filename on module definitions.");
_commander().option("--module-root [filename]",
"Optional prefix for the AMD module formatter that will be prepended to the filename on module definitions.");
_commander().option("-M, --module-ids", "Insert an explicit id for modules.");
_commander().option("--module-id [string]", "Specify a custom name for module ids.");

@@ -101,43 +70,23 @@ }

_commander().option("-x, --extensions [extensions]", "List of extensions to compile when a directory has been the input. [" + _core().DEFAULT_EXTENSIONS.join() + "]", collect);
_commander().option("--keep-file-extension", "Preserve the file extensions of the input files.");
_commander().option("-w, --watch", "Recompile files on changes.");
_commander().option("--skip-initial-build", "Do not compile files before watching.");
_commander().option("-o, --out-file [out]", "Compile all input files into a single file.");
_commander().option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory.");
_commander().option("--relative", "Compile into an output directory relative to input directory or file. Requires --out-dir [out]");
_commander().option("-D, --copy-files", "When compiling a directory copy over non-compilable files.");
_commander().option("--include-dotfiles", "Include dotfiles when compiling and copying non-compilable files.");
_commander().option("--no-copy-ignored", "Exclude ignored files when copying non-compilable files.");
_commander().option("--verbose", "Log everything. This option conflicts with --quiet");
_commander().option("--quiet", "Don't log anything. This option conflicts with --verbose");
_commander().option("--delete-dir-on-start", "Delete the out directory before compilation.");
_commander().option("--out-file-extension [string]", "Use a specific extension for the output files");
_commander().version("7.19.3" + " (@babel/core " + _core().version + ")");
_commander().version("7.20.7" + " (@babel/core " + _core().version + ")");
_commander().usage("[options] <files ...>");
_commander().action(() => {});
function parseArgv(args) {
_commander().parse(args);
const errors = [];
let filenames = _commander().args.reduce(function (globbed, input) {
let files = _glob().sync(input);
if (!files.length) files = [input];

@@ -147,3 +96,2 @@ globbed.push(...files);

}, []);
filenames = Array.from(new Set(filenames));

@@ -155,15 +103,11 @@ filenames.forEach(function (filename) {

});
if (_commander().outDir && !filenames.length) {
errors.push("--out-dir requires filenames");
}
if (_commander().outFile && _commander().outDir) {
errors.push("--out-file and --out-dir cannot be used together");
}
if (_commander().relative && !_commander().outDir) {
errors.push("--relative requires --out-dir usage");
}
if (_commander().watch) {

@@ -173,3 +117,2 @@ if (!_commander().outFile && !_commander().outDir) {

}
if (!filenames.length) {

@@ -179,23 +122,17 @@ errors.push("--watch requires filenames");

}
if (_commander().skipInitialBuild && !_commander().watch) {
errors.push("--skip-initial-build requires --watch");
}
if (_commander().deleteDirOnStart && !_commander().outDir) {
errors.push("--delete-dir-on-start requires --out-dir");
}
if (_commander().verbose && _commander().quiet) {
errors.push("--verbose and --quiet cannot be used together");
}
if (!_commander().outDir && filenames.length === 0 && typeof _commander().filename !== "string" && _commander().babelrc !== false) {
errors.push("stdin compilation requires either -f/--filename [filename] or --no-babelrc");
}
if (_commander().keepFileExtension && _commander().outFileExtension) {
errors.push("--out-file-extension cannot be used with --keep-file-extension");
}
if (errors.length) {

@@ -208,5 +145,3 @@ console.error("babel:");

}
const opts = _commander().opts();
const babelOptions = {

@@ -246,3 +181,2 @@ presets: opts.presets,

}
return {

@@ -271,21 +205,15 @@ babelOptions,

}
function booleanify(val) {
if (val === undefined) return undefined;
if (val === "true" || val == 1) {
return true;
}
if (val === "false" || val == 0 || !val) {
return false;
}
return val;
}
function collect(value, previousValue) {
if (typeof value !== "string") return previousValue;
const values = value.split(",");
if (previousValue) {

@@ -295,3 +223,2 @@ previousValue.push(...values);

}
return values;

@@ -298,0 +225,0 @@ }

@@ -17,49 +17,33 @@ "use strict";

exports.withExtension = withExtension;
function _fsReaddirRecursive() {
const data = require("fs-readdir-recursive");
_fsReaddirRecursive = function () {
return data;
};
return data;
}
function babel() {
const data = require("@babel/core");
babel = function () {
return data;
};
return data;
}
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
var watcher = require("./watcher");
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); }); }; }
function chmod(src, dest) {

@@ -72,7 +56,5 @@ try {

}
function readdir(dirname, includeDotfiles, filter) {
return _fsReaddirRecursive()(dirname, (filename, index, currentDirectory) => {
const stat = _fs().statSync(_path().join(currentDirectory, filename));
if (stat.isDirectory()) return true;

@@ -82,3 +64,2 @@ return (includeDotfiles || filename[0] !== ".") && (!filter || filter(filename));

}
function readdirForCompilable(dirname, includeDotfiles, altExts) {

@@ -92,12 +73,8 @@ return readdir(dirname, includeDotfiles, function (filename) {

const exts = altExts || babel().DEFAULT_EXTENSIONS;
const ext = _path().extname(filename);
return exts.includes(ext);
}
function addSourceMappingUrl(code, loc) {
return code + "\n//# sourceMappingURL=" + _path().basename(loc);
}
function hasDataSourcemap(code) {

@@ -107,7 +84,5 @@ const pos = code.lastIndexOf("\n", code.length - 2);

}
const CALLER = {
name: "@babel/cli"
};
function transformRepl(filename, code, opts) {

@@ -124,7 +99,5 @@ opts = Object.assign({}, opts, {

}
function compile(_x, _x2) {
return _compile.apply(this, arguments);
}
function _compile() {

@@ -135,2 +108,3 @@ _compile = _asyncToGenerator(function* (filename, opts) {

});
const result = yield new Promise((resolve, reject) => {

@@ -141,3 +115,2 @@ babel().transformFile(filename, opts, (err, result) => {

});
if (result) {

@@ -149,3 +122,2 @@ {

}
return result;

@@ -155,3 +127,2 @@ });

}
function deleteDir(path) {

@@ -161,3 +132,2 @@ if (_fs().existsSync(path)) {

const curPath = path + "/" + file;
if (_fs().lstatSync(curPath).isDirectory()) {

@@ -169,7 +139,5 @@ deleteDir(curPath);

});
_fs().rmdirSync(path);
}
}
process.on("uncaughtException", function (err) {

@@ -179,3 +147,2 @@ console.error(err);

});
function withExtension(filename, ext = ".js") {

@@ -185,6 +152,4 @@ const newBasename = _path().basename(filename, _path().extname(filename)) + ext;

}
function debounce(fn, time) {
let timer;
function debounced() {

@@ -194,3 +159,2 @@ clearTimeout(timer);

}
debounced.flush = () => {

@@ -200,3 +164,2 @@ clearTimeout(timer);

};
return debounced;

@@ -203,0 +166,0 @@ }

@@ -11,23 +11,16 @@ "use strict";

exports.watch = watch;
function _module() {
const data = require("module");
_module = function () {
return data;
};
return data;
}
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
const fileToDeps = new Map();

@@ -39,3 +32,2 @@ const depToFiles = new Map();

let hasStarted = false;
function enable({

@@ -60,10 +52,7 @@ enableGlobbing

}
function startWatcher() {
hasStarted = true;
for (const dep of watchQueue) {
watcher.add(dep);
}
watchQueue.clear();

@@ -74,3 +63,2 @@ watcher.on("ready", () => {

}
function watch(filename) {

@@ -80,3 +68,2 @@ if (!isWatchMode) {

}
if (!hasStarted) {

@@ -93,14 +80,9 @@ watchQueue.add(_path().resolve(filename));

}
watcher.on("all", (event, filename) => {
var _depToFiles$get;
if (event !== "change" && event !== "add") return;
const absoluteFile = _path().resolve(filename);
callback([absoluteFile, ...((_depToFiles$get = depToFiles.get(absoluteFile)) != null ? _depToFiles$get : [])], event, absoluteFile);
});
}
function updateExternalDependencies(filename, dependencies) {

@@ -110,6 +92,4 @@ if (!isWatchMode) return;

const absFilename = _path().resolve(filename);
const absDependencies = new Set(Array.from(dependencies, dep => _path().resolve(dep)));
const deps = fileToDeps.get(absFilename);
if (deps) {

@@ -122,9 +102,6 @@ for (const dep of deps) {

}
for (const dep of absDependencies) {
let deps = depToFiles.get(dep);
if (!deps) {
depToFiles.set(dep, deps = new Set());
if (!hasStarted) {

@@ -136,16 +113,11 @@ watchQueue.add(dep);

}
deps.add(absFilename);
}
fileToDeps.set(absFilename, absDependencies);
}
function removeFileDependency(filename, dep) {
const deps = depToFiles.get(dep);
deps.delete(filename);
if (deps.size === 0) {
depToFiles.delete(dep);
if (!hasStarted) {

@@ -158,14 +130,10 @@ watchQueue.delete(dep);

}
function unwatchFile(filename) {
const deps = fileToDeps.get(filename);
if (!deps) return;
for (const dep of deps) {
removeFileDependency(filename, dep);
}
fileToDeps.delete(filename);
}
function requireChokidar() {

@@ -172,0 +140,0 @@ try {

6

package.json
{
"name": "@babel/cli",
"version": "7.19.3",
"version": "7.20.7",
"description": "Babel command line.",

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

"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/helper-fixtures": "^7.18.6",
"@babel/core": "^7.20.7",
"@babel/helper-fixtures": "^7.19.4",
"@types/fs-readdir-recursive": "^1.1.0",

@@ -47,0 +47,0 @@ "@types/glob": "^7.2.0",

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc