Skip to content

Deprecate --module amd, umd, system, none; --moduleResolution classic; change defaults - #62669

Merged
Andrew Branch (andrewbranch) merged 6 commits into
microsoft:mainfrom
andrewbranch:deprecate-module-stuff
Oct 24, 2025
Merged

Deprecate --module amd, umd, system, none; --moduleResolution classic; change defaults#62669
Andrew Branch (andrewbranch) merged 6 commits into
microsoft:mainfrom
andrewbranch:deprecate-module-stuff

Conversation

@andrewbranch

@andrewbranchAndrew Branch (andrewbranch) commented Oct 24, 2025

Copy link
Copy Markdown
Member

This leaves the module default as-is for now, but changes the computed moduleResolution default for the es series to be bundler. Deprecated module modes still default to classic.

I went through compiler tests and fourslash tests and changed them to use non-deprecated options if they weren’t intending to test the newly deprecated options. That will allow them to come into typescript-go for better coverage.

Closes#62199
Closes#62206

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR deprecates several legacy module formats (amd, umd, system, none) and the classic module resolution strategy, while changing the default moduleResolution for ES module formats from classic to bundler. These deprecated options will stop functioning in TypeScript 7.0.

Key Changes

  • Deprecated --module options: amd, umd, system, and none
  • Deprecated --moduleResolution classic
  • Changed default moduleResolution for ES module series from classic to bundler
  • Updated test baselines to reflect new deprecation warnings and changed module resolution behavior

Reviewed Changes

Copilot reviewed 299 out of 1932 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
Multiple *.errors.txt filesAdded deprecation warnings for deprecated module formats and classic resolution
Multiple *.js baseline filesRemoved AMD/UMD/System wrapper code, showing CommonJS output instead
Multiple *.types baseline filesUpdated type information reflecting bundler resolution
Multiple *.symbols baseline filesUpdated import paths from bare specifiers to relative paths
Config baseline filesUpdated error messages to remove deprecated options from valid choices

@typescript-bot

Copy link
Copy Markdown
Contributor

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure Daniel Rosenwasser (@DanielRosenwasser) and Ryan Cavanaugh (@RyanCavanaugh) are aware of the changes, just as a heads up.

@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) user test this
TypeScript Bot (@typescript-bot) test top800
TypeScript Bot (@typescript-bot) pack this

@typescript-bot

TypeScript Bot (typescript-bot) commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
user test this✅ Started✅ Results
test top800✅ Started👀 Results
pack this✅ Started✅ Results

@typescript-bot

TypeScript Bot (typescript-bot) commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/166375/artifacts?artifactName=tgz&fileId=C423F954FA7ABC3DA7B47D6984471C48D3D6C4A6BEF4E66FD691EC5F8B596AE802&fileName=/typescript-6.0.0-insiders.20251024.tgz"
}
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@6.0.0-pr-62669-3".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests with tsc comparing main and refs/pull/62669/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Everything looks good!

@jakebaileyJake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

@github-project-automationgithub-project-automationBot moved this from Not started to Needs merge in PR BacklogOct 24, 2025
@andrewbranch

Copy link
Copy Markdown
MemberAuthor

I am going to go ahead and port this into tsgo-port since none of these things are implemented in Corsa anyway. It should light up a bunch of new tests and make other diffs go away.

TypeScript Bot (@typescript-bot) cherry-pick into tsgo-port

@typescript-bot

TypeScript Bot (typescript-bot) commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
cherry-pick into tsgo-port✅ Started❌ Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 800 repos with tsc comparing main and refs/pull/62669/merge:

Something interesting changed - please have a look.

Details

microsoft/azuredatastudio

43 of 67 projects failed to build with the old tsc and were ignored

src/tsconfig.vscode-proposed-dts.json

  • error TS5107: Option 'module=None' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
    • Project Scope

microsoft/vscode

12 of 63 projects failed to build with the old tsc and were ignored

src/tsconfig.vscode-proposed-dts.json

  • error TS5107: Option 'module=None' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
    • Project Scope

voideditor/void

25 of 58 projects failed to build with the old tsc and were ignored

src/tsconfig.vscode-proposed-dts.json

  • error TS5107: Option 'module=None' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
    • Project Scope

@andrewbranch
Andrew Branch (andrewbranch) merged commit 42f6576 into microsoft:mainOct 24, 2025
33 checks passed
@github-project-automationgithub-project-automationBot moved this from Needs merge to Done in PR BacklogOct 24, 2025
@typescript-bot

Copy link
Copy Markdown
Contributor

Hey, Andrew Branch (@andrewbranch)! I was unable to cherry-pick this PR.

Check the logs at: https://github.com/microsoft/TypeScript/actions/runs/18793106856

@andrewbranch

Copy link
Copy Markdown
MemberAuthor

Interesting; I'll try to see what Azure Data Studio and VS Code are trying to do with --module none. We are deprecating it because its behavior is inconsistent and weird in Strada, but it could potentially be useful to bring back as something coherent if a strong case for it emerges.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamBreaking ChangeWould introduce errors in existing codeFor Milestone BugPRs that fix a bug with a specific milestone

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Deprecate, remove --moduleResolution classic Deprecate, remove less-used --module targets (AMD, SystemJS, UMD)

4 participants

@andrewbranch@typescript-bot@jakebailey