From 69e58f0c8395213b3dd3bddc4c642036e4ef2c0c Mon Sep 17 00:00:00 2001 From: Daniel O'Grady Date: Tue, 1 Jul 2025 07:40:25 +0200 Subject: [PATCH 1/2] Add cds-dk to default export --- .github/api-extractor/post-rollup.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/api-extractor/post-rollup.js b/.github/api-extractor/post-rollup.js index 38477568..2a50400c 100755 --- a/.github/api-extractor/post-rollup.js +++ b/.github/api-extractor/post-rollup.js @@ -104,10 +104,13 @@ async function post (preResults) { rollup += filterFile } - // put all exports into an augmented module declaration. Remove all "declare" modifiers - // as they will now already be in an ambient context - rollup = rollup.replaceAll('declare ','') + rollup = rollup + // remove all "declare" modifiers as they will now already be in an ambient context + .replaceAll('declare ','') + // put cds-dk into the cds-namespace as well, to be included in the default export + .replaceAll(/^namespace cds {$/gm, 'namespace cds { export * from "@sap/cds-dk";') rollup = 'export * from "@sap/cds-dk";\n' + rollup // add cds-dk back in we had to remove in pre() + // put all exports into an augmented module declaration. rollup = `declare module '@sap/cds' {\n${rollup}\n}` await writeFile(rollupFile, rollup) From 2a80576eefd23a77bc9b7beb5ac71b6874645109 Mon Sep 17 00:00:00 2001 From: Daniel O'Grady Date: Tue, 1 Jul 2025 07:41:07 +0200 Subject: [PATCH 2/2] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 096a9b26..ccc4ea40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). ### Added ### Changed +- Types for `@sap/cds-dk` are now also available from the default export, if the package is intalled. ### Deprecated ### Removed ### Fixed