Skip to content

Commit

Permalink
[INTERNAL] Add specification version 2.0 (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
svbender authored and RandomByte committed Mar 25, 2020
1 parent d2bffdc commit 164df38
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 32 deletions.
24 changes: 16 additions & 8 deletions docs/pages/Configuration.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Configuration
This document describes the configuration of UI5 Tooling based projects and extensions. It represents **[Specification Version](#specification-versions) `1.1`**.
This document describes the configuration of UI5 Tooling based projects and extensions. It represents **[Specification Version](#specification-versions) `2.0`**.

A projects UI5 Tooling configuration is typically located in a [YAML](https://yaml.org/) file named `ui5.yaml`, located in the root directory.

## Example

````yaml
specVersion: "1.1"
specVersion: "2.0"
type: application|library|theme-library|module
metadata:
name: some.project.name
Expand All @@ -18,7 +18,7 @@ A project must define a specification version (`specVersion`), to which its conf
In addition, a project must define a `type`. This can be either `application`, `library`, `theme-library` (since Specification Version 1.1) or `module`. The type defines the default path mappings and build tasks. See [UI5 Builder: Types](./Builder.md#types) for details.

````yaml
specVersion: "1.1"
specVersion: "2.0"
type: library
````

Expand Down Expand Up @@ -204,20 +204,20 @@ Extensions can be identified by the `kind: extension` configuration. Note that i

### Example
````yaml
specVersion: "1.1"
specVersion: "2.0"
type: application
metadata:
name: my.application
---
specVersion: "1.1"
specVersion: "2.0"
kind: extension
type: project-shim
metadata:
name: my.application.thirdparty
shims:
configurations:
lodash:
specVersion: "1.1"
specVersion: "2.0"
type: module
metadata:
name: lodash
Expand Down Expand Up @@ -293,7 +293,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. The UI5 Tooling uses this information to detect whether the currently installed version is compatible to a projects configuration.

````yaml
specVersion: "1.1"
specVersion: "2.0"
[...]
````

Expand All @@ -308,13 +308,14 @@ All changes are documented below.

### Compatibility Matrix

Unless otherwise noted in the table below, the UI5 Tooling modules are backward compatible in the means that for example UI5 CLI v2.0 will still be able to handle a project that is using Specification Version `1.0`.
Unless otherwise noted in the table below, the UI5 Tooling modules are backward compatible in the means that for example UI5 CLI v3.0.0 might still be able to handle a project that is using Specification Version `1.0`.

Version | UI5 CLI Release
--- | ---
**0.1** | v0.0.1+
**1.0** | v1.0.0+
**1.1** | v1.13.0+
**2.0** | v2.0.0+

### Specification Version 0.1
Initial version.
Expand All @@ -330,3 +331,10 @@ Version 1.0 projects are supported by [UI5 CLI](https://github.com/SAP/ui5-cli)
Adds support for the `theme-library` type.

Version 1.1 projects are supported by [UI5 CLI](https://github.com/SAP/ui5-cli) v1.13.0 and above.

### Specification Version 2.0

- Adds and enforces schema validation of ui5.yaml
- Adds support for "framework" configuration to consume SAPUI5 libraries.

Version 2.0 projects are supported by [UI5 CLI](https://github.com/SAP/ui5-cli) v.2.0.0 and above.
8 changes: 4 additions & 4 deletions docs/pages/Project.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Enhances a given dependency tree based on a projects [configuration](docs/Config
"id": "projectA",
"version": "1.0.0",
"path": "/absolute/path/to/projectA",
"specVersion": "1.1",
"specVersion": "2.0",
"type": "application",
"metadata": {
"name": "sap.projectA",
Expand All @@ -97,7 +97,7 @@ Enhances a given dependency tree based on a projects [configuration](docs/Config
"id": "projectB",
"version": "1.0.0",
"path": "/path/to/projectB",
"specVersion": "1.1",
"specVersion": "2.0",
"type": "library",
"metadata": {
"name": "sap.ui.projectB"
Expand All @@ -119,7 +119,7 @@ Enhances a given dependency tree based on a projects [configuration](docs/Config
"id": "projectD",
"version": "1.0.0",
"path": "/path/to/different/projectD",
"specVersion": "1.1",
"specVersion": "2.0",
"type": "library",
"metadata": {
"name": "sap.ui.projectD"
Expand All @@ -144,7 +144,7 @@ Enhances a given dependency tree based on a projects [configuration](docs/Config
"id": "projectD",
"version": "1.0.0",
"path": "/path/to/projectD",
"specVersion": "1.1",
"specVersion": "2.0",
"type": "library",
"metadata": {
"name": "sap.ui.projectD"
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 @@ -9,7 +9,7 @@ A middleware may be executed before or after any other middleware.

### Example: Basic configuration
```yaml
specVersion: "1.1"
specVersion: "2.0"
type: application
metadata:
name: my.application
Expand Down Expand Up @@ -39,7 +39,7 @@ A custom middleware extension consists of a `ui5.yaml` and a [custom middleware
### Example: ui5.yaml

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

````yaml
# Project configuration for the above example
specVersion: "1.1"
specVersion: "2.0"
kind: project
type: application
metadata:
Expand All @@ -70,7 +70,7 @@ server:
beforeMiddleware: serveResources
---
# Custom middleware extension as part of your project
specVersion: "1.1"
specVersion: "2.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 @@ -12,7 +12,7 @@ In the below example, when building the library `my.library` the `babel` task wi

````yaml
# In this example configuration two custom tasks are defined: 'babel' and 'generateMarkdownFiles'.
specVersion: "1.1"
specVersion: "2.0"
type: library
metadata:
name: my.library
Expand All @@ -32,7 +32,7 @@ You can also connect multiple custom task with each other. Please be aware that

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

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

````yaml
# Project configuration for the above example
specVersion: "1.1"
specVersion: "2.0"
kind: project
type: library
metadata:
Expand All @@ -84,7 +84,7 @@ builder:
color: blue
---
# Task extension as part of your project
specVersion: "1.1"
specVersion: "2.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/master

#### Structure
```yaml
specVersion: "1.1"
specVersion: "2.0"
kind: extension
type: project-shim
metadata:
name: <name of project shim extension>
shims:
configurations:
<module name (id)>:
specVersion: "1.1"
specVersion: "2.0",
type: <project type>
metadata:
name: <project name>
<module name (id)>:
specVersion: "1.1"
specVersion: "2.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: "1.1"
specVersion: "2.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: "1.1"
specVersion: "2.0"
kind: extension
type: project-shim
metadata:
name: my.application.thirdparty
shims:
configurations:
lodash: # name as defined in package.json
specVersion: "1.1"
specVersion: "2.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: "1.1"
specVersion: "2.0"
type: application
metadata:
name: application.a
----
specVersion: "1.1"
specVersion: "2.0"
kind: extension
type: project-shim
metadata:
name: legacy-lib-shims
shims:
configurations:
legacy-library-a:
specVersion: "1.1"
specVersion: "2.0"
type: library
metadata:
name: legacy.library.a
legacy-library-b:
specVersion: "1.1"
specVersion: "2.0"
type: library
metadata:
name: legacy.library.b
legacy-library-x:
specVersion: "1.1"
specVersion: "2.0"
type: library
metadata:
name: legacy.library.x
Expand Down

0 comments on commit 164df38

Please sign in to comment.