Skip to content

2.1.2

Latest

Choose a tag to compare

@Systerr Systerr released this 28 Oct 09:56
5e0435d

Fixes

  • send() and sendRaw() resolve with TSentMessageInfo instead of any: nodemailer's SMTPSentMessageInfo for the smtp transport, TStubSentMessageInfo (envelope, messageId, response as a Buffer) for stub. Both types are exported from types.d.ts.
  • The published types now use the types nodemailer 10 ships. They were read from @types/nodemailer v8, a devDependency, so in a project without it the SMTP settings in EmailConfig were any.
  • EmailConfig.transports.stub is typed as TStubTransportOptions (error, keepBcc).

Dependencies

  • Removed the devDependencies @types/nodemailer (nodemailer 10 ships its own types) and @types/nodemailer-stub-transport (it pulled in @types/nodemailer v3). No runtime changes.

Verified in a strict TypeScript consumer with only @types/node installed, where the send() result is fully typed, and in the example project (types, lint, tests 9/9).

Known issue: npm audit reports a low-severity deepmerge advisory (GHSA-gcqx-w48m-w2h4), the same as in 2.1.1. The module only merges the app's own mail config with its defaults.

Changes since 2.1.1 · npm package