Skip to content

Releases: facebook/jscodeshift

v0.3.13

25 Jan 22:09
Compare
Choose a tag to compare

Fixes

Ignore local .babelrc files. This fixes issues with running jscodeshift on code that was in a project that uses Babel. ( #85 ). Thanks to @sviridov!

v0.3.12

07 Jan 16:55
Compare
Choose a tag to compare

Fixes

Fixed filtering for .closest method ( #83). Thanks @juliankrispel!

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.