Skip to content
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

TS 5.0 - ModuleResolutionKind Enum changed (breaking change that's not listed) #53131

Closed
dummdidumm opened this issue Mar 7, 2023 · 2 comments · Fixed by #53139
Closed

TS 5.0 - ModuleResolutionKind Enum changed (breaking change that's not listed) #53131

dummdidumm opened this issue Mar 7, 2023 · 2 comments · Fixed by #53139
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript

Comments

@dummdidumm
Copy link

dummdidumm commented Mar 7, 2023

Bug Report

ts.ModuleResolutionKind seems to have changed between 4.9 and 5. The enum now has a Node10 value which I guess is the old NodeJs. This isn't mentioned in the API breaking changes list, so this is either a bug (which will probably break a few libraries [for example the rollup typescript plugin, through which I discovered this]) or should be added to that list.
(for me personally, if you want to keep the name change, it would be best to first deprecate the old name and remove it later)

🔎 Search Terms

ModuleResolutionKind

🕗 Version & Regression Information

  • This changed between versions 4.9 and 5.0

⏯ Playground Link

Doesn't apply here

💻 Code

ts.ModuleResolutionKind.NodeJs

🙁 Actual behavior

Error

🙂 Expected behavior

No error

@jakebailey
Copy link
Member

jakebailey commented Mar 7, 2023

NodeJs was changed to Node10 in #51901, and I'm also noticing some cross-linked changes to that PR of people working around this.

@andrewbranch Should we have left behind a deprecated enum member?

(It is of course 5.0 where we made loads of breaking changes, so we could just document it.)

@andrewbranch
Copy link
Member

I may have meant to make it a breaking change; I don’t remember. But it’s very easy to make it backward-compatible. It’s probably best to add NodeJs back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants