OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-proto-peer commits / 02c0fd2

0.3.102: fix the sidecar helper's imports — bare-native, not #node:*
The helper was copied verbatim from atproto-bridge, which resolves `#node:fs` through an "imports" map in its package.json. hyper-proto-peer has no such map, so every import in the file threw PACKAGE_IMPORT_NOT_DEFINED the moment it was dynamically imported. It failed SILENTLY because registration is deliberately non-fatal: the daemon caught it, logged one line, and booted normally — so two releases (0.3.100, 0.3.101) shipped a registration that never ran while `pgh app status` kept saying registered:false. I was reading the flag and re-guessing the cause instead of reading the log line, which named the error exactly. Now imports bare-fs/bare-path/bare-os/bare-process directly, matching the rest of this package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
02c0fd2170701b264015987decababc9b5c0cb8f
by plankatron <fleeky@gmail.com> · 2026-08-01T02:00:36.000Z

Changed files (2) +9 -5

lib/sidecar.js +8 -4
……@@ -3,10 +3,14 @@
33// readiness probe work) and survives the boot race (sidecar socket may appear after us).
44// Mirrors pear-git-v3/lib/sidecar-wait.js + server.js registerWithSidecar.
55
6import fs from '#node:fs'
7import path from '#node:path'
8import os from '#node:os'
9import process from '#node:process'
6// ⚠ BARE-NATIVE IMPORTS, deliberately. This file was copied from atproto-bridge, which uses the
7// `#node:*` import-map indirection — hyper-proto-peer has NO `imports` map, so those specifiers throw
8// PACKAGE_IMPORT_NOT_DEFINED at runtime. The failure was invisible because registration is wrapped in a
9// non-fatal try/catch: the daemon booted fine and simply never registered.
10import fs from 'bare-fs'
11import path from 'bare-path'
12import os from 'bare-os'
13import process from 'bare-process'
1014
1115export function sidecarSockPath () {
1216 return process.env.PGH_SIDECAR_SOCK || path.join(os.homedir(), '.pgh', 'svc.sock')
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "hyper-proto-peer",
3 "version": "0.3.101",
3 "version": "0.3.102",
44 "description": "Self-custody, P2P-native atproto peer — holds the user's key + content as Hypercores and authors+signs its own repo. The source of truth in the peer/bridge split (Model B); atproto-bridge projects it to bsky.",
55 "type": "module",
66 "main": "lib/peer.js",