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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^29.3.1",
"nodemailer": "^6.9.4",
"nodemailer": "^7.0.7",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Peer bump to Nodemailer v7 may be a breaking change; consider widening range and verify runtime/types compatibility

  • Changing peerDependencies to ^7.0.7 drops v6 and can break consumers. If your code supports both, widen the peer range; otherwise plan a semver-major release with notes.
  • Verify Node.js support for Nodemailer v7 vs engines.node (currently >=16.20.1). Update engines if v7 requires a higher baseline.
  • Confirm @types/nodemailer ^6.4.9 remains compatible with Nodemailer v7; bump if needed.

Apply this diff to keep compatibility with both v6 and v7 (if supported):

-    "nodemailer": "^7.0.7"
+    "nodemailer": ">=6 <8"

Run these quick checks:

Also applies to: 44-44


🌐 Web query:

What Node.js versions are supported by Nodemailer v7? Does it require Node 18+?

💡 Result:

Short answer: No — Nodemailer v7 does not require Node 18+. The project documentation and repo state Nodemailer supports older Node versions (historically "Node.js ≥ 6.0.0"); there is no indication in the v7 release notes that Node 18+ is required. [1][2]

Sources:

  • Nodemailer requirements (official docs). [1]
  • Nodemailer GitHub repository / README. [2]

References:
[1] https://nodemailer.com/
[2] https://github.com/nodemailer/nodemailer


🌐 Web query:

Are the DefinitelyTyped package versions @types/nodemailer@6.x compatible with Nodemailer v7, or is there a newer types version recommended?

💡 Result:

Short answer: No — @types/nodemailer 6.x targets Nodemailer v6. For Nodemailer v7 you should use the @types/nodemailer 7.x release (install @types/nodemailer@latest). [1][2]

Sources:

  • @types/nodemailer (npm) shows v7.x published. [1]
  • nodemailer package docs note TypeScript definitions are provided via @types/nodemailer (types package versions track the library). [2]

Align dependencies and types for Nodemailer v7

  • Peer bump to ^7.0.7 is a semver-major change: if you still need v6 support, widen to "nodemailer": ">=6 <8"; otherwise proceed with a major release.
  • Update @types/nodemailer from ^6.4.9 to ^7.0.0 in both devDependencies and peerDependencies.
  • engines.node (>=16.20.1) already satisfies Nodemailer v7’s requirements.
🤖 Prompt for AI Agents
In package.json around line 28, the dependency bump to "nodemailer": "^7.0.7" is
a semver-major change and the types are still at v6; either relax the nodemailer
range to ">=6 <8" if you need to keep v6 support, or keep the ^7.0.7 but treat
this as a major release; then update @types/nodemailer in both devDependencies
and peerDependencies from ^6.4.9 to ^7.0.0 to match Nodemailer v7; no change
needed to engines.node since >=16.20.1 already satisfies v7.0.0.

"prettier": "^2.6.2",
"ts-node": "^10.2.1",
"typescript": "^5.0.3"
Expand All @@ -41,7 +41,7 @@
"main": "dist/index.js",
"peerDependencies": {
"@types/nodemailer": "^6.4.9",
"nodemailer": "^6.9.4"
"nodemailer": "^7.0.7"
},
"peerDependenciesMeta": {
"nodemailer": {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3991,10 +3991,10 @@ node-releases@^2.0.6:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.7.tgz#593edbc7c22860ee4d32d3933cfebdfab0c0e0e5"
integrity sha512-EJ3rzxL9pTWPjk5arA0s0dgXpnyiAbJDE6wHT62g7VsgrgQgmmZ+Ru++M1BFofncWja+Pnn3rEr3fieRySAdKQ==

nodemailer@^6.9.4:
version "6.9.9"
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.9.tgz#4549bfbf710cc6addec5064dd0f19874d24248d9"
integrity sha512-dexTll8zqQoVJEZPwQAKzxxtFn0qTnjdQTchoU6Re9BUUGBJiOy3YMn/0ShTW6J5M0dfQ1NeDeRTTl4oIWgQMA==
nodemailer@^7.0.7:
version "7.0.7"
resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-7.0.7.tgz#91a16235c08abb7805a4ec1537ca63edca79687f"
integrity sha512-jGOaRznodf62TVzdyhKt/f1Q/c3kYynk8629sgJHpRzGZj01ezbgMMWJSAjHADcwTKxco3B68/R+KHJY2T5BaA==

normalize-path@^3.0.0:
version "3.0.0"
Expand Down