rsnext/packages/create-next-app/helpers
Sukka 127e30ed42
refactor(cna): make create-next-app even smaller (#53241)
The PR follows #53146 and #53115.

The PR does 3 things:

- Replaces a [very heavy dependency `cpy`](https://github.com/vercel/next.js/pull/53146#issuecomment-1649193789) with a more lightweight copy helper.
  - The `fs.cp(src, dest, {recursive: true})` API is not used, as it is still experimental:
  <img width="1630" alt="image" src="https://github.com/vercel/next.js/assets/40715044/c61a454a-3a96-4658-a389-fbb68c241f18">
- Update `cross-spawn` to the latest version `7.0.3`
  - The only breaking change introduced in `cross-spawn@7.x` is dropping Node.js 8 supports, which allows `cross-spawn` to drop a dependency. Since `create-next-app` requires Node.js 16.8.0, I assume bumping `cross-spawn` would be safe.
- Update `fast-glob` to the latest version `3.3.1` to remove more KiBs (pointed out by @imranbarbhuiya)
  - The breaking change introduced in `fast-glob@3.x` is dropping Node.js 8 supports and some options changes.

Together the PR removes another 202 KiB from the `create-next-app/dist/index.js`. The size of `create-next-app/dist/index.js` is now 616 KiB.

<img width="583" alt="image" src="https://github.com/vercel/next.js/assets/40715044/4deb5e36-a63b-4501-b67c-29ea06e30578">
2023-07-28 17:21:58 +00:00
..
copy.ts refactor(cna): make create-next-app even smaller (#53241) 2023-07-28 17:21:58 +00:00
examples.ts Fix nested example setup with create-next-app (#45390) 2023-01-29 11:54:28 -08:00
get-pkg-manager.ts change(create-next-app): Get-pkg-manager logic change. (#50372) 2023-06-05 19:31:10 -04:00
git.ts [create-next-app]: respecting the user's init.defaultBranch git con… (#49960) 2023-05-20 23:53:58 +00:00
install.ts refactor(cna): replace chalk with picocolors, glob with fast-glob@2.2.7 (#53146) 2023-07-26 18:16:13 +00:00
is-folder-empty.ts refactor(cna): replace chalk with picocolors, glob with fast-glob@2.2.7 (#53146) 2023-07-26 18:16:13 +00:00
is-online.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
is-writeable.ts CNA: Add warning about permission (#14889) 2020-08-19 17:09:34 +00:00
make-dir.ts chore: cross-platform rm -rf script (#49529) 2023-05-10 01:14:37 +00:00
validate-pkg.ts Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00