Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions packages/@apphosting/adapter-nextjs/e2e/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ describe("app", () => {
const response = await fetch(host);
assert.ok(response.ok);
assert.equal(response.headers.get("content-type")?.toLowerCase(), "text/html; charset=utf-8");
assert.equal(
response.headers.get("cache-control"),
"s-maxage=31536000, stale-while-revalidate",
);
assert.equal(response.headers.get("cache-control"), "s-maxage=31536000, ");
});

it("/ssg", async () => {
const response = await fetch(posix.join(host, "ssg"));
assert.ok(response.ok);
assert.equal(response.headers.get("content-type")?.toLowerCase(), "text/html; charset=utf-8");
assert.equal(
response.headers.get("cache-control"),
"s-maxage=31536000, stale-while-revalidate",
);
assert.equal(response.headers.get("cache-control"), "s-maxage=31536000, ");
const text = await response.text();
assert.ok(text.includes("SSG"));
assert.ok(text.includes("Generated"));
Expand Down Expand Up @@ -80,10 +74,7 @@ describe("app", () => {
const response = await fetch(posix.join(host, "isr", "demand"));
assert.ok(response.ok);
assert.equal(response.headers.get("content-type")?.toLowerCase(), "text/html; charset=utf-8");
assert.equal(
response.headers.get("cache-control"),
"s-maxage=31536000, stale-while-revalidate",
);
assert.equal(response.headers.get("cache-control"), "s-maxage=31536000, ");
const text = await response.text();
assert.ok(text.includes("A cached page"));
assert.ok(text.includes("Generated"));
Expand Down
1 change: 1 addition & 0 deletions packages/@apphosting/adapter-nextjs/e2e/run-local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const run = spawn(runScript, runArgs, {
env: {
NODE_ENV: "production",
PORT: port.toString(),
PATH: process.env.PATH,
},
});
run.stderr.on("data", (data) => console.error(data.toString()));
Expand Down
3 changes: 0 additions & 3 deletions starters/nextjs/basic/.eslintrc.json

This file was deleted.

11 changes: 11 additions & 0 deletions starters/nextjs/basic/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { FlatCompat } from "@eslint/eslintrc";
const compat = new FlatCompat({
// import.meta.dirname is available after Node.js v20.11.0
baseDirectory: import.meta.dirname,
});
const eslintConfig = [
...compat.config({
extends: ["next/core-web-vitals"],
}),
];
export default eslintConfig;