Skip to content

Commit 80405a5

Browse files
Merge branch 'master' into lk/2371-remove-ajv-from-combinators
2 parents cf3f154 + 5218263 commit 80405a5

File tree

29 files changed

+13739
-6994
lines changed

29 files changed

+13739
-6994
lines changed

.devcontainer/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.191.1/containers/javascript-node/.devcontainer/base.Dockerfile
22

3-
# [Choice] Node.js version: 18
4-
ARG VARIANT="18"
3+
# [Choice] Node.js version: 22
4+
ARG VARIANT="22"
55
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:1-${VARIANT}
66

77
# Install chromium and point the CHROME_BIN environment variable to it

.github/workflows/ci.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
- windows-latest
2222
name: Run on ${{ matrix.os }}
2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525

2626
- name: Setup node
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
2828
with:
29-
node-version: 18
29+
node-version: 22
3030

3131
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
3232
name: Install pnpm

.github/workflows/publish.yaml

+35-35
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
name: "Publish"
1+
name: 'Publish'
22

33
on:
44
workflow_dispatch:
55
inputs:
66
next_version:
7-
type: "string"
8-
description: "version (e.g. 3.4.0-alpha.0)"
7+
type: 'string'
8+
description: 'version (e.g. 3.4.0-alpha.0)'
99
required: true
1010
skip_publish:
11-
type: "boolean"
12-
description: "mark in case only the version update shall be executed, skipping the release to npm"
11+
type: 'boolean'
12+
description: 'mark in case only the version update shall be executed, skipping the release to npm'
1313
required: true
1414
skip_push:
15-
type: "boolean"
16-
description: "mark in case the version update shall not be pushed back to the repository"
15+
type: 'boolean'
16+
description: 'mark in case the version update shall not be pushed back to the repository'
1717
required: true
1818
stable_release:
19-
type: "boolean"
20-
description: "mark in case this is a full stable release (flag is ignored in case publish is skipped)"
19+
type: 'boolean'
20+
description: 'mark in case this is a full stable release (flag is ignored in case publish is skipped)'
2121
required: true
2222

2323
jobs:
2424
publish:
2525
permissions:
26-
contents: "write"
27-
id-token: "write"
28-
runs-on: "ubuntu-latest"
26+
contents: 'write'
27+
id-token: 'write'
28+
runs-on: 'ubuntu-latest'
2929
steps:
30-
- uses: "actions/checkout@v4"
30+
- uses: 'actions/checkout@v4'
3131
with:
32-
token: "${{ secrets.JSONFORMS_PUBLISH_PAT }}"
32+
token: '${{ secrets.JSONFORMS_PUBLISH_PAT }}'
3333

34-
- name: "Configure Git Credentials"
34+
- name: 'Configure Git Credentials'
3535
run: |
3636
git config user.name "jsonforms-publish[bot]"
3737
git config user.email "jsonforms-publish@eclipsesource.com"
3838
39-
- name: "Setup node"
40-
uses: "actions/setup-node@v3"
39+
- name: 'Setup node'
40+
uses: 'actions/setup-node@v4'
4141
with:
42-
node-version: "18"
43-
registry-url: "https://registry.npmjs.org"
42+
node-version: '22'
43+
registry-url: 'https://registry.npmjs.org'
4444

4545
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
4646
name: Install pnpm
4747
id: pnpm-install
4848
with:
4949
run_install: false
5050

51-
- name: "Install Packages"
52-
run: "pnpm i --frozen-lockfile"
51+
- name: 'Install Packages'
52+
run: 'pnpm i --frozen-lockfile'
5353

54-
- name: "Build"
55-
run: "pnpm run build"
54+
- name: 'Build'
55+
run: 'pnpm run build'
5656

57-
- name: "Test"
58-
run: "pnpm run test"
57+
- name: 'Test'
58+
run: 'pnpm run test'
5959

60-
- name: "Versioning"
61-
run: "pnpm exec lerna version ${{ github.event.inputs.next_version }} --no-push --force-publish --yes"
60+
- name: 'Versioning'
61+
run: 'pnpm exec lerna version ${{ github.event.inputs.next_version }} --no-push --force-publish --yes'
6262

63-
- name: "Adjust PeerDependencies"
63+
- name: 'Adjust PeerDependencies'
6464
run: |
6565
cd packages/angular && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}"
6666
cd ../angular-material && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/angular="${{ github.event.inputs.next_version }}"
@@ -72,20 +72,20 @@ jobs:
7272
cd ../vue-vanilla && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/vue="${{ github.event.inputs.next_version }}"
7373
cd ../vue-vuetify && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/vue="${{ github.event.inputs.next_version }}"
7474
75-
- name: "Tag and Commit"
75+
- name: 'Tag and Commit'
7676
run: |
7777
git add -A && git commit --amend --no-edit
7878
git tag v${{ github.event.inputs.next_version }} -f
7979
80-
- name: "push"
81-
if: "github.event.inputs.skip_push == 'false'"
80+
- name: 'push'
81+
if: github.event.inputs.skip_push == 'false'
8282
run: |
8383
git push
8484
git push origin v${{ github.event.inputs.next_version }}
8585
86-
- name: "Publish to npm"
87-
if: "github.event.inputs.skip_publish == 'false'"
86+
- name: 'Publish to npm'
87+
if: github.event.inputs.skip_publish == 'false'
8888
run: "pnpm publish --recursive ${{ github.event.inputs.stable_release == 'true' && ' ' || '--tag next' }}"
8989
env:
90-
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}"
91-
NPM_CONFIG_PROVENANCE: "true"
90+
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
91+
NPM_CONFIG_PROVENANCE: 'true'

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.19.0
1+
22

LICENSE

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2019 EclipseSource Munich
4-
https://github.com/eclipsesource/jsonforms
3+
Copyright (c) 2019 EclipseSource GmbH
54

65
Permission is hereby granted, free of charge, to any person obtaining a copy
76
of this software and associated documentation files (the "Software"), to deal

MIGRATION.md

+8
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ const dataWithUser = {
112112
};
113113
```
114114

115+
### UI schema type changes
116+
117+
The `UISchemaElement` type was renamed to `BaseUISchemaElement` and a new `UISchemaElement` type was introduced, which is a union of all available UI schema types.
118+
119+
The `Condition` type was renamed to `BaseCondition` and a new `Condition` type was introduced, which is a union of all available condition types.
120+
121+
Both unions include their respective base type for backwards compatibility, but if you run into errors, replace `UISchemaElement` with `BaseUISchemaElement`/`Condition` with `BaseCondition` in your code to restore the old behaviour.
122+
115123
## Migrating to JSON Forms 3.5
116124

117125
### Angular support now targets Angular 18 and Angular 19

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Independently of the assigned milestone, contributions are always accepted and a
4343

4444
### First time setup
4545

46-
- Install [node.js](https://nodejs.org/) (only Node v18.19+ < 19 is currently supported)
46+
- Install [node.js](https://nodejs.org/) (only Node v22+ < 23 is currently supported)
4747
- Install pnpm: <https://pnpm.io/installation> (use pnpm 10.4.1+) or use [corepack](https://nodejs.org/docs/latest-v18.x/api/corepack.html) to enable the recommended version
4848
- Clone this repository
4949
- Install dependencies: `pnpm i --frozen-lockfile`

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.5.1",
2+
"version": "3.6.0-alpha.0",
33
"npmClient": "pnpm",
44
"useWorkspaces": true
55
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "jsonforms-monorepo",
33
"engines": {
4-
"node": "^18.19.0",
4+
"node": "^22",
55
"pnpm": "^10.4.1"
66
},
7-
"packageManager": "pnpm@10.4.1+sha256.4b702887986995933d4300836b04d6d02a43bc72b52e4f7e93a4ca608b959197",
7+
"packageManager": "pnpm@10.5.2+sha512.da9dc28cd3ff40d0592188235ab25d3202add8a207afbedc682220e4a0029ffbff4562102b9e6e46b4e3f9e8bd53e6d05de48544b0c57d4b0179e22c76d1199b",
88
"scripts": {
99
"lerna": "lerna",
1010
"preparePublish": "git clean -dfx && pnpm i --frozen-lockfile && pnpm run clean && pnpm run build && pnpm run doc && pnpm run test",

packages/angular-material/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jsonforms/angular-material",
3-
"version": "3.5.1",
3+
"version": "3.6.0-alpha.0",
44
"description": "Material Renderer Set for Angular module of JSON Forms",
55
"repository": "https://github.com/eclipsesource/jsonforms",
66
"bugs": "https://github.com/eclipsesource/jsonforms/issues",
@@ -68,8 +68,8 @@
6868
"@angular/material": "^18.0.0 || ^19.0.0",
6969
"@angular/platform-browser": "^18.0.0 || ^19.0.0",
7070
"@angular/router": "^18.0.0 || ^19.0.0",
71-
"@jsonforms/angular": "3.5.1",
72-
"@jsonforms/core": "3.5.1",
71+
"@jsonforms/angular": "3.6.0-alpha.0",
72+
"@jsonforms/core": "3.6.0-alpha.0",
7373
"dayjs": "^1.11.10",
7474
"rxjs": "^6.6.0 || ^7.4.0"
7575
},
@@ -103,7 +103,7 @@
103103
"@ngtools/webpack": "^18.0.0",
104104
"@types/jasmine": "~3.8.0",
105105
"@types/lodash": "4.14.149",
106-
"@types/node": "^18.19.4",
106+
"@types/node": "^22.13.8",
107107
"@typescript-eslint/eslint-plugin": "^5.54.1",
108108
"@typescript-eslint/parser": "^5.54.1",
109109
"babel-loader": "^8.0.6",

packages/angular/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jsonforms/angular",
3-
"version": "3.5.1",
3+
"version": "3.6.0-alpha.0",
44
"description": "Angular module of JSON Forms",
55
"repository": "https://github.com/eclipsesource/jsonforms",
66
"bugs": "https://github.com/eclipsesource/jsonforms/issues",
@@ -69,7 +69,7 @@
6969
"peerDependencies": {
7070
"@angular/core": "^18.0.0 || ^19.0.0",
7171
"@angular/forms": "^18.0.0 || ^19.0.0",
72-
"@jsonforms/core": "3.5.1",
72+
"@jsonforms/core": "3.6.0-alpha.0",
7373
"rxjs": "^6.6.0 || ^7.4.0"
7474
},
7575
"devDependencies": {

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jsonforms/core",
3-
"version": "3.5.1",
3+
"version": "3.6.0-alpha.0",
44
"description": "Core module of JSON Forms",
55
"repository": "https://github.com/eclipsesource/jsonforms",
66
"bugs": "https://github.com/eclipsesource/jsonforms/issues",

packages/core/src/models/uischema.ts

+39-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/*
22
The MIT License
3-
3+
44
Copyright (c) 2017-2019 EclipseSource Munich
55
https://github.com/eclipsesource/jsonforms
6-
6+
77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal
99
in the Software without restriction, including without limitation the rights
1010
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1111
copies of the Software, and to permit persons to whom the Software is
1212
furnished to do so, subject to the following conditions:
13-
13+
1414
The above copyright notice and this permission notice shall be included in
1515
all copies or substantial portions of the Software.
16-
16+
1717
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1818
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1919
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -114,7 +114,7 @@ export enum RuleEffect {
114114
/**
115115
* Represents a condition to be evaluated.
116116
*/
117-
export interface Condition {
117+
export interface BaseCondition {
118118
/**
119119
* The type of condition.
120120
*/
@@ -124,7 +124,7 @@ export interface Condition {
124124
/**
125125
* A leaf condition.
126126
*/
127-
export interface LeafCondition extends Condition, Scoped {
127+
export interface LeafCondition extends BaseCondition, Scoped {
128128
type: 'LEAF';
129129

130130
/**
@@ -133,7 +133,7 @@ export interface LeafCondition extends Condition, Scoped {
133133
expectedValue: any;
134134
}
135135

136-
export interface SchemaBasedCondition extends Condition, Scoped {
136+
export interface SchemaBasedCondition extends BaseCondition, Scoped {
137137
schema: JsonSchema;
138138

139139
/**
@@ -153,7 +153,7 @@ export interface SchemaBasedCondition extends Condition, Scoped {
153153
/**
154154
* A composable condition.
155155
*/
156-
export interface ComposableCondition extends Condition {
156+
export interface ComposableCondition extends BaseCondition {
157157
conditions: Condition[];
158158
}
159159

@@ -171,10 +171,20 @@ export interface AndCondition extends ComposableCondition {
171171
type: 'AND';
172172
}
173173

174+
/**
175+
* A union of all available conditions.
176+
*/
177+
export type Condition =
178+
| BaseCondition
179+
| LeafCondition
180+
| OrCondition
181+
| AndCondition
182+
| SchemaBasedCondition;
183+
174184
/**
175185
* Common base interface for any UI schema element.
176186
*/
177-
export interface UISchemaElement {
187+
export interface BaseUISchemaElement {
178188
/**
179189
* The type of this UI schema element.
180190
*/
@@ -195,7 +205,7 @@ export interface UISchemaElement {
195205
* Represents a layout element which can order its children
196206
* in a specific way.
197207
*/
198-
export interface Layout extends UISchemaElement {
208+
export interface Layout extends BaseUISchemaElement {
199209
/**
200210
* The child elements of this layout.
201211
*/
@@ -241,7 +251,7 @@ export interface LabelDescription {
241251
/**
242252
* A label element.
243253
*/
244-
export interface LabelElement extends UISchemaElement, Internationalizable {
254+
export interface LabelElement extends BaseUISchemaElement, Internationalizable {
245255
type: 'Label';
246256
/**
247257
* The text of label.
@@ -254,7 +264,7 @@ export interface LabelElement extends UISchemaElement, Internationalizable {
254264
* to which part of the schema the control should be bound.
255265
*/
256266
export interface ControlElement
257-
extends UISchemaElement,
267+
extends BaseUISchemaElement,
258268
Scoped,
259269
Labelable<string | boolean | LabelDescription>,
260270
Internationalizable {
@@ -274,7 +284,7 @@ export interface Category extends Layout, Labeled, Internationalizable {
274284
* the categorization element can be used to represent recursive structures like trees.
275285
*/
276286
export interface Categorization
277-
extends UISchemaElement,
287+
extends BaseUISchemaElement,
278288
Labeled,
279289
Internationalizable {
280290
type: 'Categorization';
@@ -284,3 +294,19 @@ export interface Categorization
284294
*/
285295
elements: (Category | Categorization)[];
286296
}
297+
298+
/**
299+
* A union of all available UI schema elements.
300+
* This includes all layout elements, control elements, label elements,
301+
* group elements, category elements and categorization elements.
302+
*/
303+
export type UISchemaElement =
304+
| BaseUISchemaElement
305+
| ControlElement
306+
| Layout
307+
| LabelElement
308+
| GroupLayout
309+
| Category
310+
| Categorization
311+
| VerticalLayout
312+
| HorizontalLayout;

0 commit comments

Comments
 (0)