You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@babel/register

Package Overview
Dependencies
Maintainers
4
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/register - npm Package Compare versions

Comparing version
8.0.0-beta.3
to
8.0.0-beta.4
+0
-1
lib/hook.cjs

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

}
;
function compile(client, inputCode, filename) {

@@ -28,0 +27,0 @@ const result = client.transform(inputCode, filename);

+1
-3
"use strict";
{
module.exports = require("./experimental-worker.cjs");
}
module.exports = require("./experimental-worker.cjs");
//# sourceMappingURL=index.cjs.map

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

const envVarValue = "yes_I_am";
const markInRegisterWorker = env => Object.assign({}, env, {
const markInRegisterWorker = env => ({
...env,
[envVarName]: envVarValue

@@ -8,0 +9,0 @@ });

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

function register(opts = {}) {
return hook.register(client, Object.assign({}, opts));
return hook.register(client, {
...opts
});
}

@@ -12,0 +14,0 @@ module.exports = Object.assign(register, {

@@ -58,4 +58,3 @@ "use strict";

};
;
//# sourceMappingURL=worker-client.cjs.map

@@ -11,9 +11,6 @@ "use strict";

exports.getEnv = babel.getEnv;
;
cache.initializeCacheFilename();
}
{
exports.init = import("@babel/core").then(initialize);
}
exports.init = import("@babel/core").then(initialize);
//# sourceMappingURL=babel-core.cjs.map

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

case "TRANSFORM_SYNC":
;
}

@@ -18,0 +17,0 @@ throw new Error(`Unknown internal parser worker action: ${action}`);

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

error,
errorData: Object.assign({}, error)
errorData: {
...error
}
};

@@ -24,0 +26,0 @@ }

@@ -24,7 +24,9 @@ "use strict";

delete opts.extensions;
transformOpts = Object.assign({}, opts, {
caller: Object.assign({
name: "@babel/register"
}, opts.caller || {})
});
transformOpts = {
...opts,
caller: {
name: "@babel/register",
...(opts.caller || {})
}
};
let {

@@ -41,7 +43,7 @@ cwd = "."

async function transform(input, filename) {
const opts = await babel.loadOptionsAsync(Object.assign({
sourceRoot: path.dirname(filename) + path.sep
}, cloneDeep(transformOpts), {
const opts = await babel.loadOptionsAsync({
sourceRoot: path.dirname(filename) + path.sep,
...cloneDeep(transformOpts),
filename
}));
});
if (opts === null) return null;

@@ -56,6 +58,7 @@ const {

map
} = await babel.transformAsync(input, Object.assign({}, opts, {
} = await babel.transformAsync(input, {
...opts,
sourceMaps: opts.sourceMaps === undefined ? "both" : opts.sourceMaps,
ast: false
}));
});
return store({

@@ -70,3 +73,2 @@ code,

};
;
const id = value => value;

@@ -83,3 +85,3 @@ function cacheLookup(opts, filename) {

const fileMtime = +fs.statSync(filename).mtime;
if (cached && cached.mtime === fileMtime) {
if (cached?.mtime === fileMtime) {
return {

@@ -86,0 +88,0 @@ cached: cached.value,

{
"name": "@babel/register",
"version": "8.0.0-beta.3",
"version": "8.0.0-beta.4",
"description": "babel require hook",

@@ -24,8 +24,8 @@ "license": "MIT",

"peerDependencies": {
"@babel/core": "^8.0.0-beta.3"
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^8.0.0-beta.3",
"@babel/plugin-transform-arrow-functions": "^8.0.0-beta.3",
"@babel/plugin-transform-modules-commonjs": "^8.0.0-beta.3",
"@babel/core": "^8.0.0-beta.4",
"@babel/plugin-transform-arrow-functions": "^8.0.0-beta.4",
"@babel/plugin-transform-modules-commonjs": "^8.0.0-beta.4",
"browserify": "^16.5.2"

@@ -44,3 +44,6 @@ },

"./package.json": "./package.json"
},
"browser": {
"./lib/index.cjs": "./lib/browser.cjs"
}
}

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