Skip to content

Releases: facebook/jscodeshift

v0.3.11

19 Dec 01:33
Compare
Choose a tag to compare

New

The --slient / -s option suppresses logging to the console ( #79 , #60 ).

v0.3.10

07 Dec 22:03
Compare
Choose a tag to compare

New

--run-in-band option makes jscodeshift execute all transformations in the main process instead of splitting up over multiple workers. Useful for debugging. (#71, @zertosh)

v0.3.9

18 Nov 00:55
Compare
Choose a tag to compare

Fixes

  • Fixed promise (chain) returned by .run (#69). The code used to perform an invalid operation which let the promise fail always.

v0.3.8

21 Oct 22:08
Compare
Choose a tag to compare

Improvements

  • jscodeshift.match and many methods that accept an object as second argument for filtering / pattern matching (e.g. .find) now also accept functions / objects containing functions. This allows you to write more complex filters more easily.

    Example:

    j(source)
    .find(j.VariableDeclarator, {id: node => node.name === 'foo' || node.name === 'bar'})

finds all VariableDeclarators whose identifier is either named "foo" or "bar".

Internal changes

jscodeshift switched to jest v0.5.10, which means that tests will only run in Node v4+. jscodeshift will likely continue to function in older Node versions though.

v0.3.7

03 Sep 21:52
Compare
Choose a tag to compare

New

  • .run returns a promise that is resolved once all workers are done
  • .at accepts negative indexes to get a collection of a node from the end of the current collection

Fixes

.remove now returns the collection itself

v0.3.6

21 Aug 00:38
Compare
Choose a tag to compare

Fixes

  • Fix .closest not correctly applying filter argument (#41)

v0.3.5

12 Aug 23:27
Compare
Choose a tag to compare

Fixes

  • File extension filter only applies to files in traversed directories, not to directly passed files
  • Enforce latest recast version that fixes some printing issues
  • Remove esprima-fb dependency

Changes

  • Depend on babel-core instead of babel

v0.3.4

06 Aug 16:50
Compare
Choose a tag to compare

Fixes

  • No worker spawned when using --cpu option.

v0.3.3

31 Jul 19:35
Compare
Choose a tag to compare

Fixes

  • Printing options not passed along to root
  • Trailing and leading whitespace being removed from file (#28)

v0.3.2

31 Jul 19:34
Compare
Choose a tag to compare

Fixes

  • Really fixed install process