Astro: @astrojs/[email protected] Release

Release date:
June 19, 2025
Previous version:
@astrojs/[email protected] (released June 17, 2025)
Magnitude:
3,067 Diff Delta
Contributors:
3 total committers
Data confidence:
Commits:

16 Commits in this Release

Ordered by the degree to which they evolved the repo in this version.

Authored June 19, 2025
Authored June 19, 2025
Authored June 19, 2025
Authored June 17, 2025
Authored June 19, 2025
Authored June 18, 2025
Authored June 19, 2025
Authored June 17, 2025
Authored June 18, 2025
Authored June 19, 2025

Top Contributors in @astrojs/[email protected]

ematipico
alexanderniebuhr
florian-lefebvre

Directory Browser for @astrojs/[email protected]

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Minor Changes

  • #13837 7cef86f Thanks @alexanderniebuhr! - Adds new configuration options to allow you to set a custom workerEntryPoint for Cloudflare Workers. This is useful if you want to use features that require handlers (e.g. Durable Objects, Cloudflare Queues, Scheduled Invocations) not supported by the basic generic entry file.

    This feature is not supported when running the Astro dev server. However, you can run astro build followed by either wrangler deploy (to deploy it) or wrangler dev to preview it.

    The following example configures a custom entry file that registers a Durable Object and a queue handler:

    // astro.config.ts
    import cloudflare from '@astrojs/cloudflare';
    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      adapter: cloudflare({
        workerEntryPoint: {
          path: 'src/worker.ts',
          namedExports: ['MyDurableObject'],
        },
      }),
    });
    
    // src/worker.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,
      };
    }
    

Patch Changes