modernize extension - #23
Draft
jonsmithers wants to merge 9 commits into
Draft
Conversation
jonsmithers
commented
Jul 20, 2026
Owner
- Add support for Ghostty terminal
- Restore working npm test tooling
- Modernize manifest and TypeScript config
- Upgrade to TypeScript 7
- Add changelog entry for the modernization work
- Bundle with esbuild, add oxlint and CI
- Re-pin @types/node to Node 20 to match engines.vscode
- Add Prettier for formatting, enforcing semicolons
- Add pre-commit formatting hook and CI format check
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migrate off the deprecated `vscode` npm test harness to the current official runner (@vscode/test-cli + @vscode/test-electron): - Replace `node ./node_modules/vscode/bin/test` with the `vscode-test` CLI - Add `.vscode-test.mjs` config (Mocha tdd ui, test/**/*.test.js) - Remove old custom Mocha harness (test/index.js) - Point extension.test.js at compiled ../out/extension - Pin wildcard deps to current ranges: tmp ^0.2.7, @types/tmp ^0.2.6, @types/mocha ^10.0.10, @types/node ^22.20.1, typescript ^5.9.3 - Pin @types/vscode to 1.61.0 to match engines.vscode minimum - Bump open to ^8.4.2 (stay on v8.x; v9+ is ESM-only and breaks the commonjs build) - Drop deprecated vscode-test devDependency Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bring the extension manifest and compiler settings up to current VS Code conventions: - Bump engines.vscode ^1.61.0 -> ^1.90.0 and @types/vscode to match - Remove the activationEvents array; commands in contributes.commands are auto-registered for activation since VS Code 1.74, making the explicit onCommand entry redundant and deprecated - tsconfig: raise target/lib es6 -> ES2022 (VS Code ships Node 18+) - tsconfig: drop the unused baseUrl + paths "types/*" mapping (no such directory exists) - Delete the redundant jsconfig.json leftover Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump typescript to ^7.0.2 (the native compiler) and adapt to its two breaking changes: - tsconfig: add "types": ["node"], since TS 7 no longer auto-includes every @types package's global declarations - extension.ts: switch the 'open' import to `import open = require('open')`; TS 7 removed esModuleInterop=false, under which a namespace import of an `export =` callable is no longer callable. Behavior is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Introduce a modern build/lint/CI toolchain: - Bundle src/extension.ts into a single minified dist/extension.js via esbuild (main now points there). 'vscode' and 'open' are kept external: vscode is provided by the runtime, and 'open' resolves helper assets (e.g. xdg-open) by a path relative to its own module, which bundling breaks -- so it ships via node_modules instead. - Type-checking is now a standalone 'check-types' (tsc --noEmit); esbuild handles emit, so the out/ directory is gone. - Lint with oxlint rather than ESLint. ESLint's typescript-eslint parser is built on the TypeScript JS API, which the native TypeScript 7 compiler (tsgo) does not expose, so they are incompatible here; oxlint has its own parser and works against tsgo. Both prior rule overrides are preserved. - Add a GitHub Actions workflow running lint, compile, and tests (tests run under xvfb since they launch a real VS Code instance). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
VS Code 1.90 (engines.vscode: ^1.90.0) ships Electron 29, which runs Node 20.9.0. Align @types/node with that runtime instead of the Node 22 types that were carried over from earlier tooling work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
oxlint has no semi rule by design (it excludes stylistic rules), so use Prettier for that instead. Config is tuned to minimize unrelated churn (preserve quote style/keys, no trailing commas).
Plain git hook via core.hooksPath (no husky/lint-staged dependency) checks staged src/*.ts files with prettier --check. CI runs the same check via npm run format:check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.