@sap-ux/app-config-writer 0.5.11 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,10 +15,19 @@ const semver_1 = require("semver");
|
|
|
15
15
|
* @returns indicator if the version is lower than the minimal version
|
|
16
16
|
*/
|
|
17
17
|
function isLowerThanMinimalVersion(packageJson, dependencyName, minVersionInfo, mandatory = true) {
|
|
18
|
-
|
|
18
|
+
let versionInfo = packageJson?.devDependencies?.[dependencyName] ?? packageJson?.dependencies?.[dependencyName];
|
|
19
19
|
if (!versionInfo) {
|
|
20
|
+
// In case no dependency is found we assume the minimal version is not met depending on the mandatory flag
|
|
20
21
|
return mandatory;
|
|
21
22
|
}
|
|
23
|
+
if (versionInfo === 'latest') {
|
|
24
|
+
// In case of 'latest' we know the minimal version is met
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
if ((0, semver_1.valid)(versionInfo)) {
|
|
28
|
+
// In case of a valid version we add a prefix to make it a range
|
|
29
|
+
versionInfo = `<=${versionInfo}`;
|
|
30
|
+
}
|
|
22
31
|
return !(0, semver_1.satisfies)(minVersionInfo, versionInfo);
|
|
23
32
|
}
|
|
24
33
|
/**
|
|
@@ -270,7 +270,7 @@ async function updateDefaultTestConfig(fs, basePath, logger) {
|
|
|
270
270
|
for (const ui5Yaml of ui5YamlFileNames.filter((ui5Yaml) => ui5Yaml !== project_access_1.FileName.Ui5Yaml)) {
|
|
271
271
|
const ui5YamlConfig = await (0, project_access_1.readUi5Yaml)(basePath, ui5Yaml, fs);
|
|
272
272
|
const previewMiddleware = (await (0, utils_1.getPreviewMiddleware)(ui5YamlConfig));
|
|
273
|
-
if (previewMiddleware
|
|
273
|
+
if (previewMiddleware?.configuration?.test) {
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/app-config-writer",
|
|
3
3
|
"description": "Add or update configuration for SAP Fiori tools application",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.13",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/semver": "7.5.8",
|
|
43
43
|
"axios": "1.7.4",
|
|
44
44
|
"nock": "13.4.0",
|
|
45
|
-
"@sap-ux/preview-middleware": "0.16.
|
|
45
|
+
"@sap-ux/preview-middleware": "0.16.163"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=18.x"
|