From 6337d52b9c1233b5e9f5a187fa98150932ee57b6 Mon Sep 17 00:00:00 2001 From: Ilja Postnovs Date: Thu, 23 Nov 2023 23:57:34 +0200 Subject: [PATCH] update packages --- CHANGELOG.md | 5 ++ package-lock.json | 68 +++++++++---------- package.json | 6 +- .../registrators/DiagnosticsRegistrator.ts | 2 +- src/classes/utils/FileWatcherMediator.ts | 4 +- src/test/js/TestRunner.ts | 2 +- src/test/js/project/src/util/AllBodyTest.js | 20 ++++++ src/test/js/project/src/util/AnotherModel.js | 8 ++- .../js/project/src/view/LinterTest.view.xml | 10 ++- src/test/js/suite/data/CodeLensData.json | 8 ++- .../completionitems/JSCompletionItems.json | 3 +- 11 files changed, 87 insertions(+), 49 deletions(-) create mode 100644 src/test/js/project/src/util/AllBodyTest.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 24c2791f..62b10ed1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.16.5 (23-11-2023) + +- [UI5 Parser](https://github.com/iljapostnovs/ui5plugin-parser) updated to v1.7.4 +- [UI5 Linter](https://github.com/iljapostnovs/ui5plugin-linter) updated to v1.14.3 + ## 1.16.4 (09-11-2023) - [UI5 Parser](https://github.com/iljapostnovs/ui5plugin-parser) updated to v1.7.0 diff --git a/package-lock.json b/package-lock.json index 574e9bc5..dd0f58a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ui5plugin", - "version": "1.16.4", + "version": "1.16.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ui5plugin", - "version": "1.16.4", + "version": "1.16.5", "funding": [ { "type": "paypal", @@ -23,8 +23,8 @@ ], "license": "Apache-2.0", "dependencies": { - "ui5plugin-linter": "^1.13.0", - "ui5plugin-parser": "^1.7.0" + "ui5plugin-linter": "^1.14.3", + "ui5plugin-parser": "^1.7.4" }, "devDependencies": { "@types/mocha": "^10.0.1", @@ -352,9 +352,9 @@ } }, "node_modules/@ts-morph/common": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.20.0.tgz", - "integrity": "sha512-7uKjByfbPpwuzkstL3L5MQyuXPSKdoNG93Fmi2JoDcTf3pEP731JdRFAduRVkOs8oqxPsXKA+ScrWkdQ8t/I+Q==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.21.0.tgz", + "integrity": "sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==", "dependencies": { "fast-glob": "^3.2.12", "minimatch": "^7.4.3", @@ -1014,9 +1014,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -2612,9 +2612,9 @@ } }, "node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", "engines": { "node": "14 || >=16.14" } @@ -3157,9 +3157,9 @@ "dev": true }, "node_modules/properties-file": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/properties-file/-/properties-file-3.3.7.tgz", - "integrity": "sha512-HRGqNDmvtmYjqvnXplA8JXzgA75oZAa6/QQVe5hcdTW8YuybnPDt2CGEVzEPyvgj4HlB5ky4b6Wlo+INj0CHWw==", + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/properties-file/-/properties-file-3.3.9.tgz", + "integrity": "sha512-iDNuqd9GC76HYMKGqHXdPM4ajA2lEYgbgpIPni6KBIm3W4CJXeEQMYPMb1a/2wpBO3+p8LFO5DRP30ovss/D1A==", "engines": { "node": "*" } @@ -3737,11 +3737,11 @@ } }, "node_modules/ts-morph": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-19.0.0.tgz", - "integrity": "sha512-D6qcpiJdn46tUqV45vr5UGM2dnIEuTGNxVhg0sk5NX11orcouwj6i1bMqZIz2mZTZB1Hcgy7C3oEVhAT+f6mbQ==", + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz", + "integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==", "dependencies": { - "@ts-morph/common": "~0.20.0", + "@ts-morph/common": "~0.21.0", "code-block-writer": "^12.0.0" } }, @@ -3783,9 +3783,9 @@ } }, "node_modules/ui5plugin-linter": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/ui5plugin-linter/-/ui5plugin-linter-1.13.0.tgz", - "integrity": "sha512-uB9fizU9ZBkHmVtVf2rXTMlul7Bc5z2uXu6KiC3lGB0eVLMcIvaG/4J8oOSr0nELbcBxNp96YsxVMFxPMOBcwg==", + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/ui5plugin-linter/-/ui5plugin-linter-1.14.3.tgz", + "integrity": "sha512-8JhBQANjj1KZ+SFuTlwCvjv5NtrrgevGwUJykCIjLAY3Jv0H+J9gzUcy2nxbNEfM1xZDQWSf7mr+1OaHSF1oqA==", "funding": [ { "type": "paypal", @@ -3804,7 +3804,7 @@ "chalk": "^4.1.2", "minimatch": "^9.0.3", "rc-config-loader": "^4.1.3", - "ui5plugin-parser": "1.7.0" + "ui5plugin-parser": "1.7.4" }, "bin": { "ui5linter": "bin/ui5linter.js" @@ -3833,9 +3833,9 @@ } }, "node_modules/ui5plugin-parser": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ui5plugin-parser/-/ui5plugin-parser-1.7.0.tgz", - "integrity": "sha512-9I/ymIJ/5QPU6cupTrzuXnehOsKGkVT+kET2E2dQkdw8IX80Y+MSm6WxzQqKm2532iq0I3KaLJlL5rrwyLdkAw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/ui5plugin-parser/-/ui5plugin-parser-1.7.4.tgz", + "integrity": "sha512-kF2LjNAYyG5lORqGPQVYFty32FFA325ENMlZJv7JUCEZ+DnX4zLIVGCAwuGEZaQwVlPBxRqWEX5vOqSDOBiJBA==", "funding": [ { "type": "paypal", @@ -3851,16 +3851,16 @@ } ], "dependencies": { - "acorn-loose": "^8.3.0", - "axios": "^1.5.0", - "comment-parser": "^1.4.0", - "fast-xml-parser": "^4.2.7", - "glob": "^10.3.4", + "acorn-loose": "^8.4.0", + "axios": "^1.6.1", + "comment-parser": "^1.4.1", + "fast-xml-parser": "^4.3.2", + "glob": "^10.3.10", "hjson": "^3.2.2", "line-column": "^1.0.2", - "properties-file": "^3.2.18", + "properties-file": "^3.3.8", "rc-config-loader": "^4.1.3", - "ts-morph": "^19.0.0" + "ts-morph": "^20.0.0" } }, "node_modules/update-browserslist-db": { diff --git a/package.json b/package.json index 056c2226..98b14385 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ui5plugin", "displayName": "SAPUI5 Extension", "description": "Extension for working with UI5 projects", - "version": "1.16.4", + "version": "1.16.5", "publisher": "iljapostnovs", "license": "Apache-2.0", "author": "Ilja Postnovs ", @@ -540,8 +540,8 @@ "webpack-cli": "^5.1.4" }, "dependencies": { - "ui5plugin-linter": "^1.13.0", - "ui5plugin-parser": "^1.7.0" + "ui5plugin-linter": "^1.14.3", + "ui5plugin-parser": "^1.7.4" }, "__metadata": { "id": "7a9177b5-9a33-478d-bff3-879dc393cb43", diff --git a/src/classes/registrators/DiagnosticsRegistrator.ts b/src/classes/registrators/DiagnosticsRegistrator.ts index 4f5901e6..2c1b44dc 100644 --- a/src/classes/registrators/DiagnosticsRegistrator.ts +++ b/src/classes/registrators/DiagnosticsRegistrator.ts @@ -117,7 +117,7 @@ export class DiagnosticsRegistrator { parser.classFactory.setNewCodeForClass(className, document.getText(), bForce); } this._updateTSDiagnostics(document, tsDiagnosticCollection); - } else if (fileName.endsWith(".properties")) { + } else if (fileName.endsWith("i18n.properties")) { this._updatePropertiesDiagnostics(document, propertiesDiagnosticCollection); } } diff --git a/src/classes/utils/FileWatcherMediator.ts b/src/classes/utils/FileWatcherMediator.ts index e8cfe61a..7ad30882 100644 --- a/src/classes/utils/FileWatcherMediator.ts +++ b/src/classes/utils/FileWatcherMediator.ts @@ -88,7 +88,7 @@ export class FileWatcherMediator { parser.fileReader.setNewViewContentToCache(viewContent, toNative(document.uri.fsPath), true); } else if (document.fileName.endsWith(".fragment.xml")) { parser.fileReader.setNewFragmentContentToCache(document.getText(), toNative(document.fileName), true); - } else if (document.fileName.endsWith(".properties")) { + } else if (document.fileName.endsWith("18n.properties")) { parser.resourceModelData.updateCache(new TextDocumentAdapter(document)); } else if (document.fileName.endsWith("manifest.json")) { parser.fileReader.rereadAllManifests(); @@ -221,7 +221,7 @@ export class FileWatcherMediator { if (uri.fsPath.endsWith(".xml")) { DiagnosticsRegistrator.removeDiagnosticForUri(uri, "xml"); } - if (uri.fsPath.endsWith(".properties")) { + if (uri.fsPath.endsWith("i18n.properties")) { DiagnosticsRegistrator.removeDiagnosticForUri(uri, "properties"); } diff --git a/src/test/js/TestRunner.ts b/src/test/js/TestRunner.ts index 6079843c..f31e79a5 100644 --- a/src/test/js/TestRunner.ts +++ b/src/test/js/TestRunner.ts @@ -14,7 +14,7 @@ async function main() { const testWorkspace = path.resolve(__dirname, "../../../src/test/js/project"); // Download VS Code, unzip it and run the integration test - await runTests({ extensionDevelopmentPath, extensionTestsPath, launchArgs: [testWorkspace, "--disable-extensions"] }); + await runTests({ version: "1.84.2", extensionDevelopmentPath, extensionTestsPath, launchArgs: [testWorkspace, "--disable-extensions"] }); } catch (err) { console.error("Failed to run tests"); process.exit(1); diff --git a/src/test/js/project/src/util/AllBodyTest.js b/src/test/js/project/src/util/AllBodyTest.js new file mode 100644 index 00000000..72d79cfc --- /dev/null +++ b/src/test/js/project/src/util/AllBodyTest.js @@ -0,0 +1,20 @@ +sap.ui.define([ + "sap/ui/base/ManagedObject" +], function( + ManagedObject +) { + "use strict"; + + const AllBodyTest = ManagedObject.extend("com.test.util.AllBodyTest", { + _test() { + this._test(); + AllBodyTest.staticTest(); + } + }); + + AllBodyTest.staticTest = function() { + AllBodyTest.staticTest(); + }; + + return AllBodyTest; +}); \ No newline at end of file diff --git a/src/test/js/project/src/util/AnotherModel.js b/src/test/js/project/src/util/AnotherModel.js index 0e350a9d..d34db5fc 100644 --- a/src/test/js/project/src/util/AnotherModel.js +++ b/src/test/js/project/src/util/AnotherModel.js @@ -1,13 +1,15 @@ sap.ui.define([ - "sap/ui/model/json/JSONModel" + "sap/ui/model/json/JSONModel", + "com/test/util/AllBodyTest" ], function( - JSONModel + JSONModel, + AllBodyTest ) { "use strict"; return JSONModel.extend("com.test.util.AnotherModel", { anotherMethod: function() { - + AllBodyTest.staticTest(); } }); }); \ No newline at end of file diff --git a/src/test/js/project/src/view/LinterTest.view.xml b/src/test/js/project/src/view/LinterTest.view.xml index def25498..4b73982d 100644 --- a/src/test/js/project/src/view/LinterTest.view.xml +++ b/src/test/js/project/src/view/LinterTest.view.xml @@ -5,16 +5,20 @@ xmlns:f="sap.f" xmlns:c="sap.ui.core" xmlns:l="sap.ui.layout" + xmlns:html="http://www.w3.org/1999/xhtml" displayBlock="true" height="100%" busyIndicatorDelay="0" > - + stest"> ]> + + + @@ -35,8 +39,8 @@ validateFieldGroup="cmd:Save" busy="false" /> - - + +