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

Re-add support for tsconfig's moduleResolution=node10 #1741

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Mar 18, 2025

This feels crazy to add support for the node10 moduleResolution setting, but as pointed out in:
emberjs/ember.js#20876

Some projects aren't up to date enough to use more modern moduleResolution settings -- and every TS dep needs to be compat with both in order to allow a consumer to migrate.

From the tsconfig docs

Default: Node10 if module is CommonJS; Node16 if module is Node16 or Node18; NodeNext if module is NodeNext; Bundler if module is Preserve; Classic otherwise.

No one should be using Node10 if they're writing ESM.

moduleResolution: node was renamed to moduleResolution: node10 with the release of TypeScript 5.0, which was released in March of 2023, which at the time, ember LTS was 4.8 with 4.12 being released on May 2023.

So it is within the TS Rolling support policy to be reasonable to have dropped support for moduleResolution: node10, and earlier TS versions.
(assuming config changes't aren't covered under semver-ts -- I opened this issue on semver-ts)

However, supporting node10 is easy, as this PR is one line change in each published package.json

Copy link
Contributor

This PRmain
Dev
583K └─┬ .
169K   ├── runtime
160K   ├── syntax
100K   ├── compiler
 58K   ├── opcode-compiler
 27K   ├── manager
 19K   ├── validator
 11K   ├── program
8.9K   ├── reference
7.2K   ├── destroyable
6.3K   ├── util
4.3K   ├── node
3.4K   ├── global-context
2.5K   ├── wire-format
1.0K   ├── vm
969B   ├── encoder
844B   ├── vm-babel-plugins
606B   └── owner
583K └─┬ .
169K   ├── runtime
160K   ├── syntax
100K   ├── compiler
 58K   ├── opcode-compiler
 27K   ├── manager
 19K   ├── validator
 11K   ├── program
8.9K   ├── reference
7.2K   ├── destroyable
6.3K   ├── util
4.3K   ├── node
3.4K   ├── global-context
2.5K   ├── wire-format
1.0K   ├── vm
969B   ├── encoder
844B   ├── vm-babel-plugins
606B   └── owner
Prod
230K └─┬ .
 70K   ├── syntax
 63K   ├── runtime
 48K   ├── compiler
 18K   ├── opcode-compiler
7.9K   ├── manager
4.8K   ├── program
4.0K   ├── validator
3.6K   ├── reference
2.4K   ├── util
2.1K   ├── node
1.6K   ├── wire-format
1.5K   ├── destroyable
737B   ├── vm
594B   ├── global-context
516B   ├── encoder
469B   ├── vm-babel-plugins
155B   └── owner
230K └─┬ .
 70K   ├── syntax
 63K   ├── runtime
 48K   ├── compiler
 18K   ├── opcode-compiler
7.9K   ├── manager
4.8K   ├── program
4.0K   ├── validator
3.6K   ├── reference
2.4K   ├── util
2.1K   ├── node
1.6K   ├── wire-format
1.5K   ├── destroyable
737B   ├── vm
594B   ├── global-context
516B   ├── encoder
469B   ├── vm-babel-plugins
155B   └── owner

@NullVoxPopuli NullVoxPopuli merged commit 0a3b180 into main Mar 18, 2025
12 checks passed
@NullVoxPopuli NullVoxPopuli deleted the add-back-types-for-moduleResolution=node10 branch March 18, 2025 18:42
@github-actions github-actions bot mentioned this pull request Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant