opencode-acp 1.14.18-pr.307.18 → 1.14.19-pr.308.20

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/README.md CHANGED
@@ -492,6 +492,16 @@ For the complete list with root cause analysis, see the [bug tracker](https://gi
492
492
 
493
493
  ## Changelog
494
494
 
495
+ ### v1.14.19 — Fix release pipeline for real (npm 10 `--ignore-scripts` bug)
496
+
497
+ **Problem**: v1.14.18 (#306) was merged but still never published — `release.yml` failed at the exact same step. Root cause of the failed fix: the CI runner uses Node 22 (npm 10.9.x), and **npm 10 runs the `prepare` lifecycle hook during `npm pack` even when `--ignore-scripts` is passed**. v1.14.18's fix (`npm pack --ignore-scripts`) works on npm 11 but is a no-op on npm 10. When prepare runs, tsup writes `CLI Building entry: index.ts` to **stdout**, breaking `JSON.parse` in `verify-package.mjs` (`SyntaxError: Unexpected token`).
498
+
499
+ **Fix**: Redirect the `prepare` build's stdout to stderr: `"prepare": "npm run build 1>&2"` in `package.json`. Build output (informational) goes to stderr; stdout stays pure JSON regardless of npm version or whether `--ignore-scripts` works. Verified empirically with npm 10.9.9 locally: `npm pack --dry-run --json` now returns valid JSON (173 tarball entries) both with and without `--ignore-scripts`. The `--ignore-scripts` flag added in v1.14.18 is kept (harmless on npm 10, skips the redundant rebuild on npm 11). The `npm install github:...#branch` path still works — prepare still runs and still builds `dist/`.
500
+
501
+ Files: `package.json`. Tests: 976 pass; `check:package` green on npm 10.9.9 and npm 11.12.1.
502
+
503
+ **Install**: `opencode plugin opencode-acp@latest --global`
504
+
495
505
  ### v1.14.18 — Supersedes unpublished v1.14.17; fix release pipeline
496
506
 
497
507
  **Problem**: v1.14.17 was merged (#305) but never published — `release.yml` failed at `npm run check:package` because the `prepare` hook added in #298 (`npm run build`) runs during `npm pack --json` inside `verify-package.mjs`, and tsup's `CLI Building entry: index.ts` stdout output breaks `JSON.parse` (`SyntaxError: Unexpected token 'C'`).
package/README.zh-CN.md CHANGED
@@ -446,6 +446,16 @@ ACP 是 DCP 的直接替代品。迁移步骤:
446
446
 
447
447
  ## 更新日志
448
448
 
449
+ ### v1.14.19 — 彻底修复发版流水线(npm 10 `--ignore-scripts` 失效)
450
+
451
+ **问题**:v1.14.18(#306)已合并但依然没有发布 —— `release.yml` 又在同一步骤失败。v1.14.18 修复失败的根本原因:CI 运行器是 Node 22(npm 10.9.x),而 **npm 10 在 `npm pack` 时即使传了 `--ignore-scripts` 也照样执行 `prepare` 生命周期钩子**。v1.14.18 的修复(`npm pack --ignore-scripts`)在 npm 11 上有效,在 npm 10 上是空操作。prepare 一旦执行,tsup 会把 `CLI Building entry: index.ts` 写到 **stdout**,破坏 `verify-package.mjs` 里的 `JSON.parse`(`SyntaxError: Unexpected token`)。
452
+
453
+ **修复**:把 `prepare` 构建的 stdout 重定向到 stderr:`package.json` 中改为 `"prepare": "npm run build 1>&2"`。构建输出(信息性)走 stderr,stdout 无论 npm 版本、无论 `--ignore-scripts` 是否生效都保持纯 JSON。已在本地用 npm 10.9.9 实证验证:`npm pack --dry-run --json` 现在返回合法 JSON(173 个 tarball 条目),带与不带 `--ignore-scripts` 均通过。v1.14.18 加的 `--ignore-scripts` 标志保留(npm 10 上无害,npm 11 上跳过多余重建)。`npm install github:...#branch` 路径不受影响 —— prepare 照常执行并构建 `dist/`。
454
+
455
+ 文件:`package.json`。测试:976 通过;`check:package` 在 npm 10.9.9 和 npm 11.12.1 上均绿。
456
+
457
+ **安装**:`opencode plugin opencode-acp@latest --global`
458
+
449
459
  ### v1.14.18 — 取代未能发布的 v1.14.17;修复发版流水线
450
460
 
451
461
  **问题**:v1.14.17 已合并(#305)但从未发布 —— \`release.yml\` 在 \`npm run check:package\` 一步失败:#298 新增的 \`prepare\` 钩子(\`npm run build\`)会在 \`verify-package.mjs\` 的 \`npm pack --json\` 期间运行,tsup 的 \`CLI Building entry: index.ts\` 输出污染 stdout,导致 \`JSON.parse\` 报错(\`SyntaxError: Unexpected token 'C'\`)。
package/dist/index.js CHANGED
@@ -8949,7 +8949,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
8949
8949
  import { join as join3 } from "path";
8950
8950
  import { existsSync as existsSync3 } from "fs";
8951
8951
  import { homedir as homedir3 } from "os";
8952
- var LOG_VERSION = true ? "1.14.18-pr.307.18" : "dev";
8952
+ var LOG_VERSION = true ? "1.14.19-pr.308.20" : "dev";
8953
8953
  var Logger = class {
8954
8954
  logDir;
8955
8955
  enabled;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "opencode-acp",
4
- "version": "1.14.18-pr.307.18",
4
+ "version": "1.14.19-pr.308.20",
5
5
  "type": "module",
6
6
  "description": "Active Context Pruning — model-driven context management for OpenCode (hardened fork of DCP with 35 bug fixes)",
7
7
  "main": "./dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "scripts": {
20
20
  "clean": "rm -rf dist",
21
21
  "build": "npm run clean && tsup && tsc --emitDeclarationOnly",
22
- "prepare": "npm run build",
22
+ "prepare": "npm run build 1>&2",
23
23
  "verify:package": "node scripts/verify-package.mjs",
24
24
  "check:package": "npm run build && npm run verify:package",
25
25
  "prepublishOnly": "npm run check:package",