Releases: 75lb/renamer
Releases · 75lb/renamer
v5.0.0
v4.0.0
All changes are non-functional - there are no changes to the API or app behaviour.
Breaking changes since v3.2.1
- Removed CommonJS distribution. The codebase is now ESM only.
- This is due to rollup (used to create the CJS dist) not having good support for dynamic imports (required by renamer's plugin loader).
- This change only affects API (not CLI) users that use
require
to load renamer.
Other non-functional changes
- Extended support back to v12.17 (previously v14 was required).
- Renamed all source filename extensions from
.mjs
to.js
Upgrade notes
- CommonJS users that load renamer using
require
should not upgrade to v4 - stick with versions 1, 2 or 3 until able to load ECMAScript modules. - There are no other changes. All other users can safely upgrade. Node >=v12.17 users may now also upgrade.
v3.0.0
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 anEventEmitter
. Rather than listen forreplace-result
events you now async iterate overrenamer.results
. - The
renamer.rename
API method is now asynchronous, returning aPromise
. 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.
- This is because both replace chain and
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.
v2.0.0
v1.1.0
New features since v1.0.0
Added --index-root
.
By default, the {{index}}
value begins at 1. You can override this by specifying an --index-root
value.
$ renamer -d --replace "Image{{index}}.jpg" --index-root 10 *
Before | After |
---|---|
|
|
v1.0.0
Renamer has been completely rewritten but retains its core behaviour and "feel".
Breaking changes since v0.7.0
- It requires node v8.9.0 or above.
- The programmatic API has been rewritten. Documentation for the new API is here.
--regex
and--insensitive
options removed, you now specify a regular expression literal. For example,--find '/something/ig'
.- The number replacing the
{{index}}
token is now incremented per file-renamed-successfully, rather than per file.
New features
- Added the ability to specify which
--path-element
should be renamed. - Plugin system added.
--force
mode added, fixes #17.--view long
and--view diff
added.- A file list can now be passed into
stdin
, facilitating use of tools likefind
to build the input file list. Users now have control over the input file order and therefore{{index}}
value. Fixes #31.
Documentation
Upgrade notes
Quite a lot has changed so it's worth reading the new documentation. Nevertheless, the core user-experience remains largely the same: you set a --find
, --replace
, some files, check the --dry-run
then rename.