Skip to content

Commit

Permalink
🤖 Pick PR #53139 (Make ModuleResolutionKind.Node10 ch...) into releas…
Browse files Browse the repository at this point in the history
…e-5.0 (#53143)

Co-authored-by: Andrew Branch <andrew@wheream.io>
  • Loading branch information
TypeScript Bot and andrewbranch committed Mar 10, 2023
1 parent 23455b4 commit a5484ae
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6914,6 +6914,12 @@ export function diagnosticCategoryName(d: { category: DiagnosticCategory }, lowe

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

export enum ModuleDetectionKind {
Expand Down
6 changes: 6 additions & 0 deletions tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6991,6 +6991,12 @@ declare namespace ts {
}
enum ModuleResolutionKind {
Classic = 1,
/**
* @deprecated
* `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
* Use the new name or consider switching to a modern module resolution target.
*/
NodeJs = 2,
Node10 = 2,
Node16 = 3,
NodeNext = 99,
Expand Down
6 changes: 6 additions & 0 deletions tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3016,6 +3016,12 @@ declare namespace ts {
}
enum ModuleResolutionKind {
Classic = 1,
/**
* @deprecated
* `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
* Use the new name or consider switching to a modern module resolution target.
*/
NodeJs = 2,
Node10 = 2,
Node16 = 3,
NodeNext = 99,
Expand Down

0 comments on commit a5484ae

Please sign in to comment.