@babel/traverse 7.1.5 → 7.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @babel/traverse might be problematic. Click here for more details.

@@ -104,7 +104,9 @@ function insertAfter(nodes) {
104
104
  } = this;
105
105
 
106
106
  if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
107
- return parentPath.insertAfter(nodes);
107
+ return parentPath.insertAfter(nodes.map(node => {
108
+ return t().isExpression(node) ? t().expressionStatement(node) : node;
109
+ }));
108
110
  } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
109
111
  if (this.node) {
110
112
  let {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/traverse",
3
- "version": "7.1.5",
3
+ "version": "7.1.6",
4
4
  "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
5
5
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
6
6
  "homepage": "https://babeljs.io/",
@@ -12,12 +12,12 @@
12
12
  "main": "lib/index.js",
13
13
  "dependencies": {
14
14
  "@babel/code-frame": "^7.0.0",
15
- "@babel/generator": "^7.1.5",
15
+ "@babel/generator": "^7.1.6",
16
16
  "@babel/helper-function-name": "^7.1.0",
17
17
  "@babel/helper-split-export-declaration": "^7.0.0",
18
- "@babel/parser": "^7.1.5",
19
- "@babel/types": "^7.1.5",
20
- "debug": "^3.1.0",
18
+ "@babel/parser": "^7.1.6",
19
+ "@babel/types": "^7.1.6",
20
+ "debug": "^4.1.0",
21
21
  "globals": "^11.1.0",
22
22
  "lodash": "^4.17.10"
23
23
  },