@ui5/cli 3.0.0-beta.1 → 3.0.0-beta.2

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,7 +2,18 @@
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/v3.0.0-beta.1...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-cli/compare/v3.0.0-beta.2...HEAD).
6
+
7
+ <a name="v3.0.0-beta.2"></a>
8
+ ## [v3.0.0-beta.2] - 2022-11-29
9
+ ### Dependency Updates
10
+ - Bump [@ui5](https://github.com/ui5)/server from 3.0.0-beta.1 to 3.0.0-beta.2 [`8bbfcf9`](https://github.com/SAP/ui5-cli/commit/8bbfcf9e51036c7c9b60e29f53b011a60063c2ea)
11
+ - Bump [@ui5](https://github.com/ui5)/builder from 3.0.0-beta.1 to 3.0.0-beta.2 [`3b241bc`](https://github.com/SAP/ui5-cli/commit/3b241bca435e107772473fab226b652ab3abbe69)
12
+ - Bump [@ui5](https://github.com/ui5)/project from 3.0.0-beta.2 to 3.0.0-beta.3 [`1654cbc`](https://github.com/SAP/ui5-cli/commit/1654cbc91d6c0483144afbe600738a6bee5b4b66)
13
+ - Bump [@ui5](https://github.com/ui5)/project from 3.0.0-beta.1 to 3.0.0-beta.2 [`677dc78`](https://github.com/SAP/ui5-cli/commit/677dc7856363051db7a4b0b2feb312a98cec943a)
14
+ - Bump [@ui5](https://github.com/ui5)/fs from 3.0.0-beta.2 to 3.0.0-beta.3 [`6f59a7e`](https://github.com/SAP/ui5-cli/commit/6f59a7ed1124dc7e55cbbc42bfe2262103f78ef9)
15
+ - Bump [@ui5](https://github.com/ui5)/logger from 3.0.1-beta.0 to 3.0.1-beta.1 [`1532039`](https://github.com/SAP/ui5-cli/commit/15320397fae3ccba9a702bbb6d920367c67c738a)
16
+
6
17
 
7
18
  <a name="v3.0.0-beta.1"></a>
8
19
  ## [v3.0.0-beta.1] - 2022-11-07
@@ -852,6 +863,7 @@ Only Node.js v10 or higher is supported.
852
863
  <a name="v0.0.1"></a>
853
864
  ## v0.0.1 - 2018-06-06
854
865
 
866
+ [v3.0.0-beta.2]: https://github.com/SAP/ui5-cli/compare/v3.0.0-beta.1...v3.0.0-beta.2
855
867
  [v3.0.0-beta.1]: https://github.com/SAP/ui5-cli/compare/v3.0.0-alpha.15...v3.0.0-beta.1
856
868
  [v3.0.0-alpha.15]: https://github.com/SAP/ui5-cli/compare/v3.0.0-alpha.14...v3.0.0-alpha.15
857
869
  [v3.0.0-alpha.14]: https://github.com/SAP/ui5-cli/compare/v3.0.0-alpha.13...v3.0.0-alpha.14
@@ -160,7 +160,7 @@ serve.handler = async function(argv) {
160
160
  browserUrl += relPath;
161
161
  }
162
162
  const {default: open} = await import("open");
163
- open(browserUrl, {url: true});
163
+ open(browserUrl);
164
164
  }
165
165
  };
166
166
 
@@ -43,7 +43,7 @@ tree.handler = async function(argv) {
43
43
  elapsedTime = await getElapsedTime(startTime);
44
44
  }
45
45
 
46
- const projects = {};
46
+ const projects = Object.create(null);
47
47
  const indentWidth = 4;
48
48
  await graph.traverseBreadthFirst(async ({project, getDependencies}) => {
49
49
  const deps = getDependencies().map((dep) => {
@@ -1,4 +1,4 @@
1
- import {getRootProjectConfiguration, getFrameworkResolver, isValidSpecVersion} from "./utils.js";
1
+ import {getRootProjectConfiguration, getFrameworkResolver} from "./utils.js";
2
2
 
3
3
  /**
4
4
  * Adds the given set of libraries to the framework libraries section in the ui5.yaml
@@ -10,10 +10,10 @@ import {getRootProjectConfiguration, getFrameworkResolver, isValidSpecVersion} f
10
10
  export default async function({projectGraphOptions, libraries}) {
11
11
  const project = await getRootProjectConfiguration(projectGraphOptions);
12
12
 
13
- if (!isValidSpecVersion(project.getSpecVersion())) {
13
+ if (project.getSpecVersion().lt("2.0")) {
14
14
  throw new Error(
15
15
  `ui5 add command requires specVersion "2.0" or higher. ` +
16
- `Project ${project.getName()} uses specVersion "${project.getSpecVersion()}"`
16
+ `Project ${project.getName()} uses specVersion "${project.getSpecVersion().toString()}"`
17
17
  );
18
18
  }
19
19
 
@@ -1,4 +1,4 @@
1
- import {getRootProjectConfiguration, isValidSpecVersion} from "./utils.js";
1
+ import {getRootProjectConfiguration} from "./utils.js";
2
2
  import logger from "@ui5/logger";
3
3
 
4
4
  const log = logger.getLogger("cli:framework:remove");
@@ -13,10 +13,10 @@ const log = logger.getLogger("cli:framework:remove");
13
13
  export default async function({projectGraphOptions, libraries}) {
14
14
  const project = await getRootProjectConfiguration(projectGraphOptions);
15
15
 
16
- if (!isValidSpecVersion(project.getSpecVersion())) {
16
+ if (project.getSpecVersion().lt("2.0")) {
17
17
  throw new Error(
18
18
  `ui5 remove command requires specVersion "2.0" or higher. ` +
19
- `Project ${project.getName()} uses specVersion "${project.getSpecVersion()}"`
19
+ `Project ${project.getName()} uses specVersion "${project.getSpecVersion().toString()}"`
20
20
  );
21
21
  }
22
22
 
@@ -1,4 +1,4 @@
1
- import {getRootProjectConfiguration, getFrameworkResolver, isValidSpecVersion} from "./utils.js";
1
+ import {getRootProjectConfiguration, getFrameworkResolver} from "./utils.js";
2
2
 
3
3
  async function resolveVersion({frameworkName, frameworkVersion}, resolverOptions) {
4
4
  return await getFrameworkResolver(frameworkName).resolveVersion(frameworkVersion, resolverOptions);
@@ -25,10 +25,10 @@ function getEffectiveFrameworkName({project, frameworkOptions}) {
25
25
  export default async function({projectGraphOptions, frameworkOptions}) {
26
26
  const project = await getRootProjectConfiguration(projectGraphOptions);
27
27
 
28
- if (!isValidSpecVersion(project.getSpecVersion())) {
28
+ if (project.getSpecVersion().lt("2.0")) {
29
29
  throw new Error(
30
30
  `ui5 use command requires specVersion "2.0" or higher. ` +
31
- `Project ${project.getName()} uses specVersion "${project.getSpecVersion()}"`
31
+ `Project ${project.getName()} uses specVersion "${project.getSpecVersion().toString()}"`
32
32
  );
33
33
  }
34
34
 
@@ -28,10 +28,3 @@ export function getFrameworkResolver(frameworkName) {
28
28
  throw new Error("Invalid framework.name: " + frameworkName);
29
29
  }
30
30
  }
31
-
32
- export function isValidSpecVersion(specVersion) {
33
- // Only checks for a string and versions that are not supported
34
- // The CLI relies on the @ui5/project to correctly verify the version
35
- return typeof specVersion === "string" && specVersion !== "" &&
36
- specVersion !== "0.1" && specVersion !== "1.0" && specVersion !== "1.1";
37
- }