Minor Changes
-
#3105
cd3e391Thanks @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/cloudflareif the site still uses an Astro 6 prerelease. -
#2980
570333aThanks @logelog! - AddsgetVersioned,compareAndSetandcompareAndDeleteto plugin storage collections andctx.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
nullrevision 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
2b2f69eThanks @ascorbic! - Fixes Cloudflare binding failures during runtime startup returningNOT_CONFIGUREDfrom EmDash API routes. Missing D1, R2, KV, Durable Object, and Hyperdrive bindings now returnBINDING_NOT_FOUNDwith the binding-specific setup message. Invalid KV and Hyperdrive binding configuration returnsCONFIGURATION_ERROR. -
#2169
107c3ccThanks @vedanshujain! - Addsctx.storage.<collection>.updateIf(id, { where, set?, delta? })for atomic conditional updates to existing plugin documents. Usewhereto check stored fields,setto replace field values, anddeltato 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
nullcounters start at0. 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"andretryable: true, including across sandbox transports. Retry standalone calls with bounded backoff, or restart the entire explicit transaction. -
#2351
f0af9a1Thanks @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 theLOADERbinding inwrangler.jsonc, including the named environment selected withCLOUDFLARE_ENV. Without it, config-based sandboxed plugins do not load and marketplace or registry installs returnSANDBOX_NOT_AVAILABLE, while browsing remains available. -
#3041
0ae2f26Thanks @danielmlr! - Adds the cause to theSANDBOX_NOT_AVAILABLEerror 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 missingworker_loadersbinding orPluginBridgeexport; on Node.js it says that theworkerdbinary did not run.Sandbox runners report the cause through a new optional
unavailableReason()method onSandboxRunner. 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