Skip to content

(mdx): add missing subpath exports map for types lookup#75059

Open
talatkuyuk wants to merge 2 commits into
DefinitelyTyped:masterfrom
talatkuyuk:master
Open

(mdx): add missing subpath exports map for types lookup#75059
talatkuyuk wants to merge 2 commits into
DefinitelyTyped:masterfrom
talatkuyuk:master

Conversation

@talatkuyuk
Copy link
Copy Markdown

Please fill in this template.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

Summary

Added explicit subpath "exports" to types/mdx/package.json.

Context

The package internally targets types from "mdx/types". However, without an explicit subpath exports entry in package.json, environments compiling code using modern TypeScript configurations like "moduleResolution": "bundler" or "moduleResolution": "nodenext" fail to resolve the path if skipLibCheck is disabled, throwing a Cannot find module 'mdx/types' or its corresponding type declarations error. (I faced with it in in next-mdx-remote-client)

Adding the exports field matches the package lookup requirements and guarantees uniform type resolution across both modern and legacy TS compilation options.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented May 29, 2026

@talatkuyuk 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
  • 🕐 Most recent commit is approved by a DT maintainer

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": 75059,
  "author": "talatkuyuk",
  "headCommitOid": "c7c1901632d37714fcad703923883f62c9f0ddc8",
  "mergeBaseOid": "d367b0514b079743f749259bd0f1fb627d079895",
  "lastPushDate": "2026-05-29T14:34:41.000Z",
  "lastActivityDate": "2026-06-01T15:03:22.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "tooManyCommits": false,
  "tooManyReviews": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "mdx",
      "kind": "edit",
      "files": [
        {
          "path": "types/mdx/package.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "ChristianMurphy",
        "remcohaszing",
        "wooorm"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "ChristianMurphy",
      "date": "2026-06-01T15:03:22.000Z",
      "isMaintainer": false
    },
    {
      "type": "approved",
      "reviewer": "remcohaszing",
      "date": "2026-05-31T09:31:54.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 4576351867,
  "ciResult": "pass"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @ChristianMurphy @remcohaszing @wooorm — 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.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board May 29, 2026
Comment thread types/mdx/package.json Outdated
@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label May 29, 2026
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in Pull Request Status Board May 29, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

@talatkuyuk One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

Co-authored-by: Remco Haszing <remcohaszing@gmail.com>
@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label May 30, 2026
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board May 30, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

@remcohaszing Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board May 30, 2026
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 31, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

⏳ Hi @talatkuyuk,

It's been a few days since this PR was approved by ChristianMurphy, remcohaszing and we're waiting for a DT maintainer to give a review.

If you would like to short-circuit this wait, you can edit some of the test files in the package that verify how the .d.ts files work. This would allow the PR to be merged by you or the DT module owners after a re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Owner Approved A listed owner of this package signed off on the pull request.

Projects

Status: Needs Maintainer Review

Development

Successfully merging this pull request may close these issues.

4 participants