Socket
Socket
Sign inDemoInstall

@babel/core

Package Overview
Dependencies
58
Maintainers
4
Versions
182
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0-alpha.7 to 8.0.0-alpha.8

16

lib/config/files/module-types.js

@@ -12,6 +12,3 @@ import { isAsync, waitFor } from "../../gensync-utils/async.js";

const require = createRequire(import.meta.url);
let import_;
try {
import_ = require("./import.cjs");
} catch {}
;
export const supportsESM = semver.satisfies(process.versions.node, "^12.17 || >=13.2");

@@ -104,9 +101,8 @@ export default function* loadCodeDefault(filepath, asyncError) {

}
async function loadMjsDefault(filepath) {
if (!import_) {
throw new ConfigError("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath);
const loadMjsDefault = endHiddenCallStack(async function loadMjsDefault(filepath) {
const url = pathToFileURL(filepath).toString();
{
return (await import(url)).default;
}
const module = await endHiddenCallStack(import_)(pathToFileURL(filepath));
return module.default;
}
});
function getTSPreset(filepath) {

@@ -113,0 +109,0 @@ try {

@@ -53,3 +53,3 @@ import semver from "semver";

}
if (semver.satisfies(coreVersion, range)) return;
if (range === "*" || semver.satisfies(coreVersion, range)) return;
const limit = Error.stackTraceLimit;

@@ -56,0 +56,0 @@ if (typeof limit === "number" && limit < 25) {

;
export const version = "8.0.0-alpha.7";
export const version = "8.0.0-alpha.8";
export { default as File } from "./transformation/file/file.js";

@@ -4,0 +4,0 @@ export { default as buildExternalHelpers } from "./tools/build-external-helpers.js";

@@ -11,22 +11,29 @@ import traverse from "@babel/traverse";

}) {
const {
body
} = node;
let max = 2 ** 30 - 1;
let hasChange = false;
for (let i = 0; i < body.length; i++) {
const n = body[i];
const p = priority(n);
if (p > max) {
hasChange = true;
break;
}
max = p;
}
if (!hasChange) return;
node.body = stableSort(body.slice());
node.body = performHoisting(node.body);
}
},
SwitchCase: {
exit({
node
}) {
node.consequent = performHoisting(node.consequent);
}
}
}
};
function performHoisting(body) {
let max = 2 ** 30 - 1;
let hasChange = false;
for (let i = 0; i < body.length; i++) {
const n = body[i];
const p = priority(n);
if (p > max) {
hasChange = true;
break;
}
max = p;
}
if (!hasChange) return body;
return stableSort(body.slice());
}
export default function loadBlockHoistPlugin() {

@@ -33,0 +40,0 @@ if (!LOADED_PLUGIN) {

{
"name": "@babel/core",
"version": "8.0.0-alpha.7",
"version": "8.0.0-alpha.8",
"description": "Babel compiler core.",

@@ -50,11 +50,11 @@ "main": "./lib/index.js",

"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^8.0.0-alpha.7",
"@babel/generator": "^8.0.0-alpha.7",
"@babel/helper-compilation-targets": "^8.0.0-alpha.7",
"@babel/helper-module-transforms": "^8.0.0-alpha.7",
"@babel/helpers": "^8.0.0-alpha.7",
"@babel/parser": "^8.0.0-alpha.7",
"@babel/template": "^8.0.0-alpha.7",
"@babel/traverse": "^8.0.0-alpha.7",
"@babel/types": "^8.0.0-alpha.7",
"@babel/code-frame": "^8.0.0-alpha.8",
"@babel/generator": "^8.0.0-alpha.8",
"@babel/helper-compilation-targets": "^8.0.0-alpha.8",
"@babel/helper-module-transforms": "^8.0.0-alpha.8",
"@babel/helpers": "^8.0.0-alpha.8",
"@babel/parser": "^8.0.0-alpha.8",
"@babel/template": "^8.0.0-alpha.8",
"@babel/traverse": "^8.0.0-alpha.8",
"@babel/types": "^8.0.0-alpha.8",
"convert-source-map": "^2.0.0",

@@ -67,9 +67,9 @@ "debug": "^4.1.0",

"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "^8.0.0-alpha.7",
"@babel/plugin-syntax-flow": "^8.0.0-alpha.7",
"@babel/plugin-transform-flow-strip-types": "^8.0.0-alpha.7",
"@babel/plugin-transform-modules-commonjs": "^8.0.0-alpha.7",
"@babel/preset-env": "^8.0.0-alpha.7",
"@babel/preset-typescript": "^8.0.0-alpha.7",
"@jridgewell/trace-mapping": "^0.3.17",
"@babel/helper-transform-fixture-test-runner": "^8.0.0-alpha.8",
"@babel/plugin-syntax-flow": "^8.0.0-alpha.8",
"@babel/plugin-transform-flow-strip-types": "^8.0.0-alpha.8",
"@babel/plugin-transform-modules-commonjs": "^8.0.0-alpha.8",
"@babel/preset-env": "^8.0.0-alpha.8",
"@babel/preset-typescript": "^8.0.0-alpha.8",
"@jridgewell/trace-mapping": "^0.3.25",
"@types/convert-source-map": "^2.0.0",

@@ -76,0 +76,0 @@ "@types/debug": "^4.1.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

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

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

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

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

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

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc