Skip to content

Stop using TypeScript in ./vscode#166

Merged
jviotti merged 1 commit intomainfrom
no-ts-backend
Feb 13, 2026
Merged

Stop using TypeScript in ./vscode#166
jviotti merged 1 commit intomainfrom
no-ts-backend

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 13, 2026

The whole thing is 500 lines of code. The amount of boilerplate needed
to setup TypeScript, the build, the extra dependencies, etc seem
overkill for something so simple.

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 23 files

@augmentcode
Copy link

augmentcode bot commented Feb 13, 2026

🤖 Augment PR Summary

Summary: This PR simplifies the VS Code extension by removing the TypeScript toolchain from ./vscode and shipping a plain JavaScript entrypoint.

Changes:

  • Replaced the TypeScript extension source (src/extension.ts) with a CommonJS module (vscode/index.js) exporting activate/deactivate.
  • Removed VS Code-side TS build/lint infrastructure (tsconfigs, esbuild script, ESLint TS config, and related devDependencies).
  • Updated the Makefile to stop running VS Code TS build/lint steps and to package/copy index.js into build/vscode.
  • Adjusted VS Code debug configuration to point at JS outputs without a pre-launch build task.
  • Moved protocol type declarations under webview/src/protocol and updated webview imports accordingly.
  • Relocated the webview TypeScript base config into webview/ and updated webview/tsconfig.json to extend it.

Technical Notes: The VS Code extension now runs directly from vscode/index.js (and build/vscode/index.js for VSIX packaging), reducing build-time dependencies and boilerplate for the extension side.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

const diagnostics = errors
.filter((error): error is LintError & { position: Position } =>
error.position !== null)
.filter((error) => error.position !== null)
Copy link

Choose a reason for hiding this comment

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

updateLintDiagnostics filters out null positions but not undefined; if any CLI error object omits position, errorPositionToRange(error.position) will throw when destructuring. Consider filtering out both null and undefined (or validating the shape) before creating diagnostics.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

.filter((error): error is MetaschemaError & { instancePosition: Position } => {
return 'instancePosition' in error && error.instancePosition !== undefined;
})
.filter((error) => 'instancePosition' in error && error.instancePosition !== undefined)
Copy link

Choose a reason for hiding this comment

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

This filter only excludes undefined instancePosition, but null (or other non-array values) would still pass and then crash in errorPositionToRange(error.instancePosition) due to destructuring. Consider ensuring instancePosition is a valid 4-tuple before building a vscode.Range.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

The whole thing is 500 lines of code. The amount of boilerplate needed
to setup TypeScript, the build, the extra dependencies, etc seem
overkill for something so simple.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 1e72e2c into main Feb 13, 2026
4 checks passed
@jviotti jviotti deleted the no-ts-backend branch February 13, 2026 17:12
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

Comments