Socket
Socket
Sign inDemoInstall

@babel/traverse

Package Overview
Dependencies
Maintainers
6
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/traverse - npm Package Compare versions

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

2

lib/path/context.js

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

if (ret && typeof ret === "object" && typeof ret.then === "function") {
throw new Error("You appear to be using an plugin with an async traversay visitors, " + "which your current version of Babel does not support." + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version.");
throw new Error("You appear to be using a plugin with an async traversal visitor, " + "which your current version of Babel does not support." + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version.");
}

@@ -70,0 +70,0 @@

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

this.path.replaceWith(uid);
this.path.replaceWith(t.cloneNode(uid));
};

@@ -179,0 +179,0 @@

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

var temp = this.scope.generateDeclaredUidIdentifier();
nodes.unshift(t.expressionStatement(t.assignmentExpression("=", temp, this.node)));
nodes.push(t.expressionStatement(temp));
nodes.unshift(t.expressionStatement(t.assignmentExpression("=", t.cloneNode(temp), this.node)));
nodes.push(t.expressionStatement(t.cloneNode(temp)));
}

@@ -118,0 +118,0 @@

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

_callee.get("body").pushContainer("body", t.returnStatement(uid));
_callee.get("body").pushContainer("body", t.returnStatement(t.cloneNode(uid)));

@@ -224,3 +224,3 @@ loop.setData("expressionReplacementReturnUid", uid);

_path.get("expression").replaceWith(t.assignmentExpression("=", uid, _path.node.expression));
_path.get("expression").replaceWith(t.assignmentExpression("=", t.cloneNode(uid), _path.node.expression));
} else {

@@ -227,0 +227,0 @@ _path.replaceWith(t.returnStatement(_path.node.expression));

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

});
return id;
return t.cloneNode(id);
};

@@ -240,3 +240,3 @@

_proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) {
_proto.generateUidBasedOnNode = function generateUidBasedOnNode(parent, defaultName) {
var node = parent;

@@ -256,5 +256,9 @@

id = id.replace(/^_/, "") || defaultName || "ref";
return this.generateUidIdentifier(id.slice(0, 20));
return this.generateUid(id.slice(0, 20));
};
_proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) {
return t.identifier(this.generateUidBasedOnNode(parent, defaultName));
};
_proto.isStatic = function isStatic(node) {

@@ -284,5 +288,9 @@ if (t.isThisExpression(node) || t.isSuper(node)) {

if (!dontPush) this.push({
id: _id2
});
if (!dontPush) {
this.push({
id: _id2
});
return t.cloneNode(_id2);
}
return _id2;

@@ -289,0 +297,0 @@ }

{
"name": "@babel/traverse",
"version": "7.0.0-beta.38",
"version": "7.0.0-beta.39",
"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.38",
"@babel/generator": "7.0.0-beta.38",
"@babel/helper-function-name": "7.0.0-beta.38",
"@babel/types": "7.0.0-beta.38",
"babylon": "7.0.0-beta.38",
"@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",
"debug": "^3.0.1",

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

"devDependencies": {
"@babel/helper-plugin-test-runner": "7.0.0-beta.38"
"@babel/helper-plugin-test-runner": "7.0.0-beta.39"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc