Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@benjaminpjones
Copy link

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:

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
    • N/A - my code doesn't use the ses bits
  • Add or edit tests to reflect the change.
    • I didn't add tests, but I kept the existing ones the same to ensure these are still compatible with the AWS lib
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run pnpm test nodemailer.

Changing an existing definition:

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]>
@typescript-bot
Copy link
Contributor

typescript-bot commented Dec 21, 2025

@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 PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Only a DT maintainer can approve changes without tests

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"
}

@typescript-bot
Copy link
Contributor

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!

@typescript-bot
Copy link
Contributor

🔔 @rogierschouten @dex4er @bioball — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@benjaminpjones
Copy link
Author

😒 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 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 aws-sdk types.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Untested Change This PR does not touch tests

Projects

Status: Needs Maintainer Review

Development

Successfully merging this pull request may close these issues.

2 participants