@hanzo/dev 0.6.85 → 0.6.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/dev.js CHANGED
@@ -72,7 +72,7 @@ if (!targetTriple) {
72
72
 
73
73
  // Binary names for Hanzo dev
74
74
  let binaryPath = path.join(__dirname, "..", "bin", `dev-${targetTriple}`);
75
- let legacyBinaryPath = path.join(__dirname, "..", "bin", `code-${targetTriple}`);
75
+ let legacyBinaryPath = path.join(__dirname, "..", "bin", `dev-${targetTriple}`);
76
76
 
77
77
  import { existsSync, chmodSync, statSync, openSync, readSync, closeSync, mkdirSync, copyFileSync, readFileSync, unlinkSync, createWriteStream } from "fs";
78
78
 
@@ -207,8 +207,8 @@ const tryBootstrapBinary = async () => {
207
207
 
208
208
  // Download from GitHub release
209
209
  const isWin = platform === "win32";
210
- // Use 'code-*' binary names since that's what the release produces
211
- const binaryName = `code-${targetTriple}`;
210
+ // Use 'dev-*' binary names matching the release artifacts
211
+ const binaryName = `dev-${targetTriple}`;
212
212
  const archiveName = isWin
213
213
  ? `${binaryName}.zip`
214
214
  : (() => { try { execSync("zstd --version", { stdio: "ignore", shell: true }); return `${binaryName}.zst`; } catch { return `${binaryName}.tar.gz`; } })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/dev",
3
- "version": "0.6.85",
3
+ "version": "0.6.87",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Hanzo AI coding assistant - intelligent CLI for developers",
6
6
  "bin": {
@@ -35,10 +35,10 @@
35
35
  "prettier": "^3.3.3"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@hanzo/dev-darwin-arm64": "0.6.85",
39
- "@hanzo/dev-darwin-x64": "0.6.85",
40
- "@hanzo/dev-linux-x64-musl": "0.6.85",
41
- "@hanzo/dev-linux-arm64-musl": "0.6.85",
42
- "@hanzo/dev-win32-x64": "0.6.85"
38
+ "@hanzo/dev-darwin-arm64": "0.6.87",
39
+ "@hanzo/dev-darwin-x64": "0.6.87",
40
+ "@hanzo/dev-linux-x64-musl": "0.6.87",
41
+ "@hanzo/dev-linux-arm64-musl": "0.6.87",
42
+ "@hanzo/dev-win32-x64": "0.6.87"
43
43
  }
44
44
  }
package/postinstall.js CHANGED
@@ -373,15 +373,14 @@ export async function runPostinstall(options = {}) {
373
373
  );
374
374
  const version = packageJson.version;
375
375
 
376
- // The release produces 'code-*' binaries; we'll download and rename to 'dev-*'
377
- const binaries = ["code"];
376
+ // The release produces dev-* binaries directly
377
+ const binaries = ["dev"];
378
378
 
379
379
  console.log(`Installing @hanzo/dev v${version} for ${targetTriple}...`);
380
380
 
381
381
  for (const binary of binaries) {
382
382
  const binaryName = `${binary}-${targetTriple}${binaryExt}`;
383
- const devBinaryName = `dev-${targetTriple}${binaryExt}`;
384
- const localPath = join(binDir, devBinaryName);
383
+ const localPath = join(binDir, binaryName);
385
384
  const cachePath = getCachedBinaryPath(version, targetTriple, isWindows);
386
385
 
387
386
  // Fast path: if a valid cached binary exists, reuse it
@@ -407,7 +406,7 @@ export async function runPostinstall(options = {}) {
407
406
  chmodSync(localPath, 0o755);
408
407
  } catch {}
409
408
  }
410
- console.log(`✓ ${devBinaryName} ready from user cache`);
409
+ console.log(`✓ ${binaryName} ready from user cache`);
411
410
  continue;
412
411
  }
413
412
  }
@@ -443,7 +442,7 @@ export async function runPostinstall(options = {}) {
443
442
 
444
443
  if (platformPkg) {
445
444
  try {
446
- const src = join(platformPkg.dir, "bin", devBinaryName);
445
+ const src = join(platformPkg.dir, "bin", binaryName);
447
446
  if (!existsSync(src)) {
448
447
  throw new Error(
449
448
  `platform package missing binary: ${platformPkg.name}`,
@@ -469,7 +468,7 @@ export async function runPostinstall(options = {}) {
469
468
  } catch {}
470
469
  }
471
470
  console.log(
472
- `✓ Installed ${devBinaryName} from ${platformPkg.name} (cached)`,
471
+ `✓ Installed ${binaryName} from ${platformPkg.name} (cached)`,
473
472
  );
474
473
  continue;
475
474
  } catch (e) {
@@ -586,9 +585,7 @@ export async function runPostinstall(options = {}) {
586
585
  }
587
586
  try {
588
587
  const extractedPath = join(unzipDest, binaryName);
589
- // Rename code-* to dev-* in cache
590
- const devCachePath = cachePath;
591
- await writeCacheAtomic(extractedPath, devCachePath);
588
+ await writeCacheAtomic(extractedPath, cachePath);
592
589
  try {
593
590
  unlinkSync(extractedPath);
594
591
  } catch {}
@@ -630,17 +627,11 @@ export async function runPostinstall(options = {}) {
630
627
  unlinkSync(tmpPath);
631
628
  } catch {}
632
629
  }
633
- // Rename code-* to dev-*
634
- if (existsSync(downloadedPath)) {
635
- if (mirrorToLocal) {
636
- renameSync(downloadedPath, localPath);
637
- } else {
638
- const extractedPath = downloadedPath;
639
- await writeCacheAtomic(extractedPath, cachePath);
640
- try {
641
- unlinkSync(extractedPath);
642
- } catch {}
643
- }
630
+ if (existsSync(downloadedPath) && !mirrorToLocal) {
631
+ await writeCacheAtomic(downloadedPath, cachePath);
632
+ try {
633
+ unlinkSync(downloadedPath);
634
+ } catch {}
644
635
  }
645
636
  }
646
637
 
@@ -661,7 +652,7 @@ export async function runPostinstall(options = {}) {
661
652
  }
662
653
 
663
654
  console.log(
664
- `✓ Installed ${devBinaryName}${isWin || !mirrorToLocal ? " (cached)" : ""}`,
655
+ `✓ Installed ${binaryName}${isWin || !mirrorToLocal ? " (cached)" : ""}`,
665
656
  );
666
657
  if (!isWin && mirrorToLocal) {
667
658
  try {
@@ -669,7 +660,7 @@ export async function runPostinstall(options = {}) {
669
660
  } catch {}
670
661
  }
671
662
  } catch (error) {
672
- console.error(`✗ Failed to install ${devBinaryName}: ${error.message}`);
663
+ console.error(`✗ Failed to install ${binaryName}: ${error.message}`);
673
664
  console.error(` Downloaded from: ${downloadUrl}`);
674
665
  }
675
666
  }