Skip to content

v9.0.0

Compare
Choose a tag to compare
@sindresorhus sindresorhus released this 27 Feb 09:46
· 15 commits to main since this release

Breaking

  • This package is now pure ESM. Please read this.
  • Require Node.js 12

Recursive by default

  • parents option was removed
  • to get flat list of files use flat: true option

Example directory structure:

- .github/workflows/main.yml
- .github/funding.yml

Command: cpy('.github/**', 'dest')

Old output:

- dest/funding.yml
- dest/main.yml

New output:

- dest/workflows/main.yml
- dest/main.yml

Recreate old parents: true

Example directory structure:

- .github/workflows/main.yml
- .github/funding.yml

Old:
cpy('.github/**', 'dest', {parents: true})

New:
cpy('.github', 'dest')

Output:

- dest/.github/workglows/main.yml
- dest/.github/funding.yml

Recreate old parents: false

Example directory structure:

- .github/workflows/main.yml
- .github/funding.yml

Old:
cpy('.github/**', 'dest', {parents: false})

New:
cpy('.github', 'dest', {flat: true})

Output:

- dest/main.yml
- dest/funding.yml

Copy all package.json and preserve folder structure

Old:
cpy('node_modules/**/package.json', 'dest', {parents: true})

Old output:

New:
cpy('node_modules/**/package.json', 'dest')

New output:

v8.1.2...v9.0.0