diff options
author | 2024-09-16 19:31:49 +0200 | |
---|---|---|
committer | 2024-09-16 13:31:49 -0400 | |
commit | d9619eef3a62c841b9408d23032dd19e8caaed60 (patch) | |
tree | d0f0617ef03f9775669a69b21bcef3c55363c781 | |
parent | 132b66147faf50dffe977224786f04a16e75b9e7 (diff) | |
download | astro-d9619eef3a62c841b9408d23032dd19e8caaed60.tar.gz astro-d9619eef3a62c841b9408d23032dd19e8caaed60.tar.zst astro-d9619eef3a62c841b9408d23032dd19e8caaed60.zip |
Adapter related changes for IntegrationData (#377)
* chore: port adapter related changes from astro #11864
* chore: bump version
* chore: bump
* fix: types
* fix
* fix: tests
* fix: locals
* Update expected image endpoint
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
-rw-r--r-- | packages/integrations/netlify/package.json | 6 | ||||
-rw-r--r-- | packages/integrations/netlify/src/index.ts | 6 | ||||
-rw-r--r-- | packages/integrations/netlify/test/hosted/hosted-astro-project/package.json | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index d22b0d4c7..e7841f76b 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -32,20 +32,20 @@ }, "dependencies": { "@astrojs/internal-helpers": "0.4.1", - "@astrojs/underscore-redirects": "^0.3.4", + "@astrojs/underscore-redirects": "^0.4.0-alpha.0", "@netlify/functions": "^2.8.0", "@vercel/nft": "^0.27.3", "esbuild": "^0.23.1" }, "peerDependencies": { - "astro": "^5.0.0-alpha.6" + "astro": "^5.0.0-alpha.8" }, "devDependencies": { "@astrojs/test-utils": "workspace:*", "@netlify/edge-functions": "^2.10.0", "@netlify/edge-handler-types": "^0.34.1", "@types/node": "^20.16.1", - "astro": "^5.0.0-alpha.6", + "astro": "^5.0.0-alpha.8", "astro-scripts": "workspace:*", "cheerio": "1.0.0", "execa": "^8.0.1", diff --git a/packages/integrations/netlify/src/index.ts b/packages/integrations/netlify/src/index.ts index 061a8b2e9..9b7208f1c 100644 --- a/packages/integrations/netlify/src/index.ts +++ b/packages/integrations/netlify/src/index.ts @@ -10,7 +10,7 @@ import type { AstroIntegration, AstroIntegrationLogger, HookParameters, - RouteData, + IntegrationRouteData, } from 'astro'; import { build } from 'esbuild'; import { copyDependenciesToFunction } from './lib/nft.js'; @@ -26,7 +26,7 @@ export interface NetlifyLocals { }; } -const isStaticRedirect = (route: RouteData) => +const isStaticRedirect = (route: IntegrationRouteData) => route.type === 'redirect' && (route.redirect || route.redirectRoute); type RemotePattern = AstroConfig['image']['remotePatterns'][number]; @@ -212,7 +212,7 @@ export default function netlifyIntegration( emptyDir(ssrBuildDir()), ]); - async function writeRedirects(routes: RouteData[], dir: URL) { + async function writeRedirects(routes: IntegrationRouteData[], dir: URL) { const fallback = finalBuildOutput === 'static' ? '/.netlify/static' : '/.netlify/functions/ssr'; const redirects = createRedirectsFromAstroRoutes({ config: _config, diff --git a/packages/integrations/netlify/test/hosted/hosted-astro-project/package.json b/packages/integrations/netlify/test/hosted/hosted-astro-project/package.json index 46180c46a..a13a65ca1 100644 --- a/packages/integrations/netlify/test/hosted/hosted-astro-project/package.json +++ b/packages/integrations/netlify/test/hosted/hosted-astro-project/package.json @@ -7,6 +7,6 @@ }, "dependencies": { "@astrojs/netlify": "workspace:*", - "astro": "^5.0.0-alpha.6" + "astro": "^5.0.0-alpha.8" } } |