Skip to content

v3.0.0

Compare
Choose a tag to compare
@75lb 75lb released this 03 May 10:05
· 30 commits to master since this release

Breaking changes since v2.0.1

  • Support dropped for Node.js versions less than v14.
  • Small change to Replace chain plugin API: the plugin module should now export a plain class instead of a decorator function as before
    • The previous method prevented the user from defining a plugin which extended his/her own base plugin class.
  • The Renamer class is no longer an EventEmitter. Rather than listen for replace-result events you now async iterate over renamer.results.
  • The renamer.rename API method is now asynchronous, returning a Promise. Previously it was synchronous.
  • The --plugin option has been renamed to --chain
    • This is because both replace chain and --view plugins are now accepted, making the previous name --plugin ambiguous.

New features

  • Added ability to create and use custom views
  • Added --silent mode
  • Added --view one-line which outputs just a summary line, nothing more. #49
  • Added some basic stats (e.g. 2 of 3 files renamed) to the built-in views
  • Added renamer.results async iterator to the core API.

Other changes

  • Source code rewritten as ECMAScript Modules.
  • All synchronous I/O rewritten as asynchronous, which should yield some performance improvements on large batch renames.
  • Dependency tree refreshed and updated
  • Wiki docs updated

Upgrade notes

  • Regular renamer CLI use (e.g. everything documented on the examples page) is unchanged. Only API consumers plus replace chain plugin authors and users will have any changes to make.