Skip to content

Releases: veliovgroup/mail-time

v3.0.0

14 Apr 20:34
b6f43ba
Compare
Choose a tag to compare

📦 NPM @3.0.0
☄️ Packosphere @3.0.0

Major Changes

  • ☝️ NPM release skipped v2.x in order to match Meteor's version (NPM release happened one generation later)
  • ⚠️ New way to import and require the package import { MailTime, MongoQueue, RedisQueue } from 'mail-time';
  • ⚠️ Decouple from storage, now requires {queue} passed to constructor new MailTime({})
  • ⚠️ Removed callback from .sendMail() method
  • 🟥 Added support for Redis as Queue storage driver 🥳
  • 🍃 MongoDB as optional Queue storage driver 🥳
  • ☝️ Now josk task manager and Queue driver can use different databases

Whats' new

  • ping() method
  • cancelMail() method
  • onSent() callback option
  • ✨ new opts.josk option for josk library-specific options
  • ✨ new opts.queue option for storage-driver
  • opts.retryDelay retry delay in ms, successor to opts.interval
  • opts.retries quantity of retry attempts, successor to opts.maxTries
  • opts.concatDelay concatenation delay in ms, successor to opts.concatThrottling
  • 👨‍🔬 A lot of new improved tests
  • 📔 Custom Queue API

Changes

  • ☝️ .sendMail() now returns {Promise<string>} that can get passed into .cancelMail() method

Dependencies

  • 📦 josk@5.0.0, was v3.1.1
  • 📦 deepmerge@4.3.1, was v4.2.2

Dev Dependencies

  • 📦 chai@5.1.0, was v4.4.1
  • 📦 mocha@10.4.0, was v10.3.0
  • 📦 Added redis@4.6.13

Migrate to v3

Import was in v1/v2:

import MailTime from 'mail-time';

Changed in v3 to:

import { MailTime, MongoQueue, RedisQueue } from 'mail-time';

new MailTime in v3

Constructor was in v1/v2:

new MailTime({
  db,
})

Changed in v3 to:

new MailTime({
  queue: new MongoQueue({ db }),
  josk: {
    adapter: {
      type: 'mongo',
      db: db
    }
  }
})

prefix in v3

Constructor was in v1/v2:

new MailTime({
  db,
  prefix: 'prefix'
})

prefix need to get duplicated in queue constructor in v3:

new MailTime({
  prefix: 'prefix',
  queue: new MongoQueue({
    db: db,
    prefix: 'prefix',
  }),
  josk: {
    adapter: {
      type: 'mongo',
      db: db,
    }
  }
})

sent/failed callback in v3

Constructor was in v1/v2:

MailTime#sendMail(message, (error, details) => {
  console.log({error, details})
});

Callbacks are removed in v3, onError and onSent should be used instead:

const mailQueue = new MailTime({
  queue: new MongoQueue({ db }),
  josk: {
    adapter: { type: 'mongo', db }
  },
  onError(error, email, details) {
    console.log(`Email "${email.mailOptions.subject}" wasn't sent to ${email.mailOptions.to}`, error, details);
  },
  onSent(email, details) {
    console.log(`Email "${email.mailOptions.subject}" successfully sent to ${email.mailOptions.to}`, details);
  },
});

await mailQueue.sendMail(message);

v1.4.0

03 Apr 14:04
6656d20
Compare
Choose a tag to compare

📦 NPM @1.4.0
☄️ Packosphere @2.5.0

Major Changes:

  • ⚠️ Minimal required version of Node.js now is @>=14.20.0, was @>=8.9.0
  • 📦 Packaged as ES Module (reverse-compatible with CommonJS)

Changes:

  • 👨‍🔧 Fix minor bug when re-send loop was trying non-existent transport if only single transport defined
  • 👨‍🔧 Fix .sendMail callbacks on single-server setup when {concatEmails: true} option enabled
  • 👨‍🔧 Fix .sendMail callbacks when {keepHistory: true} option enabled
  • 📔 Refined documentation
  • 🤝 Compatibility with mongod server, tested with @4.4.29, @5.0.25, @6.0.14, and @7.0.6
  • 🤝 Compatibility with mongodb driver for node.js, tested with @4.17.2, @5.9.2, and @6.5.0
  • 🤝 Compatibility with the latest nodejs releases, tested with @14.21.3, @18.19.1, @20.11.1, and @21.7.1
  • 🤝 Compatibility with the latest Meteor.js and its packages
  • 🤝 Compatibility with upcoming meteor@3.0.0 and its packages

Dependencies:

  • 📦 josk@3.1.1, was v3.0.2
  • 📦 deepmerge@4.3.1, was v4.2.2

Dev Dependencies:

  • 📦 bson@6.6.0, was v4.7.0
  • 📦 chai@4.4.1, was v4.3.6
  • 📦 mocha@10.3.0, was v10.0.0
  • 📦 mongodb@6.5.0, was v4.17.2
  • 📦 nodemailer@6.9.12, was v6.7.8
  • 📦 nodemailer-direct-transport@3.3.2, was v3.0.7

v1.3.4

19 Sep 16:19
666713c
Compare
Choose a tag to compare

Major Changes:

📦 NPM: @1.3.4
☄️ Atmosphere @2.4.4

Changes:

Notes:

  • 👨‍🔬 Tested with latest mongodb server 5.0.11 and 6.0.1
  • 👨‍🔬 Tested with latest nodemailer

Dependencies:

  • 📦 [dev] bson@4.7.0, was v4.6.4
  • 📦 [dev] bson-ext@4.0.3, was v4.0.2
  • 📦 [dev] mongodb@4.10.0, was v4.7.0
  • 📦 [dev] nodemailer@6.7.6, was v6.7.8

v1.3.3

03 Jul 12:22
37b88e6
Compare
Choose a tag to compare

📦 NPM: @1.3.3
☄️ Atmosphere @2.4.3

Dependencies:

  • 📦 josk@3.0.2, was v3.0.1
  • 📦 [dev] nodemailer@6.7.6, was v6.7.5

v1.3.2

10 Jun 12:41
07c8f6f
Compare
Choose a tag to compare

📦 NPM: @1.3.2
☄️ Atmosphere @2.4.2

Changes:

  • 👷‍♂️ Maintenance release, dependencies update
  • 🤝 Support meteor@2.7.3

Dependencies:

  • 📦 josk@3.0.1, was v3.0.0
  • 📦 [dev] mongodb@4.7.0, was v4.6.0

v1.3.1

06 Jun 16:37
fdd1d5d
Compare
Choose a tag to compare

📦 NPM: @1.3.1
☄️ Atmosphere @2.4.1

Changes:

  • 👨‍🔧 Fix emails removed with {keepHistory : true}

Other changes:

  • 👨‍💻 Minor codebase refactoring
  • 📔 Documentation update
  • 👨‍🔬 Improve tests

v1.3.0

27 May 03:58
226978f
Compare
Choose a tag to compare

📦 NPM: @1.3.0
☄️ Atmosphere @2.4.0

Changes:

  • 🔧 Fix #31 by @bacloud22 (thank you!)
  • 👨‍🔧 Merge #24, improving "concatenated" emails queue management, thanks to @Treenity
  • 👨‍💻 Reduced mongoDB calls
  • 👨‍💻 Overall package codebase refactoring
  • 👨‍🔬 Improve tests suite

Other changes:

  • 📔 Update documentation: overall improvements and additional examples
  • 🤝 Compatibility and support of mongod@5.0.8 (Mongo Database)
  • 🤝 Compatibility and support of mongod@4.2.20 (Mongo Database)
  • 🤝 Compatibility and support of mongod@4.4.14 (Mongo Database)
  • 🤝 Compatibility and support of mongodb@4.6.0 (MongoDB node.js driver)
  • 🤝 Compatibility ans support of meteor@2.7.2

Dependencies:

  • 📦 josk@3.0.0, was v2.4.0

Development dependencies:

Used by test suite

  • 📦 bson@4.6.4, was v4.2.2
  • 📦 bson-ext@4.0.2, was v2.0.5
  • 📦 chai@4.3.6, was v4.3.0
  • 📦 mocha@10.0.0, was v8.2.1
  • 📦 mongodb@4.6.0, was v3.6.4
  • 📦 nodemailer@6.7.5, was v6.4.17
  • 📦 nodemailer-direct-transport@3.0.7, was v3.3.2 (tested with both versions, sticking to 3.0.7 to avoid security warnings)

v1.2.6

07 Feb 21:49
3021ac1
Compare
Choose a tag to compare
  • ☄️ NPM: v1.2.6
  • 📦 Meteor: v2.3.6

This is maintenance update

Notable Changes:

  • Default { writeConcern } options removed from write/update operations, pass readConcern, writeConcern, and readPreference as mongodb connections settings.

Changes:

  • 👷 Fix possible memory leak with forcefully closing cursors Cursor#close();
  • 🤝 Compatibility with mongodb@3.6.4 (the driver);
  • 🤝 Compatibility with nodemailer@6.4.17;
  • 📦 josk upgaded to v2.4.0;

v1.2.5

29 Sep 22:46
3d59634
Compare
Choose a tag to compare
  • ☄️ Meteor: v2.3.5;
  • 📦 NPM: v1.2.5;

Changes

  • ☄️ Compatibility with meteor@1.11.1;
  • 🤝 Compatibility with nodemailer@6.4.11;
  • 👨‍💻 Minor codebase refactoring;
  • 📋 Minor docs update;

New

  • keepHistory option;

📦 Dependencies:

  • josk@2.3.0, was v2.2.5;
  • [dev] bson@4.1.0, was v4.0.4;
  • [dev] bson-ext@2.0.5, was v2.0.3;
  • [dev] mocha@8.1.3, was v7.1.2;
  • [dev] mongodb@3.6.2, was v3.5.7;
  • [dev] nodemailer@6.4.11, was v6.4.6.

v1.2.4

03 May 23:47
f31de06
Compare
Choose a tag to compare
  • ☄️ Meteor: v2.3.4;
  • 📦 NPM: v1.2.4;

Changes:

  • 🐞 Edge case bug fix: Minor fix to trow an error (instead of silent interruption) when context is lost or misconfiguration is in place. Upon calling internal ___compileMailOpts() method without configured transports.
  • 👷‍♂️ This is regular maintenance release;
  • 🤝 Compatibility with meteor@1.10.2;
  • 🤝 Compatibility with nodemailer@6.4.6;
  • 📦 Update josk package to v2.2.5, was: v2.2.3;
  • 📦 [dev-dependency] Update bson package to v4.0.4, was v4.0.3;
  • 📦 [dev-dependency] Update mocha package to v7.1.0, was v7.1.2;
  • 📦 [dev-dependency] Update mongodb package to v3.5.7, was v3.5.4;
  • 📦 [dev-dependency] Update nodemailer package to v6.4.6, was v6.4.4;
  • 📋 Minor documentation updates.