Releases: sindresorhus/cpy
Releases · sindresorhus/cpy
v13.2.1
v13.2.0
v13.1.0
v13.0.0
Breaking
- Dotfiles are no longer included by default. Globs now respect the
dotoption (default false), so files like.hiddenare skipped unless explicitly included.- If you relied on dotfiles being copied implicitly, either:
- Pass
dot: true, or - Add explicit dotfile patterns (for example
.hiddenor**/.hidden).
- Pass
- If you relied on dotfiles being copied implicitly, either:
- Add rename source/destination objects 3207310
- The old single parameter
renamefunction still works, but it will be removed in the next major version, so I recommend migrating. - The new two-argument form lets you safely mutate the destination while keeping it within the destination directory.
- Old:
await cpy("foo.js", "destination", { rename(basename) { return basename.replace("foo", "bar"); } });
- New:
await cpy("foo.js", "destination", { rename(source, destination) { if (source.nameWithoutExtension === "foo") { destination.nameWithoutExtension = "bar"; } // destination.name, destination.extension, or destination.path can be updated here } });
- The old single parameter
Improvements
v12.1.0
v12.0.2
v12.0.1
v12.0.0
Breaking
- Require Node.js 20 61b9de2
Improvements
- Add
onProgressoption 79c6e3a- The previous
cpy(…).on('progress', …)handler is deprecated
- The previous
Fixes
v11.1.0
- Update dependencies 7c96d93
v11.0.1
- Remove unused type 778e9e1