github emdash-cms/emdash emdash@1.0.1

latest releases: @emdash-cms/plugin-test@0.2.6, @emdash-cms/sandbox-workerd@0.9.1, @emdash-cms/plugin-webhook-notifier@0.2.2...
4 hours ago

Patch Changes

  • #3515 d274172 Thanks @ascorbic! - Releases EmDash 1.0. This release includes breaking changes, such as removing APIs deprecated during 0.x. Before upgrading from 0.42, read the upgrade guide, which lists each change and how to migrate.

    From this release, breaking changes ship only in a new major version.

  • #3531 f6674fa Thanks @danielmlr! - Fixes recreating a deleted collection failing with Collection "…" already exists (COLLECTION_EXISTS) on sites with media usage tracking turned on, which new sites turn on automatically. Creating a collection through the admin, the API, MCP or a seed now finishes the deleted collection's media usage cleanup first, so sites already stuck in this state can recreate the collection after upgrading.

    Each create attempt does a bounded amount of that cleanup. If it can't finish, for example because the deleted collection referenced media from many entries, the error says the collection is being deleted, and the next attempt continues where the last one stopped. If the cleanup has failed, the error says so and includes the deleted collection's ID in details.deletedCollectionId. Both errors keep the COLLECTION_EXISTS code. Send that ID as { "collectionId": "…" } to POST /_emdash/api/admin/media-usage/collection-deletions/retry, which requires the schema:manage permission and, for API tokens, the admin scope, then create the collection again.

  • #3537 02c2ad3 Thanks @akapug! - Fixes the WordPress media URL rewrite matching a URL map key that carries a query string by its base URL. A key such as an attachment's ?attachment_id=7 shortlink also matched the home page, so the rewrite pointed links to the home page at that file. Such a key now matches that URL only, and inside a text field only where the URL ends with it.

  • #3518 bc54886 Thanks @ascorbic! - Moves the subpaths that only EmDash itself loads under emdash/internal/, and the D1 and Hyperdrive migration executors under @emdash-cms/cloudflare/internal/. These paths are not public API: their exports can change or be removed in any release.

    Sites that use emdash() in astro.config.mjs need no changes. The integration, the database, cache and media adapter helpers, and the first-party Cloudflare, workerd sandbox and plugin-test packages all load the new paths automatically.

    The following subpaths are removed:

    Removed subpath Now loaded from
    emdash/routes/* emdash/internal/routes/*
    emdash/middleware/auth emdash/internal/middleware/auth
    emdash/middleware/redirect emdash/internal/middleware/redirect
    emdash/middleware/request-context emdash/internal/middleware/request-context
    emdash/middleware/setup emdash/internal/middleware/setup
    emdash/middleware/media-usage-write-fence emdash/internal/middleware/media-usage-write-fence
    emdash/image-endpoint emdash/internal/image-endpoint
    emdash/media/local-runtime emdash/internal/media/local-runtime
    emdash/object-cache/memory emdash/internal/object-cache/memory
    emdash/db/sqlite-migrations emdash/internal/db/sqlite-migrations
    emdash/db/libsql-migrations emdash/internal/db/libsql-migrations
    emdash/db/postgres-migrations emdash/internal/db/postgres-migrations
    emdash/database/migration-lock emdash/internal/database/migration-lock
    emdash/database/pg-migration-lock emdash/internal/database/pg-migration-lock
    emdash/plugins/host emdash/internal/plugins/host
    emdash/plugins/http-wire emdash/internal/plugins/http-wire
    emdash/plugins/adapt-sandbox-entry emdash/internal/plugins/adapt-sandbox-entry
    emdash/plugin-test-runtime emdash/internal/plugin-test-runtime
    emdash/testing/registry emdash/internal/testing/registry
    @emdash-cms/cloudflare/db/d1-migrations @emdash-cms/cloudflare/internal/db/d1-migrations
    @emdash-cms/cloudflare/db/hyperdrive-migrations @emdash-cms/cloudflare/internal/db/hyperdrive-migrations

    What should I do?

    If your project or package imports one of the removed subpaths directly, replace the import with a public entrypoint:

    • To configure a database, object cache or media provider, use sqlite(), libsql() or postgres() from emdash/db, memoryCache() from emdash/astro, or localMedia() from emdash/media, instead of writing their entrypoints by hand.
    • To test a plugin, use @emdash-cms/plugin-test instead of emdash/plugin-test-runtime.
    • To run your own middleware before EmDash's, set the middleware.outer option of emdash(). The internal auth, setup, redirect and request-context middleware have no public replacement.

    Rebuild after upgrading. emdash migrate rejects a migration manifest written by an earlier EmDash version.

  • #3519 0b4be2c Thanks @ascorbic! - Removes the deprecated Comments and CommentForm exports from emdash/ui. Sites that still import either component from emdash/ui fail to build after upgrading.

    Import them from emdash/ui/comments instead:

    - import { Comments, CommentForm } from "emdash/ui";
    + import { Comments, CommentForm } from "emdash/ui/comments";

    The components themselves are unchanged. Importing them from emdash/ui/comments also keeps comment styles off pages that don't render comments.

  • #3519 0b4be2c Thanks @ascorbic! - Removes the deprecated emdash dev and emdash auth secret CLI commands. Scripts that still call either command now exit with Unknown command.

    • Replace emdash dev with the site's own dev script, such as pnpm dev, or run astro dev directly. The site then uses its configured database adapter instead of a local ./data.db, which emdash dev created and migrated even on D1 sites. The url key under emdash in package.json was only read by emdash dev --types and can be deleted. To generate types from a remote instance, run emdash types --url <site-url>, or set EMDASH_URL.
    • Remove emdash auth secret from scripts. New installations don't need EMDASH_AUTH_SECRET. Existing installations should keep the value they already have, since EmDash still reads it to keep commenter-IP hashes stable. To encrypt plugin secrets at rest, generate EMDASH_ENCRYPTION_KEY with emdash secrets generate.
  • #3519 0b4be2c Thanks @ascorbic! - Removes the deprecated experimental.registry integration option. Sites that still set it now fail at startup with an error pointing to the top-level registry option, including sites that already set registry alongside it. The value is not silently ignored, because that would drop the configured aggregator and release-age policy.

    Move the value unchanged. The top-level option accepts the same URL string or configuration object:

     emdash({
    -	experimental: {
    -		registry: {
    -			aggregatorUrl: "https://registry.example.com",
    -			policy: { minimumReleaseAge: "48h" },
    -		},
    -	},
    +	registry: {
    +		aggregatorUrl: "https://registry.example.com",
    +		policy: { minimumReleaseAge: "48h" },
    +	},
     });

    The experimental option is also removed from the EmDashConfig type, because it has no remaining settings. An empty experimental: {} block is still ignored at runtime, but TypeScript configs should delete it. Registry configuration errors in the admin now always name the top-level registry.* setting.

  • #3322 1cdca21 Thanks @danielmlr! - Fixes routeCtx.ui being undefined for the declared Block Kit pages and dashboard widgets of plugins registered in plugins: []. They now receive the administrator's locale, text direction, and surface, as sandboxed plugins do, so a plugin can localize its Block Kit text in both install modes.

  • #3519 0b4be2c Thanks @ascorbic! - Adds a startup warning when an installed or configured plugin declares deprecated capability names such as read:content, network:fetch or page:inject. The warning appears once per plugin and lists each current replacement, for example read:content → content:read. The deprecated names keep working throughout 1.x. If a plugin you use triggers the warning, update it, or ask its author to publish a version that uses the current names.

    aiSearch() from @emdash-cms/cloudflare now declares content:read, so it no longer triggers the warning.

  • Updated dependencies [6f2ef26, c66b49b, 9e297d6, d274172, a3609fb, 618591e, 0b4be2c]:

    • @emdash-cms/admin@1.0.1
    • @emdash-cms/auth@1.0.1
    • @emdash-cms/blocks@1.0.1
    • @emdash-cms/gutenberg-to-portable-text@1.0.1

Don't miss a new emdash release

NewReleases is sending notifications on new releases.