Skip to content

v0.61.0

Choose a tag to compare

@Teloz1870 Teloz1870 released this 11 Oct 07:09
· 1 commit to main since this release

A shop can now run as a Node container on any host: the repo ships a Dockerfile, and
CARTWRIGHT_OUTPUT=standalone pnpm build writes a standalone server with no .env file left in it
(docs/self-hosting.md). On a single-language shop that sets urls.localePrefix: "never", the
pages answer without the language in front, and the engine's footer, trust badges, cookie banner,
breadcrumbs and 404s link straight to the address the shop serves with either URL option.
Cancelling an order that was never paid puts its items back in stock exactly once, and an operator
status change that a cancel or a payment beats to the order — landing between the change's read and
its write — is refused instead of overwriting it.

Upgrading

No schema change: no pnpm db:push is needed, no flag was added and no dependency changed. The
URL options stay off unless you set them; trailingSlash and localePrefix now steer routing,
while a stored permalink is still not served at its address, so keep permalinks at false on a
live shop (docs/urls.md). The cron change announced in v0.60.0 — a production deploy without
CRON_SECRET refusing its cron calls — is not in this release; it is still the next one, so set
CRON_SECRET now if you have not.

✨ Added

  • A shop can run as a Node container on any host (HOST2-1). The repo now ships a Dockerfile
    (Node 22 as .nvmrc names it, pnpm through corepack, a non-root runtime with a health check) and
    a .dockerignore that keeps .env files, credentials, SQLite databases, backups/ and
    .mail-previews/ out of the image at any depth — prisma/dev.db and data/prod.db included.
    CARTWRIGHT_OUTPUT=standalone pnpm build writes .next/standalone/server.js and traces the same
    local data out of it. Next itself copies the root .env and .env.production into that
    directory after tracing, so the build deletes every .env* file there as it exits, and the
    server reads its variables from the environment it starts in. Without the variable
    next.config.ts has no output key and adds no exit step, so a Vercel build is unchanged; any
    other value stops the build. One Dockerfile is written for every profile and never runs Prisma
    itself (an image of a site scaffold is untested). docs/self-hosting.md covers build
    arguments, runtime variables, Turso or a SQLite file on a volume, and what still needs a Vercel
    service: the cron jobs (a runner is HOST2-2) and Vercel Blob storage (an S3 adapter is HOST2-3).
  • urls.localePrefix: "never" now steers routing as well as links, on a single-language shop
    that opts in: / and /contact answer directly (200, no redirect to /da), and an address
    with the language in front (/da/contact) answers with a permanent redirect (308) to
    /contact. next-intl decides the route; the proxy only makes its redirect permanent. The
    proxy's own redirects (trust-page aliases, legacy Danish paths, merchant redirects) and the
    /om-os alias land on the unprefixed page in one hop, also with urls.trailingSlash. Every
    canonical and og:url the engine writes, both sitemaps, the page links in llms.txt and the
    JSON-LD addresses of the catalogue, service, blog and breadcrumb data drop the prefix. /api,
    /admin, /oauth, /icon, /og and files are not touched. A single language alone never
    drops the prefix — the option must be set — and the build now refuses "never" with more than
    one locale. The locale patterns in both proxies and in the merchant-redirect matcher are now
    built from brand.locales instead of a hardcoded da|en, and the cart's WebMCP
    go_to_checkout no longer reads /cart as a locale. Links the engine still writes by hand
    (/da/… in e-mails, for one — the footer, trust badges, cookie banner, breadcrumbs and 404 page
    moved, see Fixed) reach their page through that one 308 until they adopt the helper. With the
    option unset next-intl receives exactly the config it did before (docs/urls.md).

🛠 Fixed

  • The engine's footer (including the trust badges), cookie banner, announcement bar, breadcrumbs
    and 404s link where the shop answers with urls.trailingSlash or
    urls.localePrefix: "never" (URL2-c).
    Their links were written by hand (/da/contact), so on
    a shop with either option every click on one took a 308 to the address the shop serves. They now
    go through lib/urls.ts (localeHref(path, locale)): the footer in both profiles, the trust
    badges wherever they render (the footer, the product, category and checkout pages, the
    aurora-shop, hoptify and webshop-classic homepages), the cookie banner's policy link on every
    page, the announcement bar's audit-feed link, the visible breadcrumbs and their steps in the
    product, category, catalogue, service and blog-post JSON-LD, and the recovery links on both 404s
    (the not-found page, and the catch-all for an address nothing serves, in markdown and HTML). Each
    is already the address the shop serves (/contact/, /info/terms/, /produkter/). With the
    options unset every link is the same string as before. A design pack that brings its own header
    and footer (apex, which Solbrillen runs, is one) shows its own links instead of the engine
    footer's, and those are not converted. Still written by hand on the storefront, so still one 308
    away: every link in the chrome-parts headers and footers; the headers and footers of the 17
    packs that bring their own, the packs' own 404 pages, the fixed-route links on pack homepages
    (/produkter, /contact, /about, /services, /info/… — the default aurora-shop and
    Northbound's crema among them) and the crema and halo product-page crumb; the catalogue's
    filter links, its empty-grid link and its WebMCP navigation; the AI stylist panel's cart,
    checkout, order and returns links; the login form's forgot-password link; the services index's
    links to each service; the order page's "Continue shopping"; the blog index's post links; the
    wishlist and order-review pages and their sign-in redirects, the wishlist button's sign-in
    redirect and the review page's home link; and links in e-mails. docs/urls.md lists the files.
  • Cancelling an order that was never paid puts its items back in stock. Checkout takes the
    stock when the order is placed, but cancelling an order still awaiting payment never gave it
    back: the admin status form, the bulk action and orders.update_status only changed the status,
    and so did Stripe's "payment cancelled" notification — which, since cancelling an order now
    cancels its Stripe payment, arrives for every such cancel. Those items stayed out of stock for
    good. Now the stock comes back exactly once, whichever gets there first — your cancel, Stripe's
    notification, the nightly check, or checkout's own rollback when the payment could not be set
    up — and a variant's stock goes back to that variant. The admin status form, the bulk action and
    orders.update_status note "items returned to stock" on the order timeline, and the tool also
    reports restocked: true in its result. Stripe's notification no longer
    overwrites an order that has moved on: a paid, flagged, shipped or refunded order stays as it is.
    An order you cancel after it was paid gets no stock back here — a return does that. A cancel
    reads the order's status when it runs: if the customer has paid by then, it is an ordinary cancel
    of a paid order (no stock back), and if Stripe's notification or the nightly check cancelled the
    order first, your cancel is refused. A payment that lands after the cancel read the order but
    before it wrote refuses the cancel too (see RACE-MARKPAID below), and the order stays paid.
  • The agent rules files no longer name CSS the engine does not use (SKILL-INTERPOLATE). The
    cartwright-guidance skill said <details> animates with interpolate-size and honours reduced
    motion there; no stylesheet has ever used interpolate-size or calc-size(), so that line is
    gone, and the Cursor, Windsurf and Gemini rules no longer offer them as the engine's CSS
    animation tools (@starting-style, which the mobile menu uses, stays). The skill's
    lib/shipping/ line now says what .claude/CLAUDE.md says: zones are stored, but every order
    pays the flat rate. A unit test fails if AGENTS.md, its sibling rules files or a project skill
    names passkeys before WebAuthn exists, or interpolate-size/calc-size() before a stylesheet
    uses it.
  • A status change no longer overwrites a change that landed while it ran (RACE-MARKPAID).
    Every operator status change — the admin status form, the bulk action and orders.update_status —
    read the order and then wrote the new status unconditionally, so a cancel, a payment or another
    operator landing in the moment between that read and the write was overwritten: a "mark paid"
    racing a cancel could leave a paid order whose items had already gone back to stock, so the same
    units could be shipped and sold a second time. Now the write lands only if the order is still in
    the status it was read in; otherwise nothing is written and the change is refused with "it changed
    while it was being updated — reload the order and try again". A change clicked on a page opened
    earlier is still checked against the order's status when it runs, as before (a cancelled order
    refuses "mark paid" as an illegal move). The same holds for the flag Stripe's
    notification and the nightly check set when a payment's amount does not match: an order
    cancelled in the meantime stays cancelled. Refunds and disputes Stripe reports still always
    land, since they record money that moved. orders.update_status now also writes the
    order-timeline note the admin status form writes, so a change made through the AI or REST tool
    shows on the order page, and the audit entry of an admin cancel that returned stock records
    restocked: true.