feat: recognize .msix / .msixbundle assets and 'msix' package format#26
Open
jjeff wants to merge 2 commits into
Open
feat: recognize .msix / .msixbundle assets and 'msix' package format#26jjeff wants to merge 2 commits into
jjeff wants to merge 2 commits into
Conversation
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.
There was a problem hiding this comment.
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
.msixand.msixbundleto supported extensions and Windows download extension resolution whenpkg=msix. - Add
msixas a recognizedPackageFormatand detect MSIX/MSIXBUNDLE filenames accordingly. - Extend OS/architecture detection to treat
.msixbundleas universal and.msix/.msixbundleas 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. |
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
autoUpdaterconsumes the existing Squirrel.Mac-shaped JSON the/update/:platform/:versionendpoint already emits — Pecans only needs to recognize.msix/.msixbundleas Windows assets and route to them when callers request themsixpackage format.Changes
SUPPORTED_FILE_EXTENSIONSwith.msixand.msixbundle.PACKAGE_FORMATSwithmsix;filenameToPackageFormatdetects both extensions.filenameToOperatingSystemmaps.msix/.msixbundle→windows.filenameToArchitecturetreats.msixbundleasuniversal(it's a multi-arch bundle by definition); single-arch.msixcontinues 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/:versionJSON endpoint already emits the{url, name, notes, pub_date}shape Electron's MSIX updater consumes. Callers (Electron'sautoUpdater.setFeedURL) just pass?filetype=msixor?filetype=msixbundleand the resolved download URL routes through/download/version/.../?filetype=msixto the matching asset.Test plan
handleUpdateOSXproduces a Squirrel.Mac-shaped JSON response with a.msix/.msixbundleURL when called with the appropriate filetypetsc --noEmitcleanNotes
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