Skip to content

Commit 97d07b5

Browse files
authored
update astro 5.1.8 (#155)
2 parents 41b9713 + 7cccd09 commit 97d07b5

File tree

8 files changed

+1435
-1159
lines changed

8 files changed

+1435
-1159
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Drizzle migrations happen in two steps: the first step generates a migration fil
117117
To generate a migration file, run
118118

119119
```sh
120-
doppler run yarn drizzle-kit generate:pg
120+
doppler run yarn drizzle-kit generate
121121
```
122122

123123
This will generate a file called something like `src/db/migration/1234_xyz.sql`. Under normal circumstances, you wouldn't have to worry about this file - it will contain an auto-generated set of SQL statements needed to apply the changes expressed in your `schema.ts` to the database. However, since we're using Supabase Postgres, we have to take care of [Row Level Security](https://supabase.com/docs/guides/auth/row-level-security) policies when creating new tables.
@@ -295,7 +295,7 @@ const count = await helpers.counter.getCount.fetch();
295295

296296
Note that in Astro, the code between `---` (called "frontmatter") runs on the server and is not sent to the client.
297297

298-
You can think of `export const prerender = ...` as a per-route switch between SSG and SSR. `prerender = true` means "build-time" (SSG), and `prerender = false` means "request-time" (SSR). If `export const prerender` isn't defined, its default value depends on the value of `output` in the `astro.config.mjs` settings file. In our case, `output` is `hybrid`, which means `prerender = true` by default. For more info on this, see https://docs.astro.build/en/guides/server-side-rendering/.
298+
You can think of `export const prerender = ...` as a per-route switch between SSG and SSR. `prerender = true` means "build-time" (SSG), and `prerender = false` means "request-time" (SSR). If `export const prerender` isn't defined, its default value depends on the value of `output` in the `astro.config.mjs` settings file. In our case, `output` is `static`, which means `prerender = true` by default. For more info on this, see https://docs.astro.build/en/guides/server-side-rendering/.
299299

300300
If you're familiar with other full-stack frameworks, using `prerender = false` is similar to `getServerSideProps` in Next.js and `loader` in Remix, while `prerender = true` is similar to getStaticProps in Next.js.
301301

astro.config.mjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import react from '@astrojs/react';
2-
import vercel from '@astrojs/vercel/serverless';
2+
import vercel from '@astrojs/vercel';
33
import { defineConfig } from 'astro/config';
44
import checker from 'vite-plugin-checker';
55

66
// https://astro.build/config
77
export default defineConfig({
88
integrations: [react()],
9-
output: 'hybrid',
10-
adapter: vercel({
11-
functionPerRoute: false,
12-
}),
9+
adapter: vercel({}),
1310
// eslint-disable-next-line no-undef
1411
site: process.env.SITE_URL,
1512
vite: {

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"astro": "astro"
2020
},
2121
"dependencies": {
22-
"@astrojs/check": "0.9.2",
23-
"@astrojs/react": "3.6.2",
24-
"@astrojs/vercel": "7.7.2",
22+
"@astrojs/check": "0.9.4",
23+
"@astrojs/react": "4.1.6",
24+
"@astrojs/vercel": "8.0.3",
2525
"@propelauth/base-elements": "^0.0.16",
2626
"@propelauth/node": "^2.1.0",
2727
"@propelauth/react": "2.1.0-beta.4",
@@ -37,7 +37,7 @@
3737
"@types/jsonwebtoken": "^9.0.2",
3838
"@types/react": "^18.0.21",
3939
"@types/react-dom": "^18.0.6",
40-
"astro": "4.13.3",
40+
"astro": "5.1.8",
4141
"astro-seo": "^0.7.2",
4242
"clsx": "^1.2.1",
4343
"cookie": "^0.5.0",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<script type="module" src="/@vite-plugin-checker-runtime-entry"></script>
1+
<script is:inline type="module" src="/@vite-plugin-checker-runtime-entry"></script>

src/content/eject/vercel.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ To remove the Vercel adapter, follow these steps:
1111

1212
```diff
1313
import react from '@astrojs/react';
14-
- import vercel from '@astrojs/vercel/serverless';
14+
- import vercel from '@astrojs/vercel';
1515
import { defineConfig } from 'astro/config';
1616

1717
// https://astro.build/config
1818
export default defineConfig({
1919
integrations: [react()],
20-
output: 'hybrid',
2120
- adapter: vercel(),
2221
// eslint-disable-next-line no-undef
2322
site: process.env.SITE_URL,
2423
```
2524

26-
<p class="text-sm pl-4">NOTE that you can use regular Astro without SSR adapters (if you remove the <code class="whitespace-nowrap">output: 'hybrid',</code> line). This can be a good option if you already have your own backend, but the Kit does not currently support such a configuration.</p>
25+
<p class="text-sm pl-4">NOTE that you can use regular Astro without SSR adapters (once you remove the <code class="whitespace-nowrap">adapter: vercel({}),</code> line). This can be a good option if you already have your own backend, but the Kit has some routes that will only work in SSR so you'll have to remove those yourself.</p>
2726

2827
Instead, you can add another Astro SSR adapter from the ones available on https://docs.astro.build/en/guides/server-side-rendering/#adding-an-adapter.
2928

src/pages/eject/index.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ const parsedSteps: {
3030
}[] = [];
3131
for (const slug of checksOrder) {
3232
const step = await getEntry('eject', slug);
33-
parsedSteps.push({ step });
33+
if (step) {
34+
parsedSteps.push({ step });
35+
}
3436
}
3537
---
3638

src/pages/setup/index.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const parsedSteps: {
2929
}[] = [];
3030
for (const slug of checksOrder) {
3131
const step = await getEntry('setup', slug);
32+
if (!step) continue;
3233
const stepDone = step.data.needsEnv.every((x) => {
3334
const value = process.env[x] || import.meta.env[x];
3435
return value !== undefined && value !== false;

0 commit comments

Comments
 (0)