Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .claude/skills/fix/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: fix
description: Run the fix-and-verify suite for the client workspace (build, auto-fix lint/format/headers). IMPORTANT - Proactively invoke this skill after completing any code changes to the client (new features, bug fixes, refactors) before reporting completion. Re-run it after manually addressing anything it could not auto-fix.
---

Run the auto-fix and validation suite for the GLSP Eclipse Integration client monorepo. All commands run from the `client/` directory (the pnpm workspace root):

```bash
cd client
```

1. Build first (compiles all TypeScript packages and bundles the workflow webapp). This is a hard gate: if the build fails, stop immediately, report the build errors, and do not run any of the following steps.
The build must pass before anything else runs.

```bash
pnpm build
```

2. Auto-fix lint, formatting, and copyright headers. Run all three even if an earlier one reports remaining problems (they are independent):

```bash
pnpm lint:fix
pnpm format
pnpm headers:fix
```

Then:

- If `pnpm build` failed, fix the compile errors and re-run this skill.
- If `pnpm lint:fix` reported lint errors it could not fix, fix them manually and re-run this skill.
- Otherwise if everything is clean (compile succeeds, formatting and headers are corrected in place, lint has no remaining errors) — report completion.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: client/package.json
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.x
cache: pnpm
cache-dependency-path: client/pnpm-lock.yaml
- name: Build
working-directory: ./client
run: yarn install
- name: Check for uncommitted changes in yarn.lock
run: |
if git diff --name-only | grep -q "^client/yarn.lock"; then
echo "::error::The yarn.lock file has uncommitted changes!"
exit 1
fi
run: pnpm build
lint:
name: Lint
timeout-minutes: 60
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: client/package.json
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.x
- name: Install
working-directory: ./client
run: |
yarn install
cache: pnpm
cache-dependency-path: client/pnpm-lock.yaml
- name: Create eslint json report
working-directory: ./client
run: |
yarn lint:ci
pnpm lint:ci
- name: Create summary
if: always()
working-directory: ./client
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,16 @@ jobs:
run: mvn -B clean verify --file pom.xml
working-directory: server

- name: Build Client with yarn
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: client/package.json
- name: Build Client with pnpm
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22'
- run: yarn install
cache: pnpm
cache-dependency-path: client/pnpm-lock.yaml
- run: pnpm build

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: ${{ inputs.ref || github.event.inputs.ref || github.event.workflow_run.head_commit.id || github.sha }}
# Fetch all history for lerna to determine versions
# Fetch all history to determine the canary version (commits since last tag)
fetch-depth: 0

- name: Check for changes in "client/packages" directory
Expand All @@ -64,26 +64,33 @@ jobs:
echo "should_publish=true" >> $GITHUB_OUTPUT
fi

- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
if: steps.check_changes.outputs.should_publish == 'true'
with:
package_json_file: client/package.json

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
if: steps.check_changes.outputs.should_publish == 'true'
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm
cache-dependency-path: client/pnpm-lock.yaml

- name: Build
working-directory: ./client
if: steps.check_changes.outputs.should_publish == 'true'
run: yarn
run: pnpm compile

- name: Publish to NPM
if: steps.check_changes.outputs.should_publish == 'true'
working-directory: ./client
run: |
DIST_TAG="${{ inputs.dist-tag || github.event.inputs.dist-tag || 'next' }}"
if [[ "$DIST_TAG" == "next" ]]; then
yarn publish:next
pnpm publish:next
elif [[ "$DIST_TAG" == "latest" ]]; then
yarn publish:latest
pnpm publish:latest
else
echo "Unknown dist-tag: $DIST_TAG"
exit 1
Expand Down
21 changes: 10 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Project Structure & Module Organization
This repository is split into two main parts:
- `client/`: TypeScript/Yarn workspace for the GLSP IDE integration package and workflow webapp example.
- `client/`: TypeScript/pnpm workspace for the GLSP IDE integration package and workflow webapp example.
- `client/packages/ide/src/`: reusable integration source.
- `client/examples/workflow-webapp/src/`: example app source, bundled to `client/examples/workflow-webapp/app/`.
- `server/`: Java 17 + Maven/Tycho Eclipse plugin build.
Expand All @@ -11,26 +11,25 @@ This repository is split into two main parts:
- `server/releng/`: target platform, feature, and p2 repository modules.

## Build, Test, and Development Commands
- `cd client && yarn install`: install workspace dependencies (Node `>=22`, Yarn 1.x).
- `cd client && yarn build`: compile TS packages and bundle the workflow webapp.
- `cd client && yarn lint`: run ESLint on all TS/TSX sources.
- `cd client && yarn format:check`: verify Prettier formatting.
- `cd client && yarn check:pr`: CI-like client gate (`build`, `lint`, `format:check`, headers).
- `cd client/examples/workflow-webapp && yarn test`: run Mocha specs (`*.spec.ts|tsx`) for the example app.
The client is a pnpm workspace — do not use yarn or npm. A recent pnpm switches to the version pinned in `client/package.json`'s `packageManager` field.
- `cd client && pnpm install`: install workspace dependencies (Node `>=22`, pnpm 11+).
- `cd client && pnpm build`: compile TS packages and bundle the workflow webapp.
- `cd client && pnpm lint`: run ESLint on all TS/TSX sources.
- `cd client && pnpm format:check`: verify Prettier formatting.
- `cd client && pnpm check:all`: CI-like client gate (`install`, `lint`, `format:check`, headers).
- `cd client && pnpm copy:client`: copy the bundled webapp into the server's diagram folder.
- `cd server && mvn clean install`: build Eclipse bundles.
- `cd server && mvn clean install -Pp2`: build including p2 artifacts.
- `cd server && mvn checkstyle:check -B`: run Java style checks.

## Coding Style & Naming Conventions
- TypeScript: 4-space indentation, single quotes, trailing commas disabled, max line length 140 (see `.prettierrc`).
- Linting: ESLint with `@eclipse-glsp` config (`client/.eslintrc.js`).
- Linting: ESLint with `@eclipse-glsp` config (`client/eslint.config.mjs`).
- Java: follow Checkstyle rules configured via Maven (`maven-checkstyle-plugin`).
- Naming: keep existing conventions (`*.spec.ts` for tests, PascalCase Java classes, kebab-case TS file names where already used).

## Testing Guidelines
Prefer targeted tests for changed behavior:
- Client example tests live beside sources and should match `*.spec.ts`/`*.spec.tsx`.
- Run `yarn check:pr` for client-side validation before opening a PR.
- Validate client changes by running `pnpm check:all` (from `client/`) before opening a PR.
- For server changes, run `mvn clean verify` (or at least `mvn clean install`) and `mvn checkstyle:check`.

## Commit & Pull Request Guidelines
Expand Down
23 changes: 10 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pod
spec:
containers:
- name: ci
image: eclipseglsp/ci:alpine-v8.0
image: eclipseglsp/ci:alpine-v9.0
resources:
limits:
memory: "2Gi"
Expand All @@ -22,8 +22,8 @@ spec:
- mountPath: "/home/jenkins"
name: "jenkins-home"
readOnly: false
- mountPath: "/.yarn"
name: "yarn-global"
- mountPath: "/.pnpm-store"
name: "pnpm-store"
readOnly: false
- name: settings-xml
mountPath: /home/jenkins/.m2/settings.xml
Expand Down Expand Up @@ -61,7 +61,7 @@ spec:
volumes:
- name: "jenkins-home"
emptyDir: {}
- name: "yarn-global"
- name: "pnpm-store"
emptyDir: {}
- name: settings-xml
secret:
Expand Down Expand Up @@ -102,7 +102,9 @@ pipeline {
}

environment {
YARN_CACHE_FOLDER = "${env.WORKSPACE}/yarn-cache"
npm_config_store_dir = "${env.WORKSPACE}/.pnpm-store"
// CI=true makes pnpm's implicit pre-run install a frozen-lockfile install.
CI = "true"
SPAWN_WRAP_SHIM_ROOT = "${env.WORKSPACE}"
EMAIL_TO= "glsp-build@eclipse.org"
}
Expand Down Expand Up @@ -139,14 +141,9 @@ pipeline {
container('ci') {
timeout(30){
dir('client') {
sh "yarn install"
script {
// Fail the step if there are uncommited changes to the yarn.lock file
if (sh(returnStatus: true, script: 'git diff --name-only | grep -q "^client/yarn.lock"') == 0) {
echo 'The yarn.lock file has uncommited changes!'
error 'The yarn.lock file has uncommited changes!'
}
}
sh "pnpm build"
// Copy the webapp bundle into the server's diagram folder for the server build.
sh "pnpm copy:client"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ https://user-images.githubusercontent.com/588090/161574154-1da641be-86e1-4d4b-8c

### How to start the Workflow Diagram example?

First, you need to build both the client and the server (see instructions on [building the client](client/README.md#building) and [building the server](server/README.md#building)).
First, you need to build both the client and the server (see instructions on [building the client](client/README.md#developer-documentation) and [building the server](server/README.md#building)).
Then, import the following Eclipse plug-in projects into your Eclipse IDE workspace:

- `server/plugins/org.eclipse.glsp.ide.editor`
Expand Down
2 changes: 1 addition & 1 deletion client/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dist/

# Lock files
package-lock.json
yarn.lock
pnpm-lock.yaml
examples/workflow-webapp/app
# Logs
*.log
4 changes: 2 additions & 2 deletions client/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"kind": "build",
"isDefault": true
},
"command": "yarn",
"command": "pnpm build",
"presentation": {
"reveal": "always",
"panel": "new"
Expand All @@ -21,7 +21,7 @@
"label": "Watch all packages",
"type": "shell",
"group": "test",
"command": "yarn watch",
"command": "pnpm watch",
"presentation": {
"reveal": "always",
"panel": "new"
Expand Down
17 changes: 15 additions & 2 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
Contains the client side glue code for opening browser-based GLSP diagrams in an Eclipse IDE editor as well as the workflow webapp example.
This project is available from npm via [@eclipse-glsp/ide](https://www.npmjs.com/package/@eclipse-glsp/ide).

## Building
## Developer Documentation

To build this project locally, run `yarn` in this directory.
### First time setup

- Install [node.js](https://nodejs.org/) (requires Node v22+)
- Install pnpm: <https://pnpm.io/installation> (use pnpm 11+); a recent pnpm automatically switches to the version pinned in the `packageManager` field
- Clone this repository
- Install dependencies from this `client` directory: `pnpm i` or `pnpm i --frozen-lockfile`

### Build & Testing

- Build (all packages + workflow webapp bundle): `pnpm build`
- Lint: `pnpm lint`
- Check formatting: `pnpm format:check`
- Clean (all packages): `pnpm clean`
- `pnpm copy:client` copies the bundled webapp into the Eclipse server's diagram folder (`../server/example/org.eclipse.glsp.ide.workflow.editor/diagram`); the Jenkins build runs this automatically before building the server.

## More information

Expand Down
12 changes: 7 additions & 5 deletions client/examples/workflow-webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
"private": true,
"description": "GLSP-based webapp for the Workflow example",
"scripts": {
"bundle": "yarn compile && node ./esbuild.js",
"bundle": "pnpm compile && node ./esbuild.js",
"clean": "rimraf lib tsconfig.tsbuildinfo app/bundle.js app/bundle.js.map app/bundle.css app/bundle.css.map app/*.ttf",
"compile": "tsc -b",
"lint": "eslint ./src",
"test": "mocha --config ../../.mocharc.json \"./src/**/*.spec.?(ts|tsx)\"",
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
"watch": "node ./esbuild.js --watch",
"watch:tsc": "tsc -w"
},
"dependencies": {
"@eclipse-glsp-examples/workflow-glsp": "next",
"@eclipse-glsp/ide": "2.8.0-next"
"@eclipse-glsp/client": "next",
"@eclipse-glsp/ide": "workspace:*",
"@eclipse-glsp/protocol": "next",
"inversify": "^6.1.3",
"vscode-jsonrpc": "8.2.0"
},
"devDependencies": {
"@vscode/codicons": "^0.0.25",
"esbuild": "^0.25.0",
"reflect-metadata": "^0.1.13",
"reflect-metadata": "^0.2.2",
"rimraf": "^3.0.2"
}
}
14 changes: 0 additions & 14 deletions client/lerna.json

This file was deleted.

Loading