Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Vendure Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-vendure-knowledge-patch-nevaberry-plugins)
---
name: vendure-knowledge-patch
description: Vendure
version: null
license: MIT
metadata:
author: Nevaberry
---
# Vendure Knowledge Patch
Load this skill when upgrading Vendure or working on authentication, channels,
catalog data, checkout, Dashboard extensions, jobs, or integrations.
Use the topic references for complete details and release-specific behavior.
## Reference index
| Reference | Topics |
| --- | --- |
| [Security, Authentication, and Policy](references/security-auth-and-policy.md) | Security fixes, native and external accounts, API keys, channel authorization, CORS, CSRF, job redaction |
| [Platform, Data, and Operations](references/platform-data-and-operations.md) | Upgrades, migrations, settings, custom fields, startup, health, queues, Redis cache, CLI, scaffolding |
| [Catalog, Assets, and Search](references/catalog-assets-and-search.md) | Product options, channel assignment, stock locking, MIME types, asset headers, translations, search indexing |
| [Orders, Checkout, Tax, and Payments](references/orders-checkout-and-payments.md) | Cart operations, promotions, tax, shipping, seller orders, cancellation, custom fields, events |
| [Dashboard Development](references/dashboard-development.md) | Installation, builds, routing, authentication, extension APIs, forms, tables, widgets, permissions, order operations |
| [Integrations and Public Exports](references/integrations-and-public-exports.md) | Email, payment providers, GraphiQL, tracing, Sentry, exported services, MCP |
## Breaking changes and upgrade requirements
### Startup, packages, and database changes
- Upgrade all `@vendure/*` packages together to the target version.
- From 3.7.0, production startup refuses the default superadmin password.
Set a non-default password before upgrading.
- With `DefaultCachePlugin`, the 3.2.0 upgrade requires precision 3 for
`CacheItem.expiresAt`.
- For 3.4.0, generate a migration for the Settings Store table and the
`Order.orderPlacedAt` index; include the `JobItem.createdAt` index when using
`DefaultJobQueuePlugin`.
- Use `migrateAssetTranslationData()` for existing asset translations during
the 3.6 upgrade. Version 3.6.4 skips this migration on an empty database.
### Authentication and coupon compatibility
- From 3.7.0, custom `AuthenticationStrategy` implementations must return
`verified: true` for provider-verified emails to link to an existing account.
- For an existing external-auth customer without a native password,
`registerCustomerAccount` emails a verification token regardless of
`authOptions.requireVerification`; `verifyCustomerAccount` sets the password
using that token.
- Registration ignores supplied `firstName`, `lastName`, `phoneNumber`, and
custom fields whenever a `User` already exists for the email address.
- From 3.7.0, coupon matching is case-insensitive. Resolve case-only promotion
collisions before upgrading, and handle `CouponRemovedDuringCheckoutError`
in the Shop API's `AddPaymentToOrderResult`.
### Asset MIME allow-lists
The `file-type` update to `^21.3.1` fixes a file parsing denial of service and
changes four MIME types. Update explicit `assetOptions.permittedFileTypes`
entries to keep these uploads working:
| Previous MIME type | Replacement |
| --- | --- |
| `audio/x-flac` | `audio/flac` |
| `video/x-matroska` | `video/matroska` |
| `application/x-apache-arrow` | `application/vnd.apache.arrow.file` |
| `application/x-parquet` | `application/vnd.apache.parquet` |
### Deprecations and integration upgrades
- External-component health checks were deprecated in 3.6.0; 3.7.0 removes
transitive `@nestjs/terminus`. Install it directly if custom health checks
import it. The `/health` endpoint skips health-check strategies, so run
dependency checks separately.
- `adminApiDebug` and `shopApiDebug` are deprecated no-ops from 3.8.0.
GraphQL error responses omit stack traces in every environment in 3.8.1.
- The legacy Admin UI plugin's `compatibilityMode` is deprecated from 3.5.1.
- On the 3.7.0 upgrade, check custom MJML templates and Nodemailer transport
settings against MJML v5 and Nodemailer v9.
- For `MolliePlugin` in 3.4.0, install `@mollie/api-client@4.3.3` for the move
to the Payments API.
- Version 3.6.4 accepts `graphql` `^16.11.0`; remove workarounds added
specifically for the 3.6.3 incompatibility.
## Security and authorization
- Upgrade to 3.7.2 for authorization fixes on `adjustDraftOrderLine` and
administrator password resets through `updateAdministrator`.
- Delegated `createApiKey`, `updateApiKey`, `rotateApiKey`, and `deleteApiKeys`
require every permission granted by the key's roles. Keys outside the
caller's scope are omitted from lists and return not-found on lookup.
- Admin API active-channel checks cover entity duplication, channel assignment
and removal, channel updates and deletion, product-option creation, and
order payment, refund, fulfillment, and customer-note operations.
- `deleteProductVariant` and `deleteProductVariants` throw `EntityNotFoundError`
for unknown IDs or variants outside the active channel.
- `administrators` and `administrator` return only staff whose roles the
caller has authority over.
### CORS, proxies, and request headers
- Set `apiOptions.trustProxy` to match the deployment's trusted proxies.
- Set an explicit production allowlist in `apiOptions.cors.origin`, or use
`CORS_ORIGINS` in a newly scaffolded project.
- Set `apiOptions.csrfPrevention` to `true` to enable Apollo CSRF protection
on both APIs; the default is `false`.
- When enabled, send `Apollo-Require-Preflight: true` on GET queries and file
uploads, including from custom clients using `apollo-upload-client`.
Packaged Admin UI, Dashboard, and test clients already send it.
- Asset responses include `X-Content-Type-Options: nosniff` and
`Content-Security-Policy`. SVG, HTML, and XML use
`Content-Disposition: attachment`; embed SVG with `<img src>` for display
or link directly for a download.
### Stored job data
In 3.7.3, the Admin API redacts job-response session tokens, but
`RequestContext.serialize()` still persists them. After upgrading, purge
settled job data and consider invalidating existing administrator sessions.
In 3.8.1, Admin API job queries return redacted copies of `Job.data`,
`Job.result`, and `Job.error`; the telemetry plugin's `job.data` span attribute
contains only job-data key names.
## Stock, catalog, and search
- `DefaultStockLocationStrategy` caps allocations at the sum of
`stockOnHand - stockAllocated - outOfStockThreshold` across locations.
- Subscribe to `StockShortfallEvent` to backorder, refund, or notify when an
order receives part of its requested allocation or none.
- The saleable-stock check and allocation lock `StockLevel` rows. SQLite and
SQL.js use unlocked reads and emit one warning per process.
- Overrides of `BaseStockLocationStrategy.init()` must call
`super.init(injector)`. `StockAllocationStrategy.shouldAllocateStock()` must
be deterministic and side-effect-free because it can run multiple times
per transition.
- Custom strategies can use `StockLevelService.lockStockLevelsForVariants()`,
`StockLevelService.getLockedStockLevelsForVariant()`, and `StockLevelLockOptions`.
- `assignProductVariantsToChannel` also assigns associated options and groups.
Product assignment skips soft-deleted options; `createProductVariants` and
`updateProductVariants` reject their IDs.
- The default search plugin accepts `collectionIds` and `collectionSlugs`.
Its index includes every variant passed to `updateVariantsById` or
`updateVariants`, fixing incomplete results after a collection update adds
more than 50 variants.
## Orders, promotions, and events
- `addItemsToOrder` adds multiple cart items in one mutation. The Shop API
also provides a mutation to change order currency.
- Use `OrderTaxCalculationStrategy` for custom tax calculation and
`OrderLineDiscountDistributionStrategy` for discount proration.
Custom `OrderMergeStrategy` implementations can run asynchronously.
- Cancel all order lines before moving from `ArrangingAdditionalPayment` to
`Cancelled` so allocated stock is released. The transition fails while any
line remains uncancelled.
- `updatePromotion` validates required action conditions whenever the input
includes `conditions` or `actions`. Omit both fields to rename or disable
a saved promotion with a missing condition.
- A promotion applying no discount consumes neither `usageLimit` nor
`perCustomerUsageLimit` because it is left off the order. Promotions with
side effects, such as a free gift, still attach.
- Seller orders apply price adjustments in the seller's channel. Splitting
preserves shipping lines, reapplies shipping promotions to seller orders,
and preserves the transaction when switching to the seller's context.
- Blocking handlers can declare the same ordering constraint using `after`
on one and `before` on the other. Cycles spanning three or more handlers
raise `Circular dependency detected`, name the handlers, and leave the
rejected handler unregistered.
## Runtime, queues, and Redis cache
- Use `onBeforeAppListen` to configure the Nest application before listening,
or subscribe to `BootstrappedEvent` for server readiness.
- Read `vendure migrate` diagnostics even if the command exits successfully.
Pass `onDiagnostic` in `RunMigrationsOptions` to receive diagnostics from `runMigrations()`.
- `RedisCacheStrategy` stores tags at `<namespace>:ztag:<tag>` in expiring
sorted sets. Tagged writes use `EVAL`: grant the Redis ACL user `@scripting`
and use Redis 3.2 or a compatible server such as Valkey.
- `invalidateTags()` batches 1,000 entries, throws on Redis command errors,
and clears legacy `<namespace>:tag:<tag>` sets. During rolling upgrades,
older-instance invalidations leave upgraded-instance tagged entries cached
until TTL expiry or invalidation by an upgraded instance.
- `BullMQJobQueueStrategy` accepts a `Redis` or `Cluster` connection. It and
`RedisJobBufferStorageStrategy` close connections they open; the caller owns
supplied connections. BullMQ cancellation is scoped to the queue prefix.
## Dashboard extension essentials
- `DashboardPlugin` ships in `@vendure/dashboard`. `useExperimentalBundle`
opts into the prebundled Dashboard. Activate plugins in runtime config to
load their Dashboard extensions.
- Use the CLI `codemod` command to move Dashboard code from Radix to Base UI.
Extensions can use Zod v4 re-exported by `@vendure/dashboard`.
- Extensions support unauthenticated routes, TanStack Router `validateSearch`,
custom React providers, and header `toolbarItems`.
- Use `dashboard: false` to hide a custom field. Use `requiresPermissions`
on widgets; replacement page blocks fall back to the original block when
permission to render the replacement is denied.
- `ListPage` forwards `transformQueryKey` and view options to the list.
`addDisplayComponent` takes precedence for list columns with core cell
functions and for `additionalColumns`.
- Builds generate new JavaScript chunk filenames even for identical source,
preventing immutable cached chunks from breaking extension pages after
redeploy. Set `disablePlugins.chunkHash` to `true` in Dashboard Vite plugin
options to disable the per-build filename changes.
- `defaultSize.x` and `defaultSize.y` place widgets when no saved layout exists
and the requested position is free.
## CLI and Console
The CLI provides `dev`, `build`, `start`, `doctor`, and `schema` commands;
code generation uses a schema file. `vendure dev` keeps watching after server
or worker TypeScript errors; `DevOptions.reloadIgnorePaths` excludes generated
paths from restart triggers for CLI plugins.
Pass `--console-project <id|slug>` to skip the project picker. With
`--non-interactive`, Console linking uses the login stored by `vendure auth login`:
```sh
vendure console link --console-project my-project --non-interactive
```
`vendure auth status` exits with code 1 when login renewal is unavailable;
its `--json` output includes `renewable` and `renewalError`.