I have added to all packages that are imported from node, the `node:`
and I have reordered the imports, first the `node:` ones to make it more
readable, as well as only importing the necessary functions.
I ran a `node --prof` before and after the modifications and it seems to
be more optimal now than before.
Co-authored-by: torresgol10.itd <torresgol10.itd@gmail.com>
Co-authored-by: Sam Ko <sam@vercel.com>
The PR further reduces the `create-next-app` installation size by
another 80 KiB:
- Replace the callback version of Node.js built-in `dns` API usage with
`dns/promise` + async/await
- Replace `got` w/ `fetch` since Next.js and `create-next-app` now
target Node.js 18.17.0+
- Download and extract the tar.gz file in the memory (without creating
temporary files). This improves the performance.
- Some other minor refinements.
Following these changes, the size of `dist/index.js` is now 536 KiB.
* Completely rewrite Create Next App
* Sort imports
* Show what package manager is being used
* Fix project name suggestion
* Update tests for new implementation
* Use normal prepublish command for on-install
* Upgrade Node version
* Switch to 8.16
* Disable v8 cache
* Swap out update check package and fix CLI boot