Socket
Socket
Sign inDemoInstall

babel-core

Package Overview
Dependencies
77
Maintainers
5
Versions
257
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-alpha.20 to 7.0.0-beta.0

12

lib/config/loading/files/plugins.js

@@ -27,8 +27,8 @@ "use strict";

var EXACT_RE = /^module:/;
var BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/\/]+[/\/]|babel-plugin-)/;
var BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/\/]+[/\/]|babel-preset-)/;
var BABEL_PLUGIN_ORG_RE = /^(@babel[/\/])(?!plugin-|[^/\/]+[/\/])/;
var BABEL_PRESET_ORG_RE = /^(@babel[/\/])(?!preset-|[^/\/]+[/\/])/;
var OTHER_PLUGIN_ORG_RE = /^(@(?!babel[/\/])[^/\/]+[/\/])(?!babel-plugin-|[^/\/]+[/\/])/;
var OTHER_PRESET_ORG_RE = /^(@(?!babel[/\/])[^/\/]+[/\/])(?!babel-preset-|[^/\/]+[/\/])/;
var BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/;
var BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/;
var BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/;
var BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/;
var OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-plugin-|[^/]+\/)/;
var OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-preset-|[^/]+\/)/;

@@ -35,0 +35,0 @@ function resolvePlugin(name, dirname) {

@@ -55,3 +55,3 @@ "use strict";

var optionNames = new Set(["filename", "filenameRelative", "inputSourceMap", "env", "mode", "retainLines", "highlightCode", "suppressDeprecationMessages", "presets", "plugins", "ignore", "only", "code", "metadata", "ast", "extends", "comments", "shouldPrintComment", "wrapPluginVisitorMethod", "compact", "minified", "sourceMaps", "sourceMapTarget", "sourceFileName", "sourceRoot", "babelrc", "sourceType", "auxiliaryCommentBefore", "auxiliaryCommentAfter", "resolveModuleSource", "getModuleId", "moduleRoot", "moduleIds", "moduleId", "passPerPreset", "parserOpts", "generatorOpts"]);
var optionNames = new Set(["relative", "filename", "filenameRelative", "inputSourceMap", "env", "mode", "retainLines", "highlightCode", "suppressDeprecationMessages", "presets", "plugins", "ignore", "only", "code", "metadata", "ast", "extends", "comments", "shouldPrintComment", "wrapPluginVisitorMethod", "compact", "minified", "sourceMaps", "sourceMapTarget", "sourceFileName", "sourceRoot", "babelrc", "sourceType", "auxiliaryCommentBefore", "auxiliaryCommentAfter", "resolveModuleSource", "getModuleId", "moduleRoot", "moduleIds", "moduleId", "passPerPreset", "parserOpts", "generatorOpts"]);
var ALLOWED_PLUGIN_KEYS = new Set(["name", "manipulateOptions", "pre", "post", "visitor", "inherits"]);

@@ -58,0 +58,0 @@

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

global: buildGlobal,
module: buildModule,
umd: buildUmd,

@@ -57,2 +58,3 @@ var: buildVar

var keywordHelpers = ["typeof", "extends", "instanceof"];
var buildUmdWrapper = (0, _babelTemplate2.default)("\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n");

@@ -69,2 +71,17 @@

function buildModule(namespace, builder) {
var body = [];
builder(body);
var module = body.map(function (helper) {
var originalIdentifier = helper.expression.left.property.name;
var isKeywordHelper = keywordHelpers.indexOf(originalIdentifier) !== -1;
var helperIndentifier = isKeywordHelper ? "_" + originalIdentifier : originalIdentifier;
var variableDeclaration = t.variableDeclaration("var", [t.variableDeclarator(t.identifier(helperIndentifier), helper.expression.right)]);
return isKeywordHelper ? variableDeclaration : t.exportNamedDeclaration(variableDeclaration, []);
}).concat(t.exportNamedDeclaration(null, keywordHelpers.map(function (keywordHelper) {
return t.exportSpecifier(t.identifier("_" + keywordHelper), t.identifier(keywordHelper));
})));
return t.program(module);
}
function buildUmd(namespace, builder) {

@@ -71,0 +88,0 @@ var body = [];

{
"name": "babel-core",
"version": "7.0.0-alpha.20",
"version": "7.0.0-beta.0",
"description": "Babel compiler core.",

@@ -28,12 +28,12 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"dependencies": {
"babel-code-frame": "7.0.0-alpha.20",
"babel-generator": "7.0.0-alpha.20",
"babel-helpers": "7.0.0-alpha.20",
"babel-messages": "7.0.0-alpha.20",
"babel-template": "7.0.0-alpha.20",
"babel-traverse": "7.0.0-alpha.20",
"babel-types": "7.0.0-alpha.20",
"babel-code-frame": "7.0.0-beta.0",
"babel-generator": "7.0.0-beta.0",
"babel-helpers": "7.0.0-beta.0",
"babel-messages": "7.0.0-beta.0",
"babel-template": "7.0.0-beta.0",
"babel-traverse": "7.0.0-beta.0",
"babel-types": "7.0.0-beta.0",
"babylon": "7.0.0-beta.22",
"convert-source-map": "^1.1.0",
"debug": "^2.1.1",
"debug": "^3.0.1",
"json5": "^0.5.0",

@@ -46,5 +46,5 @@ "lodash": "^4.2.0",

"devDependencies": {
"babel-helper-transform-fixture-test-runner": "7.0.0-alpha.20",
"babel-register": "7.0.0-alpha.20"
"babel-helper-transform-fixture-test-runner": "7.0.0-beta.0",
"babel-register": "7.0.0-beta.0"
}
}
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