Skip to content

Releases: sindresorhus/cpy

v13.2.1

12 Feb 13:47

Choose a tag to compare

  • Fix negation patterns copying files outside the positive pattern 5e657e4

v13.2.0...v13.2.1

v13.2.0

05 Feb 06:59

Choose a tag to compare

  • Add ignoreExisting option 64a5d30

v13.1.0...v13.2.0

v13.1.0

04 Feb 17:25

Choose a tag to compare


v13.0.0...v13.1.0

v13.0.0

02 Feb 07:02

Choose a tag to compare

Breaking

  • Dotfiles are no longer included by default. Globs now respect the dot option (default false), so files like .hidden are skipped unless explicitly included.
    • If you relied on dotfiles being copied implicitly, either:
      1. Pass dot: true, or
      2. Add explicit dotfile patterns (for example .hidden or **/.hidden).
  • Add rename source/destination objects 3207310
    • The old single parameter rename function 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
      	}
      });

Improvements

  • Add dryRun option 247cb9e
  • Add base option for path resolution 28175cb

v12.1.0...v13.0.0

v12.1.0

20 Oct 07:00

Choose a tag to compare


v12.0.2...v12.1.0

v12.0.2

19 Oct 16:41

Choose a tag to compare

  • Fix rename failing when destination is the same folder as origin (#122) 6b2226b

v12.0.1...v12.0.2

v12.0.1

20 Aug 08:03

Choose a tag to compare

  • Fix relative path handling and path normalization (#120) c20ee96

v12.0.0...v12.0.1

v12.0.0

13 Aug 03:59

Choose a tag to compare

Breaking

Improvements

  • Add onProgress option 79c6e3a
    • The previous cpy(…).on('progress', …) handler is deprecated

Fixes


v11.1.0...v12.0.0

v11.1.0

26 Jul 15:25

Choose a tag to compare

v11.0.1...v11.1.0

v11.0.1

10 Mar 15:33

Choose a tag to compare

v11.0.0...v11.0.1