This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
# Releases
## vercel@32.5.0
### Minor Changes
- Indicates whether @vercel/speed-insights or @vercel/analytics are used ([#10623](https://github.com/vercel/vercel/pull/10623))
- [cli] update env var validation rule to allow name start with underscore ([#10697](https://github.com/vercel/vercel/pull/10697))
### Patch Changes
- Updated dependencies \[[`da300030c`](da300030c9), [`de84743e1`](de84743e10), [`913608de4`](913608de4d), [`7fa08088e`](7fa08088ea)]:
- @vercel/next@4.0.11
- @vercel/python@4.1.0
- @vercel/remix-builder@2.0.10
- @vercel/redwood@2.0.5
- @vercel/static-build@2.0.9
## @vercel/python@4.1.0
### Minor Changes
- Add support for pip3.10 and pip3.11 ([#10648](https://github.com/vercel/vercel/pull/10648))
## @vercel/routing-utils@3.1.0
### Minor Changes
- Adds support for statusCode property on rewrites ([#10495](https://github.com/vercel/vercel/pull/10495))
## @vercel/client@13.0.6
### Patch Changes
- Updated dependencies \[[`9e9fac019`](9e9fac0191)]:
- @vercel/routing-utils@3.1.0
## @vercel/fs-detectors@5.1.2
### Patch Changes
- Updated dependencies \[[`9e9fac019`](9e9fac0191)]:
- @vercel/routing-utils@3.1.0
## @vercel/gatsby-plugin-vercel-builder@2.0.8
### Patch Changes
- Updated dependencies \[[`9e9fac019`](9e9fac0191)]:
- @vercel/routing-utils@3.1.0
## @vercel/next@4.0.11
### Patch Changes
- fix `build` in appDir on Windows ([#10708](https://github.com/vercel/vercel/pull/10708))
- Fix RSC prefetch for index route with catch-all ([#10734](https://github.com/vercel/vercel/pull/10734))
## @vercel/redwood@2.0.5
### Patch Changes
- Updated dependencies \[[`9e9fac019`](9e9fac0191)]:
- @vercel/routing-utils@3.1.0
## @vercel/remix-builder@2.0.10
### Patch Changes
- Update `@remix-run/dev` fork to v2.1.0 ([#10732](https://github.com/vercel/vercel/pull/10732))
## @vercel/static-build@2.0.9
### Patch Changes
- Updated dependencies \[]:
- @vercel/gatsby-plugin-vercel-builder@2.0.8
## @vercel-internals/types@1.0.13
### Patch Changes
- Updated dependencies \[[`9e9fac019`](9e9fac0191)]:
- @vercel/routing-utils@3.1.0
Allows to define a `statusCode` property on `rewrites` in the same way as we already have it for `redirects`.
This is still blocked internally as it requires a feature flag to build with that setting.
So it would allow to set the status in `vercel.json` like this:
```json
{
"rewrites": [
{
"source": "/*",
"destination": "not-found.html",
"statusCode": 404
}
]
}
```
Once released, I'll update the documentation on that as well.
### Requirements
> Cause once router sees a status code is set, it stops routing.
> So it wont run the `miss` and `rewrite` sections again once it has a status.
> So just need to make sure wherever status code is set, its at the end of its routing.
> [[internal ref](https://vercel.slack.com/archives/C01A2M9R8RZ/p1691594782351809?thread_ts=1691540814.244679&cid=C01A2M9R8RZ)]
This adds a new `pnpm type-check` that leverages `turbo` to validate the TypeScript code. This can be run at the top-level or for an individual package.
The `test-lint` workflow will run it after linting and doing the prettier check.
As apart of this effort, each package's `tsconfig.json` has been simplified. There's a new top-level `tsconfig.base.json` file that extends the Vercel Style Guide for TypeScript. Each package's `tsconfig.json` has been audited and previously suppressed rules that no longer apply have been removed. The result is each package's `tsconfig.json` is greatly simplified and we can control common settings in the base config while keeping the flexibility of package-level overrides.
Lastly, in `package/cli`, `pnpm build` calls `scripts/build.mjs` which calls `scripts/compile-templates.mjs`. The `compile-templates.mjs` file was generating invalid TypeScript code. I've fixed it and now it's happier than ever.
Note: In order to run `pnpm type-check`, you must first `pnpm build` because we need the `.d.ts` definition files.
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.
Adds a new Route property called `isInternal` that indicates whether or not this is a project route or a Vercel platform route. Routes with this flag will be hidden from project-specific lists of routes to avoid confusion.
Verified on staging.
Follow-up to #9696. Ensures that all packages in this repository have
the correct "license" field in their respective `package.json` files set
to "Apache-2.0", to match the `LICENSE` file at the root of the
repository.
The `LICENSE` file the authoritative source, so the "MIT" value was
incorrect. This change corrects the previous values and is not
considered a relicensing.
### Related Issues
Updates @types/node to the latest version within the v14 major (based on `npm view @types/node`)
```
❯ npm view @types/node@'>=14.0.0 <15.0.0' version | tail -1
@types/node@14.18.33 '14.18.33'
```
This PR also fixes the various necessary type changes
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
This PR consolidates all the `test` scripts to be the same and removes the `prepublishOnly` script since we always run `build` before publishing to npm.
This is a semver major change to the public API for `@vercel/routing-utils` which includes the following breaking changes.
1. `getTransformedRoutes({ nowConfig })` props changed to `getTransformedRoutes(nowConfig)`
2. `type Source` renamed `type RouteWithSrc`
3. `type Handler` renamed `type RouteWithHandle`
4. `interface VercelConfig` removed
5. `type NowConfig` removed
6. `type NowRewrite` removed
7. `type NowRedirect` removed
8. `type NowHeader` removed
9. `type NowHeaderKeyValue` removed
Node 12 is EOL and we're starting to reference packages that don't install on node lower than 14, such as nuxt@3 and remix. Let's update to 14 for now.
---
Reimplements: https://github.com/vercel/vercel/pull/7819
Node 12 is EOL and we're starting to reference packages that don't install on node lower than 14, such as nuxt@3 and remix. Let's update to 14 for now.
* [tests] Use `turbo` for unit tests
* .
* .
* Revert "."
This reverts commit 3d6204fef3fda3c7b4bf08955a186fe806d7c597.
* Add "src/util/constants.ts" to outputs
* .
* Add `@vercel/node-bridge` outputs
* .
* Mac and Windows
* .
* Node 14
* .
* .
* Add templates to CLI output
* Run only selected test files
* Add cross platform testing
* make test paths relative and have minimum per chunk
* add install arg
* update shell
* bump cache key
* use backslashes on windows
* pass tests as arg
* update script name
* update turbo config
* forward turbo args correctly
* dont use backslashes
* chunk integration tests instead
* update env
* separate static-build tests
* ensure unit test turbo cache is saved
* ensure turbo cache is saved for dev/cli
* fix cache key and update timeout
* Increase static-build unit test timeout
* Leverage turbo remote caching instead of actions/cache
* apply suggestions and test chunking itself
* update other ci jobs
* fix test collecting
Co-authored-by: Nathan Rajlich <n@n8.io>