Skip to content

feat: Allow specifying PIC version#266

Open
adamspofford-dfinity wants to merge 3 commits into
mainfrom
spofford/specify-server
Open

feat: Allow specifying PIC version#266
adamspofford-dfinity wants to merge 3 commits into
mainfrom
spofford/specify-server

Conversation

@adamspofford-dfinity
Copy link
Copy Markdown

@adamspofford-dfinity adamspofford-dfinity commented May 20, 2026

Adds support for reading the binary version from a .pocket-ic-version file. The version string goes ic:<version> or package:<version> based on whether it should be read from the dfinity/ic or dfinity/pocketic repos. Also adds arm64 support to the platform detection. This allows you to use bleeding edge features ahead of official pocket-ic releases.

Copilot AI review requested due to automatic review settings May 20, 2026 21:12
@adamspofford-dfinity adamspofford-dfinity requested a review from a team as a code owner May 20, 2026 21:12
Copy link
Copy Markdown
Contributor

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

This PR enhances @dfinity/pic’s postinstall flow by letting consumers pin which PocketIC binary version to download (via a .pocket-ic-version file in the invoking project) and by extending platform detection to support arm64 binaries.

Changes:

  • Add support for reading a package:<version> or ic:<version> spec from .pocket-ic-version to choose the download source/version.
  • Extend platform detection to download arm64-* binaries when running on arm64/aarch64.
  • Refactor the download URL computation into a helper (resolveDownloadUrl()).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/pic/postinstall.mjs Outdated
Comment on lines +38 to +44
const source = versionSpec.slice(0, colonIdx);
const version = versionSpec.slice(colonIdx + 1);

if (source === 'package') {
return `https://github.com/dfinity/pocketic/releases/download/${version}/pocket-ic-${PLATFORM}.gz`;
} else if (source === 'ic') {
return `https://github.com/dfinity/ic/releases/download/${version}/pocket-ic-${PLATFORM}.gz`;
Comment thread packages/pic/postinstall.mjs
adamspofford-dfinity and others added 2 commits May 21, 2026 08:39
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
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.

3 participants