Conversation
Also reverts to use experimental decorators due to stage 3 decorators not being supported yet microsoft/typescript-go#2354 The skipLib check is needed to work around some jsdom types issues
There was a problem hiding this comment.
Pull request overview
This PR transitions the VS Code extensions build system from using TypeScript's stage 3 decorators to experimental decorators and replaces the existing TypeScript compilation with ts-go (typescript-go) for faster builds. According to the PR description, ts-go enables extension builds to complete in ~500ms even without caching.
Changes:
- Switched from stage 3 to experimental decorators across all extensions due to stage 3 decorators not being supported by ts-go yet
- Converted all decorator implementations from stage 3 syntax to experimental decorator syntax
- Integrated ts-go as the build tool for extensions compilation
- Added skipLibCheck to notebook-renderers tsconfig to work around jsdom types issues
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| extensions/tsconfig.base.json | Added experimentalDecorators flag to enable experimental decorator syntax |
| extensions/notebook-renderers/tsconfig.json | Added skipLibCheck to work around jsdom types issues |
| extensions/github/src/util.ts | Converted decorate function from stage 3 to experimental decorator syntax |
| extensions/git/src/decorators.ts | Converted all decorator implementations from stage 3 to experimental decorator syntax |
| extensions/git/src/commands.ts | Updated command decorator from stage 3 to experimental decorator syntax |
| extensions/git/src/api/extension.ts | Updated deprecated decorator from stage 3 to experimental decorator syntax |
| extensions/git-base/src/decorators.ts | Converted decorate function from stage 3 to experimental decorator syntax |
| build/lib/tsgo.ts | New file implementing ts-go integration for spawning compilation processes and parsing output |
| build/gulpfile.extensions.ts | Updated build tasks to use ts-go instead of tsb for compile and watch tasks |
| @@ -6,11 +6,14 @@ | |||
| import { done } from './util'; | |||
|
|
|||
| function decorate(decorator: (fn: Function, key: string) => Function): Function { | |||
There was a problem hiding this comment.
For consistency with the similar decorate function in extensions/git-base/src/decorators.ts (line 50), this function should return MethodDecorator instead of Function. The git-base version correctly types the return value as MethodDecorator, which is more type-safe. This would also make the cast on line 91 unnecessary.
|
Created and tested full build to make sure this works |
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @lszomoruMatched files:
|
Fixes #271167
Also reverts to use experimental decorators due to stage 3 decorators not being supported yet microsoft/typescript-go#2354
The skipLib check is needed to work around some jsdom types issues
We can also consider removing the transpile option after this since the extension build is ~500ms even without a build cache