✨ Vendure v3.3.0 includes:
New Dashboard Beta
Our new React-based dashboard is now in beta! With this release we have started to publish details of the APIs you'll have available to your plugins for extending the dashboard.
We now have an in-depth guide that will show you how to install and run the dashboard, as well as how to extend it with list & details views and more!
👉 Getting Started with the New Dashboard
Native Scheduled Tasks
This version introduces native support for scheduled tasks, allowing you to define tasks that will run at regular intervals. We're also shipping two built-in scheduled tasks for cleaning up the session table, and cleaning the job_item table when using the DefaultJobQueuePlugin.
// vendure-config.ts
import { DefaultSchedulerPlugin, VendureConfig } from '@vendure/core';
export const config: VendureConfig = {
// ...
plugins: [DefaultSchedulerPlugin.init()],
};
👉 New Developer Guide: Scheduled Tasks
Open Telemetry Support
We've introduced a brand new core plugin, @vendure/telemetry-plugin
which allows you to add support for Open Telemetry to your Vendure app. Using Open Telemetry, you can gain deep insights into the performance of your app using advanced tracing and logging features.
👉 New Developer Guide: Open Telemetry
New Graphiql Plugin
In this release we are deprecating the bundled graphql playground app (which is unmaintained and buggy), and introducing a new stand-alone plugin that implements the GraphiQL client.
Get started with this improved developer experience:
npm install @vendure/graphiql-plugin
// vendure-config.ts
import { VendureConfig } from '@vendure/core';
import { GraphiqlPlugin } from '@vendure/graphiql-plugin';
export const config: VendureConfig = {
// ...
plugins: [GraphiqlPlugin.init()],
};
Upgrading
To update from Vendure v2.2.x:
- Update all
@vendure/...
packages to "~3.3.0" andnpm install
- Set up the
DefaultSchedulerPlugin
to enable support for scheduled tasks:- Import
DefaultSchedulerPlugin
from@vendure/core
in your config file - Add
DefaultSchedulerPlugin.init()
to your plugins array - Generate a migration (
npx vendure migrate
)
- Import
Note Vendure automatically includes a scheduled task that will clean up old sessions from the "session" table in the database. By default, it runs every night at midnight and will attempt to clean up the 1,000 oldest sessions.
If your application has been running for a while you may have very large numbers of rows in the session table (i.e. millions). For this reason you may wish to begin by setting the task to remove smaller batches of sessions and gauge the performance. This can be configured like this:
import { cleanSessionsTask, DefaultSchedulerPlugin, VendureConfig } from '@vendure/core';
export const config: VendureConfig = {
// ...
schedulerOptions: {
tasks: [
// or further configure the task
cleanSessionsTask.configure({
params: {
// Process fewer rows to start with, to ensure no adverse
// load is generated for the DB server
batchSize: 100,
},
}),
],
},
plugins: [DefaultSchedulerPlugin.init()],
};
Changelog
Fixes
- dashboard Fix checkbox on DetailPage (f32d66d)
- dashboard Fix Page component not rendering when used externally (3322fa1)
- dashboard Fix some form validation issues (e811e99)
- dashboard Fix some small issues with extensions, add docs (7dca28c)
- dashboard Fix types for dashboard extensions (c6ade27)
- dashboard Improve DetailPage component (c4c93a0)
- dashboard Preserve Vite alias settings if set (d79ea77)
- dashboard Prevent navigation blocker on creating entity (b5851d5)
Features
- telemetry-plugin Add new
@vendure/telemetry-plugin
package - graphiql-plugin Add new
@vendure/graphiql-plugin
package - admin-ui Manual triggering of scheduled tasks (76d74e1), closes #1425
- core Add scheduled task to clean up jobs from the DB (ed28280)
- core Allow manual triggering of scheduled tasks (2a89b2a), closes #1425
- core Apply Instrumentation to all services & key helper classes (4b3f526)
- core Enhance cache service and SQL cache strategy with tracing support (374db42)
- core Enhance scheduled task execution with RequestContext (c0b5902)
- core Integrate tracing into ConfigService for enhanced custom fields logging (195132f)
- core Tracing for job-queue (7a27428)
- core Update tracing in AppModule to enhance middleware configuration logging (596846c)
- create Update default tsconfig (ee40c50)
- dashboard Add refresh button to data tables (891ff15)
- dashboard Implement alert system with customizable alerts (13c8969)
- dashboard Manual triggering of scheduled tasks (226730e), closes #1425
Full Changelog: v3.2.4...v3.3.0