Union UISchemaElement type by IceFreez3r · Pull Request #2436 · eclipsesource/jsonforms

Changes

as discussed in #2109

  • Renamed UISchemaElement to BaseUISchemaElement

  • Added new UISchemaElement which is a union of all uischema options, including BaseUISchemaElement for backwards-compatibility

  • Same treatment for conditions

    • renamed Condition to BaseCondition
    • added Condition as new union type
  • Unrelated to the main changes, I found that .nvmrc had a different node version than required in the README, so I updated it to node 22

Install node.js (only Node v22+ < 23 is currently supported)

Compliance

Build and lint both run through. I have one failing test: test/testers.test.ts, but I checked and it also fails without my changes, so I assume it's unrelated. Error message for reference:

$ nvm use
Now using node v22.14.0 (npm v10.9.2)
$ pnpm test
> jsonforms-monorepo@ test /path/to/jsonforms
> lerna run test

lerna notice cli v6.6.2


    ✖  @jsonforms/core:test
       > @jsonforms/core@3.5.1 test /path/to/jsonforms/packages/core
       > ava
       
       
         Uncaught exception in test/testers.test.ts
       
         Error: Cannot find module '/path/to/jsonforms/packages/core/node_modules/.cache/ava/import-from-project.mjs' imported from /path/to/jsonforms/node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/worker/base.js
       
         Error: Cannot find module '/path/to/jsonforms/packages/core/node_modules/.cache/ava/import-from-project.mjs' imported from /path/to/jsonforms/node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/worker/base.js
             at finalizeResolution (node:internal/modules/esm/resolve:275:11)
             at moduleResolve (node:internal/modules/esm/resolve:860:10)
             at defaultResolve (node:internal/modules/esm/resolve:984:11)
             at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:685:12)
             at ModuleLoader.#cachedDefaultResolve (node:internal/modules/esm/loader:634:25)
             at ModuleLoader.resolve (node:internal/modules/esm/loader:617:38)
             at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:273:38)
             at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:577:36)
             at TracingChannel.tracePromise (node:diagnostics_channel:344:14)
             at ModuleLoader.import (node:internal/modules/esm/loader:576:21)
       
         ✘ test/testers.test.ts exited with a non-zero exit code: 1