Skip to content

Conversation

@astrobot-houston
Copy link
Contributor

@astrobot-houston astrobot-houston commented Nov 12, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

[email protected]

Major Changes

Minor Changes

  • #14306 141c4a2 Thanks @ematipico! - Adds new optional properties to setAdapter() for adapter entrypoint handling in the Adapter API

    Changes:

    • New optional properties:
      • devEntrypoint?: string | URL - specifies custom dev server entrypoint
      • entryType?: 'self' | 'legacy-dynamic' - determines if the adapter provides its own entrypoint ('self') or if Astro constructs one ('legacy-dynamic', default)

    Migration: Adapter authors can optionally add these properties to support custom dev entrypoints. If not specified, adapters will use the legacy behavior.

  • #14826 170f64e Thanks @florian-lefebvre! - Adds an option prerenderConflictBehavior to configure the behavior of conflicting prerendered routes

    By default, Astro warns you during the build about any conflicts between multiple dynamic routes that can result in the same output path. For example /blog/[slug] and /blog/[...all] both could try to prerender the /blog/post-1 path. In such cases, Astro renders only the highest priority route for the conflicting path. This allows your site to build successfully, although you may discover that some pages are rendered by unexpected routes.

    With the new prerenderConflictBehavior configuration option, you can now configure this further:

    • prerenderConflictBehavior: 'error' fails the build
    • prerenderConflictBehavior: 'warn' (default) logs a warning and the highest-priority route wins
    • prerenderConflictBehavior: 'ignore' silently picks the highest-priority route when conflicts occur
    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
    +    prerenderConflictBehavior: 'error',
    });
  • #14946 95c40f7 Thanks @ematipico! - Removes the experimental.csp flag and replaces it with a new configuration option security.csp - (v6 upgrade guidance)

Patch Changes

  • #14982 6849e38 Thanks @Princesseuh! - Fixes images outside the project directory not working when using astro:assets in development mode

@astrojs/[email protected]

Major Changes

  • #14306 141c4a2 Thanks @ematipico! - Changes the API for creating a custom entrypoint, replacing the createExports() function with a direct export pattern.

    What should I do?

    If you're using a custom entryPoint in your Cloudflare adapter config, update your existing worker file that uses createExports() to reflect the new, simplified pattern:

    my-entry.ts

    import type { SSRManifest } from 'astro';
    import { App } from 'astro/app';
    import { handle } from '@astrojs/cloudflare/handler';
    import { DurableObject } from 'cloudflare:workers';
    
    class MyDurableObject extends DurableObject<Env> {
      constructor(ctx: DurableObjectState, env: Env) {
        super(ctx, env);
      }
    }
    
    export function createExports(manifest: SSRManifest) {
      const app = new App(manifest);
      return {
        default: {
          async fetch(request, env, ctx) {
            await env.MY_QUEUE.send('log');
            return handle(manifest, app, request, env, ctx);
          },
          async queue(batch, _env) {
            let messages = JSON.stringify(batch.messages);
            console.log(`consumed from our queue: ${messages}`);
          },
        } satisfies ExportedHandler<Env>,
        MyDurableObject: MyDurableObject,
      };
    }

    To create the same custom entrypoint using the updated API, export the following function instead:

    my-entry.ts

    import { handle } from '@astrojs/cloudflare/utils/handler';
    
    export default {
      async fetch(request, env, ctx) {
        await env.MY_QUEUE.send("log");
        return handle(manifest, app, request, env, ctx);
      },
      async queue(batch, _env) {
        let messages = JSON.stringify(batch.messages);
        console.log(`consumed from our queue: ${messages}`);
      }
    } satisfies ExportedHandler<Env>,

    The manifest is now created internally by the adapter.

  • #14306 141c4a2 Thanks @ematipico! - Development server now runs in workerd

    astro dev now runs your Cloudflare application using Cloudflare's workerd runtime instead of Node.js. This means your development environment is now a near-exact replica of your production environment—the same JavaScript engine, the same APIs, the same behavior. You'll catch issues during development that would have only appeared in production, and features like Durable Objects, Workers Analytics Engine, and R2 bindings work exactly as they do on Cloudflare's platform.

    To accommodate this major change to your development environment, this update includes breaking changes to Astro.locals.runtime, removing some of its properties.

    What should I do?

    Update occurrences of Astro.locals.runtime as shown below:

    • Astro.locals.runtime no longer contains the env object. Instead, import it directly:
      import { env } from 'cloudflare:workers';
    • Astro.locals.runtime no longer contains the cf object. Instead, access it directly from the request:
      Astro.request.cf;
    • Astro.locals.runtime no longer contains the caches object. Instead, use the global caches object directly:
      caches.default.put(request, response);
    • Astro.locals.runtime object is replaced with Astro.locals.cfContext which contains the Cloudflare ExecutionContext:
      const cfContext = Astro.locals.cfContext;

Minor Changes

  • #14306 141c4a2 Thanks @ematipico! - Adds support for astro preview command

    Developers can now use astro preview to test their Cloudflare Workers application locally before deploying. The preview runs using Cloudflare's workerd runtime, giving you a staging environment that matches production exactly—including support for KV namespaces, environment variables, and other Cloudflare-specific features.

Patch Changes

@astrojs/[email protected]

Minor Changes

Patch Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Minor Changes

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@astrojs/[email protected]

Patch Changes

@github-actions github-actions bot added pkg: example Related to an example package (scope) pkg: astro Related to the core `astro` package (scope) labels Nov 12, 2025
@github-actions github-actions bot force-pushed the changeset-release/next branch 3 times, most recently from 83585bf to 875f339 Compare November 13, 2025 15:04
@github-actions github-actions bot force-pushed the changeset-release/next branch 2 times, most recently from afefaac to de0a133 Compare November 21, 2025 15:33
@github-actions github-actions bot force-pushed the changeset-release/next branch 11 times, most recently from a250df2 to a4c26ce Compare December 10, 2025 13:55
@github-actions github-actions bot force-pushed the changeset-release/next branch 12 times, most recently from 1a0270b to 9c4a965 Compare December 12, 2025 16:03
@github-actions github-actions bot force-pushed the changeset-release/next branch 2 times, most recently from 49790a4 to bf0db8c Compare December 12, 2025 17:57
@github-actions github-actions bot force-pushed the changeset-release/next branch from bf0db8c to 8562a27 Compare December 12, 2025 18:38
@matthewp matthewp merged commit cffc3f0 into next Dec 12, 2025
@matthewp matthewp deleted the changeset-release/next branch December 12, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants