Skip to content

fix(compiler): install VS Code/VS extensions from marketplace instead of npm#11169

Draft
timotheeguerin wants to merge 2 commits into
mainfrom
timotheeguerin/cli-install-extension-from-marketplace
Draft

fix(compiler): install VS Code/VS extensions from marketplace instead of npm#11169
timotheeguerin wants to merge 2 commits into
mainfrom
timotheeguerin/cli-install-extension-from-marketplace

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Fixes part of #11168.

The tsp code install and tsp vs install CLI commands previously installed the editor extensions by downloading the typespec-vscode / typespec-vs npm packages, extracting the bundled .vsix, and installing that. Those npm packages only exist as a distribution vehicle and are now redundant since both extensions are published to their marketplaces.

Changes

  • tsp code install now delegates directly to code --install-extension microsoft.typespec-vscode (respecting --insiders). No npm download.
  • tsp vs install keeps the "download a .vsix, then run VSIXInstaller.exe" flow, but downloads the latest vsix from the Visual Studio Marketplace instead of npm (via the gallery extensionquery + vspackage endpoints).
  • Removed the npm-based install-vsix.ts; added download-vsix.ts (marketplace query + download to temp dir + install callback + cleanup, with a TYPESPEC_DEBUG_VSIX local override for debugging).
  • Added a vsix-download-failed diagnostic.
  • Uninstall commands are unchanged (they never used npm).

Tests

  • test/cli/vscode.test.ts: install/uninstall invoke code/code-insiders --install-extension microsoft.typespec-vscode; vscode-in-path diagnostic when code is missing.
  • test/cli/download-vsix.test.ts: version resolution + vspackage URL, temp cleanup, TYPESPEC_DEBUG_VSIX override, and download-failure diagnostics.

Notes

Fully retiring/unpublishing the typespec-vscode / typespec-vs npm packages and their publish pipelines (also part of #11168) is left as a follow-up; this PR removes the CLI's runtime dependency on them.

… of npm

`tsp code install` now delegates to `code --install-extension microsoft.typespec-vscode` and `tsp vs install` downloads the latest vsix from the Visual Studio Marketplace, removing the dependency on the `typespec-vscode`/`typespec-vs` npm packages.

Fixes part of #11168
@microsoft-github-policy-service microsoft-github-policy-service Bot added the compiler:core Issues for @typespec/compiler label Jul 3, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/compiler@11169

commit: 941229f

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

tsp code install and tsp vs install now install the editor extensions from the marketplace instead of downloading the typespec-vscode/typespec-vs npm packages. tsp code install delegates to code --install-extension microsoft.typespec-vscode, and tsp vs install downloads the latest vsix from the Visual Studio Marketplace.

@azure-sdk-automation

azure-sdk-automation Bot commented Jul 3, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant