babel-traverse
Advanced tools
Comparing version 7.0.0-beta.1 to 7.0.0-beta.2
@@ -8,2 +8,8 @@ "use strict"; | ||
var _babelTypes = require("babel-types"); | ||
var t = _interopRequireWildcard(_babelTypes); | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
function shareCommentsWithSiblings() { | ||
@@ -29,23 +35,7 @@ if (typeof this.key === "string") return; | ||
function addComment(type, content, line) { | ||
this.addComments(type, [{ | ||
type: line ? "CommentLine" : "CommentBlock", | ||
value: content | ||
}]); | ||
t.addComment(this.node, type, content, line); | ||
} | ||
function addComments(type, comments) { | ||
if (!comments) return; | ||
var node = this.node; | ||
if (!node) return; | ||
var key = type + "Comments"; | ||
if (node[key]) { | ||
if (type === "leading") { | ||
node[key] = comments.concat(node[key]); | ||
} else { | ||
node[key] = node[key].concat(comments); | ||
} | ||
} else { | ||
node[key] = comments; | ||
} | ||
t.addComments(this.node, type, comments); | ||
} |
{ | ||
"name": "babel-traverse", | ||
"version": "7.0.0-beta.1", | ||
"version": "7.0.0-beta.2", | ||
"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.1", | ||
"babel-helper-function-name": "7.0.0-beta.1", | ||
"babel-messages": "7.0.0-beta.1", | ||
"babel-types": "7.0.0-beta.1", | ||
"babylon": "7.0.0-beta.22", | ||
"babel-code-frame": "7.0.0-beta.2", | ||
"babel-helper-function-name": "7.0.0-beta.2", | ||
"babel-messages": "7.0.0-beta.2", | ||
"babel-types": "7.0.0-beta.2", | ||
"babylon": "7.0.0-beta.25", | ||
"debug": "^3.0.1", | ||
@@ -23,5 +23,5 @@ "globals": "^10.0.0", | ||
"devDependencies": { | ||
"babel-generator": "7.0.0-beta.1", | ||
"babel-helper-plugin-test-runner": "7.0.0-beta.1" | ||
"babel-generator": "7.0.0-beta.2", | ||
"babel-helper-plugin-test-runner": "7.0.0-beta.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153130
4317
+ Addedbabel-code-frame@7.0.0-beta.2(transitive)
+ Addedbabel-helper-function-name@7.0.0-beta.2(transitive)
+ Addedbabel-helper-get-function-arity@7.0.0-beta.2(transitive)
+ Addedbabel-messages@7.0.0-beta.2(transitive)
+ Addedbabel-template@7.0.0-beta.2(transitive)
+ Addedbabel-types@7.0.0-beta.2(transitive)
+ Addedbabylon@7.0.0-beta.25(transitive)
- Removedbabel-code-frame@7.0.0-beta.1(transitive)
- Removedbabel-helper-function-name@7.0.0-beta.1(transitive)
- Removedbabel-helper-get-function-arity@7.0.0-beta.1(transitive)
- Removedbabel-messages@7.0.0-beta.1(transitive)
- Removedbabel-template@7.0.0-beta.1(transitive)
- Removedbabel-types@7.0.0-beta.1(transitive)
- Removedbabylon@7.0.0-beta.22(transitive)
Updatedbabel-messages@7.0.0-beta.2
Updatedbabel-types@7.0.0-beta.2
Updatedbabylon@7.0.0-beta.25