Skip to content

Commit

Permalink
fix: min ui5 version as array
Browse files Browse the repository at this point in the history
  • Loading branch information
marufrasully committed Jul 18, 2024
1 parent 488510e commit 249bee2
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 41 deletions.
2 changes: 1 addition & 1 deletion packages/binding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"lodash": "4.17.21"
},
"devDependencies": {
"@sap-ux/vocabularies-types": "0.7.4",
"@sap-ux/vocabularies-types": "0.10.14",
"@types/lodash": "4.14.168",
"@ui5-language-assistant/semantic-model-types": "4.0.10",
"@ui5-language-assistant/test-framework": "4.0.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"@sap-ux/annotation-converter": "0.5.20",
"@sap-ux/edmx-parser": "0.5.13",
"@sap-ux/project-access": "1.9.1",
"@sap-ux/project-access": "1.25.5",
"@ui5-language-assistant/logger": "0.0.1",
"@ui5-language-assistant/logic-utils": "4.0.18",
"@ui5-language-assistant/settings": "4.0.9",
Expand All @@ -31,7 +31,7 @@
"vscode-uri": "2.1.2"
},
"devDependencies": {
"@sap-ux/vocabularies-types": "0.6.8",
"@sap-ux/vocabularies-types": "0.10.14",
"@types/js-yaml": "4.0.5",
"@types/lodash": "4.14.168",
"@types/node-fetch": "2.5.10",
Expand Down
15 changes: 13 additions & 2 deletions packages/context/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { getCustomViewId, getManifestDetails } from "./manifest";
import { getMinimumUI5Version } from "@sap-ux/project-access";
import {
getCustomViewId,
getManifestDetails,
getUI5Manifest,
} from "./manifest";
import { getServices } from "./services";
import { Context } from "./types";
import { getSemanticModel } from "./ui5-model";
Expand Down Expand Up @@ -37,11 +42,17 @@ export async function getContext(
): Promise<Context | Error> {
try {
const manifestDetails = await getManifestDetails(documentPath);
const manifest = await getUI5Manifest(manifestDetails.manifestPath);
let minUI5Version = manifestDetails.minUI5Version;
if (manifest) {
minUI5Version = getMinimumUI5Version(manifest);
}

const yamlDetails = await getYamlDetails(documentPath);
const ui5Model = await getSemanticModel(
modelCachePath,
yamlDetails.framework,
manifestDetails.minUI5Version
minUI5Version
);
const services = await getServices(documentPath);
const customViewId = await getCustomViewId(documentPath);
Expand Down
2 changes: 1 addition & 1 deletion packages/fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lodash": "4.17.21"
},
"devDependencies": {
"@sap-ux/vocabularies-types": "0.6.8",
"@sap-ux/vocabularies-types": "0.10.14",
"@types/lodash": "4.14.168",
"@ui5-language-assistant/semantic-model-types": "4.0.10",
"@ui5-language-assistant/test-framework": "4.0.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/fe/test/unit/utils/metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import {
getRootElements,
} from "../../../src/utils";

const entityContainer: EntityContainer = {
const entityContainer = {
_type: "EntityContainer",
annotations: {},
fullyQualifiedName: "TravelService.EntityContainer",
name: "EntityContainer",
};
} as EntityContainer;
const bookingEntityType: EntityType = {
_type: "EntityType",
name: "Booking",
Expand Down
4 changes: 2 additions & 2 deletions packages/fe/test/unit/utils/path.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import {
} from "../../../src/utils";

describe("path utils (exotic cases to achieve full code coverage)", () => {
const entityContainer: EntityContainer = {
const entityContainer = {
_type: "EntityContainer",
annotations: {},
fullyQualifiedName: "TravelService.EntityContainer",
name: "EntityContainer",
};
} as EntityContainer;
const bookingEntityType: EntityType = {
_type: "EntityType",
name: "Booking",
Expand Down
92 changes: 61 additions & 31 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1633,39 +1633,47 @@
dependencies:
xml-js "1.6.11"

"@sap-ux/[email protected]":
version "1.9.1"
resolved "https://registry.yarnpkg.com/@sap-ux/project-access/-/project-access-1.9.1.tgz#0d03683f7d8d0a444d19a9fe8a6927d1615ff728"
integrity sha512-ObLlzem77Vpe7C6I8UimPPQW7LrSq4zQ2PaYfUaLqamrG2cu9Knl+/xRBZz51ZbHWbN/2I2cdZRBfG695PewXw==
"@sap-ux/[email protected]":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@sap-ux/i18n/-/i18n-0.1.0.tgz#aeeecb19fd220a4c923d6cbc4dfed0a2d4a7270f"
integrity sha512-v16e/m+DShlqQELz6/VQZ454FeHYr/JbQA20xGT62yKjuvhG1tSKHwBrss8NYT0A9Lr8XxrKZpUZghD0iqY1/A==
dependencies:
jsonc-parser "3.2.0"
vscode-languageserver-textdocument "1.0.7"
vscode-languageserver-types "3.17.2"

"@sap-ux/[email protected]":
version "1.25.5"
resolved "https://registry.yarnpkg.com/@sap-ux/project-access/-/project-access-1.25.5.tgz#7ffe13d83a88d35159d11ce83034c28f1d9889ea"
integrity sha512-ZBUneSOIoX8jRUUf+ffmD37wuIBikKOjmjfmMZ0dn6dp+HoQSSXhnObsP5//51d3stPZ27y40HOHkdOon3CmrQ==
dependencies:
"@sap-ux/ui5-config" "0.18.2"
"@sap-ux/i18n" "0.1.0"
"@sap-ux/ui5-config" "0.23.1"
fast-xml-parser "4.2.7"
findit2 "2.2.3"
json-parse-even-better-errors "3.0.2"
mem-fs "2.1.0"
mem-fs-editor "9.4.0"
semver "7.5.4"

"@sap-ux/ui5-config@0.18.2":
version "0.18.2"
resolved "https://registry.yarnpkg.com/@sap-ux/ui5-config/-/ui5-config-0.18.2.tgz#ef5f5257c39e8e9895b16e265487b52ade180d65"
integrity sha512-s/UsykJXbQIMmpcNjI2ChAIYBnQvnjJlp5n5QpT4XRHHwstExz2YCWz2vThXuF1GmwsCMzSjmhF+zTmGbTJ11w==
"@sap-ux/ui5-config@0.23.1":
version "0.23.1"
resolved "https://registry.yarnpkg.com/@sap-ux/ui5-config/-/ui5-config-0.23.1.tgz#5e45b4217e0292cb0a812c65117c8577a7486b2c"
integrity sha512-2pfA5GX+Oho1SpRKgWdIiY6tW8L812Jjr/zNiDm27hmua0GKifIUxt5CanN11MB+YAwkg0rJwHH/2aWLeoFiuA==
dependencies:
"@sap-ux/yaml" "0.13.7"
"@sap-ux/yaml" "0.16.0"
lodash "4.17.21"
semver "7.5.3"

"@sap-ux/[email protected]":
version "0.6.8"
resolved "https://registry.yarnpkg.com/@sap-ux/vocabularies-types/-/vocabularies-types-0.6.8.tgz#abcdebfd986c249f7131d5e9085b6ff4bffb4876"
integrity sha512-58b1/E9hxSsIit9NMQ9oXCYNUaOT7kbQU1OKhAPVp3Pg2BMbkRo5p1SX6BSan4XmONUpao7yRUVZEG0dspR5qg==
semver "7.5.4"

"@sap-ux/vocabularies-types@0.7.4":
version "0.7.4"
resolved "https://registry.yarnpkg.com/@sap-ux/vocabularies-types/-/vocabularies-types-0.7.4.tgz#66388bc5368be7edee2502a726e019cd8638c5c3"
integrity sha512-JC2s7P7EOYvnubxqDIJYdZXA/aNvK78XqvB1sMyI4z+rf/mgTTID7mIf/2J3rSwHw+GjVrDK+UvSX3vJhomKew==
"@sap-ux/vocabularies-types@0.10.14":
version "0.10.14"
resolved "https://registry.yarnpkg.com/@sap-ux/vocabularies-types/-/vocabularies-types-0.10.14.tgz#014544baf56da4ac818f0904ad4917b57f4cbb15"
integrity sha512-PtjyRBQbjCFHE1TAXz3DXuyD46eoobAK3BmOsjS60o2dNHMU9EVL1/sbbeiB2917ZV0ARezd3C1BNEict5VXfg==

"@sap-ux/yaml@0.13.7":
version "0.13.7"
resolved "https://registry.yarnpkg.com/@sap-ux/yaml/-/yaml-0.13.7.tgz#b3316c665e15ff48510abdac8cbf7b9fd7739986"
integrity sha512-4638D6TyaBA43lnhWtkXVM2xFwgDh3u8DEsTmCEvvbh6SQsE09t/eheRSoBD1ryZVG9NmmasY2tMgy3JxEPV5A==
"@sap-ux/yaml@0.16.0":
version "0.16.0"
resolved "https://registry.yarnpkg.com/@sap-ux/yaml/-/yaml-0.16.0.tgz#4a29553a0e5879ed0d9c45239dd4366b7505f691"
integrity sha512-jojo+NDZyuguUmTznj+yof2luSRarfqR2x09jRoVhS0CT2oJaAxyd60yXRtuCUFW7FbuEii+jSf+aeBU7QSPVw==
dependencies:
lodash "4.17.21"
yaml "2.2.2"
Expand Down Expand Up @@ -4617,6 +4625,13 @@ [email protected]:
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743"
integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==

[email protected]:
version "4.2.7"
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.2.7.tgz#871f2ca299dc4334b29f8da3658c164e68395167"
integrity sha512-J8r6BriSLO1uj2miOk1NW0YVm8AGOOu3Si2HQp/cSmo6EA4m3fcwu2WKjJ4RK9wMLBtg69y1kS8baDiQBR41Ig==
dependencies:
strnum "^1.0.5"

fastq@^1.6.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
Expand Down Expand Up @@ -6598,6 +6613,11 @@ json-parse-better-errors@^1.0.1:
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==

[email protected]:
version "3.0.2"
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz#b43d35e89c0f3be6b5fbbe9dc6c82467b30c28da"
integrity sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==

json-parse-even-better-errors@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
Expand Down Expand Up @@ -8995,6 +9015,13 @@ [email protected], semver@^7.3.8:
dependencies:
lru-cache "^6.0.0"

[email protected], semver@^7.5.3:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"

[email protected], semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7:
version "7.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec"
Expand All @@ -9007,13 +9034,6 @@ semver@^6.0.0, semver@^6.3.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^7.5.3:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"

set-blocking@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
Expand Down Expand Up @@ -9556,6 +9576,11 @@ [email protected], strip-json-comments@^3.1.0, strip-json-comments@^3.1.
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==

strnum@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db"
integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==

[email protected], strong-log-transformer@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10"
Expand Down Expand Up @@ -10306,6 +10331,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz#178168e87efad6171b372add1dea34f53e5d330f"
integrity sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA==

[email protected]:
version "1.0.7"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.7.tgz#16df468d5c2606103c90554ae05f9f3d335b771b"
integrity sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg==

vscode-languageserver-textdocument@^1.0.7:
version "1.0.8"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0"
Expand Down

0 comments on commit 249bee2

Please sign in to comment.