Skip to content

Commit c24fc91

Browse files
committed
fix: Documentation syntax
1 parent 8e0770e commit c24fc91

File tree

2 files changed

+61
-54
lines changed

2 files changed

+61
-54
lines changed

packages/documentation/docs/updates/migrate-v3.md

Lines changed: 54 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Migrate to v3
22

3-
!!! warning "Superseded"
4-
**UI5 CLI 3.0 has been superseded by version 4.0. See [Migrate to v4](./migrate-v4.md).**
3+
::: warning "Superseded"
4+
**UI5 CLI 3.0 has been superseded by version 4.0. See [Migrate to v4](./migrate-v4.md).**
55

6-
Find the announcement blog post for version 3.0 here: **[SAP Community: UI5 CLI 3.0](https://blogs.sap.com/2023/02/10/ui5-tooling-3.0/)**
6+
Find the announcement blog post for version 3.0 here: **[SAP Community: UI5 CLI 3.0](https://blogs.sap.com/2023/02/10/ui5-tooling-3.0/)**
7+
:::
78

89
## Node.js and npm Version Support
910

@@ -19,8 +20,9 @@ This means your old projects might still work. Unless they have non-standard con
1920

2021
## Changes for Projects
2122

22-
!!! info
23-
✅ Projects defining **Specification Version 2.x** are expected to be **fully compatible with UI5 CLI v3**
23+
::: info
24+
✅ Projects defining **Specification Version 2.x** are expected to be **fully compatible with UI5 CLI v3**
25+
:::
2426

2527
For projects defining the latest **Specification Versions 3.0 and higher**, some changes apply:
2628

@@ -30,8 +32,9 @@ See also [Configuration: Specification Version 3.0](../pages/Configuration.md#sp
3032

3133
## Changes for Extensions
3234

33-
!!! info
34-
✅ Custom Tasks and Custom Middleware defining **Specification Version 2.x** are expected to be **fully compatible with UI5 CLI v3**
35+
::: info
36+
✅ Custom Tasks and Custom Middleware defining **Specification Version 2.x** are expected to be **fully compatible with UI5 CLI v3**
37+
:::
3538

3639
For extensions defining the latest **Specification Versions 3.0 and higher**, some changes and improvements apply:
3740

@@ -44,27 +47,28 @@ For extensions defining the latest **Specification Versions 3.0 and higher**, so
4447

4548
## Changes to Dependency Configuration
4649

47-
!!! info
48-
✅ The **`ui5.dependencies` package.json configuration** becomes obsolete and is ignored in UI5 CLI v3.
49-
50-
Configuration like the following is not needed anymore:
51-
52-
```diff title="package.json"
53-
{
54-
[...]
55-
- "ui5": {
56-
- "dependencies": [
57-
- "my-package"
58-
- ]
59-
- }
60-
[...]
61-
}
62-
```
50+
::: info
51+
✅ The **`ui5.dependencies` package.json configuration** becomes obsolete and is ignored in UI5 CLI v3.
52+
53+
Configuration like the following is not needed anymore:
54+
55+
```diff title="package.json"
56+
{
57+
[...]
58+
- "ui5": {
59+
- "dependencies": [
60+
- "my-package"
61+
- ]
62+
- }
63+
[...]
64+
}
65+
```
6366

64-
`dependencies`, `devDependencies` and `optionalDependencies` are now [automatically analyzed](https://github.com/SAP/ui5-project/blob/ff04ae4aeeb7f7d889dffd0c0e3e8774dd708c79/lib/graph/providers/NodePackageDependencies.js#L104).
65-
If a dependency can be configured as a UI5 project or UI5 CLI extension, it is added to the graph and its `dependencies` are analyzed.
67+
`dependencies`, `devDependencies` and `optionalDependencies` are now [automatically analyzed](https://github.com/SAP/ui5-project/blob/ff04ae4aeeb7f7d889dffd0c0e3e8774dd708c79/lib/graph/providers/NodePackageDependencies.js#L104).
68+
If a dependency can be configured as a UI5 project or UI5 CLI extension, it is added to the graph and its `dependencies` are analyzed.
6669

67-
Note that `devDependencies` and `optionalDependencies` are ignored for all but the current root project. For projects that are intended to be consumed in other projects (for example libraries), this means that any required custom tasks must be added to `dependencies`.
70+
Note that `devDependencies` and `optionalDependencies` are ignored for all but the current root project. For projects that are intended to be consumed in other projects (for example libraries), this means that any required custom tasks must be added to `dependencies`.
71+
:::
6872

6973
## Changes to Module API
7074

@@ -97,34 +101,34 @@ await builder.build({
97101

98102
**New: @ui5/project v3**
99103

100-
=== "ESM"
104+
**ESM**
105+
106+
```js
107+
import {graphFromPackageDependencies} from "@ui5/project/graph";
101108

102-
```js
103-
import {graphFromPackageDependencies} from "@ui5/project/graph";
109+
let graph = await graphFromPackageDependencies({cwd: "."});
110+
111+
await graph.build({
112+
destPath: "./dist",
113+
includedDependencies: ["*"], // Parameter "buildDependencies" has been removed
114+
});
115+
```
116+
117+
**CommonJS**
118+
119+
```js
120+
// Since CommonJS does not suport top-level await, the code must be wrapped in an asynchronous function
121+
async function buildProject() {
122+
const {graphFromPackageDependencies} = await import("@ui5/project/graph");
104123

105124
let graph = await graphFromPackageDependencies({cwd: "."});
106125

107126
await graph.build({
108127
destPath: "./dist",
109128
includedDependencies: ["*"], // Parameter "buildDependencies" has been removed
110129
});
111-
```
112-
113-
=== "CommonJS"
114-
115-
```js
116-
// Since CommonJS does not suport top-level await, the code must be wrapped in an asynchronous function
117-
async function buildProject() {
118-
const {graphFromPackageDependencies} = await import("@ui5/project/graph");
119-
120-
let graph = await graphFromPackageDependencies({cwd: "."});
121-
122-
await graph.build({
123-
destPath: "./dist",
124-
includedDependencies: ["*"], // Parameter "buildDependencies" has been removed
125-
});
126-
}
127-
```
130+
}
131+
```
128132

129133
## Changes to @ui5/cli
130134

@@ -145,10 +149,11 @@ Especially for projects of type `library`, where standard tasks like [`buildThem
145149

146150
In the future, a caching mechanism should help and improve build times with this new behavior.
147151

148-
!!! info
149-
The CLI flags `-a` and `--all` are still present and now an alias for `--include-all-dependencies`. This flag (along with `--include-dependency*` and `--exclude-dependency*`) mainly controls the **build output**. Use it to define whether dependency resources should be part of the build result.
152+
::: info
153+
The CLI flags `-a` and `--all` are still present and now an alias for `--include-all-dependencies`. This flag (along with `--include-dependency*` and `--exclude-dependency*`) mainly controls the **build output**. Use it to define whether dependency resources should be part of the build result.
150154

151-
Please also refer to the [`ui5 build` documentation](../pages/CLI.md#ui5-build).
155+
Please also refer to the [`ui5 build` documentation](../pages/CLI.md#ui5-build).
156+
:::
152157

153158
## Removal of Standard Tasks and Processors
154159

packages/documentation/docs/updates/migrate-v4.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Migrate to v4
22

3-
!!! tip "New Release"
4-
**UI5 CLI 4.0 has been released on July 24, 2024 🎉**
3+
::: tip "New Release"
4+
**UI5 CLI 4.0 has been released on July 24, 2024 🎉**
55

6-
Install the latest version in your projects via: `npm i --save-dev @ui5/cli@latest`
7-
And update your global install via `npm i --global @ui5/cli@latest`
6+
Install the latest version in your projects via: `npm i --save-dev @ui5/cli@latest`
7+
And update your global install via `npm i --global @ui5/cli@latest`
8+
9+
And find the announcement blog post here: **[SAP Community: UI5 CLI 4.0](https://community.sap.com/t5/technology-blogs-by-sap/ui5-tooling-4-0/ba-p/13769578)**
10+
:::
811

9-
And find the announcement blog post here: **[SAP Community: UI5 CLI 4.0](https://community.sap.com/t5/technology-blogs-by-sap/ui5-tooling-4-0/ba-p/13769578)**
1012

1113
## UI5 2.x Compatibility
1214

0 commit comments

Comments
 (0)