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
26 changes: 17 additions & 9 deletions .claude/skills/fix/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
---
name: fix
description: Auto-fix lint, formatting, and copyright-header issues across the workspace, then run the tests to validate. IMPORTANT - Proactively invoke this skill after completing any code changes (new features, bug fixes, refactors) before reporting completion. Re-run it after manually addressing anything it could not auto-fix.
description: Run the fix-and-verify suite for the workspace (build, auto-fix lint/format/headers, test). IMPORTANT - Proactively invoke this skill after completing any code changes (new features, bug fixes, refactors) before reporting completion.
---

Run the auto-fix and validation suite for the GLSP dev-packages monorepo from the repository root.

1. Auto-fix lint, formatting, and copyright headers. Run all three even if an earlier one reports remaining problems (they are independent):
1. Build first. 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
yarn lint:fix
yarn format
yarn headers:fix -t changes
pnpm build
```

2. Run the test suite to validate behavior (tests are not auto-fixable) — **only if the change touched the CLI package** (`dev-packages/cli`), the only package with tests. Skip this step otherwise:
2. Auto-fix lint, formatting, and copyright headers. Run all three even if an earlier one reports remaining problems (they are independent):

```bash
yarn test
pnpm lint:fix
pnpm format
pnpm headers:fix -t changes
```

3. Run the test suite to validate behavior (tests are not auto-fixable) — **only if the change touched the CLI package** (`dev-packages/cli`), the only package with tests. Skip this step otherwise:

```bash
pnpm test
```

Then:

- If `yarn lint:fix` reported lint errors it could not fix, or `yarn test` failed, fix them manually and re-run this skill.
- Otherwise everything is clean (formatting and headers are corrected in place, lint has no remaining errors, tests pass) — report completion.
- If `pnpm build` failed, fix the build errors and re-run this skill.
- If `pnpm lint:fix` reported lint errors it could not fix, or `pnpm test` failed, fix them manually and re-run this skill.
- Otherwise if everything is clean (build succeeds, formatting and headers are corrected in place, lint has no remaining errors, tests pass) — report completion.
15 changes: 8 additions & 7 deletions .claude/skills/releng-next/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All inputs are taken from the user's prompt. Use the defaults below for anything

## Conventions

- Always use the **local** CLI built from this tooling repo: `yarn glsp …` (never `npx @eclipse-glsp/cli`). The maintainer wants the behavior of the code as it currently stands.
- Always use the **local** CLI built from this tooling repo: `pnpm glsp …` (never `npx @eclipse-glsp/cli`). The maintainer wants the behavior of the code as it currently stands.
- `releng prepare next` and `releng version` accept `-r/--repoDir <dir>` and `cd` into it internally, so stay in the tooling repo and point `-r` at each temp clone — do not run from inside each repo.
- **Continue-on-error.** Never abort the whole run because one repo failed. Collect outcomes and report them at the end in the four buckets.
- The 8 GLSP repos are: `glsp`, `glsp-client`, `glsp-server-node`, `glsp-theia-integration`, `glsp-vscode-integration`, `glsp-eclipse-integration`, `glsp-server`, `glsp-playwright`.
Expand All @@ -49,9 +49,10 @@ Run from the tooling repo root (`glsp/glsp`).

2. Build the local CLI so `dist/cli.js` is current:
```bash
yarn
pnpm install
pnpm build
```
Confirm `yarn glsp --help` works before continuing.
Confirm `pnpm glsp --help` works before continuing.

---

Expand All @@ -68,10 +69,10 @@ Run from the tooling repo root (`glsp/glsp`).
4. Clone the target repos fresh into `WORKDIR`, from the real upstream (no fork, so `origin = eclipse-glsp` and pushes/PRs target upstream):
```bash
# full run (default): all 8 repos
yarn glsp repo clone --preset all -d "$WORKDIR"
pnpm glsp repo clone --preset all -d "$WORKDIR"

# partial run: only the repos the user named (repo clone takes positional names)
yarn glsp repo clone <repo> [<repo> …] -d "$WORKDIR"
pnpm glsp repo clone <repo> [<repo> …] -d "$WORKDIR"
```
Each repo lands at `$WORKDIR/<repo>` on its default branch. If any clone fails, record it as a failure for that repo but continue.

Expand Down Expand Up @@ -100,7 +101,7 @@ If the version ends with `-next` or `.SNAPSHOT`, the repo is **already on next**
Build the command from the resolved inputs:

```bash
yarn glsp releng prepare next -r "$WORKDIR/<repo>" [--no-push] [--draft]
pnpm glsp releng prepare next -r "$WORKDIR/<repo>" [--no-push] [--draft]
```

Add `--no-push` if no-push was requested, and `--draft` if draft was requested (draft is ignored by `prepare` when `--no-push` is also set).
Expand Down Expand Up @@ -184,7 +185,7 @@ Steps (share the same overall timeout as Phase 4):
The nightly deploy is not instant — it may take many minutes after merge. If the overall timeout elapses first, leave eclipse-integration **deferred** and report it.
2. **Retry prepare next** for eclipse-integration (same flags as the original run, push enabled):
```bash
yarn glsp releng prepare next -r "$WORKDIR/glsp-eclipse-integration"
pnpm glsp releng prepare next -r "$WORKDIR/glsp-eclipse-integration"
```
- Throws again with the same P2 error → P2 not actually ready; keep polling (step 1) until timeout.
- Other throw → record **❌ failed**.
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,26 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.x
cache: pnpm
- name: Build
run: yarn install
- name: Check for uncommitted changes in yarn.lock
run: |
if git diff --name-only | grep -q "^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
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.x
- name: Install
run: |
yarn install
cache: pnpm
- name: Create eslint json report
run: |
yarn lint:ci
run: pnpm lint:ci
- name: Create summary
if: always()
run: |
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.x
cache: pnpm
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
Expand All @@ -32,9 +34,9 @@ jobs:
python --version
java -version
mvn --version
- name: Install
run: yarn --skip-integrity-check --network-timeout 100000
- name: Build
run: pnpm build
- name: E2E Tests
run: yarn test:e2e
run: pnpm test:e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 (needed when e2e tests build the Theia repo)
16 changes: 9 additions & 7 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,15 @@ jobs:
path: release-repo
ref: ${{ inputs.branch || github.event.inputs.branch }}

- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: glsp-release-helper/package.json
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: pnpm
cache-dependency-path: glsp-release-helper/pnpm-lock.yaml

- name: Set up Java 21
if: >-
Expand All @@ -101,12 +106,9 @@ jobs:
with:
python-version: '3.11'

- name: Install Yarn
run: npm install -g yarn

- name: Install dependencies in glsp-release-helper
- name: Build glsp-release-helper
working-directory: ./glsp-release-helper
run: yarn install
run: pnpm build

- name: Configure Git
run: |
Expand All @@ -125,7 +127,7 @@ jobs:
fi

if [[ "${{ inputs.release_type || github.event.inputs.release_type }}" == "custom" ]]; then
yarn glsp releng prepare custom "${{ inputs.custom_version || github.event.inputs.custom_version }}" -r ${{ github.workspace }}/release-repo $DRAFT_FLAG
pnpm glsp releng prepare custom "${{ inputs.custom_version || github.event.inputs.custom_version }}" -r ${{ github.workspace }}/release-repo $DRAFT_FLAG
else
yarn glsp releng prepare "${{ inputs.release_type || github.event.inputs.release_type }}" -r ${{ github.workspace }}/release-repo $DRAFT_FLAG
pnpm glsp releng prepare "${{ inputs.release_type || github.event.inputs.release_type }}" -r ${{ github.workspace }}/release-repo $DRAFT_FLAG
fi
11 changes: 7 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
fetch-depth: 0

- name: Check for changes in "dev-packages" directory
Expand All @@ -64,24 +64,27 @@ jobs:
echo "should_publish=true" >> $GITHUB_OUTPUT
fi

- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
if: steps.check_changes.outputs.should_publish == 'true'
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
if: steps.check_changes.outputs.should_publish == 'true'
with:
node-version: 22.x
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Build
if: steps.check_changes.outputs.should_publish == 'true'
run: yarn
run: pnpm build

- name: Publish to NPM
if: steps.check_changes.outputs.should_publish == 'true'
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
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.x
- name: Install
run: |
yarn install
cache: pnpm
- name: Test
run: |
yarn test:ci
run: pnpm test:ci
- name: Publish Test Report
uses: ctrf-io/github-test-reporter@0f299074936c32ccaab5be5230511f6b2b9080aa # v1.0.28
with:
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKFLOW_STATUS.md

# Lock files
package-lock.json
yarn.lock
pnpm-lock.yaml

# Logs
*.log
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"kind": "build",
"isDefault": true
},
"command": "yarn",
"command": "pnpm install && pnpm build",
"presentation": {
"reveal": "always",
"panel": "dedicated"
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Eclipse GLSP shared development tooling monorepo. Contains reusable dev packages

## Build & Development

- **Package manager**: Yarn 1.x (classic) — do not use Yarn 2+/Berry or npm
- **Build**: Run `yarn` from the repository root to build the entire project
- **CLI**: Run `yarn glsp` to start the CLI
- **Package manager**: pnpm — do not use yarn or npm
- **Build**: Run `pnpm install` then `pnpm build` from the repository root to build the entire project
- **CLI**: Run `pnpm glsp` to start the CLI
- Refer to the scripts in the root `package.json` for available build, lint, and format commands
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Eclipse GLSP shared development tooling monorepo. Contains reusable dev packages

## Build & Development

- **Package manager**: Yarn 1.x (classic) — do not use Yarn 2+/Berry or npm
- **Build**: Run `yarn` from the repository root to build the entire project
- **CLI**: Run `yarn glsp` to start the CLI
- **Package manager**: pnpm — do not use yarn or npm
- **Build**: Run `pnpm install` then `pnpm build` from the repository root to build the entire project
- **CLI**: Run `pnpm glsp` to start the CLI
- Refer to the scripts in the root `package.json` for available build, lint, and format commands

## Validation

- **Tests**: `yarn test` runs the CLI unit tests (`dev-packages/cli`, the only package with tests)
- **Tests**: `pnpm test` runs the CLI unit tests (`dev-packages/cli`, the only package with tests)
- After completing any code changes, always run the `/fix` skill before reporting completion. It auto-fixes lint/format/header issues and — when the CLI package changed — runs the tests; manually resolve anything it could not auto-fix (remaining lint errors, test failures) and re-run it.
Loading