12.0.0
What's Changed
-
MAJOR: The package was migrated to ESM and Typescript. 🎉 This started with a PR from @davbrito (thanks!), then it spread into the test suite post-merge. The primary breaking change is there is no longer a default export.
To migrate, you will need to switch either
require()orimportto use thePgBossnamed export.const PgBoss = require('pg-boss') // old const { PgBoss } = require('pg-boss') // new
import PgBoss from 'pg-boss' // old import { PgBoss } from 'pg-boss' // new
All static functions and constants previously on the PgBoss class were moved to named exports as well.
// old const { getConstructionPlans, getMigrationPlans, getSchemaVersion, states, policies } = PgBoss // new import { getConstructionPlans, getMigrationPlans, getSchemaVersion, states, policies } from 'pg-boss'
-
MAJOR: The minimum node version was increased to 22.12 to support require(esm)
-
MINOR: Queues and scheduling keys now only support letters, numbers, hyphens, underscores, or periods in their names. This is fixing a bug in v11 where this validation was not working as intended, but now that it is, review your queue names before upgrading just to be safe.
-
MINOR: Added a new
eventsexport that has all the expected events you can listen to for convenience. -
FIX: Fixed a few stray types. This release should hopefully make these much less common going forward now that the robots are in charge in the CI build.
New Contributors
Full Changelog: 11.1.2...12.0.0