Skip to content

feat: recognize .msix / .msixbundle assets and 'msix' package format#26

Open
jjeff wants to merge 2 commits into
dopry:nextfrom
jjeff:feat/msix-support
Open

feat: recognize .msix / .msixbundle assets and 'msix' package format#26
jjeff wants to merge 2 commits into
dopry:nextfrom
jjeff:feat/msix-support

Conversation

@jjeff
Copy link
Copy Markdown
Contributor

@jjeff jjeff commented May 22, 2026

Summary

Adds MSIX support to Pecans so it can act as the update server for an Electron 41+ app packaged as MSIX. Electron 41's autoUpdater consumes the existing Squirrel.Mac-shaped JSON the /update/:platform/:version endpoint already emits — Pecans only needs to recognize .msix / .msixbundle as Windows assets and route to them when callers request the msix package format.

Changes

  • Extend SUPPORTED_FILE_EXTENSIONS with .msix and .msixbundle.
  • Extend PACKAGE_FORMATS with msix; filenameToPackageFormat detects both extensions.
  • filenameToOperatingSystem maps .msix / .msixbundlewindows.
  • filenameToArchitecture treats .msixbundle as universal (it's a multi-arch bundle by definition); single-arch .msix continues to derive arch from filename suffix (_x64, _arm64, _x86).
  • getDownloadExtensionsByOs('windows', 'msix') returns ['.msixbundle', '.msix'], preferring the bundle when both are published.

The existing /update/:platform/:version JSON endpoint already emits the {url, name, notes, pub_date} shape Electron's MSIX updater consumes. Callers (Electron's autoUpdater.setFeedURL) just pass ?filetype=msix or ?filetype=msixbundle and the resolved download URL routes through /download/version/.../?filetype=msix to the matching asset.

Test plan

  • Existing 637 tests still pass
  • +2 new unit tests verify handleUpdateOSX produces a Squirrel.Mac-shaped JSON response with a .msix / .msixbundle URL when called with the appropriate filetype
  • Extension / package format / OS / architecture detection covered by unit tests
  • tsc --noEmit clean

Notes

This is the server-side half of MSIX support for spaceagetv/missioncontrol (Visibox). Reference: Electron 41 release notes and electron/electron#49230.

🤖 Generated with Claude Code

Electron 41+'s autoUpdater has native MSIX support and consumes the
existing Squirrel.Mac-shaped JSON response format from /update/:platform/:version.
For Pecans to act as the update server for an MSIX-packaged Electron app,
it only needs to recognize the new asset extensions and surface them as
download candidates when callers request the 'msix' package format.

- Add .msix and .msixbundle to SUPPORTED_FILE_EXTENSIONS.
- Add 'msix' to PACKAGE_FORMATS; filenameToPackageFormat detects both
  .msix and .msixbundle.
- filenameToOperatingSystem maps .msix / .msixbundle to 'windows'.
- filenameToArchitecture treats .msixbundle as 'universal' (multi-arch
  bundle); single-arch .msix continues to derive arch from filename.
- getDownloadExtensionsByOs('windows', 'msix') returns
  ['.msixbundle', '.msix'], preferring the bundle when both are present.

The existing /update/:platform/:version JSON endpoint already emits the
{url, name, notes, pub_date} shape Electron's MSIX updater expects; with
the recognition above, callers pass ?filetype=msix (or msixbundle) and
the resolved download URL routes through /download/version/.../?filetype=msix
to the appropriate asset.

Tests cover extension/package/OS/arch detection and the update endpoint's
behavior for Windows MSIX clients.
@jjeff jjeff marked this pull request as ready for review May 23, 2026 03:02
Copilot AI review requested due to automatic review settings May 23, 2026 03:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds MSIX/MSIXBUNDLE support across file extension, package format, OS/architecture detection, and update feed behavior to better support Windows MSIX auto-updaters (Squirrel.Mac-shaped JSON).

Changes:

  • Add .msix and .msixbundle to supported extensions and Windows download extension resolution when pkg=msix.
  • Add msix as a recognized PackageFormat and detect MSIX/MSIXBUNDLE filenames accordingly.
  • Extend OS/architecture detection to treat .msixbundle as universal and .msix/.msixbundle as Windows; add/update unit tests and Pecans update route tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/unit/pecans.spec.ts Adds tests asserting update JSON shape and URL behavior for MSIX/MSIXBUNDLE requests.
test/unit/SupportedFileExtension.spec.ts Extends extension support tests and Windows download extension selection for pkg=msix.
test/unit/PackageFormat.spec.ts Adds msix to formats and tests filename/query detection.
test/unit/OperatingSystem.spec.ts Adds Windows detection tests for .msix and .msixbundle.
test/unit/Architecture.spec.ts Adds architecture detection tests for .msix vs .msixbundle (universal).
src/utils/SupportedFileExtension.ts Adds MSIX extensions and updates Windows download extension resolution for pkg=msix.
src/utils/PackageFormat.ts Adds msix to PACKAGE_FORMATS and detects .msix/.msixbundle filenames.
src/utils/OperatingSystem.ts Recognizes .msix and .msixbundle as Windows.
src/utils/Architecture.ts Treats .msixbundle as universal architecture.

Comment thread src/utils/SupportedFileExtension.ts Outdated
Comment thread test/unit/pecans.spec.ts Outdated
- SupportedFileExtension.ts: revert the misleading comment claim about
  special-casing .msixbundle. path.extname() already returns
  ".msixbundle" correctly for files with that extension; only .tar.gz
  needs the explicit endsWith() check because extname returns ".gz" for
  files ending in ".tar.gz".

- pecans.spec.ts: add channel:"stable" to the msixbundle test for
  parameter-shape consistency with the preceding msix test, so both
  cases exercise the same route contract.
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