Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .eslintrc.json

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: check

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types:
- synchronize

jobs:
build-and-test:
name: Build & Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [20, 22, 24]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Test with Coverage
run: npm run test:coverage
26 changes: 0 additions & 26 deletions .github/workflows/lint.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.vscode
node_modules
coverage
dist
mailpit

*.ini
*.log
Expand All @@ -8,4 +11,3 @@ node_modules
*~

.DS_Store
package-lock.json
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
coverage
test/attachments
pnpm-lock.yaml
yarn.lock
package-lock.json
3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"singleQuote": true,
"trailingComma": "es5",
"useTabs": true
"useTabs": true,
"semi": false
}
76 changes: 74 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,132 +1,204 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [5.0.0] - 2025-12-12

### Added

- Added `docker-compose.yml` to run mailpit for manual end-to-end testing.
- Added test emails in `scripts/` to be run agains mailpit.
- Increased test coverage

### Migrated

- Migrated project to latest TypeScript (v5.x) with strict typing.
- Migrated all tests from AVA to Vitest.
- Refactored project structure to `src/` for source code and co-located tests.

### Changed

- Updated core dependencies to their latest versions.
- Updated `tsconfig.json` and adopted `tsc` for builds.
- Updated ESLint and Prettier configurations.

### Removed

- AVA testing framework and its associated configurations.
- Rollup build system and its configurations.
- Removed JSDoc comments.
- Legacy source files and build artifacts (`email.js`, `email.ts`, `smtp/` directory).
- Dropped legacy dual support (CommonJS/ESM) in favor of the latest Node.js standards.

## [4.0.2] - 2023-05-12

### Fixed

- redact passwords in error messages [#339](https://github.com/eleith/emailjs/issues/339)

## [4.0.0] - 2022-04-20

### Added

- support `isolatedModules` and `preserveValueImports` compilation scenarios [#305](https://github.com/eleith/emailjs/pull/305)

### Fixed

- support `typescript@3.8.3` [#307](https://github.com/eleith/emailjs/issues/307)
- the types change in `v3.8.0` for `Client#send` & `Client#sendAsync` unintentionally raised the minimum `typescript` requirement. fixing this involved weakening the types for those functions, which may require modifying your code. this change will be reverted for `v4.0.0`.
- the types change in `v3.8.0` for `Client#send` & `Client#sendAsync` unintentionally raised the minimum `typescript` requirement. fixing this involved weakening the types for those functions, which may require modifying your code. this change will be reverted for `v4.0.0`.

## [3.8.0] - 2022-03-17

### Added

- support `typescript@4.6`
- type allow `Client#send` & `Client#sendAsync` to accept message headers instead of a `Message`
- no behavior change: this was previously allowed, but the types didn't acknowledge it
- no behavior change: this was previously allowed, but the types didn't acknowledge it

## [3.7.0] - 2021-11-19

### Added

- support `typescript@4.5`

## [3.6.0] - 2021-09-03

### Added

- support `tsc` compilation without `--esModuleInterop` or `--allowSyntheticDefaultImports` [#296](https://github.com/eleith/emailjs/pull/296)
- `Message#readAsync` API [#297](https://github.com/eleith/emailjs/pull/297)
- `Message#checkValidity` API [#298](https://github.com/eleith/emailjs/pull/298)

### Deprecated

- `Message#valid` API [#298](https://github.com/eleith/emailjs/pull/298)

## [3.5.0] - 2021-06-28

### Added

- support `tsc --noPropertyAccessFromIndexSignature` [#290](https://github.com/eleith/emailjs/pull/290)

### Fixed

- use `engines` field in `package.json` to signal node version support

## [3.4.0] - 2020-12-01

### Added

- `SMTPClient#sendAsync` API [#267](https://github.com/eleith/emailjs/issues/267)
- `isRFC2822Date` API

### Changed

- use `WeakSet` instead of `WeakMap` for greylist tracking

### Fixed

- use camelCase style for internal function names
- use correct types in jsdoc comments

## [3.3.0] - 2020-08-08

### Added

- greylist support [#202](https://github.com/eleith/emailjs/issues/202)

### Fixed

- check socket is writable before sending [#205](https://github.com/eleith/emailjs/issues/205)

## [3.2.1] - 2020-06-27

### Fixed

- use correct type for `MessageAttachment.stream` [#261](https://github.com/eleith/emailjs/issues/261)
- add missing types in mime functions [#262](https://github.com/eleith/emailjs/pull/262)

## [3.2.0] - 2020-06-19

### Added

- `addressparser` API (forked from dropped dependency) [#259](https://github.com/eleith/emailjs/issues/259)
- `mimeEncode`/`mimeWordEncode` APIs (forked from dropped dependency) [#247](https://github.com/eleith/emailjs/issues/247)

### Changed

- drop dependency on `addressparser` [#259](https://github.com/eleith/emailjs/issues/259)
- drop dependency on `emailjs-mime-codec` [#247](https://github.com/eleith/emailjs/issues/247)

### Fixed

- make `MessageAttachment` interface usable [#254](https://github.com/eleith/emailjs/issues/254)
- mend regression in address type validation [#252](https://github.com/eleith/emailjs/pull/252)

## [3.1.0] - 2020-06-19 [YANKED]

## [3.0.0] - 2020-05-28

### Added

- convert source to strict typescript, listed under the `types` field in `package.json`
- support "dual-package" ESM + CJS via [conditional exports](https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_conditional_exports) & `rollup`-generated bundles
- `SMTPClient#creatMessageStack` API [#229](https://github.com/eleith/emailjs/issues/229)
- `SMTPError` API

### Changed

- simplify public API [#249](https://github.com/eleith/emailjs/issues/249)
- rename `Client` -> `SMTPClient` [#249](https://github.com/eleith/emailjs/issues/249)
- rename `SMTPResponse` -> `SMTPResponseMonitor` [#249](https://github.com/eleith/emailjs/issues/249)

### Removed

- `Message#attach_alternative` API
- `makeSMTPError` API

### Fixed

- filter duplicate message recipients [#242](https://github.com/eleith/emailjs/issues/242)
- error when passing `password` without `user` [#199](https://github.com/eleith/emailjs/issues/199)
- trim `host` before connecting [#136](https://github.com/eleith/emailjs/issues/136)

## [2.2.0] - 2018-07-06

### Added

- expose rfc2822 date module
- annotate code with typescript-compatible jsdoc tags

### Changed

- drop dependency on `moment`
- drop dependency on `starttls`

### Fixed

- ensure timeout is set to default value [#225](https://github.com/eleith/emailjs/issues/225)

## [2.1.0] - 2018-06-09

### Added

- expose error module

### Changed

- handle errors with `fs.closeSync` instead of `fs.close`
- refactor to ES2015+ constructs
- lint & format with eslint + prettier
- drop optional dependency on `bufferjs`

### Fixed

- remove `new Buffer` calls

## [2.0.1] - 2018-02-11

### Added

- a new changelog
Loading