Skip to content

modernize extension - #23

Draft
jonsmithers wants to merge 9 commits into
masterfrom
modernize-extension
Draft

modernize extension#23
jonsmithers wants to merge 9 commits into
masterfrom
modernize-extension

Conversation

@jonsmithers

Copy link
Copy Markdown
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

jonsmithers and others added 9 commits July 19, 2026 13:51
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant