Alokai versions
Showing every integration. Set your stack in Preferences and this page hides what isn't yours.
The legacy version refers to all releases prior to the introduction of the new versioning model (before version v0).
You can upgrade your Alokai project to the next compatible version by running yarn alokai version upgrade.
Looking for what changed in a package before Alokai ecosystem 1.0.0? The per-package history is archived in the legacy package changelogs.
Pick where the project is and where it is going. The table shows every package version in between for your stack, and the upgrade guide beneath it lists every step in that range.
Upgrade guide
2.4.1 → 2.4.2· covers2.4.2·4 steps
1Apply the versions from the tableAll projects
Applies to: All projects · Only if: always
Run the upgrade command first; it moves the core packages to the target column. Then set every remaining highlighted row to its target version in `package.json` and reinstall. The table above is already filtered to your stack, so every row in it is yours to move; nothing else in the release asks for a version change.
yarn alokai version upgrade
# then bump the remaining rows in package.json and run yarn install2Redeploy the stores you deploy with patches2.4.2CLI & tooling
Applies to: All projects · Only if: you keep a patches/ directory in your project root and deploy stores with ./node_modules/.bin/alokai-cli store deploy
Redeploy each store you've deployed, once @alokai/cli is at 2.8.1. The middleware images you're running were built without your patches, and upgrading the CLI fixes only the next deploy:
./node_modules/.bin/alokai-cli store deployThis one redeploy also covers the redeploy 1.3.2 asked for, so you don't need both.
Read the deploy output for a warning ending in - the patched package is not part of this dependency tree.. It names each patch the deploy skipped because the image doesn't contain the patched package. That's expected for a patched devDependency.
If the deploy stops because a patch fails to apply, update the patch so it applies to the version of the package your lockfile resolves, then deploy again. Before this release, the same failure passed silently and left the package unpatched.
To apply patches with a pinned tool rather than whatever npx resolves that day, declare patch-package in your root devDependencies. store deploy runs the version you declare.
3Move @alokai/cli-plugin-compass to 1.1.112.4.2Compass
Applies to: Compass · Only if: the CLI reports @alokai/cli-plugin-compass at a version below 1.1.11
Check which version of @alokai/cli-plugin-compass you have. The upgrade command doesn't move it, and it lives in the CLI's own plugin store, so grepping node_modules or yarn.lock shows nothing:
./node_modules/.bin/alokai-cli pluginsIf it isn't listed, you have nothing to do. Above 1.1.11, leave it - the install below would downgrade it. Otherwise, install 1.1.11:
./node_modules/.bin/alokai-cli plugins install @alokai/cli-plugin-compass@1.1.11If you adopted the Compass module, check the postinstall script in your root package.json too. The installer appends an unpinned plugins install @alokai/cli-plugin-compass to it, which reinstalls the newest published plugin on every yarn install and undoes any pin you write.
4Check that each commercetools deleteCart call runs in the cart's Store2.4.2commercetools
Applies to: commercetools · Only if: your code calls deleteCart from @vsf-enterprise/commercetools-api and your project uses commercetools Stores, setting the vsf-store cookie or the store configuration property
Find your deleteCart calls. Keep the ones that reach the commercetools integration, through its SDK module or context.api in a middleware extension - other integrations use the same method name:
grep -rln 'deleteCart' apps --include='*.ts' --include='*.tsx' --include='*.vue' --exclude-dir=node_modules --exclude-dir=.out || trueFor each call, make sure the Store resolved when it runs is the Store the cart was created in. deleteCart now deletes within that Store, so with a different Store resolved, commercetools doesn't find the cart and the call fails instead of deleting it.
Where the call can't run with the cart's Store resolved, set the Store key in a custom query. A key you set there overrides the resolved one:
export const integrations = {
ct: {
// ...
customQueries: {
'delete-cart-custom-query': ({ variables, metadata }) => {
variables.storeKey = metadata.storeKey;
return {
variables,
query: `
mutation deleteCart($id: String!, $version: Long!, $storeKey: KeyReferenceInput) {
cart: deleteMyCart(id: $id, version: $version, storeKey: $storeKey) {
${metadata.fields}
}
}
`,
};
},
},
},
};Then pass the cart's Store key with the call:
await sdk.commerce.deleteCart({ id, version }, {
deleteCart: 'delete-cart-custom-query',
metadata: { storeKey: 'store-fr', fields: 'id,version' },
});Steps carry the release that introduced them. When a later release supersedes an earlier step, the guide shows only the final state. Each step's release note is one click away: Alokai 2.4.