Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/helper-fixtures

Package Overview
Dependencies
Maintainers
6
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-fixtures - npm Package Compare versions

Comparing version 7.12.10 to 7.12.12

46

lib/index.js

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

});
exports.resolveOptionPluginOrPreset = resolveOptionPluginOrPreset;
exports.default = get;

@@ -230,2 +231,42 @@ exports.multiple = multiple;

function wrapPackagesArray(type, names, optionsDir) {
return names.map(function (val) {
if (typeof val === "string") val = [val];
if (val[0][0] === ".") {
if (!optionsDir) {
throw new Error("Please provide an options.json in test dir when using a " + "relative plugin path.");
}
val[0] = _path.default.resolve(optionsDir, val[0]);
} else {
const monorepoPath = __dirname + "/../../babel-" + type + "-" + val[0];
if (_fs.default.existsSync(monorepoPath)) {
val[0] = monorepoPath;
}
}
return val;
});
}
function resolveOptionPluginOrPreset(options, optionsDir) {
if (options.plugins) {
options.plugins = wrapPackagesArray("plugin", options.plugins, optionsDir);
}
if (options.presets) {
options.presets = wrapPackagesArray("preset", options.presets, optionsDir).map(function (val) {
if (val.length > 3) {
throw new Error("Unexpected extra options " + JSON.stringify(val.slice(3)) + " passed to preset.");
}
return val;
});
}
return options;
}
function get(entryLoc) {

@@ -248,4 +289,7 @@ const suites = [];

const suiteOptsLoc = tryResolve(suite.filename + "/options");
if (suiteOptsLoc) suite.options = require(suiteOptsLoc);
if (suiteOptsLoc) {
suite.options = resolveOptionPluginOrPreset(require(suiteOptsLoc), suite.filename);
}
for (const taskName of _fs.default.readdirSync(suite.filename)) {

@@ -252,0 +296,0 @@ pushTask(taskName, suite.filename + "/" + taskName, suite, suiteName);

2

package.json
{
"name": "@babel/helper-fixtures",
"version": "7.12.10",
"version": "7.12.12",
"description": "Helper function to support fixtures",

@@ -5,0 +5,0 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

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