Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into categorization-to…
Browse files Browse the repository at this point in the history
…-functional
  • Loading branch information
sdirix committed Jan 22, 2024
2 parents 1d1863b + 01b08f0 commit a72b1e0
Show file tree
Hide file tree
Showing 160 changed files with 10,973 additions and 5,360 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.191.1/containers/javascript-node/.devcontainer/base.Dockerfile

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

# Install chromium and point the CHROME_BIN environment variable to it
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16
// Update 'VARIANT' to pick a Node version: 18
"args": {
"VARIANT": "16"
"VARIANT": "18"
}
},
// Set *default* container specific settings.json values on container create.
Expand Down
10 changes: 1 addition & 9 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ body:
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: input
validations:
required: true
attributes:
label: In which browser are you experiencing the issue?
placeholder: Google Chrome 91.0.4472.114
description: Provide the full name and don't forget to add the version!
- type: input
validations:
required: true
Expand All @@ -57,8 +50,7 @@ body:
- Core
- React
- Angular
- Vue 3
- Vue 2
- Vue
- Other (please specify in the Additional context field)
- type: dropdown
attributes:
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ body:
- Core
- React
- Angular
- Vue 3
- Vue 2
- Vue
- Other (please specify in the Additional context field)
- type: dropdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- uses: pnpm/action-setup@v2.2.4
name: Install pnpm
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: "Publish"

on:
workflow_dispatch:
inputs:
next_version:
type: "string"
description: "version (e.g. 3.4.0-alpha.0)"
required: true
skip_publish:
type: "boolean"
description: "mark in case only the version update shall be executed, skipping the release to npm"
required: true
skip_push:
type: "boolean"
description: "mark in case the version update shall not be pushed back to the repository"
required: true
stable_release:
type: "boolean"
description: "mark in case this is a full stable release (flag is ignored in case publish is skipped)"
required: true

jobs:
publish:
permissions:
contents: "write"
id-token: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
token: "${{ secrets.JSONFORMS_PUBLISH_PAT }}"

- name: "Configure Git Credentials"
run: |
git config user.name "jsonforms-publish[bot]"
git config user.email "jsonforms-publish@eclipsesource.com"
- name: "Setup node"
uses: "actions/setup-node@v3"
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"

- uses: "pnpm/action-setup@v2.2.4"
name: "Install pnpm"
id: "pnpm-install"
with:
version: "8"
run_install: false

- name: "Install Packages"
run: "pnpm i --frozen-lockfile"

- name: "Build"
run: "pnpm run build"

- name: "Test"
run: "pnpm run test"

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

- name: "Adjust PeerDependencies"
run: |
cd packages/angular && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}"
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 }}"
cd ../examples && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}"
cd ../material-renderers && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/react="${{ github.event.inputs.next_version }}"
cd ../react && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}"
cd ../vanilla-renderers && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/react="${{ github.event.inputs.next_version }}"
cd ../vue && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}"
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 }}"
- name: "Tag and Commit"
run: |
git add -A && git commit --amend --no-edit
git tag v${{ github.event.inputs.next_version }} -f
- name: "Publish to npm"
if: "github.event.inputs.skip_publish == 'false'"
run: "pnpm publish --recursive ${{ github.event.inputs.stable_release == 'true' && ' ' || '--tag next' }}"
env:
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}"
NPM_CONFIG_PROVENANCE: "true"

- name: "push"
if: "github.event.inputs.skip_push == 'false'"
run: |
git push
git push origin v${{ github.event.inputs.next_version }}
32 changes: 0 additions & 32 deletions .github/workflows/release.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ stats.html
!.vscode/settings.json

.coveralls.yml
packages/examples-react/build
packages/examples-react/build

**/.angular/cache
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.20.1
v18.19.0
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,10 @@
"**/node_modules": true,
"**/lib": true
},
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"[javascript][javascriptreact][typescript][typescriptreact][vue]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ See our [migration guide](https://github.com/eclipsesource/jsonforms/blob/master

### First time setup

- Install [node.js](https://nodejs.org/) (only Node v16.13+ < 17 is currently supported)
- Install [node.js](https://nodejs.org/) (only Node v18.19+ < 19 is currently supported)
- Install pnpm: <https://pnpm.io/installation> (use pnpm 8.6.2+)
- Clone this repository
- Install dependencies: `pnpm i --frozen-lockfile`
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.2.0-alpha.1",
"version": "3.2.0-beta.0",
"npmClient": "pnpm",
"useWorkspaces": true
}
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "jsonforms-monorepo",
"engines": {
"node": "^16.13",
"node": "^18.19.0",
"pnpm": ">=7.13.4"
},
"scripts": {
"lerna": "lerna",
"preparePublish": "git clean -dfx && pnpm i --frozen-lockfile && pnpm run clean && pnpm run build && pnpm run doc && pnpm run test",
"merge-report": "mkdir -p coverage && lcov-result-merger 'packages/**/coverage/lcov.info' 'coverage/lcov.info'",
"merge-report": "mkdir -p coverage && lcov-result-merger 'packages/**/coverage/lcov.info' 'coverage/lcov.info' --prepend-source-files",
"check-format": "echo 'temporarily disabled'",
"build": "lerna run build",
"bundle": "lerna run bundle",
Expand All @@ -20,6 +20,7 @@
"build:examples-app": "lerna run build:examples-app && node packages/examples-app/prepare-examples-app.js"
},
"devDependencies": {
"@angular/core": "^16.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.5",
"@babel/plugin-proposal-optional-chaining": "^7.16.5",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
Expand All @@ -45,8 +46,14 @@
"ts-loader": "^6.2.1",
"ts-node": "^10.4.0",
"tslib": "^2.5.0",
"typescript": "4.2.3",
"typescript": "~4.9.5",
"webpack": "^4.41.2",
"webpack-merge": "^4.2.2"
},
"pnpm": {
"overrides": {
"vue": "~3.3.13",
"@vue/compiler-sfc": "~3.3.13"
}
}
}
16 changes: 16 additions & 0 deletions packages/angular-material/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,21 @@ module.exports = {
caughtErrorsIgnorePattern: '^_',
},
],
// workaround for
// https://github.com/import-js/eslint-plugin-import/issues/1810:
"import/no-unresolved": [
"error",
{
ignore: [
"@angular/cdk/.*",
"@angular/core/.*",
"@angular/material/.*",
"@angular/platform-browser/.*",
"@angular/platform-browser-dynamic/.*",
"core-js/es7/.*",
"zone.js/.*",
]
}
],
},
};
73 changes: 73 additions & 0 deletions packages/angular-material/build-example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const path = require('path');
const ngCore = require('@angular-devkit/core');
const buildWebpackBrowser = require('@angular-devkit/build-angular/src/builders/browser').buildWebpackBrowser;

const main = async () => new Promise((resolve, reject) => {
const project = 'angular-material';
const target = 'build';
const configuration = '';
const workspaceRoot = path.join(process.cwd(), '../..');
const root = `packages/${project}`;
const options = {
outputPath: root + '/example/dist',
tsConfig: root + '/tsconfig.example.json',
main: root + '/example/main.ts',
index: root + '/example/index.html',
styles: [
root + '/node_modules/@angular/material/prebuilt-themes/indigo-pink.css'
],
allowedCommonJsDependencies: [
'lodash',
'hammerjs'
],
watch: false,
buildOptimizer: false,
optimization: false,
outputHashing: 'none',
};
const sourceRoot = root;
const teardownLogics = [];
const context = {
workspaceRoot,
logger: new ngCore.logging.Logger(`${project}:${target}:`),
target: {
project,
configuration,
target
},
getProjectMetadata: (projectName) => Promise.resolve({
root,
sourceRoot
}),
getBuilderNameForTarget: () => '@angular-devkit/build-angular:karma',
getTargetOptions: (target) => ({...options}),
validateOptions: (options) => options,
addTeardown: (teardown) => {
teardownLogics.push(teardown);
}
};
let exitCode = 1;
buildWebpackBrowser(options, context, {}).subscribe({
next: out => {
if (out.success) {
exitCode = 0;
}
},
error: (err) => {
reject(err);
},
complete: () => {
if (!exitCode) return resolve();
reject();
}
});
return exitCode;
});

main()
.then(() => {
process.exit(0);
})
.catch(err => {
process.exit(1);
});
11 changes: 11 additions & 0 deletions packages/angular-material/build-package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const ngPackage = require('ng-packagr');

ngPackage
.ngPackagr()
.forProject('ng-package.json')
.withTsConfig('tsconfig.json')
.build()
.catch(error => {
console.error(error);
process.exit(1);
});
Loading

0 comments on commit a72b1e0

Please sign in to comment.