Skip to content

Release new version - #410

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

Release new version#410
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@labdigital/commercetools-mock@4.4.0

Minor Changes

  • #420 7cc9e2f Thanks @korsvanloon! - Add the associate-scoped quote routes.

    The associate scope covered quote requests but not quotes, so any
    .asAssociate().…​.quotes() read returned a 404 and the correct way to read a
    colleague's quote was the one path that could not be tested. The service
    registers what commercetools documents for associate quotes — query, get by id,
    get by key, update by id and update by key — and no create or delete route,
    since quotes are created by the seller.

  • #418 f5b71dd Thanks @korsvanloon! - Support the addPayment and removePayment update actions on carts, and
    removePayment on orders.

    addPayment existed only on the order handler, so the payment-first checkout
    flow — attach the payment to the cart, then create the order from the provider
    callback — could not be exercised against the mock. Because carts and /me
    carts share a repository, both scopes get the actions. removePayment was
    missing on carts and orders alike and is the natural pair.

  • #419 f5bfb3a Thanks @korsvanloon! - Support the freezeCart and unfreezeCart update actions on carts.

    cartState: "Frozen" was unreachable, so a checkout that freezes a cart while a
    payment is in flight could not be exercised — and, worse, a test asserting that
    a code path left the cart alone passed whether or not the guard existed.

    freezeCart requires the cart to be Active and unfreezeCart requires it to
    be Frozen; both raise InvalidOperation otherwise. While a cart is frozen,
    update actions that would change what it costs are rejected with
    InvalidOperation, matching the documented purpose of freezing. Actions that
    leave the price alone (setCustomerEmail, setCustomField, addresses, …) are
    still applied, and unfreezeCart earlier in the same action list lifts the
    restriction for the actions that follow it.

  • #422 3926536 Thanks @korsvanloon! - Model purchaseOrderNumber on carts: store it from CartDraft and support the
    setPurchaseOrderNumber update action.

    B2B checkout captures the buyer's purchase order number on the cart before the
    order exists, but the mock dropped the draft field and rejected the action, so
    that write path had no coverage available. The cart's purchaseOrderNumber now
    also carries through to an order created from it, the way it does on
    commercetools.

  • #423 2ae98b3 Thanks @korsvanloon! - Support the addParcelToDelivery update action on orders.

    Parcels could only be supplied inline through addDelivery, so adding one to a
    delivery that already exists — which is what happens when a shipment is handed
    over in parts — had no route. The action accepts either deliveryId or
    deliveryKey, and rejects an unknown delivery instead of quietly doing nothing.

  • #421 c131aae Thanks @korsvanloon! - Support creating an order from a quote, on POST /{projectKey}/orders/quotes
    and POST /{projectKey}/me/orders/quotes.

    Turning a quote into an order is the endpoint of the B2B quote flow and was the
    one step that could not be exercised. The guards around it are modelled too,
    since those are what a consumer wants to assert: the quote must be Pending
    and not past its validTo, a stale version raises ConcurrentModification,
    and quoteStateToAccepted: true moves the quote to Accepted as part of
    creating the order. The order carries the quote's line items and prices —
    nothing is re-priced — and references the quote it came from with
    origin: "Quote".

  • #424 0a36033 Thanks @korsvanloon! - Map the remaining PriceDraft fields when creating prices.

    priceFromDraft only carried key, country, value and channel, so
    customerGroup, validFrom, validUntil, discounted, tiers, custom and
    recurrencePolicy were silently dropped — a price created with a customer group
    read back without one, which makes customer-group price selection untestable.

    The order import used a second, even smaller mapping (createPrice, which kept
    only the value). Both paths now go through priceFromDraft.

  • #425 06dbd1b Thanks @korsvanloon! - Implement the product-projection suggest endpoint,
    GET /{projectKey}/product-projections/suggest.

    Suggestions come from the products' searchKeywords for each requested locale.
    Matching is a case-insensitive prefix match on the keyword's tokens, so a
    keyword only matches mid-word when it carries a whitespace or custom
    suggestTokenizer — the same rule as commercetools. fuzzy allows edits up to
    fuzzyLevel, defaulting to the level commercetools derives from the length of
    the search term, and staged and limit are honoured. A request without a
    searchKeywords.{language} parameter is rejected with InvalidInput.

    No search dependency was added; the matching is a few lines in the repository.

  • #409 2a84115 Thanks @korsvanloon! - Support the changeQuoteRequestState update action on quote requests.

    The quote-request update handler implemented setCustomField, setCustomType
    and transitionState, but not changeQuoteRequestState — so a buyer
    cancelling a quote request, which maps to that action, could not be exercised
    against the mock. transitionState is not a substitute: it moves a quote
    request through a custom State machine, while changeQuoteRequestState sets
    the built-in quoteRequestState enum.

Patch Changes

  • #421 c131aae Thanks @korsvanloon! - Regenerate the zod draft schemas from the current commercetools OpenAPI spec.

    Picks up optional fields added upstream since the last run — extension
    dependencies, expansion paths and additional context, inventory entry stock
    levels and reservation expiry, shipping method stores and carrier, store
    storefront URLs — plus the reservation and variant reference type ids and
    the ReserveOnCart inventory mode.

  • #417 aea0410 Thanks @korsvanloon! - Fix query predicates where a parenthesized group is followed by another clause.

    The ( nud did not consume its closing parenthesis, so the outer parse loop
    stopped on it and everything after the group was silently dropped:
    (status="OPEN" or status="OVERDUE") and dueDate < "..." was evaluated as just
    the group, quietly widening a filter that should narrow. The same applied to
    in (...), contains all/any (...) and nested(...) groups followed by a
    clause.

    A predicate that cannot be consumed completely now raises a PredicateError
    instead of matching against a partially parsed expression, so an unsupported or
    malformed predicate surfaces at the point of use rather than returning the whole
    collection.

@github-actions
github-actions Bot force-pushed the changeset-release/main branch 8 times, most recently from 8ae864d to 4d907bf Compare August 27, 2026 14:10
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 4d907bf to a0b4831 Compare August 27, 2026 14:15
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.

0 participants