From 3138447421c84dbbc62015eae38bd58d7d3b1966 Mon Sep 17 00:00:00 2001 From: Deeksha Sinha <88374536+deekshas8@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:03:32 +0100 Subject: [PATCH] chore: Add node16 option (#5184) * add node16 option * Changes from lint:fix --------- Co-authored-by: cloud-sdk-js --- .changeset/chilled-colts-heal.md | 2 +- .github/actions/check-public-api/index.js | 1 + packages/generator-common/src/compiler.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.changeset/chilled-colts-heal.md b/.changeset/chilled-colts-heal.md index 2e7af62912..6cf49518e8 100644 --- a/.changeset/chilled-colts-heal.md +++ b/.changeset/chilled-colts-heal.md @@ -2,4 +2,4 @@ '@sap-cloud-sdk/generator-common': minor --- -[Fixed Issue] Fix ESM client code compilation by allowing the `module` option to be set to `nodenext` in a custom `tsconfig.json` file. +[Fixed Issue] Fix ESM client code compilation by allowing the `module` option to be set to `nodenext` or `node16` in a custom `tsconfig.json` file. diff --git a/.github/actions/check-public-api/index.js b/.github/actions/check-public-api/index.js index e5868d6d32..989a5932b9 100644 --- a/.github/actions/check-public-api/index.js +++ b/.github/actions/check-public-api/index.js @@ -70637,6 +70637,7 @@ function parseModuleKind(input) { es2015: typescript_1.ModuleKind.ES2015, es2020: typescript_1.ModuleKind.ES2020, esnext: typescript_1.ModuleKind.ESNext, + node16: typescript_1.ModuleKind.Node16, nodenext: typescript_1.ModuleKind.NodeNext }; if (mapping[input.toLowerCase()]) { diff --git a/packages/generator-common/src/compiler.ts b/packages/generator-common/src/compiler.ts index b807258699..c8889562e4 100644 --- a/packages/generator-common/src/compiler.ts +++ b/packages/generator-common/src/compiler.ts @@ -256,6 +256,7 @@ function parseModuleKind(input: string): ModuleKind { es2015: ModuleKind.ES2015, es2020: ModuleKind.ES2020, esnext: ModuleKind.ESNext, + node16: ModuleKind.Node16, nodenext: ModuleKind.NodeNext };