github emdash-cms/emdash @emdash-cms/cloudflare@0.38.0

latest releases: @emdash-cms/plugin-test@0.1.0, @emdash-cms/sandbox-workerd@0.6.0, @emdash-cms/plugin-embeds@0.1.46...
4 hours ago

Minor Changes

  • #3105 cd3e391 Thanks @ascorbic! - Fixes scheduled publishing cache invalidation so newly published content is served after the scheduled task completes.

    This release requires stable Astro 6.0.0 or later. Astro 6 prereleases no longer satisfy the package's peer dependency range.

    What should I do?

    Upgrade Astro to version 6.0.0 or later before updating @emdash-cms/cloudflare if the site still uses an Astro 6 prerelease.

  • #2980 570333a Thanks @logelog! - Adds getVersioned, compareAndSet and compareAndDelete to plugin storage collections and ctx.kv. Native and sandboxed plugins can create an absent key or condition a replacement or deletion on the revision they read, preventing concurrent requests from silently overwriting each other.

    Pass an explicit null revision to create only when absent. A successful replacement returns its new revision; a conflict returns { applied: false }. Invalid input, permission failures and database failures reject the promise. Atomicity applies to one key, so changes spanning multiple records still require an application-level protocol.

    Update core and the sandbox adapter together and apply the host database migrations before using the methods. The migration initializes existing records without a backfill. Stored values are preserved, and existing unconditional writes continue to work while invalidating old revisions. Conditional keys are limited to 1,024 JavaScript string characters and values to 1 MiB of UTF-8 JSON.

Patch Changes

  • #3065 2b2f69e Thanks @ascorbic! - Fixes Cloudflare binding failures during runtime startup returning NOT_CONFIGURED from EmDash API routes. Missing D1, R2, KV, Durable Object, and Hyperdrive bindings now return BINDING_NOT_FOUND with the binding-specific setup message. Invalid KV and Hyperdrive binding configuration returns CONFIGURATION_ERROR.

  • #2169 107c3cc Thanks @vedanshujain! - Adds ctx.storage.<collection>.updateIf(id, { where, set?, delta? }) for atomic conditional updates to existing plugin documents. Use where to check stored fields, set to replace field values, and delta to increment or decrement integer counters. The method returns { applied: true, data } with the updated document, or { applied: false } when the document is absent or the condition fails. It never inserts a document.

    Malformed update arguments reject without writing. Deltas require safe integer operands and results; missing or null counters start at 0. Invalid stored counters, overflow, and non-object documents return { applied: false } without changing any fields.

    Available to native plugins and sandboxed plugins on Cloudflare and Workerd, with SQLite, D1, and PostgreSQL support. PostgreSQL serialization failures and deadlocks expose code: "STORAGE_SERIALIZATION_FAILURE" and retryable: true, including across sandbox transports. Retry standalone calls with bounded backoff, or restart the entire explicit transaction.

  • #2351 f0af9a1 Thanks @MattieTK! - New Cloudflare projects leave the paid-plan Worker Loader binding disabled so they can deploy on the Workers free plan. Enable sandboxed plugins in the scaffold prompt or with --sandboxed-plugins.

    The Cloudflare sandbox() helper now selects the runner from the LOADER binding in wrangler.jsonc, including the named environment selected with CLOUDFLARE_ENV. Without it, config-based sandboxed plugins do not load and marketplace or registry installs return SANDBOX_NOT_AVAILABLE, while browsing remains available.

  • #3041 0ae2f26 Thanks @danielmlr! - Adds the cause to the SANDBOX_NOT_AVAILABLE error and to the "Plugin sandbox is configured but not available on this platform" startup warning when a configured sandbox runner cannot run plugins. On Cloudflare Workers the message names the missing worker_loaders binding or PluginBridge export; on Node.js it says that the workerd binary did not run.

    Sandbox runners report the cause through a new optional unavailableReason() method on SandboxRunner. Runners without it keep the previous messages.

  • Updated dependencies [36a021c, 573230f, 2b2f69e, 33cb7f0, befce6d, cd3e391, 3f516f4, b73a133, b1ccecd, fea6beb, 3bd30da, e13fa01, f9ac286, 0bcb1d9, 4c89130, 107c3cc, 107c3cc, 91a4aef, ef22a2d, f0af9a1, dd5ef1a, 0ae2f26, 27e432e, d409722, 8b3fd50, 1a71c9e, 91a4aef, 570333a]:

    • emdash@0.38.0

Don't miss a new emdash release

NewReleases is sending notifications on new releases.