Run of fresh-snapshots for node-estree-walker

Try this locally (using silver-platter):

debian-svp new-upstream --snapshot node-estree-walker 

Merge these changes:

Summary

Merged new upstream version: 0.6.1+git20190527.8ee5d23 (was: 0.6.0).

Diff

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0642058..06b21e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # changelog
 
+## 0.6.1
+
+* Only traverse nodes that exist and have a type ([#9](https://github.com/Rich-Harris/estree-walker/pull/9))
+* Only cache keys for nodes with a type ([#8](https://github.com/Rich-Harris/estree-walker/pull/8))
+
 ## 0.6.0
 
 * Fix walker context type
diff --git a/README.md b/README.md
index 63e701e..94dd400 100644
--- a/README.md
+++ b/README.md
@@ -16,13 +16,13 @@ npm i estree-walker
 var walk = require( 'estree-walker' ).walk;
 var acorn = require( 'acorn' );
 
-ast = acorn.parse( sourceCode, options ); // https://github.com/marijnh/acorn
+ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn
 
 walk( ast, {
-  enter: function ( node, parent ) {
+  enter: function ( node, parent, prop, index ) {
     // some code happens
   },
-  leave: function ( node, parent ) {
+  leave: function ( node, parent, prop, index ) {
   	// some code happens
   }
 });
@@ -42,4 +42,4 @@ None of which should be taken as criticism of estraverse, which has more feature
 
 ## License
 
-MIT
\ No newline at end of file
+MIT
diff --git a/debian/changelog b/debian/changelog
index 7a816c0..f6f2f84 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+node-estree-walker (0.6.1+git20190527.8ee5d23-1) UNRELEASED; urgency=medium
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sun, 23 Jun 2019 10:33:06 +0000
+
 node-estree-walker (0.6.0-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/package-lock.json b/package-lock.json
index 5fe5424..992a511 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "estree-walker",
-  "version": "0.6.0",
+  "version": "0.6.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/package.json b/package.json
index 44e7a8c..00a2544 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "estree-walker",
   "description": "Traverse an ESTree-compliant AST",
-  "version": "0.6.0",
+  "version": "0.6.1",
   "author": "Rich Harris",
   "license": "MIT",
   "typings": "index.d.ts",
diff --git a/src/estree-walker.js b/src/estree-walker.js
index a3af66d..6ecd498 100644
--- a/src/estree-walker.js
+++ b/src/estree-walker.js
@@ -26,7 +26,7 @@ function visit(node, parent, enter, leave, prop, index) {
 		if (skipped) return;
 	}
 
-	const keys = childKeys[node.type] || (
+	const keys = node.type && childKeys[node.type] || (
 		childKeys[node.type] = Object.keys(node).filter(key => typeof node[key] === 'object')
 	);
 
@@ -36,7 +36,7 @@ function visit(node, parent, enter, leave, prop, index) {
 
 		if (isArray(value)) {
 			for (let j = 0; j < value.length; j += 1) {
-				visit(value[j], node, enter, leave, key, j);
+				value[j] && value[j].type && visit(value[j], node, enter, leave, key, j);
 			}
 		}
 

Full worker log Full build log