Skip to content

chore(tsconfig): adjust both packages for TS 6 conventions - #1147

Merged
robcohen merged 3 commits into
mainfrom
chore/tsconfig-ts6-adjustments
May 18, 2026
Merged

robcohen merged 3 commits into
mainfrom
chore/tsconfig-ts6-adjustments

Conversation

@robcohen

Copy link
Copy Markdown
Member

Summary

Two small tsconfig.json tweaks now that we're on TS 6 (PR #1146):

`packages/mcp-server`

`target`/`lib` `ES2022` → `ES2024`. Node 24 is pinned via `.nvmrc` (#1144), so we can use ES2024 built-ins (`Object.groupBy`, `Promise.withResolvers`, etc.) without runtime-availability concerns. Deliberately stopping short of ES2025 to avoid tying us to APIs that need the very latest Node minor.

`packages/vscode`

  • Add explicit `moduleResolution: "node10"` + `ignoreDeprecations: "6.0"`. TS 6 deprecates the implicit `node10` resolution. Can't migrate to `nodenext`/`bundler` yet because `@vscode/vsce` (the extension publisher tooling) hasn't sanctioned that path. Comment in-line documents when to revisit (TS 7 adoption).
  • Add explicit `types: ["node"]`. TS 6 changes the default from `[]` to `[]`. Locking it explicitly avoids a silent type-loss regression when we eventually drop `ignoreDeprecations`.

Skipped (no payoff in our code)

The flashy TS 6 features don't have natural insertion points:

Feature Why not
Subpath imports (`#/`) 8 sibling files in mcp-server; no deep `../../` patterns.
`Map.getOrInsert` / `RegExp.escape` / Temporal No natural insertion points found; would be speculative refactor.
`--stableTypeOrdering` flag TS 7 prep with ~25% type-check overhead; not worth it until we're actively migrating.

Test plan

  • mcp-server: `tsc` clean; 166/166 vitest tests pass
  • vscode: `tsc` clean; `npm run package` produces `rustledger-vscode.vsix` (105 KB) without errors

🤖 Generated with Claude Code

Two small tsconfig.json tweaks now that we're on TS 6 (PR #1146):

packages/mcp-server/tsconfig.json:
  target/lib ES2022 -> ES2024
  Node 24 is now pinned via .nvmrc (#1144), so we can take advantage
  of ES2024 built-ins (Object.groupBy, Promise.withResolvers, etc.)
  without runtime-availability concerns. Deliberately stopping short
  of ES2025 to avoid tying us to APIs that need the very latest Node
  minor; revisit later if a concrete use surfaces.

packages/vscode/tsconfig.json:
  - Add explicit moduleResolution: node10 + ignoreDeprecations: "6.0"
  - Add explicit types: ["node"]

  TS 6 deprecates the implicit `node10` resolution. We can't migrate
  to nodenext/bundler yet because @vscode/vsce (the extension
  publisher tooling) hasn't sanctioned that path for VS Code
  extensions. Setting the resolution explicitly + suppressing the
  deprecation keeps us building cleanly through the TS 6 line; a
  comment in-line documents when to revisit (TS 7 adoption).

  TS 6 also changes `types` default from [<all>] to []. Locking it
  to ["node"] makes the previously-implicit auto-include explicit
  so a future ignoreDeprecations drop doesn't silently lose types.

Skipped (not enough payoff in our code):
  - Subpath imports (`#/`): only 8 sibling files in mcp-server, no
    deep `../../` patterns.
  - Map.getOrInsert / RegExp.escape / Temporal: no natural insertion
    points found; would be a speculative refactor.
  - --stableTypeOrdering flag: TS 7 prep with ~25% type-check
    overhead; not worth it until we're actively migrating.

Verified:
  - mcp-server: tsc clean; 166/166 vitest tests pass
  - vscode: tsc clean; npm run package produces vsix without errors

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@robcohen
robcohen requested a review from a team as a code owner May 18, 2026 20:41
Copilot AI review requested due to automatic review settings May 18, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts TypeScript configuration in the repo’s two Node/TS packages to align with newer TypeScript (TS 6) conventions and the repo’s Node 24 baseline.

Changes:

  • packages/mcp-server: bump target/lib from ES2022 to ES2024.
  • packages/vscode: make moduleResolution explicit (node10), add ignoreDeprecations: "6.0", and pin types to ["node"].

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/vscode/tsconfig.json Makes TS6-related resolution/deprecation behavior explicit and pins included ambient types.
packages/mcp-server/tsconfig.json Raises emitted JS / lib typings baseline to ES2024 for the Node 24 runtime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/vscode/tsconfig.json Resolved
@github-actions

github-actions Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 100%
Full AST Match 100%
Total Files 786
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

@robcohen
robcohen merged commit 191aa2e into main May 18, 2026
24 of 25 checks passed
@robcohen
robcohen deleted the chore/tsconfig-ts6-adjustments branch May 18, 2026 21:33
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.

2 participants