Skip to content

Commit

Permalink
updates to adapter internals (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfjkalsdfla authored Jan 16, 2024
1 parent 32ce15b commit 2b5aaa4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changeset/curly-oranges-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@astrojs/cloudflare": major
"@astrojs/netlify": major
---

Updates the internals of the integration to support Astro 4.0. See this [upstream pull request](https://github.com/withastro/astro/pull/9199) for additional details. **Warning:** Make sure to upgrade your Astro version to `>4.0` as `3.0` is no longer supported.
2 changes: 1 addition & 1 deletion packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"tiny-glob": "^0.2.9"
},
"peerDependencies": {
"astro": "^3.0.0 || ^4.0.0"
"astro": "^4.0.0"
},
"devDependencies": {
"execa": "^8.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/src/entrypoints/server.advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function createExports(manifest: SSRManifest) {
},
};

const response = await app.render(request, routeData, locals);
const response = await app.render(request, { routeData, locals });

if (app.setCookieHeaders) {
for (const setCookieHeader of app.setCookieHeaders(response)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/src/entrypoints/server.directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function createExports(manifest: SSRManifest) {
},
};

const response = await app.render(request, routeData, locals);
const response = await app.render(request, { routeData, locals });

if (app.setCookieHeaders) {
for (const setCookieHeader of app.setCookieHeaders(response)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"esbuild": "^0.19.5"
},
"peerDependencies": {
"astro": "^3.0.0 || ^4.0.0"
"astro": "^4.0.0"
},
"devDependencies": {
"@netlify/edge-functions": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/netlify/src/ssr-function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const createExports = (manifest: SSRManifest, _args: Args) => {

locals.netlify = { context };

const response = await app.render(request, routeData, locals);
const response = await app.render(request, { routeData, locals });

if (app.setCookieHeaders) {
for (const setCookieHeader of app.setCookieHeaders(response)) {
Expand Down

0 comments on commit 2b5aaa4

Please sign in to comment.