-
Notifications
You must be signed in to change notification settings - Fork 30.5k
[nodemailer] Remove AWS SDK from dependencies, use structural types #74249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[nodemailer] Remove AWS SDK from dependencies, use structural types #74249
Conversation
Move @aws-sdk/client-sesv2 (v7) and @aws-sdk/client-ses (v6) from dependencies to devDependencies so users who install @types/nodemailer don't pull in the large AWS SDK dependency tree. Replace AWS SDK type imports with structural "like" types that match the shape nodemailer actually needs. This works because TypeScript uses structural typing - the real AWS SDK types will still be accepted when users install the SDK themselves for SES transport. Fixes discussion DefinitelyTyped#74080 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
@benjaminpjones Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 74249,
"author": "benjaminpjones",
"headCommitOid": "5e95afda162533e250201b14a4dbbb6ab4049401",
"mergeBaseOid": "2d215e38ab25e0588d9d59d329ec7562f9869fed",
"lastPushDate": "2025-12-21T02:30:29.000Z",
"lastActivityDate": "2025-12-21T02:34:00.000Z",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "nodemailer",
"kind": "edit",
"files": [
{
"path": "types/nodemailer/lib/ses-transport/index.d.ts",
"kind": "definition"
},
{
"path": "types/nodemailer/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/nodemailer/v6/lib/ses-transport/index.d.ts",
"kind": "definition"
},
{
"path": "types/nodemailer/v6/package.json",
"kind": "package-meta-ok"
}
],
"owners": [
"rogierschouten",
"dex4er",
"bioball"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [],
"mainBotCommentID": 3678375124,
"ciResult": "pass"
} |
|
Hey @benjaminpjones, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
|
🔔 @rogierschouten @dex4er @bioball — please review this PR in the next few days. Be sure to explicitly select |
This PR fixes dependency bloat - there's not a great test for it. I did intentionally leave existing tests the same so to ensure this is still compatible with the |
Move @aws-sdk/client-sesv2 (v7) and @aws-sdk/client-ses (v6) from dependencies to devDependencies so users who install @types/nodemailer don't pull in the large AWS SDK dependency tree.
Replace AWS SDK type imports with structural "like" types that match the shape nodemailer actually needs. This works because TypeScript uses structural typing - the real AWS SDK types will still be accepted when users install the SDK themselves for SES transport.
Fixes discussion #74080
🤖 Generated with Claude Code
Template:
pnpm test nodemailer.Changing an existing definition:
package.json. (N/A)