@ui5/cli 4.0.10 → 4.0.12

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.
package/CHANGELOG.md CHANGED
@@ -2,10 +2,23 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
4
 
5
- A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/compare/v4.0.10...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/compare/v4.0.12...HEAD).
6
+
7
+ <a name="v4.0.12"></a>
8
+ ## [v4.0.12] - 2024-12-10
9
+ ### Dependency Updates
10
+ - Bump [@ui5](https://github.com/ui5)/builder from 4.0.4 to 4.0.5 [`9ee3c97`](https://github.com/SAP/ui5-cli/commit/9ee3c97312afcfa073ba0ab972d46212336197eb)
11
+
12
+
13
+ <a name="v4.0.11"></a>
14
+ ## [v4.0.11] - 2024-11-29
15
+ ### Dependency Updates
16
+ - Bump [@ui5](https://github.com/ui5)/project from 4.0.3 to 4.0.4 [`334e2e1`](https://github.com/SAP/ui5-cli/commit/334e2e1fee0e7ee6f9b8f0c536cd2f2efd4c3f15)
17
+ - Bump [@ui5](https://github.com/ui5)/builder from 4.0.3 to 4.0.4 [`ada646c`](https://github.com/SAP/ui5-cli/commit/ada646cb6668cc9ddc03ac99aef7b992d5f2bbec)
18
+
6
19
 
7
20
  <a name="v4.0.10"></a>
8
- ## [v4.0.10] - 2024-11-10
21
+ ## [v4.0.10] - 2024-11-13
9
22
 
10
23
  <a name="v4.0.9"></a>
11
24
  ## [v4.0.9] - 2024-10-15
@@ -1290,6 +1303,8 @@ Only Node.js v10 or higher is supported.
1290
1303
 
1291
1304
  <a name="v0.0.1"></a>
1292
1305
  ## v0.0.1 - 2018-06-06
1306
+ [v4.0.12]: https://github.com/SAP/ui5-cli/compare/v4.0.11...v4.0.12
1307
+ [v4.0.11]: https://github.com/SAP/ui5-cli/compare/v4.0.10...v4.0.11
1293
1308
  [v4.0.10]: https://github.com/SAP/ui5-cli/compare/v4.0.9...v4.0.10
1294
1309
  [v4.0.9]: https://github.com/SAP/ui5-cli/compare/v4.0.8...v4.0.9
1295
1310
  [v4.0.8]: https://github.com/SAP/ui5-cli/compare/v4.0.7...v4.0.8
@@ -1,4 +1,6 @@
1
1
  import baseMiddleware from "../middlewares/base.js";
2
+ import path from "node:path";
3
+ import {isLogLevelEnabled} from "@ui5/logger";
2
4
  import {createRequire} from "node:module";
3
5
 
4
6
  // Using CommonsJS require since JSON module imports are still experimental
@@ -14,7 +16,15 @@ const NOT_FOUND = "===(not installed)";
14
16
  versions.getVersion = (pkg) => {
15
17
  try {
16
18
  const packageInfo = require(`${pkg}/package.json`);
17
- return packageInfo.version || NOT_FOUND;
19
+ if (!packageInfo?.version) {
20
+ return NOT_FOUND;
21
+ }
22
+ let res = packageInfo.version;
23
+ if (isLogLevelEnabled("verbose")) {
24
+ const packageDir = path.dirname(require.resolve(`${pkg}/package.json`));
25
+ res += ` (from ${packageDir})`;
26
+ }
27
+ return res;
18
28
  } catch {
19
29
  return NOT_FOUND;
20
30
  }