Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-runtime

Package Overview
Dependencies
82
Maintainers
4
Versions
131
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.23.4 to 7.23.6

20

lib/index.js

@@ -14,5 +14,2 @@ "use strict";

var _index2 = require("./babel-7/index.cjs");
function supportsStaticESM(caller) {
return !!(caller != null && caller.supportsStaticESM);
}
var _default = exports.default = (0, _helperPluginUtils.declare)((api, options, dirname) => {

@@ -23,3 +20,2 @@ var _options$corejs;

helpers: useRuntimeHelpers = true,
useESModules = false,
version: runtimeVersion = "7.0.0-beta.0",

@@ -31,5 +27,2 @@ absoluteRuntime = false

}
if (typeof useESModules !== "boolean" && useESModules !== "auto") {
throw new Error("The 'useESModules' option must be undefined, or a boolean, or 'auto'.");
}
if (typeof absoluteRuntime !== "boolean" && typeof absoluteRuntime !== "string") {

@@ -66,3 +59,11 @@ throw new Error("The 'absoluteRuntime' option must be undefined, a boolean, or a string.");

;
const esModules = useESModules === "auto" ? api.caller(supportsStaticESM) : useESModules;
{
const {
useESModules = false
} = options;
if (typeof useESModules !== "boolean" && useESModules !== "auto") {
throw new Error("The 'useESModules' option must be undefined, or a boolean, or 'auto'.");
}
var esModules = useESModules === "auto" ? api.caller(caller => !!(caller != null && caller.supportsStaticESM)) : useESModules;
}
const HEADER_HELPERS = ["interopRequireWildcard", "interopRequireDefault"];

@@ -88,4 +89,3 @@ return {

const blockHoist = isInteropHelper && !(0, _helperModuleImports.isModule)(file.path) ? 4 : undefined;
const helpersDir = esModules && file.path.node.sourceType === "module" ? "helpers/esm" : "helpers";
let helperPath = `${modulePath}/${helpersDir}/${name}`;
let helperPath = `${modulePath}/helpers/${esModules && file.path.node.sourceType === "module" ? "esm/" + name : name}`;
if (absoluteRuntime) helperPath = (0, _index.resolveFSPath)(helperPath);

@@ -92,0 +92,0 @@ return addDefaultImport(helperPath, name, blockHoist, true);

{
"name": "@babel/plugin-transform-runtime",
"version": "7.23.4",
"version": "7.23.6",
"description": "Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals",

@@ -34,8 +34,8 @@ "repository": {

"devDependencies": {
"@babel/core": "^7.23.3",
"@babel/core": "^7.23.6",
"@babel/helper-plugin-test-runner": "^7.22.5",
"@babel/helpers": "^7.23.4",
"@babel/preset-env": "^7.23.3",
"@babel/runtime": "^7.23.4",
"@babel/runtime-corejs3": "^7.23.4",
"@babel/helpers": "^7.23.6",
"@babel/preset-env": "^7.23.6",
"@babel/runtime": "^7.23.6",
"@babel/runtime-corejs3": "^7.23.6",
"make-dir": "^2.1.0"

@@ -42,0 +42,0 @@ },

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