Port TypeScript PR #62338: Deprecate --moduleResolution node10#2817
Draft
Port TypeScript PR #62338: Deprecate --moduleResolution node10#2817
Conversation
…ort getModuleSpecifierOfBareOrAccessedRequire, update checker Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Port deprecation of --moduleResolution node10
Port TypeScript PR #62338: Deprecate --moduleResolution node10
Feb 18, 2026
jakebailey
reviewed
Feb 18, 2026
|
|
||
| tsgo --b project --v --explainFiles --listEmittedFiles | ||
| ExitStatus:: Success | ||
| ExitStatus:: DiagnosticsPresent_OutputsGenerated |
Member
There was a problem hiding this comment.
@copilot Change all of these tests to not use node10, but some other resolution mode
Contributor
Author
There was a problem hiding this comment.
Removed "moduleResolution": "node" from both the resolveJsonModule tsbuild test and the pnpm-style-layout tsc test configs. They now default to bundler instead. Baselines updated accordingly in 3dd2c9c.
…configs instead Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports microsoft/TypeScript#62338 to the Go codebase.
Core changes
internal/compiler/program.go: AddmoduleResolution: node10to the removed options list (TS7+ treats 6.0 deprecations as removed)internal/ast/utilities.go: AddIsVariableDeclarationInitializedToBareOrAccessedRequireandGetModuleSpecifierOfBareOrAccessedRequire— handles accessed require patterns likerequire("foo").barin addition to barerequire("foo")internal/checker/checker.go: Use the new utilities inresolveExternalModuleto correctly resolve module specifiers from accessed require callsTest updates
internal/execute/tsctests/tscbuild_test.go: Removed explicit"moduleResolution": "node"fromresolveJsonModuletsbuild test configs so they default tobundlerinternal/execute/tsctests/tsc_test.go: Removed explicit"moduleResolution": "node"frompnpm-style-layouttsc test config so it defaults tobundlerAlready ported (no changes needed)
moduleResolutionfor--module commonjs→bundler(GetModuleResolutionKindalready maps this)exportsOrImportsLookupreturningboolinstring_completions.godetailsEntryIdcompletions fix not applicable (pattern absent in Go port)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.