diff --git a/packages/constant/src/constant.ts b/packages/constant/src/constant.ts index 6e5a6f90..0bb3ced4 100644 --- a/packages/constant/src/constant.ts +++ b/packages/constant/src/constant.ts @@ -2,9 +2,9 @@ export const OPEN_FRAMEWORK = "OpenUI5"; export const DEFAULT_UI5_FRAMEWORK = "SAPUI5"; //https://ui5.sap.com/version.json -export const DEFAULT_UI5_VERSION = "1.71.72"; +export const DEFAULT_UI5_VERSION = "1.71.73"; // https://sdk.openui5.org/version.json -export const DEFAULT_OPEN_UI5_VERSION = "1.71.68"; +export const DEFAULT_OPEN_UI5_VERSION = "1.71.69"; export const DEFAULT_UI5_VERSION_BASE = "1.71"; diff --git a/packages/logic-utils/test/unit/ui5.test.ts b/packages/logic-utils/test/unit/ui5.test.ts index 2c3ba7c6..59848ac9 100644 --- a/packages/logic-utils/test/unit/ui5.test.ts +++ b/packages/logic-utils/test/unit/ui5.test.ts @@ -72,7 +72,7 @@ describe("getVersionInfoUrl", () => { DEFAULT_UI5_VERSION ); expect(result).toStrictEqual( - "https://ui5.sap.com/1.71.72/resources/sap-ui-version.json" + `https://ui5.sap.com/${DEFAULT_UI5_VERSION}/resources/sap-ui-version.json` ); }); it("get version info uri for OpenUI5", async () => { @@ -81,7 +81,7 @@ describe("getVersionInfoUrl", () => { DEFAULT_OPEN_UI5_VERSION ); expect(result).toStrictEqual( - "https://sdk.openui5.org/1.71.68/resources/sap-ui-version.json" + `https://sdk.openui5.org/${DEFAULT_OPEN_UI5_VERSION}/resources/sap-ui-version.json` ); }); }); @@ -93,7 +93,7 @@ it("getLibraryAPIJsonUrl", async () => { "sap.m" ); expect(result).toStrictEqual( - "https://ui5.sap.com/1.71.72/test-resources/sap/m/designtime/api.json" + `https://ui5.sap.com/${DEFAULT_UI5_VERSION}/test-resources/sap/m/designtime/api.json` ); }); @@ -101,7 +101,7 @@ describe("getVersionsMap", () => { it("get version map for SAPUI5 - http success", async () => { const data = { "1.71": { - version: "1.71.70", + version: DEFAULT_UI5_VERSION, support: "Maintenance", lts: true, }, @@ -117,7 +117,7 @@ describe("getVersionsMap", () => { it("get version map for OpenUI5 - fallback default", async () => { const data = { latest: { - version: "1.71.68", + version: DEFAULT_OPEN_UI5_VERSION, support: "Maintenance", lts: true, }, diff --git a/packages/semantic-model/src/convert.ts b/packages/semantic-model/src/convert.ts index c3e81afe..1100575f 100644 --- a/packages/semantic-model/src/convert.ts +++ b/packages/semantic-model/src/convert.ts @@ -51,8 +51,7 @@ export function convertToSemanticModel( const libSemanticModel = convertLibraryToSemanticModel( libraryName, fileContent, - jsonSymbols, - strict + jsonSymbols ); addLibraryToModel(libSemanticModel, model); } else if (strict) { @@ -76,8 +75,7 @@ function addLibraryToModel( function convertLibraryToSemanticModel( libName: string, lib: apiJson.SchemaForApiJsonFiles, - jsonSymbols: Record, - strict: boolean + jsonSymbols: Record ): model.UI5SemanticModel { const model: model.UI5SemanticModel = { version: lib.version, @@ -105,7 +103,7 @@ function convertLibraryToSemanticModel( if (has(jsonSymbols, fqn)) { error( `${libName}: Duplicate symbol found: ${symbol.kind} ${fqn}. First occurrence is a ${jsonSymbols[fqn].kind}.`, - strict + false ); continue; } diff --git a/packages/semantic-model/test/unit/api-negative.test.ts b/packages/semantic-model/test/unit/api-negative.test.ts index 8052411f..f1099110 100644 --- a/packages/semantic-model/test/unit/api-negative.test.ts +++ b/packages/semantic-model/test/unit/api-negative.test.ts @@ -612,7 +612,6 @@ describe("The ui5-language-assistant semantic model package API negative tests", }); }); describe("duplicate symbol", () => { - const message = "Duplicate symbol found"; describe("of the same kind", () => { const fileContent = { "$schema-ref": @@ -644,10 +643,6 @@ describe("The ui5-language-assistant semantic model package API negative tests", ], }; - it("fails in strict mode", () => { - assertGenerateThrowsInStrictMode(fileContent, message); - }); - it("doesn't fail and adds the first symbol in non-strict mode", () => { const model = assertGenerateDoesntThrowInNonStrictMode(fileContent); assertGeneratedModel(model, false); @@ -688,10 +683,6 @@ describe("The ui5-language-assistant semantic model package API negative tests", ], }; - it("fails in strict mode", () => { - assertGenerateThrowsInStrictMode(fileContent, message); - }); - it("doesn't fail and adds the first symbol in non-strict mode", () => { const model = assertGenerateDoesntThrowInNonStrictMode(fileContent); assertGeneratedModel(model, false); diff --git a/packages/semantic-model/test/unit/api.test.ts b/packages/semantic-model/test/unit/api.test.ts index 88c812e6..a2ef4bf6 100644 --- a/packages/semantic-model/test/unit/api.test.ts +++ b/packages/semantic-model/test/unit/api.test.ts @@ -312,7 +312,7 @@ describe("The ui5-language-assistant semantic model package API", () => { // TODO: old patches may be removed, should be updated continuously const versions: TestModelVersion[] = [ DEFAULT_UI5_VERSION, - "1.84.41", + "1.84.51", "1.96.27", // "1.105.0", ]; diff --git a/test-packages/test-utils/api.d.ts b/test-packages/test-utils/api.d.ts index 583bcc63..a1fd5da7 100644 --- a/test-packages/test-utils/api.d.ts +++ b/test-packages/test-utils/api.d.ts @@ -92,7 +92,7 @@ export function buildUI5Model>( // TODO: list should be updated continuously! export type TestModelVersion = | /* OOM */ typeof DEFAULT_UI5_VERSION - | "1.84.41" + | "1.84.51" | "1.96.27" | "1.108.26" | "1.114.11"; diff --git a/test-packages/test-utils/src/utils/download-ui5-resources.ts b/test-packages/test-utils/src/utils/download-ui5-resources.ts index 1f7a7e1d..48dec6c2 100644 --- a/test-packages/test-utils/src/utils/download-ui5-resources.ts +++ b/test-packages/test-utils/src/utils/download-ui5-resources.ts @@ -54,14 +54,7 @@ async function fetch(url: RequestInfo, init?: RequestInit): Promise { } async function getLibs(version: TestModelVersion): Promise { - // The metadata.json seems to have been added only very recently :( - // For now we assume the libraries are the same in all versions, when we support newer versions we should - // do a better check here - let versionInMetadataURL: string = version; - if (versionInMetadataURL !== "1.71.60") { - versionInMetadataURL = "1.71.60"; - } - const url = `https://ui5.sap.com/${versionInMetadataURL}/resources/sap-ui-version.json`; + const url = `https://ui5.sap.com/${version}/resources/sap-ui-version.json`; const response = await fetch(url); if (!response.ok) { log(`error fetching from ${url}`); diff --git a/test-packages/test-utils/src/utils/semantic-model-provider.ts b/test-packages/test-utils/src/utils/semantic-model-provider.ts index 4e041919..101d06a8 100644 --- a/test-packages/test-utils/src/utils/semantic-model-provider.ts +++ b/test-packages/test-utils/src/utils/semantic-model-provider.ts @@ -14,7 +14,7 @@ const MODEL_CACHE: Record = Object.create(null); const fixes: Record = { - "1.71.72": { + "1.71.73": { array: "any[]", Array: "any[]", bloolean: undefined, @@ -47,7 +47,7 @@ const fixes: Record = { "sap.viz.ui5.controls.VizRangeSlider": undefined, any: "any", }, - "1.84.41": { + "1.84.51": { array: "any[]", Array: "any[]", Control: "sap.ui.core.Control", @@ -258,8 +258,8 @@ type LibraryFix = (content: Json) => void; // Library version -> library name -> fix function const libraryFixes: Record> = { - "1.71.72": {}, - "1.84.41": {}, + "1.71.73": {}, + "1.84.51": {}, "1.96.27": { "sap.ui.mdc": [ (content: Json): void => {