Compare commits

..

3 Commits

Author SHA1 Message Date
Nathan Rajlich
1bb7b37e0c Publish Stable
- vercel@28.15.7
 - @vercel/next@3.4.6
 - @vercel/remix@1.3.2
2023-02-15 23:41:25 -08:00
Nathan Rajlich
ca81c133b9 [remix] Fix root-level splat path (#9457)
Fixes https://github.com/orgs/vercel/discussions/1545.
2023-02-16 07:32:53 +00:00
Luba Kravchenko
f332b7856c Adds framework fields to build outputs (#9449)
Adds framework to Lambda and edge build outputs so that we can distinguish which framework they originated from when certain features should be applied to specific frameworks.

This PR adds framework to the outputs. Part 1: https://github.com/vercel/vercel/pull/9448

ticket: ED-131

x-ref: [slack channel](https://vercel.slack.com/archives/C042LHPJ1NX)
2023-02-15 22:56:29 +00:00
10 changed files with 39 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "28.15.6",
"version": "28.15.7",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -44,11 +44,11 @@
"@vercel/build-utils": "6.2.4",
"@vercel/go": "2.3.6",
"@vercel/hydrogen": "0.0.52",
"@vercel/next": "3.4.5",
"@vercel/next": "3.4.6",
"@vercel/node": "2.9.5",
"@vercel/python": "3.1.48",
"@vercel/redwood": "1.1.4",
"@vercel/remix": "1.3.1",
"@vercel/remix": "1.3.2",
"@vercel/ruby": "1.3.64",
"@vercel/static-build": "1.3.8"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "3.4.5",
"version": "3.4.6",
"license": "MIT",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",

View File

@@ -1094,6 +1094,10 @@ export const build: BuildV2 = async ({
shouldAddHelpers: false,
shouldAddSourcemapSupport: false,
supportsMultiPayloads: !!process.env.NEXT_PRIVATE_MULTI_PAYLOAD,
framework: {
slug: 'nextjs',
version: nextVersion,
},
});
debug(`Created serverless function for page: "${page}"`);
})
@@ -1816,6 +1820,7 @@ export const build: BuildV2 = async ({
'___next_launcher.cjs'
),
runtime: nodeVersion.runtime,
nextVersion,
...lambdaOptions,
});
} else {
@@ -1835,6 +1840,7 @@ export const build: BuildV2 = async ({
'___next_launcher.cjs'
),
runtime: nodeVersion.runtime,
nextVersion,
...lambdaOptions,
});
}
@@ -2046,6 +2052,7 @@ export const build: BuildV2 = async ({
'___next_launcher.cjs'
),
runtime: nodeVersion.runtime,
nextVersion,
});
}
)

View File

@@ -874,6 +874,7 @@ export async function serverBuild({
maxDuration: group.maxDuration,
isStreaming: group.isStreaming,
cron: group.cron,
nextVersion,
});
for (const page of group.pages) {
@@ -974,6 +975,7 @@ export async function serverBuild({
routesManifest,
isCorrectMiddlewareOrder,
prerenderBypassToken: prerenderManifest.bypassToken || '',
nextVersion,
});
const isNextDataServerResolving =

View File

@@ -775,6 +775,7 @@ export async function createPseudoLayer(files: {
interface CreateLambdaFromPseudoLayersOptions extends LambdaOptionsWithFiles {
layers: PseudoLayer[];
isStreaming?: boolean;
nextVersion?: string;
}
// measured with 1, 2, 5, 10, and `os.cpus().length || 5`
@@ -785,6 +786,7 @@ export async function createLambdaFromPseudoLayers({
files: baseFiles,
layers,
isStreaming,
nextVersion,
...lambdaOptions
}: CreateLambdaFromPseudoLayersOptions) {
await createLambdaSema.acquire();
@@ -828,6 +830,10 @@ export async function createLambdaFromPseudoLayers({
shouldAddHelpers: false,
shouldAddSourcemapSupport: false,
supportsMultiPayloads: !!process.env.NEXT_PRIVATE_MULTI_PAYLOAD,
framework: {
slug: 'nextjs',
version: nextVersion,
},
});
}
@@ -2318,6 +2324,7 @@ export async function getMiddlewareBundle({
routesManifest,
isCorrectMiddlewareOrder,
prerenderBypassToken,
nextVersion,
}: {
config: Config;
entryPath: string;
@@ -2325,6 +2332,7 @@ export async function getMiddlewareBundle({
prerenderBypassToken: string;
routesManifest: RoutesManifest;
isCorrectMiddlewareOrder: boolean;
nextVersion: string;
}): Promise<{
staticRoutes: Route[];
dynamicRouteMap: Map<string, RouteWithSrc>;
@@ -2462,6 +2470,10 @@ export async function getMiddlewareBundle({
path: `assets/${name}`,
};
}),
framework: {
slug: 'nextjs',
version: nextVersion,
},
});
})(),
routeMatchers: getRouteMatchers(edgeFunction, routesManifest),

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix",
"version": "1.3.1",
"version": "1.3.2",
"license": "MIT",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",

View File

@@ -266,7 +266,9 @@ module.exports = config;`;
// If this is a dynamic route then add a Vercel route
const keys: Key[] = [];
// Replace "/*" at the end to handle "splat routes"
const rePath = `/${path.replace(/\/\*$/, '/:params+')}`;
const splatPath = '/:params+';
const rePath =
path === '*' ? splatPath : `/${path.replace(/\/\*$/, splatPath)}`;
const re = pathToRegexp(rePath, keys);
if (keys.length > 0) {
routes.push({

View File

@@ -0,0 +1,6 @@
import { useParams } from "@remix-run/react";
export default function CatchAll() {
const params = useParams();
return <div>{params['*']}</div>;
}

View File

@@ -15,7 +15,7 @@
{ "path": "/b", "mustContain": "B page" },
{ "path": "/nested", "mustContain": "Nested index page" },
{ "path": "/nested/another", "mustContain": "Nested another page" },
{ "path": "/nested/index", "mustContain": "Not Found" },
{ "path": "/asdf", "mustContain": "Not Found" }
{ "path": "/nested/index", "mustContain": "<div>nested/index</div>" },
{ "path": "/asdf", "mustContain": "<div>asdf</div>" }
]
}

4
pnpm-lock.yaml generated
View File

@@ -213,11 +213,11 @@ importers:
'@vercel/go': 2.3.6
'@vercel/hydrogen': 0.0.52
'@vercel/ncc': 0.24.0
'@vercel/next': 3.4.5
'@vercel/next': 3.4.6
'@vercel/node': 2.9.5
'@vercel/python': 3.1.48
'@vercel/redwood': 1.1.4
'@vercel/remix': 1.3.1
'@vercel/remix': 1.3.2
'@vercel/routing-utils': 2.1.9
'@vercel/ruby': 1.3.64
'@vercel/static-build': 1.3.8