Socket
Socket
Sign inDemoInstall

@babel/traverse

Package Overview
Dependencies
27
Maintainers
6
Versions
172
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-beta.39 to 7.0.0-beta.40

4

lib/context.js

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

function TraversalContext(scope, opts, state, parentPath) {
this.parentPath = void 0;
this.scope = void 0;
this.state = void 0;
this.opts = void 0;
this.queue = null;

@@ -24,0 +20,0 @@ this.parentPath = parentPath;

18

lib/path/conversion.js

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

allSuperCalls.forEach(function (superCall) {
return superCall.get("callee").replaceWith(t.identifier(superBinding));
var callee = t.identifier(superBinding);
callee.loc = superCall.node.callee.loc;
superCall.get("callee").replaceWith(callee);
});

@@ -184,3 +186,5 @@ }

thisPaths.forEach(function (thisChild) {
thisChild.replaceWith(thisChild.isJSX() ? t.jsxIdentifier(thisBinding) : t.identifier(thisBinding));
var thisRef = thisChild.isJSX() ? t.jsxIdentifier(thisBinding) : t.identifier(thisBinding);
thisRef.loc = thisChild.node.loc;
thisChild.replaceWith(thisRef);
});

@@ -196,3 +200,5 @@ if (specCompliant) thisBinding = null;

argumentsPaths.forEach(function (argumentsChild) {
argumentsChild.replaceWith(t.identifier(argumentsBinding));
var argsRef = t.identifier(argumentsBinding);
argsRef.loc = argumentsChild.node.loc;
argumentsChild.replaceWith(argsRef);
});

@@ -205,4 +211,6 @@ }

});
newTargetPaths.forEach(function (argumentsChild) {
argumentsChild.replaceWith(t.identifier(newTargetBinding));
newTargetPaths.forEach(function (targetChild) {
var targetRef = t.identifier(newTargetBinding);
targetRef.loc = targetChild.node.loc;
targetChild.replaceWith(targetRef);
});

@@ -209,0 +217,0 @@ }

@@ -52,23 +52,2 @@ "use strict";

function NodePath(hub, parent) {
this.parent = void 0;
this.hub = void 0;
this.contexts = void 0;
this.data = void 0;
this.shouldSkip = void 0;
this.shouldStop = void 0;
this.removed = void 0;
this.state = void 0;
this.opts = void 0;
this.skipKeys = void 0;
this.parentPath = void 0;
this.context = void 0;
this.container = void 0;
this.listKey = void 0;
this.inList = void 0;
this.parentKey = void 0;
this.key = void 0;
this.node = void 0;
this.scope = void 0;
this.type = void 0;
this.typeAnnotation = void 0;
this.parent = parent;

@@ -75,0 +54,0 @@ this.hub = hub;

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

exports.remove = remove;
exports._removeFromScope = _removeFromScope;
exports._callRemovalHooks = _callRemovalHooks;

@@ -18,2 +19,4 @@ exports._remove = _remove;

this._removeFromScope();
if (this._callRemovalHooks()) {

@@ -32,2 +35,11 @@ this._markRemoved();

function _removeFromScope() {
var _this = this;
var bindings = this.getBindingIdentifiers();
Object.keys(bindings).forEach(function (name) {
return _this.scope.removeBinding(name);
});
}
function _callRemovalHooks() {

@@ -34,0 +46,0 @@ var _arr = _removalHooks.hooks;

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

if (loc) {
err.loc = null;
err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {

@@ -89,2 +88,3 @@ start: {

});
err.code = "BABEL_REPLACE_SOURCE_ERROR";
}

@@ -91,0 +91,0 @@

@@ -12,10 +12,2 @@ "use strict";

kind = _ref.kind;
this.constantViolations = void 0;
this.constant = void 0;
this.referencePaths = void 0;
this.referenced = void 0;
this.references = void 0;
this.hasDeoptedValue = void 0;
this.hasValue = void 0;
this.value = void 0;
this.identifier = identifier;

@@ -22,0 +14,0 @@ this.scope = scope;

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

function Renamer(binding, oldName, newName) {
this.oldName = void 0;
this.newName = void 0;
this.binding = void 0;
this.newName = newName;

@@ -43,0 +40,0 @@ this.oldName = oldName;

{
"name": "@babel/traverse",
"version": "7.0.0-beta.39",
"version": "7.0.0-beta.40",
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",

@@ -11,7 +11,7 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

"dependencies": {
"@babel/code-frame": "7.0.0-beta.39",
"@babel/generator": "7.0.0-beta.39",
"@babel/helper-function-name": "7.0.0-beta.39",
"@babel/types": "7.0.0-beta.39",
"babylon": "7.0.0-beta.39",
"@babel/code-frame": "7.0.0-beta.40",
"@babel/generator": "7.0.0-beta.40",
"@babel/helper-function-name": "7.0.0-beta.40",
"@babel/types": "7.0.0-beta.40",
"babylon": "7.0.0-beta.40",
"debug": "^3.0.1",

@@ -23,4 +23,4 @@ "globals": "^11.1.0",

"devDependencies": {
"@babel/helper-plugin-test-runner": "7.0.0-beta.39"
"@babel/helper-plugin-test-runner": "7.0.0-beta.40"
}
}
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