Skip to content

fix: Sync binary version with package.json dynamically#11

Open
adambkovacs wants to merge 1 commit intoruvnet:mainfrom
adambkovacs:fix/binary-version-sync
Open

fix: Sync binary version with package.json dynamically#11
adambkovacs wants to merge 1 commit intoruvnet:mainfrom
adambkovacs:fix/binary-version-sync

Conversation

@adambkovacs
Copy link
Copy Markdown

Summary

  • Fixed binary-manager.ts to dynamically read version from package.json instead of hardcoding
  • This ensures npm package version stays in sync with GitHub releases
  • Prevents "binary not found" errors when package version is bumped

Problem

The npm package was at version 1.2.1 but binary-manager.ts had BINARY_VERSION = 'v1.0.2' hardcoded, causing download failures for platforms like aarch64-apple-darwin.

Solution

// Before (hardcoded, out of sync):
const BINARY_VERSION = 'v1.0.2';

// After (dynamic):
import { version as PKG_VERSION } from '../package.json';
const BINARY_VERSION = `v${PKG_VERSION}`;

Related

Test plan

  • Verify TypeScript compiles with resolveJsonModule: true (already enabled in tsconfig.json)
  • Test binary download after next release is published

🤖 Generated with Claude Code

The BINARY_VERSION constant was hardcoded to v1.0.2 while package.json
is at version 1.2.1, causing binary downloads to fail.

This change imports the version from package.json dynamically so they
stay in sync automatically.

Fixes: Binary not found for platform aarch64-apple-darwin error

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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