Skip to content

Commit 5316375

Browse files
committed
docs: Add migration guide for v5
1 parent da120c7 commit 5316375

File tree

1 file changed

+114
-0
lines changed

1 file changed

+114
-0
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Migrate to v5
2+
3+
::: tip Alpha Release Available
4+
**UI5 CLI 5.0 Alpha is now available for testing! 🎉**
5+
6+
Try the alpha release in your projects via: `npm i --save-dev @ui5/cli@next`
7+
Or update your global install via: `npm i --global @ui5/cli@next`
8+
9+
**Note:** This is a pre-release version.
10+
:::
11+
12+
## Breaking Changes
13+
14+
**All UI5 CLI Modules: Require Node.js >= 22.20.0 or >= 24.0.0**
15+
16+
**@ui5/cli: `ui5 init` defaults to Specification Version 5.0**
17+
18+
**@ui5/project: New Component Type**
19+
20+
A new project type `component` has been introduced with **Specification Version 5.0**. Component Type projects follow standardized conventions:
21+
- Source files in `/src` directory
22+
- Test files in `/test` directory
23+
24+
See [RFC 1083](https://github.com/SAP/ui5-tooling/issues/1083) for details.
25+
26+
## Node.js and npm Version Support
27+
28+
This release requires **Node.js version v22.20.0 and higher or v24.0.0 and higher** as well as npm v8 or higher.
29+
Support for older Node.js releases has been dropped; their use will cause an error.
30+
31+
## Specification Versions Support
32+
33+
UI5 CLI 5.x introduces **Specification Version 5.0**, which enables the new Component Type and brings improved project structure conventions.
34+
35+
Projects using older **Specification Versions** are expected to be **fully compatible with UI5 CLI v5**.
36+
37+
## UI5 CLI Init Command
38+
39+
The `ui5 init` command now generates projects with Specification Version 5.0 by default.
40+
41+
## Component Type
42+
43+
The `component` type feature aims to introduce a new project type within the UI5 CLI ecosystem to support the development of UI5 component-like applications intended to run in container apps such as the Fiori Launchpad (FLP) Sandbox or testsuite environments.
44+
45+
This feature will allow developers to serve and build multiple UI5 application components concurrently, enhancing the local development environment for integration scenarios.
46+
47+
### Migrating from Application to Component Type
48+
49+
If you have an existing application that you'd like to migrate to the Component Type, follow these steps:
50+
51+
#### 1. Update ui5.yaml Configuration
52+
53+
Update your `ui5.yaml` file to use the Component Type and Specification Version 5.0:
54+
55+
::: code-group
56+
```yaml [Before (Application)]
57+
specVersion: "4.0"
58+
type: application
59+
metadata:
60+
name: my.sample.app
61+
```
62+
63+
```yaml [After (Component)]
64+
specVersion: "5.0"
65+
type: component
66+
metadata:
67+
name: my.sample.app
68+
```
69+
:::
70+
71+
#### 2. Restructure Project Directories
72+
73+
Component Type follows a standardized directory structure:
74+
75+
- **Move `/webapp` to `/src`** - The source directory is now named `src` instead of `webapp`
76+
- **Move `/webapp/test` to `/test`** - Test files are now at the project root level
77+
78+
::: code-group
79+
```text [Before (Application)]
80+
my-app/
81+
├── ui5.yaml
82+
├── package.json
83+
└── webapp/
84+
├── Component.js
85+
├── manifest.json
86+
├── index.html
87+
├── controller/
88+
├── view/
89+
└── test/
90+
├── integration/
91+
└── unit/
92+
```
93+
94+
```text [After (Component)]
95+
my-app/
96+
├── ui5.yaml
97+
├── package.json
98+
├── src/
99+
│ ├── Component.js
100+
│ ├── manifest.json
101+
│ ├── controller/
102+
│ └── view/
103+
└── test/
104+
├── index.html
105+
├── integration/
106+
└── unit/
107+
```
108+
:::
109+
110+
111+
## Learn More
112+
113+
- [Configuration: Specification Version 5.0](../pages/Configuration#specification-version-5-0)
114+
- [UI5 Tooling RFC: Component Type](https://github.com/UI5/cli/pull/1083)

0 commit comments

Comments
 (0)