Vigia

Aktualizacja @nestjs-modules/mailer z 3.x do 4.x

Porównanie publicznego API @nestjs-modules/mailer 3.0.2 i 4.0.0, obliczone automatycznie na podstawie typów TypeScript. Zmieniona sygnatura to możliwa zmiana niekompatybilna, a nie pewność.

Podsumowanie

Usunięte ścieżki importu0
Usunięte eksporty0
Zmienione sygnatury0
Usunięte składowe klas lub interfejsów1
Zmienione składowe klas lub interfejsów3
Nowo wycofane0
Zmiany wymagań (engines, zależności peer)3
Nowe eksporty64

Usunięte eksporty

Nie wykryto.

Zmienione sygnatury

Nie wykryto.

Usunięte składowe klas lub interfejsów

memberimportPrzed
MailerService.executeSend@nestjs-modules/mailerany

Zmienione składowe klas lub interfejsów

memberPrzedPo
MailerService.constructor(mailerOptions: MailerOptions, transportFactory: MailerTransportFactory, eventService?: MailerEventService | undefined): MailerService(mailerOptions: MailerOptions, transportFactory?: MailerTransportFactory | undefined, eventService?: MailerEventService | undefined, moduleRef?: any): MailerService
MailerTestModule.static register(options?: Partial<{ template: { dir?: string | undefined; adapter?: any; options?: any; }; }> | undefined): DynamicModule(options?: Omit<MailerOptions, "transport" | "transports"> | undefined): DynamicModule
MailerEventService.constructor(eventEmitter?: any): MailerEventService(eventEmitter?: MailerEventEmitter | undefined, moduleRef?: any): MailerEventService

Nowo wycofane

Nie wykryto.

Zmiany wymagań (engines, zależności peer)

PrzedPo
peerDependencies.handlebars>=4.7.9>=4.7.10
peerDependencies.@nestjs/mail—>=0.0.1
peerDependencies.@nestjs/outbox—>=0.1.3
Nowe eksporty (64)
importexportkind
@nestjs-modules/mailerhtmlfunction
@nestjs-modules/mailersignV4function
@nestjs-modules/mailerMailableinterface
@nestjs-modules/mailerSafeHtmlclass
@nestjs-modules/mailerMailQueryinterface
@nestjs-modules/mailerhtmlToTextfunction
@nestjs-modules/mailerisSafeHtmlfunction
@nestjs-modules/mailerunsafeHtmlfunction
@nestjs-modules/mailerMailerErrorclass
@nestjs-modules/mailerTestMailboxclass
@nestjs-modules/mailerCapturedMailclass
@nestjs-modules/mailerLogTransportclass
@nestjs-modules/mailerMailableDatatype
@nestjs-modules/mailerRenderedMailinterface
@nestjs-modules/mailerSesTransportclass
@nestjs-modules/mailerSigV4Optionsinterface
@nestjs-modules/mailerSigV4Requestinterface
@nestjs-modules/mailerFileTransportclass
@nestjs-modules/mailerMailerPreviewtype
@nestjs-modules/mailertoMailerErrorfunction
@nestjs-modules/mailerAwsCredentialsinterface
@nestjs-modules/mailerBrevoTransportclass
@nestjs-modules/mailerSigV4Signatureinterface
@nestjs-modules/mailerLOCAL_TRANSPORTvariable
@nestjs-modules/mailerMailableContenttype
@nestjs-modules/mailerMailableContextinterface
@nestjs-modules/mailerMailerSmtpErrorclass
@nestjs-modules/mailerResendTransportclass
@nestjs-modules/mailerparseRetryAfterfunction
@nestjs-modules/mailervalidateMessagefunction
@nestjs-modules/mailerInterceptOptionsinterface
@nestjs-modules/mailerMailgunTransportclass
@nestjs-modules/mailerisTransientErrorfunction
@nestjs-modules/mailerMailerEventRecordinterface
@nestjs-modules/mailerPostmarkTransportclass
@nestjs-modules/mailerSendGridTransportclass
@nestjs-modules/mailermailerChannelNamefunction
@nestjs-modules/mailerMailerEventEmitterinterface
@nestjs-modules/mailerMailerMessageErrorclass
@nestjs-modules/mailerMailerRetryOptionsinterface
@nestjs-modules/mailerMailerTimeoutErrorclass
@nestjs-modules/mailerUnsubscribeOptionsinterface
@nestjs-modules/mailerHttpSentMessageInfointerface
@nestjs-modules/mailerLogTransportOptionsinterface
@nestjs-modules/mailerMailableSendOptionstype
@nestjs-modules/mailerMailerPreviewModuleclass
@nestjs-modules/mailerMailerProviderErrorclass
@nestjs-modules/mailerMailerTemplateErrorclass
@nestjs-modules/mailerSesTransportOptionsinterface
@nestjs-modules/mailerFileTransportOptionsinterface
@nestjs-modules/mailerHttpTransportOptionsinterface
@nestjs-modules/mailerMAILER_EVENT_EMITTERvariable
@nestjs-modules/mailerMailerPreviewOptionsinterface
@nestjs-modules/mailermayHaveBeenDeliveredfunction
@nestjs-modules/mailerBrevoTransportOptionsinterface
@nestjs-modules/mailerHttpProviderTransportclass
@nestjs-modules/mailerMailerConnectionErrorclass
@nestjs-modules/mailerSuppressedMessageInfointerface
@nestjs-modules/mailerMAILER_PREVIEW_OPTIONSvariable
@nestjs-modules/mailerResendTransportOptionsinterface
@nestjs-modules/mailerMailgunTransportOptionsinterface
@nestjs-modules/mailerPostmarkTransportOptionsinterface
@nestjs-modules/mailerSendGridTransportOptionsinterface
@nestjs-modules/mailerMailerRecipientsRejectedErrorclass

Changelog między tymi wersjami

Tekst opublikowany przez autorów pakietu, pokazany bez zmian.

4.0.0
### Major Changes

- [#1353](https://github.com/nest-modules/mailer/pull/1353) [`c8c0423`](https://github.com/nest-modules/mailer/commit/c8c0423749bd8f0f7d0f247e62ee5ab7a55f6535) Thanks [@juandav](https://github.com/juandav)! - v4: everything the official `@nestjs/mail` offers and more, without dropping anything v3 supports. Every capability is optional: use nodemailer, the built-in HTTP providers or `@nestjs/mail`'s transports; send directly, through BullMQ or through `@nestjs/outbox`; call `sendMail`, mail classes or the official `Mailer` over this module.
  
  **Breaking changes** (see the [migration guide](https://nest-modules.github.io/mailer/guide/migration)):
  
  - Transient failures are retried by default (3 attempts with backoff); `retry: false` restores v3. A timeout or a dropped connection while the message was being handed over is retried only when the email has a stable Message-ID (`idempotencyKey`), so nothing is sent twice. `sendTimeout` applies per attempt.
  - Errors from transports are typed (`MailerSmtpError`, `MailerTimeoutError`, … all `MailerError`), keeping nodemailer's fields and the original as `cause`; `wrapErrors: false` restores v3.
  - Emails without a text part get one derived from the HTML (`textFromHtml: false` to opt out), and messages are validated before sending (`validate: false` to opt out).
  - `MailerTestModule` delivers to a `TestMailbox` (no stream transport; `info.message` uses CRLF line endings) and defaults `retry` to `false`.
  - `MailerPreviewModule` is on by default only when `NODE_ENV` is `development` or `test`.
  - Event payloads carry `attempt`, `permanent`, `transporterName` and `durationMs`; `MailerEventService` takes its emitter through `MAILER_EVENT_EMITTER`, and `EventEmitter2` is found automatically (in v3 it was never injected).
  - `MailableContext.to` is `{ name?, address }[]`, the same shape as `@nestjs/mail`.
  
  **New**
  
  - Mail classes (`mailerService.send(WelcomeMail, { to, data })`) compatible with `@nestjs/mail`'s, with dependencies resolved from the whole app, and `render()` to render without sending.
  - Retries with backoff and error classification (nodemailer, HTTP and AWS SDK errors), failover between transporters, `AbortSignal`, `idempotencyKey`, and graceful shutdown that waits for sends in flight (`shutdownTimeout`).
  - Zero-dependency HTTP transports: Resend, Postmark, SendGrid, SES (SigV4), Mailgun and Brevo.
  - The `html` tagged template (`unsafeHtml()` for trusted markup), `htmlToText()` and message validation.
  - `intercept` (redirect recipients in staging), `suppress` (suppression lists) and one-click `unsubscribe` (RFC 8058).
  - `TestMailbox` with assertions, `FileTransport` and `LogTransport` (with a warning when used in production) and `MailerPreviewModule` to preview emails in the browser.
  - `events$`, `node:diagnostics_channel` publishing (credentials redacted), and `RETRY`, `FAILOVER` and `SUPPRESSED` events.
  - BullMQ: permanent failures fail the j

Przekaż te dane swojemu agentowi AI

Vigia to darmowy serwer MCP: Twój agent programistyczny sprawdza wersje, zmiany łamiące zgodność i podatności, zanim napisze kod. Bez rejestracji i klucza API.

claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp

Dodaj do CursorDodaj do VS Code★ Gwiazdka na GitHubie

Dowolny inny klient MCP
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }

Skill dla agentów (SKILL.md): mówi agentowi, kiedy używać Vigii · GitHub Action dla pull requestów

Najczęściej zadawane pytania

Jakie są zmiany niekompatybilne przy aktualizacji @nestjs-modules/mailer z 3 do 4?

Między @nestjs-modules/mailer 3.0.2 a 4.0.0 Vigia znalazła 0 usuniętych eksportów, 0 zmienionych sygnatur i 4 usuniętych lub zmienionych składowych klas lub interfejsów.

Co zostało wycofane w @nestjs-modules/mailer 4?

0 eksportów lub składowych oznaczono w @nestjs-modules/mailer 4.0.0 jako wycofane.

Dla agentów

GET https://vigia.coredls.cloud/v1/packages/npm/@nestjs-modules/mailer/upgrade?from=3.0.2&to=4.0.0