@babel/traverse 7.0.0-beta.51 → 7.0.0-beta.55

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.

package/README.md CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
  > The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes
4
4
 
5
- See our website [@babel/traverse](https://new.babeljs.io/docs/en/next/babel-traverse.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package.
5
+ See our website [@babel/traverse](https://babeljs.io/docs/en/next/babel-traverse.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package.
6
6
 
7
7
  ## Install
8
8
 
9
9
  Using npm:
10
10
 
11
11
  ```sh
12
- npm install --save @babel/traverse
12
+ npm install --save-dev @babel/traverse
13
13
  ```
14
14
 
15
15
  or using yarn:
16
16
 
17
17
  ```sh
18
- yarn add --save @babel/traverse
18
+ yarn add @babel/traverse --dev
19
19
  ```
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.51",
3
+ "version": "7.0.0-beta.55",
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.51",
12
- "@babel/generator": "7.0.0-beta.51",
13
- "@babel/helper-function-name": "7.0.0-beta.51",
14
- "@babel/helper-split-export-declaration": "7.0.0-beta.51",
15
- "@babel/parser": "7.0.0-beta.51",
16
- "@babel/types": "7.0.0-beta.51",
11
+ "@babel/code-frame": "7.0.0-beta.55",
12
+ "@babel/generator": "7.0.0-beta.55",
13
+ "@babel/helper-function-name": "7.0.0-beta.55",
14
+ "@babel/helper-split-export-declaration": "7.0.0-beta.55",
15
+ "@babel/parser": "7.0.0-beta.55",
16
+ "@babel/types": "7.0.0-beta.55",
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.51"
22
+ "@babel/helper-plugin-test-runner": "7.0.0-beta.55"
24
23
  }
25
24
  }