@sap-ux/ui5-application-writer 0.17.2 → 0.17.4

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.
@@ -120,15 +120,13 @@ function getTypesVersion(minUI5Version) {
120
120
  if (!version) {
121
121
  return `~${"1.102.7" /* TYPES_VERSION_BEST */}`;
122
122
  }
123
+ else if (semver_1.default.gte(version, "1.102.7" /* TYPES_VERSION_BEST */)) {
124
+ return `~${"1.102.7" /* TYPES_VERSION_BEST */}`;
125
+ }
123
126
  else {
124
- if (semver_1.default.gte(version, "1.102.7" /* TYPES_VERSION_BEST */)) {
125
- return `~${"1.102.7" /* TYPES_VERSION_BEST */}`;
126
- }
127
- else {
128
- return semver_1.default.gte(version, "1.76.0" /* TYPES_VERSION_SINCE */)
129
- ? `~${semver_1.default.major(version)}.${semver_1.default.minor(version)}.${semver_1.default.patch(version)}`
130
- : "1.71.18" /* TYPES_VERSION_PREVIOUS */;
131
- }
127
+ return semver_1.default.gte(version, "1.76.0" /* TYPES_VERSION_SINCE */)
128
+ ? `~${semver_1.default.major(version)}.${semver_1.default.minor(version)}.${semver_1.default.patch(version)}`
129
+ : "1.71.18" /* TYPES_VERSION_PREVIOUS */;
132
130
  }
133
131
  }
134
132
  exports.getTypesVersion = getTypesVersion;
@@ -213,14 +211,18 @@ function getLocalVersion({ framework, version, localVersion }) {
213
211
  else if (version === "" /* DEFAULT_UI5_VERSION */) {
214
212
  return "1.95.0" /* DEFAULT_LOCAL_UI5_VERSION */;
215
213
  }
216
- let result = framework === 'SAPUI5' ? "1.76.0" /* MIN_LOCAL_SAPUI5_VERSION */ : "1.52.5" /* MIN_LOCAL_OPENUI5_VERSION */; // minimum version available as local libs
214
+ // minimum version available as local libs
215
+ const minVersion = framework === 'SAPUI5' ? "1.76.0" /* MIN_LOCAL_SAPUI5_VERSION */ : "1.52.5" /* MIN_LOCAL_OPENUI5_VERSION */;
217
216
  // If the ui5 `version` is higher than the min framework version 'result' then use that as the local version instead
218
217
  // Update to a valid coerced version string e.g. snapshot-1.80 -> 1.80.0. Cannot be null as previously validated.
219
218
  const versionSemVer = semver_1.default.coerce(version);
220
- if (semver_1.default.gt(versionSemVer, semver_1.default.coerce(result))) {
221
- result = semver_1.default.valid(versionSemVer);
219
+ const minSemVer = semver_1.default.coerce(minVersion);
220
+ if (versionSemVer && minSemVer && semver_1.default.gt(versionSemVer, minSemVer)) {
221
+ return semver_1.default.valid(versionSemVer);
222
+ }
223
+ else {
224
+ return minVersion;
222
225
  }
223
- return result;
224
226
  }
225
227
  /**
226
228
  * Retrieve the tag version of the @sap/ux-specification based on the given version.
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aui5-application-writer"
11
11
  },
12
- "version": "0.17.2",
12
+ "version": "0.17.4",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [
@@ -20,7 +20,7 @@
20
20
  "!dist/**/*.map"
21
21
  ],
22
22
  "dependencies": {
23
- "@sap-ux/ui5-config": "0.15.0",
23
+ "@sap-ux/ui5-config": "0.15.1",
24
24
  "ejs": "3.1.7",
25
25
  "mem-fs": "2.1.0",
26
26
  "mem-fs-editor": "9.4.0",
@@ -41,7 +41,7 @@
41
41
  "node": ">= 14.16.0 < 15.0.0 || >=16.1.0 < 17.0.0 || >=18.0.0 < 19.0.0"
42
42
  },
43
43
  "scripts": {
44
- "build": "pnpm clean && tsc",
44
+ "build": "pnpm clean && tsc -p tsconfig-build.json",
45
45
  "clean": "rimraf dist test/test-output coverage",
46
46
  "format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
47
47
  "lint": "eslint . --ext .ts",