Files
vscode/build/lib/tsb
4e6997ae07 build: support platform-specific built-in extensions from GitHub releases (#324206)
* Support platform-specific built-in extensions from GitHub releases

Adds support for downloading platform-specific built-in extension VSIXs
from GitHub releases, keyed by marketplace target platform. Also downloads
the latest pre-release assets for insiders builds, ignoring the pinned
version and checksum.

- extensionTarget.ts: resolve build target + release asset name
- builtInExtensions.ts: platformSpecific checksum map + insiders detection
- extensions.ts/fetch.ts: fromGithub asset selection + prerelease support
- CI: platform-aware cache key and target env plumbing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Insiders downloads the latest release instead of latest pre-release

Insiders builds should always be on the newest published release, so the
GitHub download now resolves the most recently published release (including
pre-releases) rather than filtering to pre-releases only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address code review feedback for platform-specific extensions

- Sort latest releases by published_at instead of created_at
- Log a warning when skipping checksum validation in latest mode
- Document that platform-specific extensions always download from GitHub
- Skip gracefully on unsupported platforms; keep a clear error for a
  known target missing from the platformSpecific map

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address CCR feedback: restrict targets and harden helpers

- Restrict getExtensionTarget to the supported marketplace targets, returning
  undefined for unsupported OS/arch (e.g. win32-ia32, linux-riscv64) so callers
  skip gracefully instead of failing with a missing-asset error
- Remove the bogus ia32 -> x86 mapping (no win32-x86 target exists)
- Validate the target format in getPlatformSpecificAssetName and throw a clear
  error for malformed targets
- Guard the latest-release sort against NaN timestamps (missing published_at
  sorts to the end deterministically)
- Update tests accordingly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Align asset naming with VS Code convention and support product.overrides.json

The platform-specific extension this feature targets (typescript-go's
TypeScriptTeam.native-preview) publishes VSIX assets named
<name>-<target>.vsix using the raw marketplace target platform, not the
node-vsce-sign osx/win/arm aliasing. Update getPlatformSpecificAssetName to
the standard <name>-<target>.vsix convention and validate against the
supported target set.

- fetch.ts: in latest mode, select the newest published release that actually
  contains the requested asset, so releases shipping only other artifacts
  (e.g. tarballs) without a matching VSIX are skipped
- builtInExtensions.ts: merge product.overrides.json (gitignored, local) so
  overridden built-in extensions are downloaded, mirroring bootstrap-meta
- Update tests for the new naming convention

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Detect extensions project by path segment, not substring

ESBuildTranspiler decided CJS vs ESM output via configFilePath.includes('extensions').
When the repo is checked out (e.g. as a git worktree) into a folder whose name
merely contains the substring 'extensions', the 'src' project was wrongly treated
as an extension and transpiled to CJS, breaking top-level await in src/cli.ts,
src/server-cli.ts and src/server-main.ts. Match an 'extensions' path segment instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove product.overrides.json support from built-in extensions download

Revert the download script to read product.json directly, per review feedback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-14 10:26:58 +00:00
..