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
4 changes: 2 additions & 2 deletions .claude/skills/fix/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Run the fix-and-verify suite for the workspace (compile, auto-fix l

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

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.
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
pnpm build
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,7 @@ jobs:
node-version: 22.x
cache: pnpm
- name: Test
run: pnpm test:ci
- name: Publish Test Report
uses: ctrf-io/github-test-reporter@0f299074936c32ccaab5be5230511f6b2b9080aa # v1.0.28
with:
report-path: 'packages/*/ctrf/*.json'
summary-report: true
file-report: true
if: always()
run: pnpm test
lint:
name: Lint
timeout-minutes: 60
Expand Down Expand Up @@ -83,7 +76,7 @@ jobs:
node-version: 22.x
cache: pnpm
- name: Run Coverage Tests
run: pnpm test:coverage:ci
run: pnpm test:coverage
- name: Upload Coverage Report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.idea/
.nyc_output/
coverage

node_modules/
Expand All @@ -16,10 +15,9 @@ examples/workflow-standalone/app/*
*.jar

!packages/client/src/lib
tsconfig.tsbuildinfo
*.tsbuildinfo
eslint.xml
report.xml
**/ctrf
examples/workflow-standalone/server

.claude/local.settings.json
Expand Down
11 changes: 0 additions & 11 deletions .mocharc

This file was deleted.

3 changes: 0 additions & 3 deletions .nycrc

This file was deleted.

44 changes: 16 additions & 28 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,35 @@
"type": "node",
"request": "launch",
"name": "Run current test",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["--config", "${workspaceRoot}/.mocharc", "--timeout", "0", "${file}"],
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs",
"args": ["run", "${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
}
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Run tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"${workspaceRoot}/.mocharc",
"--timeout",
"0",
"${workspaceFolder}/packages/client/src/**/*.spec.ts"
],
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
},
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs",
"args": ["run", "packages/client/src"],
"smartStep": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Run tests (protocol)",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"${workspaceRoot}/.mocharc",
"--timeout",
"0",
"${workspaceFolder}/packages/protocol/src/**/*.spec.ts"
],
"env": {
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
},
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs",
"args": ["run", "packages/protocol/src"],
"smartStep": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Eclipse GLSP Client monorepo. Provides the sprotty-based client framework for th

## Validation

- **Tests**: `pnpm test` (Mocha), single test: `pnpm test --grep 'test name'`
- **Tests**: `pnpm test` (Vitest), single test: `pnpm test -t 'test name'`

## Inter-Package Import Rules

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Eclipse GLSP Client monorepo. Provides the sprotty-based client framework for th

## Validation

- **Tests**: `pnpm test` (Mocha), single test: `pnpm test --grep 'test name'`
- **Tests**: `pnpm test` (Vitest), single test: `pnpm test -t 'test name'`
- After completing any code changes, always run the `/fix` skill before reporting completion. It auto-fixes lint/format/header issues and runs the tests; manually resolve anything it could not auto-fix (remaining lint errors, test failures) and re-run it.

## Commenting Style
Expand Down
16 changes: 8 additions & 8 deletions examples/workflow-standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
"build": "pnpm compile && pnpm bundle",
"build:browser": "pnpm compile && pnpm bundle:browser",
"bundle": "node ./esbuild.js",
"bundle:browser": "ts-node ./scripts/download-server.ts --browser && node ./esbuild.js --browser",
"bundle:browser": "node ./scripts/download-server.mts --browser && node ./esbuild.js --browser",
"clean": "rimraf lib *.tsbuildinfo app/bundle.js app/bundle.js.map app/bundle.css app/bundle.css.map app/wf-glsp-server-webworker.js app/wf-glsp-server-webworker.js.map app/*.ttf",
"compile": "tsc -b",
"dev": "ts-node ./scripts/start.ts --dev",
"dev:browser": "ts-node ./scripts/start.ts --dev --browser",
"dev:mcp": "ts-node ./scripts/start.ts --dev --mcp",
"dev": "node ./scripts/start.mts --dev",
"dev:browser": "node ./scripts/start.mts --dev --browser",
"dev:mcp": "node ./scripts/start.mts --dev --mcp",
"lint": "eslint ./src",
"start": "ts-node ./scripts/start.ts",
"start:browser": "ts-node ./scripts/start.ts --browser",
"start:mcp": "ts-node ./scripts/start.ts --mcp",
"start:server": "ts-node ./scripts/start-node-server.ts"
"start": "node ./scripts/start.mts",
"start:browser": "node ./scripts/start.mts --browser",
"start:mcp": "node ./scripts/start.mts --mcp",
"start:server": "node ./scripts/start-node-server.mts"
},
"dependencies": {
"@eclipse-glsp-examples/workflow-glsp": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ import { execSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
import { extract } from 'tar';
import * as packageJson from '../../../package.json';
import { fileURLToPath } from 'url';
import packageJson from '../../../package.json' with { type: 'json' };

export const SERVER_DIR_PATH = path.resolve(__dirname, '..', 'server');
export const SERVER_DIR_PATH = path.resolve(import.meta.dirname, '..', 'server');

const BUNDLES = {
node: { npmPackage: '@eclipse-glsp-examples/workflow-server-bundled', stableName: 'wf-glsp-server-node.js' },
Expand Down Expand Up @@ -81,7 +82,7 @@ export function resolveVersion(): string {
}

// Direct invocation (e.g. prebundle:browser script) — skip when imported as a module by start.ts
if (require.main === module) {
if (process.argv[1] === fileURLToPath(import.meta.url)) {
const bundle = process.argv.includes('--browser') ? BUNDLES.browser : BUNDLES.node;
downloadServerBundle({ ...bundle, version: resolveVersion() });
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
********************************************************************************/
import { execSync } from 'child_process';
import * as path from 'path';
import { downloadServerBundle, resolveVersion, SERVER_DIR_PATH } from './download-server';
import { downloadServerBundle, resolveVersion, SERVER_DIR_PATH } from './download-server.mts';

const NODE_SERVER_STABLE = 'wf-glsp-server-node.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import concurrently from 'concurrently';
import * as fs from 'fs';
import * as path from 'path';
import { downloadServerBundle, resolveVersion, SERVER_DIR_PATH } from './download-server';
import { downloadServerBundle, resolveVersion, SERVER_DIR_PATH } from './download-server.mts';

const isBrowser = process.argv.includes('--browser');
const isDev = process.argv.includes('--dev');
Expand Down
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"bundle": "pnpm standalone bundle",
"bundle:browser": "pnpm standalone bundle:browser",
"check:all": "pnpm build && pnpm lint && pnpm format:check && pnpm headers:check && pnpm test",
"clean": "pnpm -r run clean && rimraf coverage .nyc_output",
"clean": "pnpm -r run clean && rimraf coverage *.tsbuildinfo",
"compile": "tsc -b",
"compile:test": "pnpm compile && tsc -b tsconfig.test.json",
"dev": "pnpm standalone dev",
"dev:browser": "pnpm standalone dev:browser",
"dev:mcp": "pnpm standalone dev:mcp",
Expand All @@ -29,23 +30,20 @@
"start:browser": "pnpm standalone start:browser",
"start:exampleServer": "pnpm standalone start:server",
"start:mcp": "pnpm standalone start:mcp",
"test": "pnpm compile && pnpm -r --no-bail test",
"test:ci": "pnpm compile && pnpm -r --no-bail test:ci",
"test:coverage": "pnpm compile && pnpm -r test:coverage",
"test:coverage:ci": "glsp coverageReport",
"test": "pnpm compile:test && vitest run",
"test:coverage": "pnpm compile:test && vitest run --coverage",
"upgrade:next": "glsp updateNext"
},
"devDependencies": {
"@eclipse-glsp/dev": "next",
"@types/node": "22.x",
"concurrently": "^9.2.1",
"mocha-ctrf-json-reporter": "^0.0.9",
"tsconfig-paths": "^4.2.0",
"reflect-metadata": "^0.2.2",
"typescript": "^5.9.2"
},
"packageManager": "pnpm@11.7.0",
"engines": {
"node": ">=22",
"node": ">=22.18",
"pnpm": ">=11"
}
}
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
"files": [
"lib",
"src",
"css"
"css",
"!**/*.spec.ts",
"!**/*.spec.tsx",
"!**/test/**"
],
"scripts": {
"build": "tsc -b",
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
"clean": "rimraf lib *.tsbuildinfo coverage",
"generate:index": "glsp generateIndex src -f -s",
"lint": "eslint ./src",
"prepublishOnly": "pnpm build",
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
"test:ci": "pnpm test --reporter mocha-ctrf-json-reporter",
"test:coverage": "nyc pnpm test",
"watch": "tsc -w"
},
"dependencies": {
Expand Down
Loading
Loading