rsnext/packages/create-next-app/helpers
Balázs Orbán bca6ff77f9
fix(cna): separate dependencies/devDependencies (#55730)
### What?

As [discussed](https://vercel.slack.com/archives/C04DUD7EB1B/p1692183798097169), we should follow the ecosystem standard separation of dependencies and dev dependencies.

### Why?

This is a common issue/misunderstanding that we always have to explain separately, while there is no real benefit.

One counter-argument was that install times would be increased when we had to run install for `dependencies` and `devDependencies` separately, but that's easy to work around as explained below.

### How?

Instead of passing the `dependencies` array to the package manager in the CLI, we write these to the `package.json` file and then run the package manager's install command without the dependency arguments.

This will also reduce the number of writes to the `package.json` file from two to just one.

Ref: https://github.com/vercel/next.js/pull/42218, https://github.com/vercel/next.js/pull/48076, https://github.com/vercel/next.js/issues/54105, https://github.com/vercel/next.js/pull/42012, and more

[Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1692183798097169)


Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-09-21 15:30:37 +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 Add --use-bun to create-next-app (#53467) 2023-08-03 18:00:38 -07: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 fix(cna): separate dependencies/devDependencies (#55730) 2023-09-21 15:30:37 +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