Add 34 tests (27 unit, 7 integration) using node:test runner: Unit tests: - pickServer(), findRoot(), pathToUri(), uriToPath() - isLspCommand(), listCommands() - formatHover(), formatDefinition(), formatReferences(), formatDiagnostics() Integration tests: - daemon lifecycle (status/stop) on isolated socket - CLI --no-daemon queries (hover, documentSymbol, diagnostics) Supporting changes: - socketPath() honors PI_LSP_SOCKET_PATH env var for test isolation - test fixtures for valid and broken TypeScript files - npm test / test:unit / test:integration scripts
34 lines
932 B
JSON
34 lines
932 B
JSON
{
|
|
"name": "@evan/pi-lsp",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"description": "LSP tools for pi: hover, definition, references, completions, symbols, diagnostics.",
|
|
"pi": {
|
|
"extensions": [
|
|
"./index.ts"
|
|
]
|
|
},
|
|
"type": "module",
|
|
"bin": {
|
|
"pi-lsp": "./cli.ts"
|
|
},
|
|
"scripts": {
|
|
"lsp": "tsx ./cli.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "oxlint . --ignore-pattern=.direnv/**",
|
|
"test": "NODE_OPTIONS='--import=tsx' node --test test/unit/**/*.ts test/integration/**/*.ts",
|
|
"test:unit": "NODE_OPTIONS='--import=tsx' node --test test/unit/**/*.ts",
|
|
"test:integration": "NODE_OPTIONS='--import=tsx' node --test test/integration/**/*.ts"
|
|
},
|
|
"dependencies": {
|
|
"vscode-jsonrpc": "^8.2.1",
|
|
"vscode-languageserver-protocol": "^3.17.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.0",
|
|
"oxlint": "^1.62.0",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^6.0.3"
|
|
}
|
|
}
|