Skip to content

Conversation

@GalacticHypernova
Copy link

@GalacticHypernova GalacticHypernova commented Nov 7, 2025

Description

Summary of Changes

This updates the moduleResolution config property according to https://www.typescriptlang.org/tsconfig/#moduleResolution, as TS6 deprecated "node"

Note that I have not updated the tsd moduleResolutuion since I'm unsure whether it is following TS's footsteps on this matter. If it should also be updated, I will update it

Notes for Reviewers

What is the motivation for this change?

TS has deprecated the "node" moduleResolution, and now it sends errors in the console, hurting DX:

image

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@GalacticHypernova GalacticHypernova marked this pull request as ready for review November 7, 2025 13:59
@GalacticHypernova GalacticHypernova requested a review from a team as a code owner November 7, 2025 13:59
@tadjik1
Copy link
Member

tadjik1 commented Nov 10, 2025

Hi @GalacticHypernova thanks so much for all your work on this PR. We're currently reviewing this and will get back to you soon.

@tadjik1 tadjik1 changed the title fix(ts): update moduleResolution to adhere to TS6 deprecation fix(NODE-7291): update moduleResolution to adhere to TS6 deprecation Nov 11, 2025
@tadjik1 tadjik1 added tracked-in-jira Ticket filed in MongoDB's Jira system External Submission PR submitted from outside the team labels Nov 11, 2025
@baileympearson
Copy link
Contributor

@GalacticHypernova Out of curiosity, how exactly are you seeing this compiler error?

Compiling a project that depends on the driver wouldn't compile the driver, so I'm not sure how you're seeing the TSC error from our tsconfig. Are you attempting to compile our driver source?

@GalacticHypernova
Copy link
Author

GalacticHypernova commented Nov 20, 2025

Hey! I am also unsure of how I am found this issue. I am not trying to compile the driver source, but I did notice it in a local app I use for development and production previews.

I'm assuming this can be achieved with a very specific app-level tsconfig (my app has the strictest error reporting threshold for quality assurance), or perhaps that TS-origianted errors (maybe particularly related to deprecations) are handled differently, but I can test it to be sure and report back to you

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

Labels

External Submission PR submitted from outside the team tracked-in-jira Ticket filed in MongoDB's Jira system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants