The intention is for this to be a drop-in replacement for compiling TypeScript to JavaScript, but using `esbuild` instead of `tsc`. `tsc` is still needed, but only for the cases where we want to generate type definitions.
Some of these packages got out of sync at some point, causing duplicate
/ older copies to be installed. Additionally, the `@vercel-internal`
packages should have "version" fields.
Attempting to fix these
[warnings](https://github.com/vercel/vercel/actions/runs/5048844603/jobs/9057538600)
during release:
```
Package "examples" must depend on the current version of "@vercel/frameworks": "1.4.2" vs "1.3.0"
Package "@vercel-internals/constants" must depend on the current version of "@vercel/build-utils": "6.7.3" vs "6.3.2"
Package "@vercel-internals/constants" must depend on the current version of "@vercel/routing-utils": "2.2.1" vs "2.1.10"
Package "@vercel-internals/constants" must depend on the current version of "@vercel-internals/tsconfig": "undefined" vs "*"
Package "@vercel-internals/get-package-json" must depend on the current version of "@vercel-internals/tsconfig": "undefined" vs "*"
Package "@vercel-internals/types" must depend on the current version of "@vercel-internals/constants": "undefined" vs "*"
Package "@vercel-internals/types" must depend on the current version of "@vercel/build-utils": "6.7.3" vs "6.3.2"
Package "@vercel-internals/types" must depend on the current version of "@vercel/routing-utils": "2.2.1" vs "2.1.10"
Package "@vercel-internals/types" must depend on the current version of "@vercel-internals/tsconfig": "undefined" vs "*"
Package "vercel" must depend on the current version of "@vercel-internals/constants": "undefined" vs "*"
Package "vercel" must depend on the current version of "@vercel-internals/get-package-json": "undefined" vs "*"
Package "vercel" must depend on the current version of "@vercel-internals/types": "undefined" vs "*"
Package "@vercel/node" must depend on the current version of "@vercel/error-utils": "1.0.10" vs "1.0.8"
```
Extracts the logic from `pkg.ts` into a new utility function
`getPackageJSON` from `@vercel-internals/utils`.
---------
Co-authored-by: Nathan Rajlich <n@n8.io>