Releases: pugjs/babel-walk
Releases · pugjs/babel-walk
v3.0.1
v3.0.0
Breaking Changes
-
All functions are now explicitly "curried" (#8)
If you were previously doing:
const visitors = { Function(node) { console.log(node); }, }; walk.simple(node, visitors, state);
You should now do:
const visitors = walk.simple({ Function(node) { console.log(node); }, }); visitors(node, state);
This helps by:
- Improving TypeScript support as inference works much better
- Making the caching we were doing of the walkers explicit, by letting you keep a copy of the resulting function.
New Features
- Export types for visitor objects (#7)
v2.0.0
Breaking Changes
-
babel-walk no longer supports node ` 10.0.0 (#4)
-
babel-walk has been renamed (from babylon-walk) (#4)
-
babel-walk no longer supports the union style syntax for defining walkers (#4)
You can still uses aliases e.g.
Expression
andFunction
but you can no longer use things likeNumberLiteral|StringLiteral
. This is because they are incompatible with TypeScript and (slightly) reduce performance. -
ancestors no longer replace falsy state in the ancestor walk. You are always passed all 3 parameters (#4)
New Features
- TypeScript definitions for all 3 walk functions (#4)
Bug Fixes
- No longer depends on the out of date version of @babel/runtime (#4)