From fdac80d7cb3a99a07485fadaa484748480928fb2 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Mon, 20 Apr 2026 22:03:39 +0100 Subject: [PATCH] chore(deps): bump bulletin-deploy 0.6.16 -> 0.7.0 The only breaking change in 0.7.0 is the removal of the --playground CLI flag and the playground?: boolean DeployOption. playground-cli already owns registry publishing via src/utils/deploy/playground.ts, so no call sites need to change. Every other DeployOption field and export we rely on is unchanged. Also refreshes the stale "0.6.9 stable today" note in CLAUDE.md. --- .changeset/bump-bulletin-deploy-0-7-0.md | 5 ++ CLAUDE.md | 2 +- package.json | 2 +- pnpm-lock.yaml | 104 ++--------------------- 4 files changed, 12 insertions(+), 101 deletions(-) create mode 100644 .changeset/bump-bulletin-deploy-0-7-0.md diff --git a/.changeset/bump-bulletin-deploy-0-7-0.md b/.changeset/bump-bulletin-deploy-0-7-0.md new file mode 100644 index 0000000..a7dde21 --- /dev/null +++ b/.changeset/bump-bulletin-deploy-0-7-0.md @@ -0,0 +1,5 @@ +--- +"playground-cli": patch +--- + +Bump `bulletin-deploy` pin from `0.6.16` to `0.7.0`. The only breaking change in 0.7.0 is the removal of the `--playground` CLI flag and the `playground?: boolean` `DeployOption`; playground-cli already owns registry publishing via its own `publishToPlayground()` flow, so this is a no-op for the deploy path. diff --git a/CLAUDE.md b/CLAUDE.md index 3c97264..4e8561f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,7 +18,7 @@ These are things that aren't self-evident from reading the code and have bitten - **Signer mode selection lives in one file** (`src/utils/deploy/signerMode.ts`). The mainnet rewrite is a single-file swap; keep that boundary clean. - **`src/utils/deploy/*` and `src/utils/build/*` must not import React or Ink.** They form the SDK surface that RevX consumes from a WebContainer. TUI code lives in `src/commands/*/`. - **Bun compiled-binary stdin quirk** — Ink's `useInput` silently drops every keystroke (arrows, Enter, Ctrl+C) in `bun build --compile` binaries unless `process.stdin.on('readable', …)` is touched before Ink's `render()`. We install a no-op `readable` listener at the top of `src/index.ts` as a warm-up. Do NOT remove it until Bun's compiled-binary TTY stdin behaves like Node's. Symptom if this breaks: TUI renders but nothing responds, including Ctrl+C. -- **`bulletin-deploy` is pinned to an explicit version, not `latest`.** We're on `0.6.9` stable today. The `latest` npm dist-tag is a moving target and previously pointed at 0.6.8, which has a WebSocket heartbeat bug (default 40s < chunk timeout 60s) that tears down uploads mid-flight as `WS halt (3)`. Keep the pin explicit so we never silently slide onto a broken `latest`. When upgrading, read the release notes for any public-API changes to `deploy()`, `DotNS` methods, or the `DeployOptions` we rely on (`jsMerkle`, `signer`, `signerAddress`, `mnemonic`, `rpc`, `attributes`). +- **`bulletin-deploy` is pinned to an explicit version, not `latest`.** We're on `0.7.0` stable today. The `latest` npm dist-tag is a moving target and previously pointed at 0.6.8, which has a WebSocket heartbeat bug (default 40s < chunk timeout 60s) that tears down uploads mid-flight as `WS halt (3)`. Keep the pin explicit so we never silently slide onto a broken `latest`. When upgrading, read the release notes for any public-API changes to `deploy()`, `DotNS` methods, or the `DeployOptions` we rely on (`jsMerkle`, `signer`, `signerAddress`, `mnemonic`, `rpc`, `attributes`). Note: 0.7.0 removed the `playground?: boolean` `DeployOption` (registry publishing now lives here in `src/utils/deploy/playground.ts`), which is a no-op for us since we never passed that flag. - **Throttle TUI info updates** — bulletin-deploy logs per-chunk and builds (vite/next) stream thousands of lines/sec. Calling `setState` on every log event floods React's reconciler with so much backpressure the process can balloon past 20 GB and freeze the OS. `RunningStage` coalesces "latest info" updates to ≤10/sec via a ref + timer and caps line length at 160 chars. Any new hot-path event sink should do the same; don't hook raw per-line streams directly into Ink state. - **Process-guard safety net** (`src/utils/process-guard.ts`) — deploy pipelines open several long-lived WebSockets + child processes and any one of them can keep the event loop alive after the TUI visibly finishes, turning `dot` into a zombie that accumulates retry buffers indefinitely (seen climbing past 25 GB). We defend in depth: (1) `installSignalHandlers()` catches SIGINT/TERM/HUP + `unhandledRejection` and forces cleanup + exit within 3 s; (2) `scheduleHardExit()` installs an `unref`'d timer that kills the process if the event loop doesn't drain within a grace period; (3) `startMemoryWatchdog()` aborts if RSS exceeds 4 GB — a generous cap because legit deploys on Bun SEA binaries routinely touch 1–1.5 GB from runtime-metadata decoding + Bun's JSC heap + Ink yoga. Do NOT re-add a per-window growth detector: we tried 300 MB / 3 s and it false-positived on the single-burst metadata-loading spike, aborting deploys that would have succeeded. Set `DOT_MEMORY_TRACE=1` to stream per-sample RSS/heap/external stats — useful when diagnosing a real leak report. `BULLETIN_DEPLOY_TELEMETRY` is also forced to `"0"` at CLI entry — Sentry buffers breadcrumbs in-memory. Any new long-running command should register a cleanup hook via `onProcessShutdown()`. - **Parser MUST NOT emit an event per log line.** `DeployLogParser.feed()` is called for every console line bulletin-deploy prints — hundreds per deploy on the happy path, thousands if retries fire. We intentionally emit events ONLY for phase-banner matches and `[N/M]` chunk progress. Everything else returns `null`. Adding a catch-all `info` emit turns the parser into a firehose that allocates ~200 bytes × thousands of lines, and was a measurable contributor to chunk-upload memory pressure. diff --git a/package.json b/package.json index 0b5ea41..12e48bf 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@polkadot-apps/terminal": "latest", "@polkadot-apps/tx": "latest", "@polkadot-apps/utils": "latest", - "bulletin-deploy": "0.6.16", + "bulletin-deploy": "0.7.0", "commander": "^12.0.0", "ink": "^5.2.1", "polkadot-api": "^1.23.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 092a857..d102a9b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: latest version: 0.4.0 bulletin-deploy: - specifier: 0.6.16 - version: 0.6.16(@polkadot-api/ink-contracts@0.6.1)(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3) + specifier: 0.7.0 + version: 0.7.0(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3) commander: specifier: ^12.0.0 version: 12.1.0 @@ -224,23 +224,6 @@ packages: resolution: {integrity: sha512-WXTuFvL3G+74SchFAtz3FgIYVOe196ycvGsMgvSH/8Goptb1qpIQtIuM4SOK9G9lhMWYpHxnXyy544ZhluFOew==} engines: {node: '>=6'} - '@dotdm/cdm@0.5.4': - resolution: {integrity: sha512-89tu3LgQrgnZkhFPr+aYNVEp6rNTOtuE1FwAlrt/Ji/tbNFzTPJ58yfA87V8TOXGEv1Yh5kPHNHeFuH8RiEbEA==} - - '@dotdm/contracts@0.4.0': - resolution: {integrity: sha512-1TfEmMQm5nmjMXBKSFqUKDnhaAC54D2xkvXk2lvv+r+Z7novFJSCylH7FxmiGJw7MI3V4MYl3TJB/Ka37oYgRg==} - - '@dotdm/descriptors@0.1.9': - resolution: {integrity: sha512-1bx4GD98+ASu64WhT0RHLjf9/Kihp0+YH12IOixi0ngF6G3bK2fXciZPrhklaw0oGeB2XOjH/N8sZ2oBA6lSCQ==} - peerDependencies: - polkadot-api: '>=1.21.0' - - '@dotdm/env@0.3.2': - resolution: {integrity: sha512-wdxuc+CiwiM3kH0WzwuNLCXLxCeKedYa5SnXhRH0J0kjWyw2BQwD05kQkbIkbPRnBAQ+h45uyzxmldR1Cebe8w==} - - '@dotdm/utils@0.3.1': - resolution: {integrity: sha512-pT7E+6opUlulMNJ2ZxdXg7EOB+DtIWgQc7BQ6wYrUUbKKsa1Oy1lrrdrHPmTethuJM2y96BJArmdW1Ma2nPy/Q==} - '@esbuild/aix-ppc64@0.25.12': resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} engines: {node: '>=18'} @@ -1602,8 +1585,8 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - bulletin-deploy@0.6.16: - resolution: {integrity: sha512-Kc576rv1uAG7V+/7d/3ZMz/V9cZwd0lS28FbC0oU/ecV4rlhMe8D/MPTLKBBhmPqiw4SgtA9OmKpGH5goMrybQ==} + bulletin-deploy@0.7.0: + resolution: {integrity: sha512-fufankGtq5jRaO1BJBgT5n3e7/lTrPuBftOW00doi+ADZcW4kq70qpxEXUcnr8ujrq1pLbwQhwns3oUvegOELw==} engines: {node: '>=22'} hasBin: true @@ -3228,81 +3211,6 @@ snapshots: '@leichtgewicht/ip-codec': 2.0.5 utf8-codec: 1.0.0 - '@dotdm/cdm@0.5.4(@polkadot-api/ink-contracts@0.6.1)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3)': - dependencies: - '@dotdm/contracts': 0.4.0(@polkadot-api/ink-contracts@0.6.1)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3) - '@dotdm/env': 0.3.2(postcss@8.5.10)(rxjs@7.8.2) - '@dotdm/utils': 0.3.1 - '@polkadot-api/sdk-ink': 0.6.2(@polkadot-api/ink-contracts@0.6.1)(polkadot-api@1.23.3(postcss@8.5.10)(rxjs@7.8.2))(rxjs@7.8.2)(typescript@5.9.3) - polkadot-api: 1.23.3(postcss@8.5.10)(rxjs@7.8.2) - transitivePeerDependencies: - - '@microsoft/api-extractor' - - '@polkadot-api/ink-contracts' - - '@swc/core' - - bufferutil - - jiti - - postcss - - rxjs - - supports-color - - tsx - - typescript - - utf-8-validate - - yaml - - zod - - '@dotdm/contracts@0.4.0(@polkadot-api/ink-contracts@0.6.1)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3)': - dependencies: - '@dotdm/descriptors': 0.1.9(polkadot-api@1.23.3(postcss@8.5.10)(rxjs@7.8.2)) - '@dotdm/env': 0.3.2(postcss@8.5.10)(rxjs@7.8.2) - '@dotdm/utils': 0.3.1 - '@noble/hashes': 2.2.0 - '@polkadot-api/sdk-ink': 0.6.2(@polkadot-api/ink-contracts@0.6.1)(polkadot-api@1.23.3(postcss@8.5.10)(rxjs@7.8.2))(rxjs@7.8.2)(typescript@5.9.3) - multiformats: 13.4.2 - polkadot-api: 1.23.3(postcss@8.5.10)(rxjs@7.8.2) - transitivePeerDependencies: - - '@microsoft/api-extractor' - - '@polkadot-api/ink-contracts' - - '@swc/core' - - bufferutil - - jiti - - postcss - - rxjs - - supports-color - - tsx - - typescript - - utf-8-validate - - yaml - - zod - - '@dotdm/descriptors@0.1.9(polkadot-api@1.23.3(postcss@8.5.10)(rxjs@7.8.2))': - dependencies: - polkadot-api: 1.23.3(postcss@8.5.10)(rxjs@7.8.2) - - '@dotdm/env@0.3.2(postcss@8.5.10)(rxjs@7.8.2)': - dependencies: - '@dotdm/descriptors': 0.1.9(polkadot-api@1.23.3(postcss@8.5.10)(rxjs@7.8.2)) - '@dotdm/utils': 0.3.1 - '@polkadot-labs/hdkd': 0.0.26 - '@polkadot-labs/hdkd-helpers': 0.0.27 - polkadot-api: 1.23.3(postcss@8.5.10)(rxjs@7.8.2) - smoldot: 2.0.40 - transitivePeerDependencies: - - '@microsoft/api-extractor' - - '@swc/core' - - bufferutil - - jiti - - postcss - - rxjs - - supports-color - - tsx - - utf-8-validate - - yaml - - '@dotdm/utils@0.3.1': - dependencies: - '@polkadot-labs/hdkd': 0.0.26 - '@polkadot-labs/hdkd-helpers': 0.0.27 - '@esbuild/aix-ppc64@0.25.12': optional: true @@ -5013,9 +4921,8 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - bulletin-deploy@0.6.16(@polkadot-api/ink-contracts@0.6.1)(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3): + bulletin-deploy@0.7.0(@polkadot/util@13.5.9)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3): dependencies: - '@dotdm/cdm': 0.5.4(@polkadot-api/ink-contracts@0.6.1)(postcss@8.5.10)(rxjs@7.8.2)(typescript@5.9.3) '@ipld/car': 5.4.3 '@ipld/dag-pb': 4.1.5 '@noble/hashes': 1.8.0 @@ -5032,7 +4939,6 @@ snapshots: viem: 2.48.0(typescript@5.9.3) transitivePeerDependencies: - '@microsoft/api-extractor' - - '@polkadot-api/ink-contracts' - '@polkadot/util' - '@swc/core' - bufferutil