Release new version - #410
Open
github-actions[bot] wants to merge 1 commit into
Open
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
8 times, most recently
from
August 27, 2026 14:10
8ae864d to
4d907bf
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
August 27, 2026 14:15
4d907bf to
a0b4831
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
7cc9e2fThanks @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 acolleague'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
f5b71ddThanks @korsvanloon! - Support theaddPaymentandremovePaymentupdate actions on carts, andremovePaymenton orders.addPaymentexisted only on the order handler, so the payment-first checkoutflow — attach the payment to the cart, then create the order from the provider
callback — could not be exercised against the mock. Because carts and
/mecarts share a repository, both scopes get the actions.
removePaymentwasmissing on carts and orders alike and is the natural pair.
#419
f5bfb3aThanks @korsvanloon! - Support thefreezeCartandunfreezeCartupdate actions on carts.cartState: "Frozen"was unreachable, so a checkout that freezes a cart while apayment 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.
freezeCartrequires the cart to beActiveandunfreezeCartrequires it tobe
Frozen; both raiseInvalidOperationotherwise. While a cart is frozen,update actions that would change what it costs are rejected with
InvalidOperation, matching the documented purpose of freezing. Actions thatleave the price alone (
setCustomerEmail,setCustomField, addresses, …) arestill applied, and
unfreezeCartearlier in the same action list lifts therestriction for the actions that follow it.
#422
3926536Thanks @korsvanloon! - ModelpurchaseOrderNumberon carts: store it fromCartDraftand support thesetPurchaseOrderNumberupdate 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
purchaseOrderNumbernowalso carries through to an order created from it, the way it does on
commercetools.
#423
2ae98b3Thanks @korsvanloon! - Support theaddParcelToDeliveryupdate action on orders.Parcels could only be supplied inline through
addDelivery, so adding one to adelivery that already exists — which is what happens when a shipment is handed
over in parts — had no route. The action accepts either
deliveryIdordeliveryKey, and rejects an unknown delivery instead of quietly doing nothing.#421
c131aaeThanks @korsvanloon! - Support creating an order from a quote, onPOST /{projectKey}/orders/quotesand
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
Pendingand not past its
validTo, a staleversionraisesConcurrentModification,and
quoteStateToAccepted: truemoves the quote toAcceptedas part ofcreating 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
0a36033Thanks @korsvanloon! - Map the remainingPriceDraftfields when creating prices.priceFromDraftonly carriedkey,country,valueandchannel, socustomerGroup,validFrom,validUntil,discounted,tiers,customandrecurrencePolicywere silently dropped — a price created with a customer groupread back without one, which makes customer-group price selection untestable.
The order import used a second, even smaller mapping (
createPrice, which keptonly the value). Both paths now go through
priceFromDraft.#425
06dbd1bThanks @korsvanloon! - Implement the product-projection suggest endpoint,GET /{projectKey}/product-projections/suggest.Suggestions come from the products'
searchKeywordsfor 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
whitespaceorcustomsuggestTokenizer— the same rule as commercetools.fuzzyallows edits up tofuzzyLevel, defaulting to the level commercetools derives from the length ofthe search term, and
stagedandlimitare honoured. A request without asearchKeywords.{language}parameter is rejected withInvalidInput.No search dependency was added; the matching is a few lines in the repository.
#409
2a84115Thanks @korsvanloon! - Support thechangeQuoteRequestStateupdate action on quote requests.The quote-request update handler implemented
setCustomField,setCustomTypeand
transitionState, but notchangeQuoteRequestState— so a buyercancelling a quote request, which maps to that action, could not be exercised
against the mock.
transitionStateis not a substitute: it moves a quoterequest through a custom State machine, while
changeQuoteRequestStatesetsthe built-in
quoteRequestStateenum.Patch Changes
#421
c131aaeThanks @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
reservationandvariantreference type ids andthe
ReserveOnCartinventory mode.#417
aea0410Thanks @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 loopstopped on it and everything after the group was silently dropped:
(status="OPEN" or status="OVERDUE") and dueDate < "..."was evaluated as justthe group, quietly widening a filter that should narrow. The same applied to
in (...),contains all/any (...)andnested(...)groups followed by aclause.
A predicate that cannot be consumed completely now raises a
PredicateErrorinstead 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.