Skip to content

Commit

Permalink
[FEATURE] Reflect specVersion: 4.0 into documentation (#963)
Browse files Browse the repository at this point in the history
JIRA: CPOUI5FOUNDATION-835

#701

---------

Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
  • Loading branch information
d3xter666 and RandomByte committed Jun 24, 2024
1 parent c3c0f8b commit d75e0f0
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 36 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Configure your project for use with UI5 Tooling.
❯ ui5 init
Wrote ui5.yaml:
specVersion: "3.2"
specVersion: "4.0"
metadata:
name: my-app
type: application
Expand Down
33 changes: 22 additions & 11 deletions docs/pages/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ See the list of [clients](https://github.com/redhat-developer/yaml-language-serv
## Example

```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application|library|theme-library|module
metadata:
name: some.project.name
Expand All @@ -36,28 +36,28 @@ The type defines the default path mappings and build tasks. See [UI5 Builder: Ty
=== "application"

```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
```

=== "library"

```yaml
specVersion: "3.2"
specVersion: "4.0"
type: library
```

=== "theme-library"

```yaml
specVersion: "3.2"
specVersion: "4.0"
type: theme-library
```

=== "module"

```yaml
specVersion: "3.2"
specVersion: "4.0"
type: module
```

Expand Down Expand Up @@ -270,7 +270,7 @@ You can find an overview of the available versions for each framework here:
!!! example
=== "application"
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
metadata:
name: my.company.app
Expand All @@ -286,7 +286,7 @@ You can find an overview of the available versions for each framework here:

=== "library"
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: my.company.library
Expand Down Expand Up @@ -618,20 +618,20 @@ The default and configured server ports can always be overwritten with the CLI p

!!! example
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
metadata:
name: my.application
---
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: project-shim
metadata:
name: my.application.thirdparty
shims:
configurations:
lodash:
specVersion: "3.2"
specVersion: "4.0"
type: module
metadata:
name: lodash
Expand Down Expand Up @@ -702,6 +702,7 @@ A list of bundle definitions. A `bundleDefinition` contains of the following opt
- `declareRawModules`: Whether raw modules should be declared after jQuery.sap.global became available. With the usage of the ui5loader, this flag should be set to 'false'. By default set to `false`
- `renderer`: Whether renderers for controls should be added to the module set. By default set to `false`
- `sort`: By default, modules are sorted by their dependencies. The sorting can be suppressed by setting the option to `false`
- `async`: Specifies whether the require section of the module should be asynchronous. When set to `true`, the modules will be loaded using sap.ui.require instead of sap.ui.requireSync. The latter API is not available in UI5 version 2.x. **Note:** This property is available only for `mode=require`

**bundleOptions**

Expand All @@ -717,7 +718,7 @@ A list of bundle definitions. A `bundleDefinition` contains of the following opt
A project must define a specification version by setting the `specVersion` property. UI5 Tooling uses this information to detect whether the currently installed version is compatible to a project's configuration.

```yaml
specVersion: "3.2"
specVersion: "4.0"
[...]
```

Expand All @@ -736,6 +737,7 @@ Unless otherwise noted in the table below, UI5 Tooling modules are backward comp

Version | UI5 CLI Release
--- | ---
**4.0** | v4.0.0+
**3.2** | v3.8.0+
**3.1** | v3.5.0+
**3.0** | v3.0.0+
Expand All @@ -750,6 +752,15 @@ Version | UI5 CLI Release
**1.0** | v1.0.0+
**0.1** | v0.0.1+

### Specification Version 4.0

**Breaking changes:**

- Remove bundle option [`usePredefineCalls`](#properties). UI5 CLI v4.0.0 and above will always use predefine calls in bundles, making this option obsolete.
- New option “async“ for [builder.bundles.bundleDefinition.section](#properties)

Specification Version 4.0 projects are supported by [UI5 CLI](https://github.com/SAP/ui5-cli) v4.0.0 and above.

### Specification Version 3.2

**Features:**
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/OpenUI5.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This configuration can be maintained by editing the file, or by using the UI5 CL

**Example ui5.yaml of an application**
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
metadata:
name: some.project.name
Expand All @@ -39,7 +39,7 @@ framework:
**Example ui5.yaml of a library**
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: some.library
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/SAPUI5.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This configuration can be maintained by editing the file, or by using the UI5 CL

**Example ui5.yaml of an application**
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
metadata:
name: some.project.name
Expand All @@ -52,7 +52,7 @@ framework:
**Example ui5.yaml of a library**
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: some.library
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/extensibility/CustomServerMiddleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A middleware may be executed before or after any other middleware. This can eith
### Example: Basic configuration

```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
metadata:
name: my.application
Expand Down Expand Up @@ -45,7 +45,7 @@ A custom middleware extension consists of a `ui5.yaml` and a [custom middleware
### Example: ui5.yaml

```yaml
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: server-middleware
metadata:
Expand All @@ -65,7 +65,7 @@ The UI5 Server will detect the custom middleware configuration of the project an

```yaml
# Project configuration for the above example
specVersion: "3.2"
specVersion: "4.0"
kind: project
type: application
metadata:
Expand All @@ -76,7 +76,7 @@ server:
beforeMiddleware: serveResources
---
# Custom middleware extension as part of your project
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: server-middleware
metadata:
Expand Down
10 changes: 5 additions & 5 deletions docs/pages/extensibility/CustomTasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Another custom task called `render-markdown-files` is then executed immediately

```yaml
# In this example configuration, two custom tasks are defined: 'babel' and 'render-markdown-files'.
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: my.library
Expand All @@ -41,7 +41,7 @@ You can also connect multiple custom tasks with each other. The order in the con

```yaml
# In this example, 'my-custom-task-2' gets executed after 'my-custom-task-1'.
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: my.library
Expand All @@ -60,7 +60,7 @@ A custom task extension consists of a `ui5.yaml` and a [task implementation](#ta
### Example: ui5.yaml

```yaml
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: task
metadata:
Expand All @@ -80,7 +80,7 @@ The task extension will then be automatically collected and processed during the

```yaml
# Project configuration for the above example
specVersion: "3.2"
specVersion: "4.0"
kind: project
type: library
metadata:
Expand All @@ -94,7 +94,7 @@ builder:
firstH1IsTitle: true
---
# Task extension as part of your project
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: task
metadata:
Expand Down
22 changes: 11 additions & 11 deletions docs/pages/extensibility/ProjectShims.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Also see [RFC 0002 Project Shims](https://github.com/SAP/ui5-tooling/blob/main/r

#### Structure
```yaml
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: project-shim
metadata:
name: <name of project shim extension>
shims:
configurations:
<module name (id)>:
specVersion: "3.2"
specVersion: "4.0"
type: <project type>
metadata:
name: <project name>
<module name (id)>:
specVersion: "3.2"
specVersion: "4.0"
type: <project type>
metadata:
name: <project name>
Expand Down Expand Up @@ -61,20 +61,20 @@ An application "my-application" defines a npm dependency to [lodash](https://lod

**ui5.yaml**
```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
metadata:
name: my.application
--- # Everything below this line could also be put into the ui5.yaml of a standalone extension module
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: project-shim
metadata:
name: my.application.thirdparty
shims:
configurations:
lodash: # name as defined in package.json
specVersion: "3.2"
specVersion: "4.0"
type: module # Use module type
metadata:
name: lodash
Expand Down Expand Up @@ -142,30 +142,30 @@ application-a/
The shim defined in the application configures the legacy libraries and defines their dependencies. This shim might as well be a standalone module that is added to the applications dependencies. That would be the typical reuse scenario for shims.

```yaml
specVersion: "3.2"
specVersion: "4.0"
type: application
metadata:
name: application.a
----
specVersion: "3.2"
specVersion: "4.0"
kind: extension
type: project-shim
metadata:
name: legacy-lib-shims
shims:
configurations:
legacy-library-a:
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: legacy.library.a
legacy-library-b:
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: legacy.library.b
legacy-library-x:
specVersion: "3.2"
specVersion: "4.0"
type: library
metadata:
name: legacy.library.x
Expand Down

0 comments on commit d75e0f0

Please sign in to comment.