Skip to content

Commit a5484ae

Browse files
TypeScript Botandrewbranch
TypeScript Bot
andauthored
🤖 Pick PR #53139 (Make ModuleResolutionKind.Node10 ch...) into release-5.0 (#53143)
Co-authored-by: Andrew Branch <[email protected]>
1 parent 23455b4 commit a5484ae

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

Diff for: ‎src/compiler/types.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -6914,6 +6914,12 @@ export function diagnosticCategoryName(d: { category: DiagnosticCategory }, lowe
69146914

69156915
export enum ModuleResolutionKind {
69166916
Classic = 1,
6917+
/**
6918+
* @deprecated
6919+
* `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
6920+
* Use the new name or consider switching to a modern module resolution target.
6921+
*/
6922+
NodeJs = 2,
69176923
Node10 = 2,
69186924
// Starting with node12, node's module resolver has significant departures from traditional cjs resolution
69196925
// to better support ecmascript modules and their use within node - however more features are still being added.
@@ -6922,7 +6928,7 @@ export enum ModuleResolutionKind {
69226928
// In turn, we offer both a `NodeNext` moving resolution target, and a `Node16` version-anchored resolution target
69236929
Node16 = 3,
69246930
NodeNext = 99, // Not simply `Node16` so that compiled code linked against TS can use the `Next` value reliably (same as with `ModuleKind`)
6925-
Bundler = 100,
6931+
Bundler = 100,
69266932
}
69276933

69286934
export enum ModuleDetectionKind {

Diff for: ‎tests/baselines/reference/api/tsserverlibrary.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -6991,6 +6991,12 @@ declare namespace ts {
69916991
}
69926992
enum ModuleResolutionKind {
69936993
Classic = 1,
6994+
/**
6995+
* @deprecated
6996+
* `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
6997+
* Use the new name or consider switching to a modern module resolution target.
6998+
*/
6999+
NodeJs = 2,
69947000
Node10 = 2,
69957001
Node16 = 3,
69967002
NodeNext = 99,

Diff for: ‎tests/baselines/reference/api/typescript.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -3016,6 +3016,12 @@ declare namespace ts {
30163016
}
30173017
enum ModuleResolutionKind {
30183018
Classic = 1,
3019+
/**
3020+
* @deprecated
3021+
* `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
3022+
* Use the new name or consider switching to a modern module resolution target.
3023+
*/
3024+
NodeJs = 2,
30193025
Node10 = 2,
30203026
Node16 = 3,
30213027
NodeNext = 99,

0 commit comments

Comments
 (0)