mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-27 01:41:40 +00:00
* fix(line): pre-export clashing symbols to prevent jiti TypeError on startup When jiti CJS-transforms extensions/line/runtime-api.ts, both export * from "openclaw/plugin-sdk/line-runtime" and the subsequent export * from individual source files attempt to define the same 13 symbols via Object.defineProperty with configurable:false. The second call throws TypeError: Cannot redefine property. The root cause is that src/plugin-sdk/line-runtime.ts re-exports these symbols directly from the extension source files, creating a circular path back to the same files that runtime-api.ts star-exports. Fix: add named pre-exports for all symbols that plugin-sdk/line-runtime re-exports from this extension. Named exports register in jiti's _exportNames map at transform time; the star re-export's hasOwnProperty guard then skips them, preventing the duplicate Object.defineProperty. export * reordering cannot fix this: _exportNames is only populated by named exports, not by export *, so the guard never fires regardless of order. This is the same class of bug as the Matrix plugin crash described in issues #50868, #52780, and #52891, and uses the same fix pattern as PR #50919. * test: add LINE runtime-api Jiti regression (#53221) (thanks @Drickon) * test: stabilize LINE Jiti regression (#53221) (thanks @Drickon) * test: harden LINE Jiti regression (#53221) (thanks @Drickon) * chore: retrigger PR checks (#53221) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
4.0 KiB
4.0 KiB