@babel/traverse 7.0.0-beta.52 → 7.0.0-beta.56

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.

Files changed (2) hide show
  1. package/lib/path/index.js +4 -11
  2. package/package.json +9 -10
package/lib/path/index.js CHANGED
@@ -17,16 +17,6 @@ function _debug() {
17
17
  return data;
18
18
  }
19
19
 
20
- function _invariant() {
21
- const data = _interopRequireDefault(require("invariant"));
22
-
23
- _invariant = function () {
24
- return data;
25
- };
26
-
27
- return data;
28
- }
29
-
30
20
  var _index = _interopRequireDefault(require("../index"));
31
21
 
32
22
  var _scope = _interopRequireDefault(require("../scope"));
@@ -118,7 +108,10 @@ class NodePath {
118
108
  hub = parentPath.hub;
119
109
  }
120
110
 
121
- (0, _invariant().default)(parent, "To get a node path the parent needs to exist");
111
+ if (!parent) {
112
+ throw new Error("To get a node path the parent needs to exist");
113
+ }
114
+
122
115
  const targetNode = container[key];
123
116
  const paths = _cache.path.get(parent) || [];
124
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/traverse",
3
- "version": "7.0.0-beta.52",
3
+ "version": "7.0.0-beta.56",
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/",
@@ -8,18 +8,17 @@
8
8
  "repository": "https://github.com/babel/babel/tree/master/packages/babel-traverse",
9
9
  "main": "lib/index.js",
10
10
  "dependencies": {
11
- "@babel/code-frame": "7.0.0-beta.52",
12
- "@babel/generator": "7.0.0-beta.52",
13
- "@babel/helper-function-name": "7.0.0-beta.52",
14
- "@babel/helper-split-export-declaration": "7.0.0-beta.52",
15
- "@babel/parser": "7.0.0-beta.52",
16
- "@babel/types": "7.0.0-beta.52",
11
+ "@babel/code-frame": "7.0.0-beta.56",
12
+ "@babel/generator": "7.0.0-beta.56",
13
+ "@babel/helper-function-name": "7.0.0-beta.56",
14
+ "@babel/helper-split-export-declaration": "7.0.0-beta.56",
15
+ "@babel/parser": "7.0.0-beta.56",
16
+ "@babel/types": "7.0.0-beta.56",
17
17
  "debug": "^3.1.0",
18
18
  "globals": "^11.1.0",
19
- "invariant": "^2.2.0",
20
- "lodash": "^4.17.5"
19
+ "lodash": "^4.17.10"
21
20
  },
22
21
  "devDependencies": {
23
- "@babel/helper-plugin-test-runner": "7.0.0-beta.52"
22
+ "@babel/helper-plugin-test-runner": "7.0.0-beta.56"
24
23
  }
25
24
  }