Socket
Socket
Sign inDemoInstall

babel-traverse

Package Overview
Dependencies
23
Maintainers
5
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-alpha.17 to 7.0.0-alpha.18

4

lib/path/ancestry.js

@@ -48,4 +48,4 @@ "use strict";

function getFunctionParent() {
return this.findParent(function (path) {
return path.isFunction() || path.isProgram();
return this.findParent(function (p) {
return p.isFunction();
});

@@ -52,0 +52,0 @@ }

@@ -158,4 +158,4 @@ "use strict";

function _guessExecutionStatusRelativeTo(target) {
var targetFuncParent = target.scope.getFunctionParent();
var selfFuncParent = this.scope.getFunctionParent();
var targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent();
var selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent();

@@ -162,0 +162,0 @@ if (targetFuncParent.node !== selfFuncParent.node) {

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

if (declar.isVar()) {
path.scope.getFunctionParent().registerBinding("var", declar);
var parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
parentScope.registerBinding("var", declar);
}

@@ -134,3 +135,4 @@ }

path.scope.getFunctionParent().registerDeclaration(path);
var parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
parent.registerDeclaration(path);
},

@@ -816,3 +818,3 @@ ReferencedIdentifier: function ReferencedIdentifier(path, state) {

if (path.isSwitchStatement()) {
path = this.getFunctionParent().path;
path = (this.getFunctionParent() || this.getProgramParent()).path;
}

@@ -855,3 +857,3 @@

throw new Error("We couldn't find a Function or Program...");
throw new Error("Couldn't find a Program");
};

@@ -868,3 +870,3 @@

throw new Error("We couldn't find a Function or Program...");
return null;
};

@@ -871,0 +873,0 @@

{
"name": "babel-traverse",
"version": "7.0.0-alpha.17",
"version": "7.0.0-alpha.18",
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",

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

"dependencies": {
"babel-code-frame": "7.0.0-alpha.17",
"babel-helper-function-name": "7.0.0-alpha.17",
"babel-messages": "7.0.0-alpha.17",
"babel-types": "7.0.0-alpha.17",
"babel-code-frame": "7.0.0-alpha.18",
"babel-helper-function-name": "7.0.0-alpha.18",
"babel-messages": "7.0.0-alpha.18",
"babel-types": "7.0.0-alpha.18",
"babylon": "7.0.0-beta.18",

@@ -23,5 +23,5 @@ "debug": "^2.2.0",

"devDependencies": {
"babel-generator": "7.0.0-alpha.17",
"babel-helper-plugin-test-runner": "7.0.0-alpha.17"
"babel-generator": "7.0.0-alpha.18",
"babel-helper-plugin-test-runner": "7.0.0-alpha.18"
}
}
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