From 33b2973d908f9327675725c17624e1b4edf06bfa Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 15 Sep 2026 08:13:59 +0000 Subject: [PATCH 1/3] feat(core): widen emdash peer dependency to support 0.38.x - Update peerDependencies to allow emdash >=0.37.0 <0.39.0 - Upgrade devDependencies to emdash@^0.38.0 and @emdash-cms/admin@^0.38.0 in core - Upgrade dependencies to emdash@^0.38.0 and @emdash-cms/cloudflare@^0.38.0 in starter - Create new patch for emdash@0.38.0 preserving raw Response handling and request cloning - Add changeset documenting compatibility with EmDash 0.38 features (entry locks, updateIf, SEO overlay) EmDash 0.38.0 introduces entry edit locks with migration 075_entry_edit_locks, atomic ctx.storage..updateIf() for conditional updates, automatic SEO overlay, collection grouping, and Portable Text tables. All typecheck and tests pass on 0.38.0. Co-authored-by: Timchosen Uzua --- .changeset/emdash-0.38-compat.md | 10 ++++++++ bun.lock | 32 ++++++++++++------------ package.json | 4 +-- packages/core/package.json | 6 ++--- packages/starter/.emdash/migrations.json | 9 ++++--- packages/starter/package.json | 4 +-- patches/emdash@0.38.0.patch | 14 +++++++++++ 7 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 .changeset/emdash-0.38-compat.md create mode 100644 patches/emdash@0.38.0.patch diff --git a/.changeset/emdash-0.38-compat.md b/.changeset/emdash-0.38-compat.md new file mode 100644 index 0000000..91ec24a --- /dev/null +++ b/.changeset/emdash-0.38-compat.md @@ -0,0 +1,10 @@ +--- +"@dashcommerce/core": patch +--- + +Widen `emdash` peer dependency to allow 0.38.x alongside existing 0.37.x support. EmDash 0.38 adds entry edit locks (migration `075_entry_edit_locks`), atomic `ctx.storage..updateIf()` for conditional updates, SEO `` overlay, collection grouping, and Portable Text table enhancements. DashCommerce installations on EmDash 0.37.x continue to work; 0.38.x installs now pass peer checks. + +**For plugin authors using DashCommerce:** +- Content update/publish APIs may now return `409 ENTRY_LOCKED` when an editor has the entry open. Pass `overrideLock: true` in request body or `?overrideLock=true` on DELETE to bypass. +- Consider using `ctx.storage..updateIf()` for atomic stock/inventory decrements instead of read-modify-write patterns. +- EmDash auto-migrates on default settings; manual migration projects should run `emdash migrate` before deploying. diff --git a/bun.lock b/bun.lock index 302a524..1906f16 100644 --- a/bun.lock +++ b/bun.lock @@ -18,19 +18,19 @@ "dashcommerce-merge-seed": "./dist/cli/merge-seed.js", }, "devDependencies": { - "@emdash-cms/admin": "^0.37.0", + "@emdash-cms/admin": "^0.38.0", "@stripe/react-stripe-js": "^3.0.0", "@stripe/stripe-js": "^5.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", - "emdash": "^0.37.0", + "emdash": "^0.38.0", "react": "^19.0.0", "react-dom": "^19.0.0", "tsdown": "^0.20.0", "typescript": "^5.9.3", }, "peerDependencies": { - "emdash": ">=0.37.0 <0.38.0", + "emdash": ">=0.37.0 <0.39.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", }, @@ -66,11 +66,11 @@ "@astrojs/react": "^5.0.0", "@astrojs/sitemap": "^3.4.0", "@dashcommerce/core": "workspace:*", - "@emdash-cms/cloudflare": "^0.37.0", + "@emdash-cms/cloudflare": "^0.38.0", "@stripe/react-stripe-js": "^6.0.0", "@stripe/stripe-js": "^9.0.0", "astro": "^6.0.0", - "emdash": "^0.37.0", + "emdash": "^0.38.0", "react": "^19.0.0", "react-dom": "^19.0.0", }, @@ -86,7 +86,7 @@ }, }, "patchedDependencies": { - "emdash@0.37.0": "patches/emdash@0.37.0.patch", + "emdash@0.38.0": "patches/emdash@0.38.0.patch", }, "packages": { "@astrojs/check": ["@astrojs/check@0.9.10", "", { "dependencies": { "@astrojs/language-server": "^2.16.7", "chokidar": "^4.0.3", "kleur": "^4.1.5", "yargs": "^18.0.0" }, "peerDependencies": { "typescript": "^5.0.0 || ^6.0.0" }, "bin": { "astro-check": "./bin/astro-check.js" } }, "sha512-zgx/UQMozdjOa3bOxjgeCFdtpE3c9rRX6xHwa+2QXvy8z8Akifu2AtubHyv/zzC2znO8dl8fFWL4K+Ba9kS8HQ=="], @@ -293,25 +293,25 @@ "@dnd-kit/utilities": ["@dnd-kit/utilities@3.2.2", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0" } }, "sha512-+MKAJEOfaBe5SmV6t34p80MMKhjvUz0vRrvVJbPT0WElzaOJ/1xs+D+KDv+tD/NE5ujfrChEcshd4fLn0wpiqg=="], - "@emdash-cms/admin": ["@emdash-cms/admin@0.37.0", "", { "dependencies": { "@atcute/identity-resolver": "^2.0.0", "@atcute/lexicons": "^2.0.0", "@cloudflare/kumo": "2.6.0", "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@emdash-cms/blocks": "0.37.0", "@emdash-cms/plugin-types": "0.3.1", "@emdash-cms/registry-client": "0.5.0", "@emdash-cms/registry-lexicons": "0.4.0", "@floating-ui/react": "^0.27.16", "@lingui/core": "^5.9.4", "@lingui/react": "^5.9.4", "@phosphor-icons/react": "^2.1.10", "@tanstack/react-query": "5.90.21", "@tanstack/react-router": "1.163.2", "@tiptap/core": "^3.20.0", "@tiptap/extension-character-count": "^3.20.0", "@tiptap/extension-code": "^3.20.0", "@tiptap/extension-code-block": "^3.20.0", "@tiptap/extension-code-block-lowlight": "3.20.0", "@tiptap/extension-collaboration": "^3.20.0", "@tiptap/extension-drag-handle": "^3.20.0", "@tiptap/extension-drag-handle-react": "^3.20.0", "@tiptap/extension-dropcursor": "^3.20.0", "@tiptap/extension-focus": "^3.20.0", "@tiptap/extension-link": "^3.20.0", "@tiptap/extension-list": "^3.20.0", "@tiptap/extension-node-range": "^3.20.0", "@tiptap/extension-placeholder": "^3.20.0", "@tiptap/extension-subscript": "^3.20.0", "@tiptap/extension-superscript": "^3.20.0", "@tiptap/extension-table": "^3.20.0", "@tiptap/extension-table-cell": "^3.20.0", "@tiptap/extension-table-header": "^3.20.0", "@tiptap/extension-table-row": "^3.20.0", "@tiptap/extension-text-align": "^3.20.0", "@tiptap/extension-typography": "^3.20.0", "@tiptap/extension-underline": "^3.20.0", "@tiptap/pm": "^3.20.0", "@tiptap/react": "^3.20.0", "@tiptap/starter-kit": "^3.20.0", "@tiptap/y-tiptap": "^3.0.5", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "dompurify": "^3.3.2", "highlight.js": "11.11.2", "lowlight": "^3.3.0", "marked": "^17.0.3", "react-day-picker": "^9.14.0", "react-hotkeys-hook": "^5.2.4", "react-image-crop": "^11.1.2", "tailwind-merge": "^3.3.0", "y-protocols": "^1.0.7", "yjs": "^13.6.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-vEfkujygtW1qfQPXl2CdvEoYQsVu8zF5JElIGmyPNRgY37bK8xRB/RB2gklOCOri+0IE+khetJSw2152SJRKsw=="], + "@emdash-cms/admin": ["@emdash-cms/admin@0.38.0", "", { "dependencies": { "@atcute/identity-resolver": "^2.0.0", "@atcute/lexicons": "^2.0.0", "@cloudflare/kumo": "2.6.0", "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@emdash-cms/blocks": "0.38.0", "@emdash-cms/plugin-types": "0.3.1", "@emdash-cms/registry-client": "0.6.0", "@emdash-cms/registry-lexicons": "0.5.0", "@floating-ui/react": "^0.27.16", "@lingui/core": "^5.9.4", "@lingui/react": "^5.9.4", "@phosphor-icons/react": "^2.1.10", "@tanstack/react-query": "5.90.21", "@tanstack/react-router": "1.163.2", "@tiptap/core": "^3.20.0", "@tiptap/extension-character-count": "^3.20.0", "@tiptap/extension-code": "^3.20.0", "@tiptap/extension-code-block": "^3.20.0", "@tiptap/extension-code-block-lowlight": "3.20.0", "@tiptap/extension-collaboration": "^3.20.0", "@tiptap/extension-drag-handle": "^3.20.0", "@tiptap/extension-drag-handle-react": "^3.20.0", "@tiptap/extension-dropcursor": "^3.20.0", "@tiptap/extension-focus": "^3.20.0", "@tiptap/extension-link": "^3.20.0", "@tiptap/extension-list": "^3.20.0", "@tiptap/extension-node-range": "^3.20.0", "@tiptap/extension-placeholder": "^3.20.0", "@tiptap/extension-subscript": "^3.20.0", "@tiptap/extension-superscript": "^3.20.0", "@tiptap/extension-table": "^3.20.0", "@tiptap/extension-table-cell": "^3.20.0", "@tiptap/extension-table-header": "^3.20.0", "@tiptap/extension-table-row": "^3.20.0", "@tiptap/extension-text-align": "^3.20.0", "@tiptap/extension-typography": "^3.20.0", "@tiptap/extension-underline": "^3.20.0", "@tiptap/pm": "^3.20.0", "@tiptap/react": "^3.20.0", "@tiptap/starter-kit": "^3.20.0", "@tiptap/y-tiptap": "^3.0.5", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "dompurify": "^3.3.2", "highlight.js": "11.11.2", "lowlight": "^3.3.0", "marked": "^17.0.3", "react-day-picker": "^9.14.0", "react-hotkeys-hook": "^5.2.4", "react-image-crop": "^11.1.2", "tailwind-merge": "^3.3.0", "y-protocols": "^1.0.7", "yjs": "^13.6.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-aifepaKLytVmzQlcBsM1DzYwLA4txpEk67q+yMcK3gU1fS6k9fZpLKkHWHy8vCuARpo7nvnlnNdd85gUparzkg=="], - "@emdash-cms/auth": ["@emdash-cms/auth@0.37.0", "", { "dependencies": { "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0", "@oslojs/webauthn": "^1.0.0", "ulidx": "^2.4.1", "zod": "4.5.4" }, "peerDependencies": { "astro": ">=6.0.0-beta.0", "kysely": "^0.29.0" }, "optionalPeers": ["kysely"] }, "sha512-fy88NeEM5qBEIbkF8xqnJTQKKtlX9pPszwa0LXi0Xjk9NR9wz8nxHjOYbKlcXBuNXRTl7VDizrXETfbj39IQ1Q=="], + "@emdash-cms/auth": ["@emdash-cms/auth@0.38.0", "", { "dependencies": { "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0", "@oslojs/webauthn": "^1.0.0", "ulidx": "^2.4.1", "zod": "4.5.4" }, "peerDependencies": { "astro": ">=6.0.0-beta.0", "kysely": "^0.29.0" }, "optionalPeers": ["kysely"] }, "sha512-3EpfqtGFGCkDWuJ7xifxuy/2mPPC490uFuH/Uc7nSG9b1+2Z27A5FN7ZaRTxz62PZNwr0rSfjVUtflBh84/04g=="], - "@emdash-cms/blocks": ["@emdash-cms/blocks@0.37.0", "", { "dependencies": { "@cloudflare/kumo": "2.6.0", "@phosphor-icons/react": "^2.1.10", "clsx": "^2.1.1", "echarts": "^6.0.0", "tailwind-merge": "^3.3.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-JjQ1ucLxvuel8y16WjskXOi2JGoC3owGfQQf53bdZuT1rV/huE1yenU0efvC6XOSVdyjTA4PvZQVoqVuXa3X1A=="], + "@emdash-cms/blocks": ["@emdash-cms/blocks@0.38.0", "", { "dependencies": { "@cloudflare/kumo": "2.6.0", "@phosphor-icons/react": "^2.1.10", "clsx": "^2.1.1", "echarts": "^6.0.0", "tailwind-merge": "^3.3.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-rXcjouF/soulUOgsBqugtwDsNIiOr49d/Qlk4C9xE4E/6HEgpBS2vXN4h8ls7+xn2fwoF2ouQhJQXc/rtGirXQ=="], - "@emdash-cms/cloudflare": ["@emdash-cms/cloudflare@0.37.0", "", { "dependencies": { "@cloudflare/ai-search-snippet": "^0.0.42", "emdash": "0.37.0", "jose": "^6.1.3", "kysely-d1": "^0.4.0", "ulidx": "^2.4.1" }, "peerDependencies": { "@astrojs/cloudflare": ">=12.0.0", "@cloudflare/kumo": "2.6.0", "@cloudflare/workers-types": ">=4.0.0", "@phosphor-icons/react": "^2.1.10", "astro": ">=6.0.0-beta.0", "kysely": ">=0.28.17", "pg": ">=8.16.3", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@cloudflare/kumo", "@phosphor-icons/react", "pg", "react"] }, "sha512-+4zHTxP2aAmq157pyHQl+xRcOC7jSZ8erwxntEHJqcJLnmd+5bXnn5UC92pLR2A3VhqHqY/T8bXZ/9UzPFRckA=="], + "@emdash-cms/cloudflare": ["@emdash-cms/cloudflare@0.38.0", "", { "dependencies": { "@cloudflare/ai-search-snippet": "^0.0.42", "emdash": "0.38.0", "jose": "^6.1.3", "kysely-d1": "^0.4.0", "ulidx": "^2.4.1" }, "peerDependencies": { "@astrojs/cloudflare": ">=12.0.0", "@cloudflare/kumo": "2.6.0", "@cloudflare/workers-types": ">=4.0.0", "@phosphor-icons/react": "^2.1.10", "astro": ">=6.0.0", "kysely": ">=0.28.17", "pg": ">=8.16.3", "react": "^18.0.0 || ^19.0.0", "wrangler": ">=4.99.0" }, "optionalPeers": ["@cloudflare/kumo", "@phosphor-icons/react", "pg", "react"] }, "sha512-S2gK2lDRS9/L/DDzaudcGliJqqwEaTMsivLjd0WqqgfYtEGu7oP//svyCrv+JF/S35fvi/EWzkm/1O7lldc+Xw=="], - "@emdash-cms/gutenberg-to-portable-text": ["@emdash-cms/gutenberg-to-portable-text@0.37.0", "", { "dependencies": { "@wordpress/block-serialization-default-parser": "^5.13.0", "parse5": "^7.2.1" } }, "sha512-4oioLfrFVQ6yXJ4jEQYcLYCeDBVdRepnIuL3Cqei9/oy6Fxqv7f99GJb04siCLZ53yCOXHei/URviR/locHkmw=="], + "@emdash-cms/gutenberg-to-portable-text": ["@emdash-cms/gutenberg-to-portable-text@0.38.0", "", { "dependencies": { "@wordpress/block-serialization-default-parser": "^5.13.0", "parse5": "^7.2.1" } }, "sha512-iciM+dwLwyLwNumq5GguhFZmaP9IQddTbVhhRxepSJJvCE0WabS6JJM/61GCxXmxqBcGhZ3M7Zm7kT98xbeD7g=="], "@emdash-cms/plugin-types": ["@emdash-cms/plugin-types@0.3.1", "", { "dependencies": { "zod": "4.5.4" } }, "sha512-HwDWdCM8brRWdVxGNFwkrFwcArm0jmBJETMcLKkSLcUAAFru0IRNDKEeD9j5tSruDcgkot4paGz6dtUh6wnt9w=="], - "@emdash-cms/registry-client": ["@emdash-cms/registry-client@0.5.0", "", { "dependencies": { "@atcute/atproto": "^4.0.2", "@atcute/client": "^5.0.0", "@atcute/crypto": "^2.4.1", "@atcute/identity": "^2.0.0", "@atcute/identity-resolver": "^2.0.0", "@atcute/lexicons": "^2.0.0", "@atcute/multibase": "^1.2.0", "@atcute/repo": "^1.0.0", "@emdash-cms/registry-lexicons": "0.4.0", "@emdash-cms/registry-moderation": "0.1.0" } }, "sha512-5RngMARaOyZcNxBcbVQN950NAktZxO4s095WTOxSeMoGNjO5k7EiQckU+QmXC//W8Vf1fu+0KPWwt9NaGNeY5g=="], + "@emdash-cms/registry-client": ["@emdash-cms/registry-client@0.6.0", "", { "dependencies": { "@atcute/atproto": "^4.0.2", "@atcute/client": "^5.0.0", "@atcute/crypto": "^2.4.1", "@atcute/identity": "^2.0.0", "@atcute/identity-resolver": "^2.0.0", "@atcute/lexicons": "^2.0.0", "@atcute/multibase": "^1.2.0", "@atcute/repo": "^1.0.0", "@emdash-cms/registry-lexicons": "0.5.0", "@emdash-cms/registry-moderation": "0.2.0" } }, "sha512-v11poy233mdsC9f+PIc1bRz7i9doLHbQ04/UFpQX4xgci77/JkIRImWpkK7tspwU///d/edCkq6q4O2tyg0s8g=="], - "@emdash-cms/registry-lexicons": ["@emdash-cms/registry-lexicons@0.4.0", "", { "dependencies": { "@atcute/atproto": "^4.0.2", "@atcute/lexicons": "^2.0.0" } }, "sha512-gdpdLD69lvvhR2kq/tADIffsPqofjugaFDLoezcCfZhTGe6N+eH1bT5ufBbmBCxu+Xpohh/xtKOcdurLwot6kQ=="], + "@emdash-cms/registry-lexicons": ["@emdash-cms/registry-lexicons@0.5.0", "", { "dependencies": { "@atcute/atproto": "^4.0.2", "@atcute/lexicons": "^2.0.0" } }, "sha512-SvE3sFSQ2oZEHDxEgemVR+7fau11Y7NHnLegc9QzyHJoNr5M5MH6xLmKRLuLzvPqpEFTY1ZR1AWqCpgSfOeA8A=="], - "@emdash-cms/registry-moderation": ["@emdash-cms/registry-moderation@0.1.0", "", { "dependencies": { "@atcute/cbor": "^2.3.3", "@atcute/cid": "^2.4.1", "@atcute/crypto": "^2.4.1", "@atcute/multibase": "^1.2.0" } }, "sha512-ErnUqW7yTDcVpuG0LJt9f4JdwYPjFYM+9PIXrrpxfQy0Xp1S7IMYez3B2rY6h/ciAP3JLCiNKV5u3btXSKv/Qw=="], + "@emdash-cms/registry-moderation": ["@emdash-cms/registry-moderation@0.2.0", "", { "dependencies": { "@atcute/cbor": "^2.3.3", "@atcute/cid": "^2.4.1", "@atcute/crypto": "^2.4.1", "@atcute/multibase": "^1.2.0" } }, "sha512-NVth5+jX85f2ZtIS8UcCbXwpxylQUeQMaem3931u6uCGzq/zdHQ0Ffm52X0TaCHd0HBzOSbDX8eIqCQYkJbDxg=="], - "@emdash-cms/registry-verification": ["@emdash-cms/registry-verification@0.3.0", "", { "dependencies": { "@emdash-cms/plugin-types": "0.3.1", "@emdash-cms/registry-lexicons": "0.4.0", "modern-tar": "^0.7.6" } }, "sha512-rxJB0Z/O6GxYOi0slDW1M1ClbzVUwEa0uAFv04BuXngvyQcVLvMrG46i82bWOQHk/rCrgCF4SbxezQWoLQjKnw=="], + "@emdash-cms/registry-verification": ["@emdash-cms/registry-verification@0.3.1", "", { "dependencies": { "@emdash-cms/plugin-types": "0.3.1", "@emdash-cms/registry-lexicons": "0.5.0", "modern-tar": "^0.7.6" } }, "sha512-rgHwsyPvQxRZKUhT1ttmHyd0SIKhy+AwTBQRRV2IrInqLKb6Mc3Ow10T6s7qDgAjYl3bRh4z4QWXGK5el3s5Ew=="], "@emmetio/abbreviation": ["@emmetio/abbreviation@2.3.3", "", { "dependencies": { "@emmetio/scanner": "^1.0.4" } }, "sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA=="], @@ -1023,7 +1023,7 @@ "electron-to-chromium": ["electron-to-chromium@1.5.427", "", {}, "sha512-n14zb3FdsChZ2BNobqNHAJMcP3ifFv4paox2LvCrfVAQcqGiSURgbJl+PfMpHVCNFkStnNc+RRVtPBTVW5PDgw=="], - "emdash": ["emdash@0.37.0", "", { "dependencies": { "@atcute/client": "^5.0.0", "@atcute/lexicons": "^2.0.0", "@atcute/multibase": "^1.2.0", "@emdash-cms/admin": "0.37.0", "@emdash-cms/auth": "0.37.0", "@emdash-cms/gutenberg-to-portable-text": "0.37.0", "@emdash-cms/plugin-types": "0.3.1", "@emdash-cms/registry-client": "0.5.0", "@emdash-cms/registry-lexicons": "0.4.0", "@emdash-cms/registry-verification": "0.3.0", "@floating-ui/react": "^0.27.16", "@modelcontextprotocol/sdk": "^1.26.0", "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0", "@portabletext/toolkit": "^5.0.1", "@tiptap/core": "^3.20.0", "@tiptap/extension-code": "^3.20.0", "@tiptap/extension-code-block": "^3.20.0", "@tiptap/extension-code-block-lowlight": "3.20.0", "@tiptap/extension-focus": "^3.20.0", "@tiptap/extension-image": "^3.20.0", "@tiptap/extension-link": "^3.20.0", "@tiptap/extension-list": "^3.20.0", "@tiptap/extension-placeholder": "^3.20.0", "@tiptap/extension-text-align": "^3.20.0", "@tiptap/extension-typography": "^3.20.0", "@tiptap/extension-underline": "^3.20.0", "@tiptap/pm": "^3.20.0", "@tiptap/react": "^3.20.0", "@tiptap/starter-kit": "^3.20.0", "@tiptap/suggestion": "^3.20.0", "@unpic/placeholder": "^0.1.2", "arctic": "^3.7.0", "astro-portabletext": "^0.11.0", "blurhash": "^2.0.5", "citty": "^0.2.2", "consola": "^3.4.2", "croner": "^10.0.1", "highlight.js": "11.11.2", "jose": "^6.1.3", "jpeg-js": "^0.4.4", "jsonc-parser": "^3.3.1", "kysely": "^0.29.0", "lowlight": "^3.3.0", "mime": "^4.1.0", "modern-tar": "^0.7.5", "picocolors": "^1.1.1", "sanitize-html": "^2.17.1", "sax": "^1.4.1", "smol-toml": "^1.6.0", "ulidx": "^2.4.1", "upng-js": "^2.1.0", "zod": "4.5.4" }, "optionalDependencies": { "@libsql/kysely-libsql": "^0.4.0", "pg": "^8.0.0" }, "peerDependencies": { "@astrojs/react": ">=5.0.0-beta.0", "@emdash-cms/auth-atproto": ">=0.2.8", "astro": ">=6.0.0-beta.0", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, "optionalPeers": ["@emdash-cms/auth-atproto"], "bin": { "emdash": "./dist/cli/index.mjs", "em": "./dist/cli/index.mjs" } }, "sha512-4m8fWygKgTP90NgSy2Zwi8SvyirNM7Ic7VvAktouuPCnkztClmDpN5advc27B/bDUafKLHSXdNh8YZG7v1Aw8A=="], + "emdash": ["emdash@0.38.0", "", { "dependencies": { "@atcute/client": "^5.0.0", "@atcute/lexicons": "^2.0.0", "@atcute/multibase": "^1.2.0", "@emdash-cms/admin": "0.38.0", "@emdash-cms/auth": "0.38.0", "@emdash-cms/gutenberg-to-portable-text": "0.38.0", "@emdash-cms/plugin-types": "0.3.1", "@emdash-cms/registry-client": "0.6.0", "@emdash-cms/registry-lexicons": "0.5.0", "@emdash-cms/registry-verification": "0.3.1", "@floating-ui/react": "^0.27.16", "@modelcontextprotocol/sdk": "^1.26.0", "@oslojs/crypto": "^1.0.1", "@oslojs/encoding": "^1.1.0", "@portabletext/toolkit": "^5.0.1", "@tiptap/core": "^3.20.0", "@tiptap/extension-code": "^3.20.0", "@tiptap/extension-code-block": "^3.20.0", "@tiptap/extension-code-block-lowlight": "3.20.0", "@tiptap/extension-focus": "^3.20.0", "@tiptap/extension-image": "^3.20.0", "@tiptap/extension-link": "^3.20.0", "@tiptap/extension-list": "^3.20.0", "@tiptap/extension-placeholder": "^3.20.0", "@tiptap/extension-text-align": "^3.20.0", "@tiptap/extension-typography": "^3.20.0", "@tiptap/extension-underline": "^3.20.0", "@tiptap/pm": "^3.20.0", "@tiptap/react": "^3.20.0", "@tiptap/starter-kit": "^3.20.0", "@tiptap/suggestion": "^3.20.0", "@unpic/placeholder": "^0.1.2", "arctic": "^3.7.0", "astro-portabletext": "^0.11.0", "blurhash": "^2.0.5", "citty": "^0.2.2", "consola": "^3.4.2", "croner": "^10.0.1", "highlight.js": "11.11.2", "jose": "^6.1.3", "jpeg-js": "^0.4.4", "jsonc-parser": "^3.3.1", "kysely": "^0.29.0", "lowlight": "^3.3.0", "mime": "^4.1.0", "modern-tar": "^0.7.5", "picocolors": "^1.1.1", "sanitize-html": "^2.17.1", "sax": "^1.4.1", "smol-toml": "^1.6.0", "ulidx": "^2.4.1", "upng-js": "^2.1.0", "zod": "4.5.4" }, "optionalDependencies": { "@libsql/kysely-libsql": "^0.4.0", "pg": "^8.0.0" }, "peerDependencies": { "@astrojs/react": ">=5.0.0-beta.0", "@emdash-cms/auth-atproto": ">=0.2.8", "astro": ">=6.0.0-beta.0", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, "optionalPeers": ["@emdash-cms/auth-atproto"], "bin": { "emdash": "./dist/cli/index.mjs", "em": "./dist/cli/index.mjs" } }, "sha512-ogu1NmOoH/G0S3EKh1JmwKhv1GVsWeJ3LwqOyyUPemUSvZLlS3msMjX9yP2LOkshHaqDdn+9YXpVd0sWU36yuw=="], "emmet": ["emmet@2.4.11", "", { "dependencies": { "@emmetio/abbreviation": "^2.3.3", "@emmetio/css-abbreviation": "^2.1.8" } }, "sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ=="], diff --git a/package.json b/package.json index 953c05f..2f12fa5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "dashcommerce-monorepo", "private": true, "version": "0.0.0", - "description": "DashCommerce \u2014 the WooCommerce-equivalent commerce plugin for the EmDash ecosystem", + "description": "DashCommerce — the WooCommerce-equivalent commerce plugin for the EmDash ecosystem", "type": "module", "workspaces": [ "packages/*" @@ -28,6 +28,6 @@ "bun": ">=1.1.0" }, "patchedDependencies": { - "emdash@0.37.0": "patches/emdash@0.37.0.patch" + "emdash@0.38.0": "patches/emdash@0.38.0.patch" } } diff --git a/packages/core/package.json b/packages/core/package.json index a9ce8c9..b3f7f63 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -66,7 +66,7 @@ "test": "bun test" }, "peerDependencies": { - "emdash": ">=0.37.0 <0.38.0", + "emdash": ">=0.37.0 <0.39.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, @@ -79,12 +79,12 @@ } }, "devDependencies": { - "@emdash-cms/admin": "^0.37.0", + "@emdash-cms/admin": "^0.38.0", "@stripe/react-stripe-js": "^3.0.0", "@stripe/stripe-js": "^5.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", - "emdash": "^0.37.0", + "emdash": "^0.38.0", "react": "^19.0.0", "react-dom": "^19.0.0", "tsdown": "^0.20.0", diff --git a/packages/starter/.emdash/migrations.json b/packages/starter/.emdash/migrations.json index a030e55..5affba4 100644 --- a/packages/starter/.emdash/migrations.json +++ b/packages/starter/.emdash/migrations.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, - "emdashVersion": "0.37.0", + "emdashVersion": "0.38.0", "migrationSet": { "names": [ "001_initial", @@ -75,9 +75,12 @@ "071_restore_content_bylines_table", "072_media_folders", "073_media_focal_point", - "074_content_deleted_scheduled_index" + "074_content_deleted_scheduled_index", + "075_entry_edit_locks", + "076_collection_nav_group", + "077_plugin_storage_revisions" ], - "fingerprint": "6864996c26aae72fb939ee06ab5408d1e877d50e3da5e93c805af1819e0bed22" + "fingerprint": "8414f4f91891e4e0f965235b2b71d210484571268f0f39ba5091881e1cb0ebe7" }, "i18n": null, "database": { diff --git a/packages/starter/package.json b/packages/starter/package.json index 098d915..24b520c 100644 --- a/packages/starter/package.json +++ b/packages/starter/package.json @@ -31,11 +31,11 @@ "@astrojs/react": "^5.0.0", "@astrojs/sitemap": "^3.4.0", "@dashcommerce/core": "workspace:*", - "@emdash-cms/cloudflare": "^0.37.0", + "@emdash-cms/cloudflare": "^0.38.0", "@stripe/react-stripe-js": "^6.0.0", "@stripe/stripe-js": "^9.0.0", "astro": "^6.0.0", - "emdash": "^0.37.0", + "emdash": "^0.38.0", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/patches/emdash@0.38.0.patch b/patches/emdash@0.38.0.patch new file mode 100644 index 0000000..bb5d727 --- /dev/null +++ b/patches/emdash@0.38.0.patch @@ -0,0 +1,14 @@ +diff --git a/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs b/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +index fc449ae587a71622495df9869becc8209b506b74..6d762d6e830ab6d88bc57cb25002c868eb981fc4 100644 +--- a/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs ++++ b/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +@@ -44,6 +44,9 @@ const handleRequest = async ({ params, request, locals }) => { + const code = result.error?.code ?? "PLUGIN_ERROR"; + return apiError(code, code === "INTERNAL_ERROR" ? "Plugin route error" : result.error?.message ?? "Plugin route error", result.status ?? (code === "NOT_FOUND" ? 404 : 400)); + } ++ // DashCommerce patch: let plugin route handlers return a raw Response ++ // (cookies, redirects, webhook 200s). apiSuccess would serialize it to {}. ++ if (result.data instanceof Response) return result.data; + const response = apiSuccess(result.data); + if (routeMeta.cacheControl && (method === "GET" || method === "HEAD")) response.headers.set("Cache-Control", routeMeta.cacheControl); + return response; From 104d1aa7480e8cb9ccc2915379d27adb851bd09c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 15 Sep 2026 13:14:45 +0000 Subject: [PATCH 2/3] fix(ci): ensure EmDash 0.37.0 compatibility matrix passes - Register both emdash@0.37.0 and emdash@0.38.0 patches in package.json - Revert packages/starter/.emdash/migrations.json to 0.37.0 baseline (was incorrectly updated to 0.38.0 with 0.38-only migrations 075-077) - Update patches/README.md to document dual-version patch support The compatibility matrix job installs with frozen lockfile (0.38) then downgrades to 0.37. Without the 0.37 patch registered, bun fails to apply the required fixes. The migrations.json with 0.38-only migrations broke 0.37 typecheck/build. Co-authored-by: Timchosen Uzua --- package.json | 1 + packages/starter/.emdash/migrations.json | 9 +++------ patches/README.md | 13 ++++++++++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 2f12fa5..0438239 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "bun": ">=1.1.0" }, "patchedDependencies": { + "emdash@0.37.0": "patches/emdash@0.37.0.patch", "emdash@0.38.0": "patches/emdash@0.38.0.patch" } } diff --git a/packages/starter/.emdash/migrations.json b/packages/starter/.emdash/migrations.json index 5affba4..a030e55 100644 --- a/packages/starter/.emdash/migrations.json +++ b/packages/starter/.emdash/migrations.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, - "emdashVersion": "0.38.0", + "emdashVersion": "0.37.0", "migrationSet": { "names": [ "001_initial", @@ -75,12 +75,9 @@ "071_restore_content_bylines_table", "072_media_folders", "073_media_focal_point", - "074_content_deleted_scheduled_index", - "075_entry_edit_locks", - "076_collection_nav_group", - "077_plugin_storage_revisions" + "074_content_deleted_scheduled_index" ], - "fingerprint": "8414f4f91891e4e0f965235b2b71d210484571268f0f39ba5091881e1cb0ebe7" + "fingerprint": "6864996c26aae72fb939ee06ab5408d1e877d50e3da5e93c805af1819e0bed22" }, "i18n": null, "database": { diff --git a/patches/README.md b/patches/README.md index 6f1d0db..8f30026 100644 --- a/patches/README.md +++ b/patches/README.md @@ -20,13 +20,16 @@ EmDash wraps all plugin route responses in `apiSuccess()`, which serializes Resp ## Applying the Patch +Patches are maintained for both supported EmDash versions (0.37.x and 0.38.x). The package manager will automatically apply the correct patch based on your installed EmDash version. + ### Option 1: Using Bun (Recommended) ```bash # Add to package.json: { "patchedDependencies": { - "emdash@0.37.0": "patches/emdash@0.37.0.patch" + "emdash@0.37.0": "patches/emdash@0.37.0.patch", + "emdash@0.38.0": "patches/emdash@0.38.0.patch" } } @@ -41,7 +44,8 @@ bun install { "pnpm": { "patchedDependencies": { - "emdash@0.37.0": "patches/emdash@0.37.0.patch" + "emdash@0.37.0": "patches/emdash@0.37.0.patch", + "emdash@0.38.0": "patches/emdash@0.38.0.patch" } } } @@ -63,8 +67,11 @@ npm install -D patch-package } } -# Copy the patch file to your project root: +# Copy the appropriate patch file to your project root: +# For EmDash 0.37.x: cp node_modules/@dashcommerce/core/patches/emdash@0.37.0.patch patches/ +# For EmDash 0.38.x: +cp node_modules/@dashcommerce/core/patches/emdash@0.38.0.patch patches/ # Run: npm install From 563d20b752aa0a61c10624152e7278b7636f993e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 15 Sep 2026 13:17:44 +0000 Subject: [PATCH 3/3] fix(ci): downgrade packages/core devDeps in compat matrix The compatibility matrix job must downgrade packages/core devDependencies in addition to root and starter. Without this, bun resolves emdash@0.38.0 from core's ^0.38.0 devDep, causing the build to import 0.38-only modules (portable-text-table) from @emdash-cms/admin@0.37.0 which doesn't have them. Build error: Could not load @emdash-cms/admin/dist/portable-text-table (imported by emdash@0.38.0 menus-*.mjs) Fix: downgrade core devDeps alongside root and starter. Co-authored-by: Timchosen Uzua --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc0a1d7..e610c41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,7 @@ jobs: run: | bun install --frozen-lockfile bun add -d emdash@${{ matrix.emdash-version }} @emdash-cms/admin@${{ matrix.emdash-version }} + bun add -d --cwd packages/core emdash@${{ matrix.emdash-version }} @emdash-cms/admin@${{ matrix.emdash-version }} bun add --cwd packages/starter emdash@${{ matrix.emdash-version }} @emdash-cms/cloudflare@${{ matrix.emdash-version }} - name: Typecheck