#75329e5fafa2b Thanks @ematipico! - The astro/middleware module exports a new utility called trySerializeLocals.
This utility can be used by adapters to validate their locals before sending it
to the Astro middleware.
This function will throw a runtime error if the value passed is not serializable, so
consumers will need to handle that error.
#75329e5fafa2b Thanks @ematipico! - Astro exposes the middleware file path to the integrations in the hook astro:build:ssr
// myIntegration.js
import type { AstroIntegration } from 'astro';
function integration(): AstroIntegration {
return {
name: 'fancy-astro-integration',
hooks: {
'astro:build:ssr': ({ middlewareEntryPoint }) => {
if (middlewareEntryPoint) {
// do some operations
}
},
},
};
}
The middlewareEntryPoint is only defined if the user has created an Astro middleware.
#74326e9c29579 Thanks @ematipico! - Adds a new command astro info, useful for sharing debugging information about your current environment when you need help!
astro info
Output
Astro version v2.6.6
Package manager pnpm
Platform darwin
Architecture arm64
Adapter @astrojs/vercel/serverless
Integrations None
#75329e5fafa2b Thanks @ematipico! - The astro/middleware module exports a new API called createContext.
This a low-level API that adapters can use to create a context that can be consumed by middleware functions.
#75329e5fafa2b Thanks @ematipico! - The astro/middleware module exports a new utility called trySerializeLocals.
This utility can be used by adapters to validate their locals before sending it
to the Astro middleware.
This function will throw a runtime error if the value passed is not serializable, so
consumers will need to handle that error.
#75329e5fafa2b Thanks @ematipico! - Astro exposes the middleware file path to the integrations in the hook astro:build:ssr
// myIntegration.js
import type { AstroIntegration } from 'astro';
function integration(): AstroIntegration {
return {
name: 'fancy-astro-integration',
hooks: {
'astro:build:ssr': ({ middlewareEntryPoint }) => {
if (middlewareEntryPoint) {
// do some operations
}
},
},
};
}
The middlewareEntryPoint is only defined if the user has created an Astro middleware.
#74326e9c29579 Thanks @ematipico! - Adds a new command astro info, useful for sharing debugging information about your current environment when you need help!
astro info
Output
Astro version v2.6.6
Package manager pnpm
Platform darwin
Architecture arm64
Adapter @astrojs/vercel/serverless
Integrations None
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps astro from 2.7.4 to 2.8.0.
Release notes
Sourced from astro's releases.
... (truncated)
Changelog
Sourced from astro's changelog.
... (truncated)
Commits
f224078
[ci] release (#7578)a0a1ca3
Refactor passing compressHTML (#7585)2d9c621
Simpify passing endpoint logging option (#7584)30d04db
RefactorSSRResult
andRenderContext
(#7575)44e56bb
[ci] format6e9c295
feat:astro info
command (#7432)c490eb6
[ci] format9e5fafa
feat: vercel edge middleware support (#7532)cfd5b2b
refactor: use only manifest to compute information (#7571)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)