Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for route-manifest v4 #292

Merged
merged 3 commits into from Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/runtime/src/index.ts
Expand Up @@ -509,7 +509,8 @@ export async function build({
switch (routesManifest.version) {
case 1:
case 2:
case 3: {
case 3:
case 4: {
redirects.push(...convertRedirects(routesManifest.redirects));
rewrites.push(...convertRewrites(routesManifest.rewrites));

Expand Down
3 changes: 2 additions & 1 deletion packages/runtime/src/utils.ts
Expand Up @@ -420,7 +420,8 @@ export async function getDynamicRoutes(
};
});
}
case 3: {
case 3:
case 4: {
return routesManifest.dynamicRoutes
.filter(({ page }) =>
omittedRoutes ? !omittedRoutes.has(page) : true
Expand Down
8 changes: 4 additions & 4 deletions packages/runtime/test/integration/index.test.js
Expand Up @@ -320,7 +320,7 @@ it(
);

it(
'Should not build the serverless-config-async example',
'Should build the serverless-config-async example',
async () => {
let error = null;

Expand All @@ -330,13 +330,13 @@ it(
error = err;
}

expect(error).not.toBe(null);
expect(error).toBe(null);
},
FOUR_MINUTES
);

it(
'Should not build the serverless-config-promise example',
'Should build the serverless-config-promise example',
async () => {
let error = null;

Expand All @@ -346,7 +346,7 @@ it(
error = err;
}

expect(error).not.toBe(null);
expect(error).toBe(null);
},
FOUR_MINUTES
);
Expand Down
@@ -1,5 +1,6 @@
{
"dependencies": {
"encoding": "latest",
"isomorphic-unfetch": "latest",
"next": "7.0.0"
}
Expand Down