Skip to content

Commit f0938b3

Browse files
author
eleith
committed
initial modernization migration
1 parent fc17593 commit f0938b3

55 files changed

Lines changed: 4298 additions & 8446 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.vscode
22
node_modules
3+
coverage
4+
dist
35

46
*.ini
57
*.log

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
dist
3+
coverage
4+
test/attachments
5+
pnpm-lock.yaml
6+
yarn.lock
7+
package-lock.json

.prettierrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"singleQuote": true,
33
"trailingComma": "es5",
4-
"useTabs": true
4+
"useTabs": true,
5+
"semi": false
56
}

CHANGELOG.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,202 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

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

8+
## [5.0.0] - 2025-12-12
9+
10+
### Added
11+
12+
- Added `docker-compose.yml` to run mailpit for manual end-to-end testing.
13+
- Added test emails in `scripts/` to be run agains mailpit.
14+
15+
### Migrated
16+
17+
- Migrated project to latest TypeScript (v5.x) with strict typing.
18+
- Migrated all tests from AVA to Vitest.
19+
- Refactored project structure to `src/` for source code and co-located tests.
20+
21+
### Changed
22+
23+
- Updated core dependencies to their latest versions.
24+
- Updated `tsconfig.json` and adopted `tsc` for builds.
25+
- Updated ESLint and Prettier configurations.
26+
27+
### Removed
28+
29+
- AVA testing framework and its associated configurations.
30+
- Rollup build system and its configurations.
31+
- Removed JSDoc comments.
32+
- Legacy source files and build artifacts (`email.js`, `email.ts`, `smtp/` directory).
33+
734
## [4.0.2] - 2023-05-12
35+
836
### Fixed
37+
938
- redact passwords in error messages [#339](https://github.com/eleith/emailjs/issues/339)
1039

1140
## [4.0.0] - 2022-04-20
41+
1242
### Added
43+
1344
- support `isolatedModules` and `preserveValueImports` compilation scenarios [#305](https://github.com/eleith/emailjs/pull/305)
1445

1546
### Fixed
47+
1648
- support `typescript@3.8.3` [#307](https://github.com/eleith/emailjs/issues/307)
17-
- 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`.
49+
- 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`.
1850

1951
## [3.8.0] - 2022-03-17
52+
2053
### Added
54+
2155
- support `typescript@4.6`
2256
- type allow `Client#send` & `Client#sendAsync` to accept message headers instead of a `Message`
23-
- no behavior change: this was previously allowed, but the types didn't acknowledge it
57+
- no behavior change: this was previously allowed, but the types didn't acknowledge it
2458

2559
## [3.7.0] - 2021-11-19
60+
2661
### Added
62+
2763
- support `typescript@4.5`
2864

2965
## [3.6.0] - 2021-09-03
66+
3067
### Added
68+
3169
- support `tsc` compilation without `--esModuleInterop` or `--allowSyntheticDefaultImports` [#296](https://github.com/eleith/emailjs/pull/296)
3270
- `Message#readAsync` API [#297](https://github.com/eleith/emailjs/pull/297)
3371
- `Message#checkValidity` API [#298](https://github.com/eleith/emailjs/pull/298)
3472

3573
### Deprecated
74+
3675
- `Message#valid` API [#298](https://github.com/eleith/emailjs/pull/298)
3776

3877
## [3.5.0] - 2021-06-28
78+
3979
### Added
80+
4081
- support `tsc --noPropertyAccessFromIndexSignature` [#290](https://github.com/eleith/emailjs/pull/290)
4182

4283
### Fixed
84+
4385
- use `engines` field in `package.json` to signal node version support
4486

4587
## [3.4.0] - 2020-12-01
88+
4689
### Added
90+
4791
- `SMTPClient#sendAsync` API [#267](https://github.com/eleith/emailjs/issues/267)
4892
- `isRFC2822Date` API
4993

5094
### Changed
95+
5196
- use `WeakSet` instead of `WeakMap` for greylist tracking
5297

5398
### Fixed
99+
54100
- use camelCase style for internal function names
55101
- use correct types in jsdoc comments
56102

57103
## [3.3.0] - 2020-08-08
104+
58105
### Added
106+
59107
- greylist support [#202](https://github.com/eleith/emailjs/issues/202)
60108

61109
### Fixed
110+
62111
- check socket is writable before sending [#205](https://github.com/eleith/emailjs/issues/205)
63112

64113
## [3.2.1] - 2020-06-27
114+
65115
### Fixed
116+
66117
- use correct type for `MessageAttachment.stream` [#261](https://github.com/eleith/emailjs/issues/261)
67118
- add missing types in mime functions [#262](https://github.com/eleith/emailjs/pull/262)
68119

69120
## [3.2.0] - 2020-06-19
121+
70122
### Added
123+
71124
- `addressparser` API (forked from dropped dependency) [#259](https://github.com/eleith/emailjs/issues/259)
72125
- `mimeEncode`/`mimeWordEncode` APIs (forked from dropped dependency) [#247](https://github.com/eleith/emailjs/issues/247)
73126

74127
### Changed
128+
75129
- drop dependency on `addressparser` [#259](https://github.com/eleith/emailjs/issues/259)
76130
- drop dependency on `emailjs-mime-codec` [#247](https://github.com/eleith/emailjs/issues/247)
77131

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

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

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

91148
### Changed
149+
92150
- simplify public API [#249](https://github.com/eleith/emailjs/issues/249)
93151
- rename `Client` -> `SMTPClient` [#249](https://github.com/eleith/emailjs/issues/249)
94152
- rename `SMTPResponse` -> `SMTPResponseMonitor` [#249](https://github.com/eleith/emailjs/issues/249)
95153

96154
### Removed
155+
97156
- `Message#attach_alternative` API
98157
- `makeSMTPError` API
99158

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

105165
## [2.2.0] - 2018-07-06
166+
106167
### Added
168+
107169
- expose rfc2822 date module
108170
- annotate code with typescript-compatible jsdoc tags
109171

110172
### Changed
173+
111174
- drop dependency on `moment`
112175
- drop dependency on `starttls`
113176

114177
### Fixed
178+
115179
- ensure timeout is set to default value [#225](https://github.com/eleith/emailjs/issues/225)
116180

117181
## [2.1.0] - 2018-06-09
182+
118183
### Added
184+
119185
- expose error module
120186

121187
### Changed
188+
122189
- handle errors with `fs.closeSync` instead of `fs.close`
123190
- refactor to ES2015+ constructs
124191
- lint & format with eslint + prettier
125192
- drop optional dependency on `bufferjs`
126193

127194
### Fixed
195+
128196
- remove `new Buffer` calls
129197

130198
## [2.0.1] - 2018-02-11
199+
131200
### Added
201+
132202
- a new changelog

0 commit comments

Comments
 (0)