@ui5/cli 4.0.10 → 4.0.11
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 +10 -2
- package/lib/cli/commands/versions.js +11 -1
- package/npm-shrinkwrap.json +834 -437
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
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.
|
|
5
|
+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/compare/v4.0.11...HEAD).
|
|
6
|
+
|
|
7
|
+
<a name="v4.0.11"></a>
|
|
8
|
+
## [v4.0.11] - 2024-11-29
|
|
9
|
+
### Dependency Updates
|
|
10
|
+
- Bump [@ui5](https://github.com/ui5)/project from 4.0.3 to 4.0.4 [`334e2e1`](https://github.com/SAP/ui5-cli/commit/334e2e1fee0e7ee6f9b8f0c536cd2f2efd4c3f15)
|
|
11
|
+
- Bump [@ui5](https://github.com/ui5)/builder from 4.0.3 to 4.0.4 [`ada646c`](https://github.com/SAP/ui5-cli/commit/ada646cb6668cc9ddc03ac99aef7b992d5f2bbec)
|
|
12
|
+
|
|
6
13
|
|
|
7
14
|
<a name="v4.0.10"></a>
|
|
8
|
-
## [v4.0.10] - 2024-11-
|
|
15
|
+
## [v4.0.10] - 2024-11-13
|
|
9
16
|
|
|
10
17
|
<a name="v4.0.9"></a>
|
|
11
18
|
## [v4.0.9] - 2024-10-15
|
|
@@ -1290,6 +1297,7 @@ Only Node.js v10 or higher is supported.
|
|
|
1290
1297
|
|
|
1291
1298
|
<a name="v0.0.1"></a>
|
|
1292
1299
|
## v0.0.1 - 2018-06-06
|
|
1300
|
+
[v4.0.11]: https://github.com/SAP/ui5-cli/compare/v4.0.10...v4.0.11
|
|
1293
1301
|
[v4.0.10]: https://github.com/SAP/ui5-cli/compare/v4.0.9...v4.0.10
|
|
1294
1302
|
[v4.0.9]: https://github.com/SAP/ui5-cli/compare/v4.0.8...v4.0.9
|
|
1295
1303
|
[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
|
-
|
|
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
|
}
|