@astrojs/telemetry@3.3.2
- #16260
354e231Thanks @gameroman! - Refactors internal config logic to remove thedlvdependency in favor of native logic
@astrojs/cloudflare@13.4.0
-
#16519
1b1c218Thanks @louisescher! - Adds support for redirecting URLs in remote image optimization.Previously, when a remote image URL meant to be optimized by Astro led to a redirect, Astro would fail silently and ignore the redirect. Now, Astro tracks up to 10 redirects for these images. If any of the redirects are not covered by a pattern in
image.remotePatternsor a domain inimage.domains, Astro will fail with a helpful error message.In the following example, the first image would be loaded successfully, while the second would lead to Astro throwing an error:
export default defineConfig({ image: { domains: ['example.com', 'cdn.example.com'], }, });
{ /* Redirects to https://cdn.example.com/assets/image.png: */ } <Image src="https://example.com/assets/image.png" width="1920" height="1080" alt="An example image." />; { /* Redirects to https://malicious.com/image.png: */ } <Image src="https://example.com/bad-image.png" width="1920" height="1080" alt="An example image." />;
In cases where all redirects to HTTPS hosts should be trusted, the following configuration for
image.remotePatternscan be used:export default defineConfig({ image: { remotePatterns: [ { protocol: 'https', }, ], }, });
- Updated dependencies []:
- @astrojs/underscore-redirects@1.0.3
astro@6.3.0
-
#16366
d69f858Thanks @matthewp! - Adds a newexperimental.advancedRoutingoption that lets you take full control of Astro's request handling pipeline by creating asrc/app.tsfile in your project.Today, Astro handles every incoming request through a fixed internal pipeline: trailing slash normalization, redirects, actions, middleware, page rendering, i18n, and so on. That pipeline works great for most sites, but as projects grow you often want to run your own logic between those steps — an auth check before rendering, a rate limiter before actions, custom logging around the whole stack. Advanced routing gives you that control.
When enabled, Astro looks for a
src/app.tsfile in your project. If it finds one, that file becomes the entrypoint for all server-rendered requests. You compose the pipeline yourself using the handlers Astro provides, and you can slot your own logic anywhere in the chain.// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { advancedRouting: true, }, });
Astro ships two entrypoints for advanced routing:
astro/fetchandastro/hono.astro/fetchis a low-level, framework-free API built on the Web Fetch standard. You create aFetchStatefrom the incoming request, then call handler functions in sequence. Each handler takes the state, does its work, and returns aResponse(orundefinedto pass through). This is the core primitive that everything else is built on:// src/app.ts import { FetchState, trailingSlash, redirects, actions, middleware, pages, i18n, } from 'astro/fetch'; export default { async fetch(request: Request) { const state = new FetchState(request); // Early exits — these return a Response only when they apply. const slash = trailingSlash(state); if (slash) return slash; const redirect = redirects(state); if (redirect) return redirect; const action = await actions(state); if (action) return action; // Middleware wraps page rendering; i18n post-processes the response. const response = await middleware(state, () => pages(state)); return i18n(state, response); }, };
astro/honowraps the same handlers as Hono middleware, so you can mix Astro's pipeline with Hono's ecosystem of middleware (logger, CORS, JWT, rate limiting, etc.) using theapp.use()pattern you already know:// src/app.ts import { Hono } from 'hono'; import { getCookie } from 'hono/cookie'; import { logger } from 'hono/logger'; import { actions, middleware, pages, i18n } from 'astro/hono'; const app = new Hono(); app.use(logger()); // Auth gate — only runs for /dashboard routes. app.use('/dashboard/*', async (c, next) => { const session = getCookie(c, 'session'); if (!session) return c.redirect('/login'); return next(); }); app.use(actions()); app.use(middleware()); app.use(pages()); app.use(i18n()); export default app;
Both approaches give you the same power — pick whichever fits your project. If you don't need a framework,
astro/fetchkeeps things minimal. If you want a rich middleware ecosystem,astro/honogets you there with one import.For more information on enabling and using this feature in your project, see the experimental advanced routing docs. To give feedback, or to keep up with its development, see the advanced routing RFC for more information and discussion.
-
#16366
d69f858Thanks @matthewp! - Adds aconsume()instance method toAstroCookies. This method marks the cookies as consumed and returns theSet-Cookieheader values. After consumption, any subsequentset()calls will log a warning, since the headers have already been sent.Previously this was only available as a static method
AstroCookies.consume(cookies). The static method is now deprecated but kept for backward compatibility with existing adapters. -
#16412
ba2d2e3Thanks @0xbejaxer! - Add retry and error event handling forastro-islandhydration import failures to reduce unrecoverable hydration errors on transient network failures. -
#16582
885cd31Thanks @Princesseuh! - Adds a newimage.dangerouslyProcessSVGflag to optionally enable processing SVG inputs. For security reasons, Astro will no longer rasterizes SVG image sources by default in its default image service and endpoint.Set
image.dangerouslyProcessSVG: trueto opt back into processing SVG inputs.// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ // ... image: { dangerouslyProcessSVG: true, }, });
Note that this is a breaking change for users who were previously relying on Astro's default image service to rasterize SVG inputs, but it is a necessary change to improve security and prevent potential vulnerabilities.
-
#16519
1b1c218Thanks @louisescher! - Adds support for redirecting URLs in remote image optimization.Previously, when a remote image URL meant to be optimized by Astro led to a redirect, Astro would fail silently and ignore the redirect. Now, Astro tracks up to 10 redirects for these images. If any of the redirects are not covered by a pattern in
image.remotePatternsor a domain inimage.domains, Astro will fail with a helpful error message.In the following example, the first image would be loaded successfully, while the second would lead to Astro throwing an error:
export default defineConfig({ image: { domains: ['example.com', 'cdn.example.com'], }, });
{ /* Redirects to https://cdn.example.com/assets/image.png: */ } <Image src="https://example.com/assets/image.png" width="1920" height="1080" alt="An example image." />; { /* Redirects to https://malicious.com/image.png: */ } <Image src="https://example.com/bad-image.png" width="1920" height="1080" alt="An example image." />;
In cases where all redirects to HTTPS hosts should be trusted, the following configuration for
image.remotePatternscan be used:export default defineConfig({ image: { remotePatterns: [ { protocol: 'https', }, ], }, });
-
#16592
9c6efc5Thanks @matthewp! - Escapes interpolated values in the dev server redirect HTML template, consistent with how the 404 template already handles them -
#16585
78f305eThanks @web-dev0521! - Fixesz.array(z.boolean())in form actions incorrectly coercing the string"false"totrue. Boolean array elements now use the same'true'/'false'string comparison as singlez.boolean()fields, so submitting["false", "true", "false"]correctly parses as[false, true, false]. -
#16567
12a03f2Thanks @matthewp! - Fixes deleted content collection entries persisting ingetCollection()results during dev -
#16595
ce9b25cThanks @web-dev0521! - FixespushDirectivein the CSP runtime duplicating the new directive once per existing non-matching directive. CallinginsertDirective()(or otherwise pushing a directive whose name is not yet in the list) now appends it exactly once, and a directive that merges with a later existing entry no longer leaves an unmerged copy behind. -
#16600
94e4b7cThanks @web-dev0521! - FixesAstro.preferredLocalereturning the wrong value wheni18n.localesmixes object-form entries ({ path, codes }) with string entries that normalize to the same locale. The first matching code in the configuredlocalesorder is now selected, matching the documented behavior. -
#16591
cce20f7Thanks @matthewp! - Uses a consistent generic error message in the image endpoint across all adapters -
#16629
f54be80Thanks @g-taki! - Fixes a bug where SSR responses inastro devcould crash withTypeError: this.logger.flush is not a function. -
#16589
3740b24Thanks @ArmandPhilippot! - Fixes an outdated code snippet in the documentation for session storage configuration. -
Updated dependencies [
354e231]:- @astrojs/telemetry@3.3.2
@astrojs/language-server@2.16.8
- #16627
5778cb7Thanks @Princesseuh! - Fixes unintended dependency on thetypescriptpackage being available to the language server
v4.1.2
- feat: add vitepress-demo-plugin and modify document demo by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/455
- feat: distinguish between underline and strikethrough labels by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/460
- feat!: migrate i18n to
quill-i18nby @zzxming in https://github.com/opentiny/tiny-editor/pull/461 - feat: solve the problem of losing content style when copying from Excel by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/466
- fix: the problem of starting to input the placeholder without disappearing in the context of Chinese input method by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/457
- fix: resolve the issue of the image toolbar border exceeding the limit after clicking on the image by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/458
- fix: resolve the issue of the close button continuously displaying after enlarging the image by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/459
- fix: resolve the issue of having an additional image label when copying images directly from the editor to the clipboard by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/462
- fix: fix the issue where the pop-up box for modification operations does not appear when hovering over an image link by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/463
- fix: fix the issue of incorrect serial number display when the content exceeds one line by @wuyiping0628 in https://github.com/opentiny/tiny-editor/pull/465
- fix: avoid exposing all system env vars in Vite define config by @hexqi in https://github.com/opentiny/tiny-editor/pull/467
- @hexqi made their first contribution in https://github.com/opentiny/tiny-editor/pull/467
Full Changelog: https://github.com/opentiny/tiny-editor/compare/v4.1.1...v4.1.2
mobx@6.15.3
25e859a3582bcdd3c5a71aa52510adfd924a1a60#4644 Thanks @kubk! - Fix TypeScript errors when usingflowas a standard decorator.
v3.6.0-beta.11
For stable releases, please refer to CHANGELOG.md for details. For pre-releases, please refer to CHANGELOG.md of the minor branch.
v3.6.0-beta.11
For stable releases, please refer to CHANGELOG.md for details. For pre-releases, please refer to CHANGELOG.md of the minor branch.