Skip to content

v5.3.1

Latest

Choose a tag to compare

@dr-dimitru dr-dimitru released this 28 Oct 12:56
d2887bc

๐Ÿ“ฆ NPM @5.3.1
โ˜„๏ธ Packosphere @5.3.1

Major changes

none

Other Changes

Added

  • โœจ mail-time/presets and mail-time/adapters/{mongo,redis,postgres} gained a require condition, so CJS consumers and TypeScript projects without "type": "module" resolve the subpaths.

Fixed

  • ๐Ÿซœ Standalone Redis: push() runs behind the same per-client serialization as update(), cancel() and remove(). Two servers could claim and send the same row twice.
  • ๐Ÿซœ Standalone Redis: remove() deletes the concatletter pointer only while it names the removed row. Later concatEmails calls append instead of creating new rows.
  • ๐Ÿซœ Standalone Redis: a WatchError from exec() returns false without an [ERROR] log line.
  • ๐Ÿซœ Redis with useHashTags: true: cancel() retries up to three times when the row changes between read and Lua script. Before, it returned false.
  • ๐Ÿ˜ PostgreSQL with a pg.Pool: setup holds one connection for pg_advisory_lock, the DDL and pg_advisory_unlock. Before, the unlock could run on another connection and block peers with the same prefix at startup.
  • ๐Ÿ˜ PostgreSQL: a failed setup no longer blocks later calls. The next ready() retries it.
  • ๐Ÿ˜ PostgreSQL: pool detection accepts a constructor name ending in Pool (BoundPool).
  • ๐Ÿ”ง strategy: 'backup': the scheduler re-probes a quarantined primary once its backoff elapses. Before, no row selected it, so sends stayed on the backup after the primary recovered.
  • ๐Ÿ”ง Transport verification: a background re-probe that reaches verifyTimeout releases its slot and counts as a failed attempt. Before, a verify() that never settled kept the transport quarantined for the process lifetime.
  • ๐Ÿ”ง recipientPolicies: sendMail() accepts group-syntax to, cc and bcc when envelope.to is explicit, as 5.2.1 did.
  • ๐Ÿ”ง recipientPolicies: a server constructor validates transport.options.mailOptions.from and transport._options.mailOptions.from. Before, these failed every letter at send time.
  • ๐Ÿ”ง adapters/blank-example.js: removed a call to the undefined __ensurePrefix helper.
  • ๐Ÿ”ง Types: RedisQueueOption.client accepts a standalone createClient() instance. MongoQueueOption.db accepts the mongodb Db without a cast. PostgresClient declares connect and totalCount.

Docs

  • ๐Ÿ“” New docs/transport-verification.md and a "Completion writes and drain" section in docs/tuning.md.
  • ๐Ÿ“” Shutdown recipe uses destroy({ drain: true }). The old destroy() followed by drain() aborted completion writes and re-sent in-flight rows.
  • ๐Ÿ“” Corrected index names, the sendMail() rejection list and onError argument names. docs/queue-api.md documents Infinity as batch opts.limit.