Skip to content

Commit

Permalink
[INTERNAL] specVersion 3.2 docs (#902)
Browse files Browse the repository at this point in the history
Adds information about specVersion 3.2

**_Note:_** This change shouldn't be merged before:
- SAP/ui5-builder#951
- SAP/ui5-project#673

---------

Co-authored-by: Matthias Oßwald <[email protected]>
  • Loading branch information
d3xter666 and matz3 authored Dec 13, 2023
1 parent 0915452 commit e7208f6
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Configure your project for use with UI5 Tooling.
❯ ui5 init
Wrote ui5.yaml:
specVersion: "3.1"
specVersion: "3.2"
metadata:
name: my-app
type: application
Expand Down
35 changes: 23 additions & 12 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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
type: application
```

=== "library"

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

=== "theme-library"

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

=== "module"

```yaml
specVersion: "3.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
type: application
metadata:
name: my.application
---
specVersion: "3.1"
specVersion: "3.2"
kind: extension
type: project-shim
metadata:
name: my.application.thirdparty
shims:
configurations:
lodash:
specVersion: "3.1"
specVersion: "3.2"
type: module
metadata:
name: lodash
Expand Down Expand Up @@ -695,7 +695,7 @@ A list of bundle definitions. A `bundleDefinition` contains of the following opt
- `name`: The module bundle name
- `defaultFileTypes`: List of default file types which should be included in the bundle. Defaults to: `.js`, `.control.xml`, `.fragment.html`, `.fragment.json`, `.fragment.xml`, `.view.html`, `.view.json` and `.view.xml`
- `sections`: A list of module bundle definition sections. Each section specifies an embedding technology (see [API-Reference](https://sap.github.io/ui5-tooling/v3/api/module-@ui5_builder_processors_bundlers_moduleBundler.html#~ModuleBundleDefinition)) and lists the resources that should be in- or excluded from the section.
- `mode`: The embedding technology (e.g. provided, raw, preload)
- `mode`: The embedding technology (e.g. provided, raw, preload, bundleInfo, depCache)
- `filters`: List of modules declared as glob patterns (resource name patterns) that are in- or excluded. Similarly to the use of a single `*` or double `**` asterisk, a pattern ending with a slash `/` denotes an arbitrary number of characters or folder names. Excludes have to be marked with a leading exclamation mark `!`. The order of filters is relevant; a later inclusion overrides an earlier exclusion, and vice versa.
- `resolve`: Setting resolve to `true` will also include all (transitive) dependencies of the files
- `resolveConditional`: Whether conditional dependencies of modules should be resolved and added to the module set for this section. By default set to `false`
Expand All @@ -718,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.1"
specVersion: "3.2"
[...]
```

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

Version | UI5 CLI Release
--- | ---
**3.2** | v3.8.0+
**3.1** | v3.5.0+
**3.0** | v3.0.0+
**2.6** | v2.14.0+
Expand All @@ -750,12 +751,22 @@ Version | UI5 CLI Release
**1.0** | v1.0.0+
**0.1** | v0.0.1+

### Specification Version 3.2

**Features:**

- Adds a new bundling mode `depCache` for providing a dependencies cache: [`builder.bundles.bundleDefinition.sections.mode=depCache`](#properties)

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

### Specification Version 3.1

**Features:**

- Adds support for maintaining the [`builder.resources.excludes`](#exclude-resources) configuration for projects of type `module`

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

### Specification Version 3.0

**Breaking changes:**
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.1"
specVersion: "3.2"
type: application
metadata:
name: some.project.name
Expand All @@ -39,7 +39,7 @@ framework:
**Example ui5.yaml of a library**
```yaml
specVersion: "3.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
type: application
metadata:
name: some.project.name
Expand All @@ -52,7 +52,7 @@ framework:
**Example ui5.yaml of a library**
```yaml
specVersion: "3.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
kind: project
type: application
metadata:
Expand All @@ -76,7 +76,7 @@ server:
beforeMiddleware: serveResources
---
# Custom middleware extension as part of your project
specVersion: "3.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
kind: project
type: library
metadata:
Expand All @@ -94,7 +94,7 @@ builder:
firstH1IsTitle: true
---
# Task extension as part of your project
specVersion: "3.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
kind: extension
type: project-shim
metadata:
name: <name of project shim extension>
shims:
configurations:
<module name (id)>:
specVersion: "3.1"
specVersion: "3.2"
type: <project type>
metadata:
name: <project name>
<module name (id)>:
specVersion: "3.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
kind: extension
type: project-shim
metadata:
name: my.application.thirdparty
shims:
configurations:
lodash: # name as defined in package.json
specVersion: "3.1"
specVersion: "3.2"
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.1"
specVersion: "3.2"
type: application
metadata:
name: application.a
----
specVersion: "3.1"
specVersion: "3.2"
kind: extension
type: project-shim
metadata:
name: legacy-lib-shims
shims:
configurations:
legacy-library-a:
specVersion: "3.1"
specVersion: "3.2"
type: library
metadata:
name: legacy.library.a
legacy-library-b:
specVersion: "3.1"
specVersion: "3.2"
type: library
metadata:
name: legacy.library.b
legacy-library-x:
specVersion: "3.1"
specVersion: "3.2"
type: library
metadata:
name: legacy.library.x
Expand Down

0 comments on commit e7208f6

Please sign in to comment.