Skip to content

Commit

Permalink
feat: updated ui5 maintenance versions (#686)
Browse files Browse the repository at this point in the history
* feat: updated ui5 maintenance versions

* fix: linter issues and chage set

* fix: build fix

* fix: leftovers

* fix: wrong change rollback

* fix: pr comments

* fix: linter
  • Loading branch information
vadson71 authored Jan 5, 2024
1 parent ab397cf commit 910e437
Show file tree
Hide file tree
Showing 41 changed files with 138 additions and 247 deletions.
15 changes: 15 additions & 0 deletions .changeset/loud-cows-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@ui5-language-assistant/test-utils": patch
"@ui5-language-assistant/semantic-model": patch
"@ui5-language-assistant/context": patch
"@ui5-language-assistant/xml-views-completion": patch
"@ui5-language-assistant/xml-views-validation": patch
"@ui5-language-assistant/xml-views-tooltip": patch
"@ui5-language-assistant/language-server": patch
"@ui5-language-assistant/logic-utils": patch

"vscode-ui5-language-assistant": patch
"@ui5-language-assistant/vscode-ui5-language-assistant-bas-ext": patch
---

Adaptation to the latest UI5 maintenance changes
2 changes: 1 addition & 1 deletion packages/context/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Manifest } from "@sap-ux/project-access";
import { FetchResponse } from "@ui5-language-assistant/logic-utils";

export const DEFAULT_UI5_FRAMEWORK = "SAPUI5";
export const DEFAULT_UI5_VERSION = "1.71.60";
export const DEFAULT_UI5_VERSION = "1.71.61";
export const UI5_VERSION_S4_PLACEHOLDER = "${sap.ui5.dist.version}";
export const UI5_FRAMEWORK_CDN_BASE_URL = {
OpenUI5: "https://sdk.openui5.org/",
Expand Down
56 changes: 32 additions & 24 deletions packages/context/test/unit/ui5-model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ describe("the UI5 language assistant ui5 model", () => {
const GET_MODEL_TIMEOUT = 30000;
const FRAMEWORK = "SAPUI5";
const OPEN_FRAMEWORK = "OpenUI5";
const VERSION = "1.71.60";
const DEFAULT_UI5_VERSION = "1.71.61";
const UI5_VERSION_S4_PLACEHOLDER = "${sap.ui5.dist.version}";
const NO_CACHE_FOLDER = undefined;

function assertSemanticModel(ui5Model: UI5SemanticModel): void {
expect(ui5Model.version).toEqual(VERSION);
expect(ui5Model.version).toEqual(DEFAULT_UI5_VERSION);

expect(Object.keys(ui5Model.classes).length).toBeGreaterThan(200);
expect(Object.keys(ui5Model.namespaces).length).toBeGreaterThan(200);
Expand Down Expand Up @@ -173,7 +173,7 @@ describe("the UI5 language assistant ui5 model", () => {
async () => {
// Create a folder with the file name so the file will not be written
const cacheFilePath = getCacheFilePath(
getCacheFolder(cachePath, FRAMEWORK, VERSION),
getCacheFolder(cachePath, FRAMEWORK, DEFAULT_UI5_VERSION),
"sap.m"
);
expectExists(cacheFilePath, "cacheFilePath");
Expand All @@ -196,7 +196,11 @@ describe("the UI5 language assistant ui5 model", () => {
"doesn't fail when file cannot be read from the cache",
async () => {
// Create a file with non-json content so the file will not be deserialized
const cacheFolder = getCacheFolder(cachePath, FRAMEWORK, VERSION);
const cacheFolder = getCacheFolder(
cachePath,
FRAMEWORK,
DEFAULT_UI5_VERSION
);
await mkdirs(cacheFolder);
const cacheFilePath = getCacheFilePath(cacheFolder, "sap.m");
expectExists(cacheFilePath, "cacheFilePath");
Expand Down Expand Up @@ -270,7 +274,7 @@ describe("the UI5 language assistant ui5 model", () => {
const versionMap = {
SAPUI5: {
latest: {
version: "1.105.0",
version: "1.120.3",
support: "Maintenance",
lts: true,
},
Expand All @@ -280,17 +284,17 @@ describe("the UI5 language assistant ui5 model", () => {
lts: true,
},
"1.96": {
version: "1.96.11",
version: "1.96.27",
support: "Maintenance",
lts: true,
},
"1.84": {
version: "1.84.27",
version: "1.84.41",
support: "Maintenance",
lts: true,
},
"1.71": {
version: "1.71.50",
version: "1.71.70",
support: "Maintenance",
lts: true,
},
Expand All @@ -307,7 +311,7 @@ describe("the UI5 language assistant ui5 model", () => {
lts: true,
},
"1.71": {
version: "1.71.50",
version: "1.71.70",
support: "Maintenance",
lts: true,
},
Expand Down Expand Up @@ -348,9 +352,11 @@ describe("the UI5 language assistant ui5 model", () => {
},
cachePath,
FRAMEWORK,
VERSION
DEFAULT_UI5_VERSION
);
expect(objNegotiatedVersionWithFetcher.version).toEqual(
DEFAULT_UI5_VERSION
);
expect(objNegotiatedVersionWithFetcher.version).toEqual(VERSION);
});

it("resolve the default version open UI5", async () => {
Expand All @@ -363,9 +369,11 @@ describe("the UI5 language assistant ui5 model", () => {
},
cachePath,
OPEN_FRAMEWORK,
VERSION
DEFAULT_UI5_VERSION
);
expect(objNegotiatedVersionWithFetcher.version).toEqual(
DEFAULT_UI5_VERSION
);
expect(objNegotiatedVersionWithFetcher.version).toEqual(VERSION);
});

it("resolve available concrete version OpenUI5 (1.106.0)", async () => {
Expand Down Expand Up @@ -479,7 +487,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
"1.96"
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.96.11");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.96.27");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
objNegotiatedVersionWithFetcher = await negotiateVersionWithFetcher(
Expand All @@ -493,7 +501,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
"1.84"
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.84.27");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.84.41");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
objNegotiatedVersionWithFetcher = await negotiateVersionWithFetcher(
Expand All @@ -507,7 +515,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
"1.71"
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.50");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.70");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
objNegotiatedVersionWithFetcher = await negotiateVersionWithFetcher(
Expand All @@ -521,7 +529,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
"1.18"
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.50");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.70");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
});
Expand All @@ -538,7 +546,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
"1"
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.50");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.70");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
});
Expand All @@ -555,7 +563,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
""
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.60");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.61");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeTrue();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeFalse();
objNegotiatedVersionWithFetcher = await negotiateVersionWithFetcher(
Expand All @@ -569,7 +577,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
undefined
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.60");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.61");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeTrue();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeFalse();
});
Expand All @@ -586,7 +594,7 @@ describe("the UI5 language assistant ui5 model", () => {
OPEN_FRAMEWORK,
""
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.60");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.61");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeTrue();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeFalse();
});
Expand All @@ -603,7 +611,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
"1.38"
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.50");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.70");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
});
Expand All @@ -620,7 +628,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
"a.b"
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.50");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.71.70");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
});
Expand All @@ -637,7 +645,7 @@ describe("the UI5 language assistant ui5 model", () => {
FRAMEWORK,
UI5_VERSION_S4_PLACEHOLDER
);
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.105.0");
expect(objNegotiatedVersionWithFetcher.version).toEqual("1.120.3");
expect(objNegotiatedVersionWithFetcher.isFallback).toBeFalse();
expect(objNegotiatedVersionWithFetcher.isIncorrectVersion).toBeTrue();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("the UI5 language assistant Code Completion Services - classes", () =>
beforeAll(async function () {
ui5SemanticModel = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
appContext = getDefaultContext(ui5SemanticModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("the UI5 language assistant Code Completion Services", () => {
beforeAll(async () => {
ui5SemanticModel = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
appContext = getDefaultContext(ui5SemanticModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("the UI5 language assistant Code Completion Services", () => {
beforeAll(async () => {
ui5SemanticModel = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
appContext = getDefaultContext(ui5SemanticModel);
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/test/unit/documentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("The @ui5-language-assistant/language-server <getNodeDocumentation> fun
beforeAll(async function () {
ui5SemanticModel = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/test/unit/hover.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe("the UI5 language assistant Hover Tooltip Service", () => {
beforeAll(async () => {
ui5SemanticModel = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
appContext = getDefaultContext(ui5SemanticModel);
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/test/unit/quick-fix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("The @ui5-language-assistant/language-server diagnostics quick fix func
beforeAll(async function () {
ui5SemanticModel = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
appContext = getDefaultContext(ui5SemanticModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function readSnapshotDiagnosticsLSPResponse(

const ui5ModelPromise = generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
let ui5Model: UI5SemanticModel | undefined = undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("the UI5 language assistant xml view diagnostics service", () => {
beforeAll(async () => {
ui5SemanticModel = await generateModel({
framework: "SAPUI5",
version: "1.108.2",
version: "1.108.26",
modelGenerator: generate,
});
appContext = getDefaultContext(ui5SemanticModel);
Expand Down
4 changes: 2 additions & 2 deletions packages/logic-utils/test/unit/find-classes-matching.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("The @ui5-language-assistant/logic-utils <findClassesMatchingType> func
beforeAll(async () => {
ui5Model = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down Expand Up @@ -73,7 +73,7 @@ describe("The @ui5-language-assistant/logic-utils <classIsOfType> function", ()
let ui5Model: UI5SemanticModel;
const beforeAllPromise = generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/logic-utils/test/unit/get-super-class.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("The @ui5-language-assistant/logic-utils <getSuperClasses> function", (
const ui5Model = cloneDeep(
await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
})
);
Expand Down
12 changes: 6 additions & 6 deletions packages/logic-utils/test/unit/xml-node-to-ui5-node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("The @ui5-language-assistant/logic-utils <getUI5ClassByXMLElement> func
beforeAll(async () => {
ui5Model = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down Expand Up @@ -105,7 +105,7 @@ describe("The @ui5-language-assistant/logic-utils <getUI5ClassByXMLElementClosin
beforeAll(async () => {
ui5Model = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down Expand Up @@ -187,7 +187,7 @@ describe("The @ui5-language-assistant/logic-utils <getUI5AggregationByXMLElement
beforeAll(async () => {
ui5Model = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down Expand Up @@ -337,7 +337,7 @@ describe("The @ui5-language-assistant/logic-utils <getUI5NodeByXMLAttribute> fun
beforeAll(async () => {
ui5Model = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down Expand Up @@ -432,7 +432,7 @@ describe("The @ui5-language-assistant/logic-utils <getUI5PropertyByXMLAttributeK
beforeAll(async () => {
ui5Model = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down Expand Up @@ -496,7 +496,7 @@ describe("The @ui5-language-assistant/logic-utils <getUI5NodeFromXMLElementNames
beforeAll(async () => {
ui5Model = await generateModel({
framework: "SAPUI5",
version: "1.71.49",
version: "1.71.61",
modelGenerator: generate,
});
});
Expand Down
Loading

0 comments on commit 910e437

Please sign in to comment.