Skip to content

Commit 9acbbab

Browse files
build: upgrade stack to pnpm, Node 16 and Lerna 6
Use pnpm 8.5+ as package manager to be used on Node 16.13+. Also upgrades Lerna to v6 with nx backend. As part of the repository overhaul the Vue 2 packages were removed. Starting with JSON Forms 3.1 they are no longer maintained. All packages now properly declare all their dependencies. A number of dependencies were updated in the process, e.g. jest and typedoc. Other changes: - Increases base lib version from ES6 to ES2016. - Update Readme, scripts and Github workflows - Increase RAM usage for test executions Note: The version constraint of pnpm in the root package.json is set to ">=7.13.4" as otherwise the Netlify build fails immediatly. It should be set to ">=8.6.2". Closes #2110
1 parent 369370a commit 9acbbab

File tree

80 files changed

+23890
-38369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+23890
-38369
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 4 deletions
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: 16, 14
4-
ARG VARIANT="14"
3+
# [Choice] Node.js version: 16
4+
ARG VARIANT="16"
55
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
66

77
# [Optional] Uncomment this section to install additional OS packages.
@@ -12,5 +12,6 @@ FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
1212
# ARG EXTRA_NODE_VERSION=10
1313
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
1414

15-
# [Optional] Uncomment if you want to install more global node modules
16-
# RUN su node -c "npm install -g <your-package-list-here>"
15+
# Install and configure pnpm
16+
RUN su node -c "npm install -g pnpm@8"
17+
RUN su node -c "pnpm config set store-dir /home/node/.pnpm-store"

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"name": "Node.js",
55
"build": {
66
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick a Node version: 14, 16
7+
// Update 'VARIANT' to pick a Node version: 16
88
"args": {
9-
"VARIANT": "14"
9+
"VARIANT": "16"
1010
}
1111
},
1212
// Set *default* container specific settings.json values on container create.
@@ -20,7 +20,7 @@
2020
]
2121
},
2222
// Use 'postCreateCommand' to run commands after the container is created.
23-
"postCreateCommand": "npm ci && npm run init && npm run build",
23+
"postCreateCommand": "pnpm i --frozen-lockfile && pnpm run build",
2424
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
2525
"remoteUser": "node"
2626
}

.github/workflows/ci.yaml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,44 @@ jobs:
1616
name: Run on ${{ matrix.os }}
1717
steps:
1818
- uses: actions/checkout@v2
19+
1920
- name: Setup node
20-
uses: actions/setup-node@v2
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 16
24+
25+
- uses: pnpm/action-setup@v2.2.4
26+
name: Install pnpm
27+
id: pnpm-install
2128
with:
22-
node-version: 14
29+
version: 8
30+
run_install: false
31+
2332
- name: Build
2433
run: |
25-
npm ci
26-
npm run init
27-
npm run build
28-
npm run bundle
34+
pnpm i --frozen-lockfile
35+
pnpm run build
36+
pnpm run doc
37+
pnpm run bundle
38+
2939
- name: Lint
3040
if: matrix.os == 'ubuntu-latest'
31-
run: npm run lint
41+
run: pnpm run lint
42+
3243
- name: Test
3344
if: matrix.os == 'windows-latest'
3445
run: |
35-
npm run test
46+
set NODE_OPTIONS=--max_old_space_size=4096
47+
pnpm run test
48+
3649
- name: Test & Coverage
3750
if: matrix.os == 'ubuntu-latest'
3851
run: |
39-
npm run test-cov
40-
npm run check-format
41-
npm run merge-report && cat coverage/lcov.info
52+
export NODE_OPTIONS=--max_old_space_size=4096
53+
pnpm run test-cov
54+
pnpm run check-format
55+
pnpm run merge-report && cat coverage/lcov.info
56+
4257
- name: Upload Coveralls Report
4358
if: success() && matrix.os == 'ubuntu-latest'
4459
uses: coverallsapp/github-action@master

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
resolution-mode=highest

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.20.1

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"[json]": {
2424
"editor.defaultFormatter": "esbenp.prettier-vscode"
2525
},
26+
"[jsonc]": {
27+
"editor.defaultFormatter": "esbenp.prettier-vscode"
28+
},
2629
"[typescript]": {
2730
"editor.defaultFormatter": "esbenp.prettier-vscode",
2831
"editor.codeActionsOnSave": {
@@ -45,5 +48,6 @@
4548
"**/docs": true,
4649
"**/node_modules": true,
4750
"**/lib": true
48-
}
51+
},
52+
"typescript.tsdk": "node_modules/typescript/lib"
4953
}

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ In addition, EclipseSource also offers [professional support](https://jsonforms.
3232

3333
### First time setup
3434

35-
- Install [node.js](https://nodejs.org/) (only Node 14 and npm 6 is currently supported)
35+
- Install [node.js](https://nodejs.org/) (only Node v16.13+ < 17 is currently supported)
36+
- Install pnpm: <https://pnpm.io/installation> (use pnpm 8.6.2+)
3637
- Clone this repository
37-
- Install dependencies: `npm ci`
38-
- Hook up dependencies between packages: `npm run init`
38+
- Install dependencies: `pnpm i --frozen-lockfile`
3939

4040
### VS Code dev container
4141

@@ -47,13 +47,13 @@ As an alternative to the first time setup, you can use the provided [VS Code dev
4747

4848
### Build & Testing
4949

50-
- Build (all packages): `npm run build`
51-
- Test (all packages): `npm run test`
52-
- Clean (delete `dist` folder of all packages): `npm run clean`
53-
- Run React Vanilla examples: `cd packages/vanilla && npm run dev`
54-
- Run React Material examples: `cd packages/material && npm run dev`
55-
- Run Angular Material examples: `cd packages/angular-material && npm run dev`
56-
- Run Vue Vanilla dev setup: `cd packages/vue/vue-vanilla && npm run serve`
50+
- Build (all packages): `pnpm run build`
51+
- Test (all packages): `pnpm run test`
52+
- Clean (delete `dist` folder of all packages): `pnpm run clean`
53+
- Run React Vanilla examples: `cd packages/vanilla && pnpm run dev`
54+
- Run React Material examples: `cd packages/material && pnpm run dev`
55+
- Run Angular Material examples: `cd packages/angular-material && pnpm run dev`
56+
- Run Vue Vanilla dev setup: `cd packages/vue/vue-vanilla && pnpm run serve`
5757

5858
### Dependency & Release management
5959

lerna.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
{
2-
"packages": [
3-
"packages/*",
4-
"packages/vue/*",
5-
"packages/vue2/*"
6-
],
72
"version": "3.1.0",
8-
"nohoist": [
9-
"core-js",
10-
"vue",
11-
"rollup-plugin-vue",
12-
"@vue/test-utils"
13-
]
3+
"npmClient": "pnpm",
4+
"useWorkspaces": true
145
}

0 commit comments

Comments
 (0)