Skip to content

Releases: pugjs/babel-walk

v3.0.1

16 Aug 09:02
dec6593
Compare
Choose a tag to compare

Performance Improvements

  • Reduce package install size by removing internal .tsbuildinfo file before publishing (#19)

v3.0.0

25 May 22:23
aea4d8f
Compare
Choose a tag to compare

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:

    1. Improving TypeScript support as inference works much better
    2. 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

25 May 20:10
8ac8131
Compare
Choose a tag to compare

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 and Function but you can no longer use things like NumberLiteral|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)