Skip to content

Commit 35d80ba

Browse files
leoortizzjamesdaniels
authored andcommitted
Expand Next.js integration test and fix some bugs (#5776)
* Bump to Next.js 13.3 * Expand the Next.js integration test, use emulators:exec better * Fix emulators:exec w/pinTags and web frameworks hitting prod for SSR routes * The next import may or may not have a default export, handle --------- Co-authored-by: James Daniels <jamesdaniels@google.com>
1 parent 868971b commit 35d80ba

File tree

23 files changed

+1788
-596
lines changed

23 files changed

+1788
-596
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ scripts/*.json
2222

2323
lib/
2424
dev/
25+
clean/

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
- Improvements for developers using Next 13's app directory (#5691)
99
- Resolve timeouts when bundling Next.js applications for Cloud Functions (#5691)
1010
- Fixes bug where the functions emulator would attempt to call to prod for 'demo-' projects (#5170)
11+
- Address issues starting the Firebase Hosting emulator with some versions of Next.js (#5781)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { headers } from 'next/headers';
2+
3+
export async function GET() {
4+
const _ = headers();
5+
return new Response(JSON.stringify([1, 2, 3]), {
6+
status: 200,
7+
headers: {
8+
"content-type": "application/json",
9+
"custom-header": "custom-value-2",
10+
},
11+
});
12+
}
13+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const revalidate = 60;
2+
3+
export default function ISR() {
4+
return <>ISR</>;
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function SSG() {
2+
return <>SSG</>;
3+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use server'
2+
3+
import { headers } from 'next/headers';
4+
5+
export default async function SSR() {
6+
const headersList = headers();
7+
return <>SSR</>;
8+
}

scripts/webframeworks-deploy-tests/hosting/app/bar/page.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

scripts/webframeworks-deploy-tests/hosting/app/foo/page.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)