Skip to content

Commit 95c3527

Browse files
committed
refactor(ui5Manifest): Add comments for lowest supported version 1.68.0
1 parent 53beef2 commit 95c3527

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/utils/ui5Manifest.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ let UI5ToManifestVersionMapping: Record<string, string> | null = null;
1212
const MAPPING_URL = "https://raw.githubusercontent.com/SAP/ui5-manifest/main/mapping.json";
1313
const ui5ToManifestVersionMappingMutex = new Mutex();
1414

15+
// Manifests prior to 1.68.0 use older meta-schema, which is not supported by the current implementation
16+
const LOWEST_SUPPORTED_MANIFEST_VERSION = "1.68.0";
17+
1518
function getSchemaURL(manifestVersion: string) {
1619
return `https://raw.githubusercontent.com/SAP/ui5-manifest/v${manifestVersion}/schema.json`;
1720
}
@@ -64,7 +67,9 @@ async function failWithSupportedVersionsHint(errorMessage: string): Promise<neve
6467

6568
try {
6669
const versionMap = await getUI5toManifestVersionMapping();
67-
supportedVersions = Object.values(versionMap).filter((version) => semver.gte(version, "1.68.0"));
70+
supportedVersions = Object.values(versionMap).filter(
71+
(version) => semver.gte(version, LOWEST_SUPPORTED_MANIFEST_VERSION)
72+
);
6873
} catch (_) {
6974
supportedVersions = null;
7075
};
@@ -84,7 +89,7 @@ async function failWithSupportedVersionsHint(errorMessage: string): Promise<neve
8489
* @throws Error if the manifest version is unsupported
8590
*/
8691
export async function getManifestSchema(manifestVersion: string): Promise<object> {
87-
if (semver.lt(manifestVersion, "1.68.0")) {
92+
if (semver.lt(manifestVersion, LOWEST_SUPPORTED_MANIFEST_VERSION)) {
8893
return failWithSupportedVersionsHint(
8994
`Manifest version '${manifestVersion}' is not supported. Please upgrade to a newer one.`
9095
);

0 commit comments

Comments
 (0)