mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
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
@vercel/routing-utils
Route validation utilities
Usage
npm add @vercel/routing-utils
import { normalizeRoutes } from '@vercel/routing-utils';
const { routes, error } = normalizeRoutes(inputRoutes);
if (error) {
console.log(error.code, error.message);
}
import { routesSchema } from '@vercel/routing-utils';
const ajv = new Ajv();
const validate = ajv.compile(routesSchema);
const valid = validate([{ src: '/about', dest: '/about.html' }]);
if (!valid) console.log(validate.errors);