Skip to content

@emdash-cms/plugin-test@0.2.11

Latest

Choose a tag to compare

@emdashbot emdashbot released this 29 Oct 13:03
10beb8c

Patch Changes

  • #4273 461f468 Thanks @emdash-autofix! - Fixes intermittent empty-manifest errors when emdashPluginTest() runs multiple test files in parallel by isolating each plugin build.

    emdashPluginTest() no longer writes to the plugin's dist/ directory. Run emdash-plugin build separately if you need build artifacts after testing.

  • #4394 6be7263 Thanks @emdash-autofix! - Fixes sandboxed plugin ctx.taxonomies mutations (createTerm(), addEntryTerms(), and removeEntryTerms()), ctx.content.create(), versioned content actions (getVersioned(), publish(), unpublish(), schedule(), unschedule(), getTrashedVersioned(), and restore()), and ctx.comments.setStatus() on Cloudflare when requests run across multiple Worker isolates. Content creation consistently uses runtime validation and hooks and preserves translationOf links instead of falling back to a plain database insert.

    Runner-created invocations without a content-create callback now receive Content creation is not configured rather than a database insert that bypasses runtime behavior. createPluginTestHost() supplies a database-backed callback with content-handler validation so transport-level tests can continue creating content and linked translations without starting the full EmDash runtime. It preserves the transport host's support for data.slug and data.status.

    Await these operation promises before returning from a plugin route or hook. Their RPC connection now lasts only for that invocation; unlike the previous loopback binding, it cannot support work that outlives the invocation.

    Publication after-hooks remain deferred. Same-entry actions attempted while an after-hook is running can return CONTENT_ACTION_REENTRANT; faster callback routing can expose this overlap in tests that assumed hooks had already finished. In runtime-host tests, call await host.waitForDeferredTasks() after an action before inspecting its after-hook effects or starting another action on the same entry. This method waits for queued deferred runtime work, including work those tasks enqueue; it does not run future scheduled tasks or wait for arbitrary unawaited plugin operations.

  • Updated dependencies [064fbbf, 75030fc, b145faf, ec973c0, ceaf9b6, d871288, 3d29980, 9d9fd82, 190022c, 3ce9d36, 8da0792, c238da2, a6f4091, f197acf, 57abb5c, e1c4a87, c16941e, 45ceb7b, 42503f0, bed3e42, 4409acb, 53acf71, 6be7263, 9e7cd3d, a16ab2c, 9201138, d1e25e0, 6c5d878, 56cb9da]:

    • emdash@1.4.0
    • @emdash-cms/plugin-cli@0.13.5
    • @emdash-cms/cloudflare@1.4.0
    • @emdash-cms/blocks@1.4.0