Skip to content

Commit 82c049d

Browse files
committed
GLSP-1637: Update to Node 22
- Update codebase to Node 22 - Deprecate docker CI image flavors which are no longer in use Part of #1637 - Fix a bug in check:headers script which caused errors in non-tty shell environments - Update and refactor Agents metadata - Cleanup and simplyfy CLAUDE.md and AGENTS.md - Add format hook so that Claude autformats edited files with prettier after a change - Add repo specific skills Part of #1618
1 parent b3f9de7 commit 82c049d

20 files changed

Lines changed: 123 additions & 101 deletions

File tree

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Write|Edit",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "jq -r '.tool_response.filePath // .tool_input.file_path' | { read -r f; npx prettier --write --ignore-unknown \"$f\"; } 2>/dev/null || true"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.claude/skills/fix/SKILL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: fix
3+
description: Auto-fix all lint, formatting, and copyright header issues across the workspace. Use when validation (`/verify`) fails or when explicitly requested.
4+
---
5+
6+
Run the full auto-fix suite for the GLSP dev-packages monorepo from the repository root:
7+
8+
```bash
9+
yarn fix:all
10+
```
11+
12+
This runs `yarn lint:fix && yarn format && yarn headers:fix` in sequence.
13+
14+
After fixing, report what changed. If any issues remain that couldn't be auto-fixed, list them and suggest manual fixes.

.claude/skills/verify/SKILL.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: verify
3+
description: Run full project validation (lint, format, copyright headers) to catch issues before committing. IMPORTANT - Proactively invoke this skill after completing any code changes (new features, bug fixes, refactors) before reporting completion to the user.
4+
---
5+
6+
Run the full validation suite for the GLSP dev-packages monorepo from the repository root:
7+
8+
```bash
9+
yarn check:all
10+
```
11+
12+
This runs `yarn install && yarn lint && yarn format:check && yarn headers:check` in sequence.
13+
14+
15+
On failure:
16+
1. Report which check failed and the specific errors
17+
2. Auto-fix by invoking the `/fix` skill
18+
3. Re-run `yarn check:all` to confirm everything passes

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2020
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2121
with:
22-
node-version: 20.x
22+
node-version: 22.x
2323
- name: Build
2424
run: yarn install
2525
- name: Check for uncommitted changes in yarn.lock
@@ -36,7 +36,7 @@ jobs:
3636
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3737
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3838
with:
39-
node-version: 20.x
39+
node-version: 22.x
4040
- name: Install
4141
run: |
4242
yarn install

.github/workflows/prepare-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
- name: Set up Node.js
8585
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
8686
with:
87-
node-version: 20
87+
node-version: 22
8888

8989
- name: Set up Java 21
9090
if: >-

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
6868
if: steps.check_changes.outputs.should_publish == 'true'
6969
with:
70-
node-version: 20.x
70+
node-version: 22.x
7171
registry-url: 'https://registry.npmjs.org'
7272

7373
- name: Build

AGENTS.md

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,14 @@
1-
# Repository Guidelines
1+
# AGENTS.md
22

3-
## Project Structure & Module Organization
3+
This file provides guidance to AI coding agents when working with code in this repository.
44

5-
This repository is a Yarn workspaces monorepo for shared GLSP development tooling.
5+
## Project Overview
66

7-
- `dev-packages/*`: publishable workspace packages (`cli`, `config`, `config-test`, `eslint-config`, `mocha-config`, `nyc-config`, `prettier-config`, `ts-config`, `dev`).
8-
- `dev-packages/cli/src`: TypeScript sources for the `glsp` CLI (`commands/` and `util/`).
9-
- `.github/workflows`: CI, release, and publishing workflows.
10-
- `docker/` and `releng/`: container and release-engineering assets.
11-
- Root configs: `eslint.config.mjs`, `tsconfig*.json`, `.prettierrc`, `lerna.json`.
7+
Eclipse GLSP shared development tooling monorepo. Contains reusable dev packages (ESLint config, Prettier config, TypeScript config, CLI tools) published to npm under `@eclipse-glsp/*`. This is **not** the GLSP runtime — it provides build/lint/format configurations consumed by other GLSP repositories (glsp-client, glsp-server-node, glsp-theia-integration, etc.).
128

13-
## Build, Test, and Development Commands
9+
## Build & Development
1410

15-
Use Node `>=20` and Yarn classic (`>=1.7.0 <2`).
16-
17-
- `yarn install`: install dependencies and build via `prepare`.
18-
- `yarn build`: run `lerna run build` across workspaces.
19-
- `yarn watch`: watch CLI bundle changes.
20-
- `yarn lint` / `yarn lint:fix`: run ESLint (or auto-fix).
21-
- `yarn format` / `yarn format:check`: apply/check Prettier formatting.
22-
- `yarn check:headers`: verify copyright headers against git history.
23-
- `yarn check:pr`: CI-style local gate (`install`, lint, format check, headers).
24-
25-
## Coding Style & Naming Conventions
26-
27-
- Language: TypeScript for source code.
28-
- Formatting: Prettier (`.prettierrc`) with 4-space indentation, single quotes, no trailing commas, LF line endings.
29-
- JSON/YAML formatting uses 2-space indentation.
30-
- Linting: ESLint flat config (`eslint.config.mjs`) with GLSP shared rules.
31-
- Naming: keep command implementations in `dev-packages/cli/src/commands/*.ts`; shared helpers in `dev-packages/cli/src/util/*.ts`.
32-
33-
## Testing Guidelines
34-
35-
There is currently no root `test` script in this repository. Validate contributions with:
36-
37-
- `yarn build`
38-
- `yarn lint`
39-
- `yarn format:check`
40-
- `yarn check:headers`
41-
42-
For new testable packages, use GLSP shared test config (`@eclipse-glsp/config-test`) and Mocha/nyc conventions (`*.spec.ts`, coverage via `test:coverage`).
43-
44-
## Commit & Pull Request Guidelines
45-
46-
- Open an issue in `https://github.com/eclipse-glsp/glsp` before coding.
47-
- Branch naming: `issues/<issue_number>` (example: `issues/123`).
48-
- Commit messages: imperative subject; issue references are expected (examples in history include `GLSP-1594: ... (#1596)`).
49-
- Include closing reference with absolute URL, e.g. `closes https://github.com/eclipse-glsp/glsp/issues/241`.
50-
- PRs should include scope, linked issue, and pass CI; ensure `yarn.lock` has no unintended diff.
51-
- Ensure Eclipse Contributor Agreement (ECA) requirements are satisfied.
11+
- **Package manager**: Yarn 1.x (classic) — do not use Yarn 2+/Berry or npm
12+
- **Build**: Run `yarn` from the repository root to build the entire project
13+
- **CLI**: Run `yarn glsp` to start the CLI
14+
- Refer to the scripts in the root `package.json` for available build, lint, and format commands

CLAUDE.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
@AGENTS.md
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
Eclipse GLSP shared development tooling monorepo. Contains reusable dev packages (ESLint config, Prettier config, TypeScript config, CLI tools) published to npm under `@eclipse-glsp/*`. This is **not** the GLSP runtime — it provides build/lint/format configurations consumed by other GLSP repositories (glsp-client, glsp-server-node, glsp-theia-integration, etc.).
8+
9+
## Build & Development
10+
11+
- **Package manager**: Yarn 1.x (classic) — do not use Yarn 2+/Berry or npm
12+
- **Build**: Run `yarn` from the repository root to build the entire project
13+
- **CLI**: Run `yarn glsp` to start the CLI
14+
- Refer to the scripts in the root `package.json` for available build, lint, and format commands
15+
16+
## Validation
17+
18+
- After completing any code changes, always run the `/verify` skill before reporting completion
19+
- If verification fails, run the `/fix` skill to auto-fix issues, then re-run `/verify`

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ All changes on the master branch are deployed automatically to the corresponding
116116

117117
### Client packages
118118

119-
We recommend node in version 20 or higher:
119+
We recommend node in version 22 or higher:
120120

121121
```bash
122122
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
123-
nvm install 18
123+
nvm install 22
124124
```
125125

126126
and Yarn

dev-packages/cli/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@
4141
"devDependencies": {
4242
"@eclipse-glsp/config": "2.7.0-next",
4343
"@types/glob": "^8.1.0",
44-
"@types/readline-sync": "^1.4.8",
4544
"@types/semver": "^7.7.1",
4645
"commander": "^14.0.0",
4746
"esbuild": "~0.25.9",
4847
"glob": "^10.4.5",
4948
"globby": "^14.1.0",
50-
"readline-sync": "^1.4.10",
5149
"semver": "^7.7.2"
5250
},
5351
"publishConfig": {

0 commit comments

Comments
 (0)