Skip to content

Commit f465b3f

Browse files
committed
fix: support UI5 2.x in version filter, clarify exclusion comment
- Workflow: version floor now uses major >= 2 || (major === 1 && minor >= 120) instead of just minor >= 120, which would exclude future 2.x versions. - generate.mjs: clarify the shouldExclude comment per review feedback.
1 parent 98023f7 commit f465b3f

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/generate-api-docs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,18 @@ jobs:
6060
6161
for OVERVIEW_URL in "https://sdk.openui5.org/versionoverview.json" "https://ui5.sap.com/versionoverview.json"; do
6262
# Get LTS versions + the latest (highest) maintenance version
63-
# Filter: lts===true OR highest minor. Hard floor: minor >= 120.
63+
# Filter: lts===true OR highest minor. Floor: types packages exist since 1.120.
6464
MAINT_LINES=$(curl -sf "$OVERVIEW_URL" | node -e "
6565
const data = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
6666
const maintained = data.versions.filter(v => v.support === 'Maintenance');
6767
const latest = maintained[0]; // first entry is always the newest
6868
const lines = maintained
6969
.filter(v => v.lts === true || v === latest)
7070
.map(v => v.version.replace('.*',''))
71-
.filter(v => parseInt(v.split('.')[1]) >= 120);
71+
.filter(v => {
72+
const [maj, min] = v.split('.').map(Number);
73+
return maj >= 2 || (maj === 1 && min >= 120);
74+
});
7275
console.log(lines.join(' '));
7376
")
7477

scripts/generate-api-docs/generate.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ function shouldExclude(relPath) {
421421
if (lastSlash < 0) break;
422422
candidate = candidate.slice(0, lastSlash);
423423
}
424-
if (!matchingModule) return true; // no matching module → re-export/namespace artefact
424+
if (!matchingModule) return true; // not declared in this library's .d.ts — exclude
425425
// Check if another library owns this module's namespace (= augmentation)
426426
const moduleNs = matchingModule + "/"; // e.g. "sap/tnt/library/"
427427
for (const [otherLib, otherNs] of libNamespacePrefixes) {

0 commit comments

Comments
 (0)