Skip to content

chore: adopt ecommerce 0.2.0, billing 0.7.0 and automation 0.6.0, drop workarounds - #15

Merged
bvdaakster merged 1 commit into
mainfrom
chore/adopt-plugin-releases
Nov 28, 2026
Merged

bvdaakster merged 1 commit into
mainfrom
chore/adopt-plugin-releases

Conversation

@bvdaakster

Copy link
Copy Markdown
Contributor

Upgrades the three plugins and removes the workarounds their new releases make unnecessary.

Ecommerce 0.2.0

  • getEcommerce replaces the useEcommerce as ecommerceHelpers alias.
  • quoteCart words a refused code from the plugin's reason (couponRefusal in src/lib/shop.ts). Gone: the findCouponByCode re-lookup, the string match on Customer usage limit reached, and the shop's own guest check for once-per-customer codes (the plugin refuses with customer_required; the message is still "Sign in to use this code: it works once per customer.").
  • Helper results are typed from the generated types, so the as Cart / as Order casts are removed.

Billing 0.7.0

  • customerInfoExtractor is back in src/plugins/billing.ts; the snapshotCustomer hook is removed. A guest invoice has no customer and passes customerInfo: { name, email }.
  • Shop invoices list the order's lines at their normal prices plus shipping, with the coupon as discountAmount. The invoice page shows subtotal and discount when there is one.

Automation 0.6.0

  • Seeded workflows declare errorHandling: 'stop' and a 60 s timeout; the pager step declares its retries. stepRetryPlugin is deleted.
  • "Release unpaid orders" has discardRunWhen and now runs every minute instead of every 15, so an order is released within about a minute of its 30-minute limit and idle minutes leave no run behind.
  • src/instrumentation.ts loads Payload with cron: true when the server starts. Until now the crons started on the first page request.

Schema

No migrations in this repo: the schema is pushed in development and tests, and e2e/CI seed in development mode. The two new columns (invoices.discount_amount, workflows.discard_run_when) arrive that way; src/payload-types.ts is regenerated. A local kiln.db from before this change may prompt on pnpm dev; pnpm seed resets it.

Verification

  • pnpm lint, pnpm typecheck, pnpm test:int (121 tests).
  • Production build (next build + next start, Next 16.4.6) with no request sent: Payload booted from instrumentation.ts, the scheduler fired "Release unpaid orders" at the next minute and its idle run was discarded. The kiln webhook then produced a run whose log step used the pager step's output (Paged … (ticket PG-…)), which also shows PORT is set when onInit runs at boot. next dev behaves the same.
  • Automation, shop and billing e2e specs against that build: 19 passed, including the admin-run digest (a workflow started from a server action).

Tests

  • New: every coupon refusal reason maps to its message; the discounted guest invoice has real lines, discountAmount and the right totals; an idle "Release unpaid orders" tick is reported as discarded and stores no run, a tick that releases an order is kept.
  • Adjusted: retry settings are asserted from the seed definition; the member e2e order uses WELCOME10 and checks the discount on the invoice page.

🤖 Generated with Claude Code

https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU

…p workarounds

Ecommerce 0.2.0: use getEcommerce, word coupon refusals from the plugin's
reason instead of looking the coupon up again, and drop the helper casts.

Billing 0.7.0: customerInfoExtractor replaces the snapshotCustomer hook; shop
invoices list real lines plus shipping with the coupon as discountAmount, and
the invoice page shows the discount.

Automation 0.6.0: retry, error handling and timeout settings are declared in
the seeded workflows (stepRetryPlugin is gone); "Release unpaid orders" runs
every minute and discards runs that released nothing; instrumentation.ts
starts Payload and its job crons when the server starts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU
@bvdaakster
bvdaakster merged commit ef27953 into main Nov 28, 2026
2 of 3 checks passed
@bvdaakster
bvdaakster deleted the chore/adopt-plugin-releases branch November 28, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant