From a5484aebf87cfe2d51747d77fcde780111c8556c Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Fri, 10 Mar 2023 15:53:10 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Pick=20PR=20#53139=20(Make=20Mod?= =?UTF-8?q?uleResolutionKind.Node10=20ch...)=20into=20release-5.0=20(#5314?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andrew Branch --- src/compiler/types.ts | 8 +++++++- tests/baselines/reference/api/tsserverlibrary.d.ts | 6 ++++++ tests/baselines/reference/api/typescript.d.ts | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4b4e79616c3cc..881f3576868cd 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -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. @@ -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 { diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 34006d63b2ea5..f23fc06fcc24a 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -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, diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 2201712f7c4eb..4b06d971712f5 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -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,