Skip to content

Commit

Permalink
GLSP-1320: Update to latest glsp dev config (#334)
Browse files Browse the repository at this point in the history
- Updates to latest version of @eclipse-glsp/dev
- Add generate:index utility script
- Regenerate index files
- Fix codeActionsOnSave in vscode settings
- Refactor upgrade:next script
- Reformat code base with prettier
- Fix copyright headers (by running a full check with glsp checkHeaders . -t full)

Part of eclipse-glsp/glsp#1320
  • Loading branch information
tortmayr committed Apr 24, 2024
1 parent 38f8bb5 commit fc12df2
Show file tree
Hide file tree
Showing 45 changed files with 1,208 additions and 1,185 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ to learn how to report vulnerabilities.

<!-- Please check, when if it applies to your change. -->

- [ ] This PR should be mentioned in the changelog
- [ ] This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)
- [ ] This PR should be mentioned in the changelog
- [ ] This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"@eclipse-glsp/prettier-config"
"@eclipse-glsp/prettier-config"
1 change: 1 addition & 0 deletions examples/workflow-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"bundle": "webpack",
"bundle:browser": "webpack --env target=webworker ",
"clean": "rimraf lib *.tsbuildinfo",
"generate:index": "glsp generateIndex src/browser src/common src/node -s -f",
"lint": "eslint --ext .ts,.tsx ./src",
"watch": "tsc -w",
"watch:bundle": "webpack -w"
Expand Down
4 changes: 4 additions & 0 deletions examples/workflow-server/src/browser/.indexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The app.ts is the entrypoint when the workflow server is used bundled in an external node process
# It launches the server when imported so it has to be excluded from the default export to avoid unintended
# autostarts when the server package is directly integrated into a node backed (e.g. Theia)
app.ts
66 changes: 15 additions & 51 deletions examples/workflow-server/src/browser/example1.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"name": "Push",
"taskType": "manual",
"id": "task0",
"cssClasses": [
"task",
"manual"
],
"cssClasses": ["task", "manual"],
"children": [
{
"id": "task0_icon",
Expand Down Expand Up @@ -66,10 +63,7 @@
"name": "ChkWt",
"taskType": "automated",
"id": "task0_automated",
"cssClasses": [
"task",
"automated"
],
"cssClasses": ["task", "automated"],
"children": [
{
"id": "task0_automated_icon",
Expand Down Expand Up @@ -194,9 +188,7 @@
{
"nodeType": "forkNode",
"id": "bb2709f5-0ff0-4438-8853-b7e934b506d7",
"cssClasses": [
"forkOrJoin"
],
"cssClasses": ["forkOrJoin"],
"type": "activityNode:fork",
"position": {
"x": 170.0,
Expand All @@ -216,9 +208,7 @@
{
"nodeType": "joinNode",
"id": "bd94e44e-19f9-446e-89d4-97ca1a63c17b",
"cssClasses": [
"forkOrJoin"
],
"cssClasses": ["forkOrJoin"],
"type": "activityNode:join",
"position": {
"x": 560.0,
Expand All @@ -245,10 +235,7 @@
"name": "WtOK",
"taskType": "automated",
"id": "e47d5eba-612d-4c43-9aba-2c5502ff4f04",
"cssClasses": [
"task",
"automated"
],
"cssClasses": ["task", "automated"],
"children": [
{
"id": "e47d5eba-612d-4c43-9aba-2c5502ff4f04_icon",
Expand Down Expand Up @@ -304,9 +291,7 @@
},
{
"id": "2317f24a-034e-4352-8857-d361dc8f5ed7",
"cssClasses": [
"medium"
],
"cssClasses": ["medium"],
"type": "edge:weighted",
"sourceId": "b00fc494-0fa4-4448-8bf9-162c2c0865e4",
"targetId": "e47d5eba-612d-4c43-9aba-2c5502ff4f04"
Expand All @@ -333,10 +318,7 @@
"name": "RflWt",
"taskType": "manual",
"id": "a63cfd87-da7c-4846-912b-29040b776bfb",
"cssClasses": [
"task",
"manual"
],
"cssClasses": ["task", "manual"],
"children": [
{
"id": "54f08126-6041-44ce-9d8b-e7a549e48f91",
Expand Down Expand Up @@ -392,9 +374,7 @@
},
{
"id": "9bb443d7-44f3-4192-8dd8-1a2782593373",
"cssClasses": [
"medium"
],
"cssClasses": ["medium"],
"type": "edge:weighted",
"sourceId": "b00fc494-0fa4-4448-8bf9-162c2c0865e4",
"targetId": "a63cfd87-da7c-4846-912b-29040b776bfb"
Expand All @@ -421,10 +401,7 @@
"name": "Brew",
"taskType": "automated",
"id": "7afd430b-5031-4082-8190-7e755c57cde9",
"cssClasses": [
"task",
"automated"
],
"cssClasses": ["task", "automated"],
"children": [
{
"id": "7afd430b-5031-4082-8190-7e755c57cde9_icon",
Expand Down Expand Up @@ -491,10 +468,7 @@
"name": "ChkTp",
"taskType": "automated",
"id": "6c26f0a4-4354-45fa-9d9f-bc2b48adee17",
"cssClasses": [
"task",
"automated"
],
"cssClasses": ["task", "automated"],
"children": [
{
"id": "6c26f0a4-4354-45fa-9d9f-bc2b48adee17_icon",
Expand Down Expand Up @@ -570,10 +544,7 @@
"name": "KeepTp",
"taskType": "automated",
"id": "4b06ed95-c9be-47df-9941-98099259be4a",
"cssClasses": [
"task",
"automated"
],
"cssClasses": ["task", "automated"],
"children": [
{
"id": "4b06ed95-c9be-47df-9941-98099259be4a_icon",
Expand Down Expand Up @@ -631,10 +602,7 @@
"name": "PreHeat",
"taskType": "automated",
"id": "80d1792f-9c7e-41c0-8eca-eeb0509397b6",
"cssClasses": [
"task",
"automated"
],
"cssClasses": ["task", "automated"],
"children": [
{
"id": "80d1792f-9c7e-41c0-8eca-eeb0509397b6_icon",
Expand Down Expand Up @@ -690,18 +658,14 @@
},
{
"id": "d04afaf8-0894-4284-b844-22b255893107",
"cssClasses": [
"medium"
],
"cssClasses": ["medium"],
"type": "edge:weighted",
"sourceId": "activityNode2",
"targetId": "4b06ed95-c9be-47df-9941-98099259be4a"
},
{
"id": "b9ef468f-2aaf-41b9-b408-29e2d08e490e",
"cssClasses": [
"medium"
],
"cssClasses": ["medium"],
"type": "edge:weighted",
"sourceId": "activityNode2",
"targetId": "80d1792f-9c7e-41c0-8eca-eeb0509397b6"
Expand All @@ -727,4 +691,4 @@
],
"type": "graph",
"revision": 10
}
}
4 changes: 2 additions & 2 deletions examples/workflow-server/src/browser/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022-2023 EclipseSource and others.
* Copyright (c) 2022-2024 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -13,5 +13,5 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export * from '../common/index';
export * from './mock-model-storage';
export * from './reexport';
16 changes: 16 additions & 0 deletions examples/workflow-server/src/browser/reexport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/********************************************************************************
* Copyright (c) 2024 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export * from '../common';
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ export abstract class CreateActivityNodeHandler extends CreateWorkflowNodeOperat
}

protected builder(point: Point = Point.ORIGIN, elementTypeId = this.elementTypeIds[0]): ActivityNodeBuilder {
return ActivityNode.builder()
.position(point)
.type(elementTypeId)
.nodeType(ModelTypes.toNodeType(elementTypeId));
return ActivityNode.builder().position(point).type(elementTypeId).nodeType(ModelTypes.toNodeType(elementTypeId));
}

override createTriggerGhostElement(elementTypeId: string): GhostElement | undefined {
Expand Down
4 changes: 2 additions & 2 deletions examples/workflow-server/src/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2023 STMicroelectronics and others.
* Copyright (c) 2023-2024 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -29,7 +29,6 @@ export * from './handler/create-task-handler';
export * from './handler/create-weighted-edge-handler';
export * from './handler/create-workflow-node-operation-handler';
export * from './handler/grid-snapper';
export * from './index';
export * from './labeledit/workflow-label-edit-validator';
export * from './layout/workflow-layout-configurator';
export * from './marker/workflow-model-validator';
Expand All @@ -46,5 +45,6 @@ export * from './taskedit/task-edit-validator';
export * from './util/model-types';
export * from './workflow-diagram-configuration';
export * from './workflow-diagram-module';
export * from './workflow-edge-creation-checker';
export * from './workflow-glsp-server';
export * from './workflow-popup-factory';
4 changes: 4 additions & 0 deletions examples/workflow-server/src/node/.indexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The app.ts is the entrypoint when the workflow server is used bundled in an external node process
# It launches the server when imported so it has to be excluded from the default export to avoid unintended
# autostarts when the server package is directly integrated into a node backed (e.g. Theia)
app.ts
4 changes: 2 additions & 2 deletions examples/workflow-server/src/node/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022-2023 EclipseSource and others.
* Copyright (c) 2022-2024 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -13,5 +13,5 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export * from '../common/index';
export * from './reexport';
export * from './workflow-cli-parser';
16 changes: 16 additions & 0 deletions examples/workflow-server/src/node/reexport.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/********************************************************************************
* Copyright (c) 2024 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export * from '../common';
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
"check:pr": "yarn all && yarn check:headers",
"clean": "lerna run clean && rimraf coverage .nyc_output",
"compile": "tsc -b",
"generate:index": "lerna run generate:index && yarn lint:fix",
"lint": "eslint --ext .ts,.tsx .",
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
"lint:fix": "yarn lint --fix",
"prepare": " yarn compile && yarn bundle",
"publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-verify-access --no-push",
"publish:next": "lerna publish preminor --exact --canary --preid next --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes",
Expand Down
1 change: 1 addition & 0 deletions packages/graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"scripts": {
"build": "tsc -b",
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
"generate:index": "glsp generateIndex src -f -s",
"lint": "eslint --ext .ts,.tsx ./src",
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/src/default-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022 STMicroelectronics and others.
* Copyright (c) 2022-2023 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/src/galignable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022-2023 STMicroelectronics and others.
* Copyright (c) 2022-2024 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/src/gbounds-aware.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022-2023 STMicroelectronics and others.
* Copyright (c) 2022-2024 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/src/ghtml-root.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022 StMicroelectronics.
* Copyright (c) 2022-2023 StMicroelectronics.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/src/gmodel-element.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022 STMicroelectronics and others.
* Copyright (c) 2022-2023 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022 STMicroelectronics and others.
* Copyright (c) 2022-2023 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
1 change: 1 addition & 0 deletions packages/layout-elk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"scripts": {
"build": "tsc -b",
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
"generate:index": "glsp generateIndex src -f -s",
"lint": "eslint --ext .ts,.tsx ./src",
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
Expand Down
2 changes: 1 addition & 1 deletion packages/layout-elk/src/di.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022-2023 STMicroelectronics and others.
* Copyright (c) 2022-2024 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down
4 changes: 2 additions & 2 deletions packages/layout-elk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022-2023 STMicroelectronics and others.
* Copyright (c) 2022-2024 STMicroelectronics and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -13,8 +13,8 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
export { LayoutOptions } from 'elkjs';
export * from './di.config';
export * from './element-filter';
export * from './glsp-elk-layout-engine';
export * from './layout-configurator';
export * from './reexport';
Loading

0 comments on commit fc12df2

Please sign in to comment.