Skip to content

Commit

Permalink
Upgrade Astro to v5.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyasskin committed Dec 14, 2024
1 parent 1c8416f commit 5a5c0fa
Show file tree
Hide file tree
Showing 6 changed files with 454 additions and 335 deletions.
50 changes: 24 additions & 26 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,33 @@ export default defineConfig({
mode: "standalone",
}),

experimental: {
env: {
schema: {
// Names for TAG repositories. These are variables so that development instances can
// override them.
TAG_ORG: clientString({ default: "w3ctag" }),
REVIEWS_REPO: clientString({ default: "design-reviews" }),
PRIVATE_BRAINSTORMING_REPO: clientString({
default: "design-reviews-private-brainstorming",
}),
MEETINGS_REPO: clientString({ default: "meetings" }),
env: {
schema: {
// Names for TAG repositories. These are variables so that development instances can
// override them.
TAG_ORG: clientString({ default: "w3ctag" }),
REVIEWS_REPO: clientString({ default: "design-reviews" }),
PRIVATE_BRAINSTORMING_REPO: clientString({
default: "design-reviews-private-brainstorming",
}),
MEETINGS_REPO: clientString({ default: "meetings" }),

// These are all defined in the Github App registration. The environment must set these or
// GITHUB_TOKEN, below.
APP_ID: optionalServerString({ access: "public" }),
PRIVATE_KEY: optionalServerString({ access: "secret" }),
CLIENT_ID: optionalServerString({ access: "public" }),
CLIENT_SECRET: optionalServerString({ access: "secret" }),
// These are all defined in the Github App registration. The environment must set these or
// GITHUB_TOKEN, below.
APP_ID: optionalServerString({ access: "public" }),
PRIVATE_KEY: optionalServerString({ access: "secret" }),
CLIENT_ID: optionalServerString({ access: "public" }),
CLIENT_SECRET: optionalServerString({ access: "secret" }),

// Technically optional when testing the non-webhook parts of the server, but easy enough to
// give a fake value.
WEBHOOK_SECRET: envField.string({
context: "server",
access: "secret",
}),
// Technically optional when testing the non-webhook parts of the server, but easy enough to
// give a fake value.
WEBHOOK_SECRET: envField.string({
context: "server",
access: "secret",
}),

// Use a personal token to test the server without registering it as a whole app.
GITHUB_TOKEN: optionalServerString({ access: "secret" }),
},
// Use a personal token to test the server without registering it as a whole app.
GITHUB_TOKEN: optionalServerString({ access: "secret" }),
},
},
});
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "astro check && eslint . && tsc && DATABASE_URL=file:./test.db prisma db push && DATABASE_URL=file:./test.db vitest"
},
"dependencies": {
"@astrojs/node": "^8.3.4",
"@astrojs/node": "^9.0.0",
"@github/relative-time-element": "^4.4.3",
"@graphql-typed-document-node/core": "^3.2.0",
"@js-temporal/polyfill": "^0.4.4",
Expand All @@ -21,7 +21,7 @@
"@octokit/graphql": "^8.1.1",
"@octokit/webhooks": "^13.4.1",
"@prisma/client": "^5.22.0",
"astro": "^4.16.16",
"astro": "^5.0.5",
"mdast-util-from-markdown": "^2.0.2",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-string": "^4.0.0",
Expand All @@ -30,7 +30,7 @@
"octokit": "^4.0.2",
"prisma": "^5.22.0",
"unist-util-visit": "^5.0.0",
"vite": "^5.4.11",
"vite": "^6.0.3",
"zod": "^3.23.8"
},
"devDependencies": {
Expand All @@ -50,7 +50,15 @@
"prettier-plugin-astro": "^0.14.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0",
"vitest": "^2.1.6"
"vitest": "^2.1.8"
},
"pnpm": {
"#": "Revert once vitest 3 is released: https://github.com/withastro/astro/issues/12662",
"overrides": {
"@vitest/mocker>vite": "6",
"vite-node>vite": "6",
"vitest>vite": "6"
}
},
"engines": {
"node": "22"
Expand Down
Loading

0 comments on commit 5a5c0fa

Please sign in to comment.