Context: found during post-release v0.4.1 verification (d6cde09).
Symptom: after pi update --extensions correctly reconciles the git clone and prepare rebuilds dist/, a running pi process keeps executing the previously imported extension modules. /reload does NOT swap them: pi-core's extension loader (dist/core/extensions/loader.js) creates jiti with moduleCache: false, but in built-Node mode jiti's tryNative path uses native import() for plain .js entrypoints/imports, and node's process-wide ESM cache returns the old modules. TypeScript-source extensions re-transpile and truly hot-swap; compiled-dist extensions like this one do not.
Proof: live tool ran pre-v0.4.1 behavior (raw batch rows got no parent-dir preparation; --bail=true + malformed ignored stdin rejected pre-spawn) while direct imports of the on-disk dist passed both. After a full pi quit+relaunch, the same calls behave correctly (raw-row mkdir works, argv-mode stdin ignored, record-start invalidation chain intact).
Actions:
- README + docs/RELEASE.md + docs/COMMAND_REFERENCE.md operational note: after updating this package, restart pi;
/reload is not sufficient for the compiled entrypoint.
- Consider reporting the jiti
tryNative reload gap upstream to pi (affects every compiled/multi-file .js extension, not just this package).
- Optional: investigate whether a cache-busting entrypoint shim (query-param import or version-stamped filename emitted by prepare) can make /reload effective for this package without pi-core changes.
Context: found during post-release v0.4.1 verification (d6cde09).
Symptom: after
pi update --extensionscorrectly reconciles the git clone andpreparerebuildsdist/, a running pi process keeps executing the previously imported extension modules./reloaddoes NOT swap them: pi-core's extension loader (dist/core/extensions/loader.js) creates jiti withmoduleCache: false, but in built-Node mode jiti'stryNativepath uses nativeimport()for plain.jsentrypoints/imports, and node's process-wide ESM cache returns the old modules. TypeScript-source extensions re-transpile and truly hot-swap; compiled-dist extensions like this one do not.Proof: live tool ran pre-v0.4.1 behavior (raw batch rows got no parent-dir preparation;
--bail=true+ malformed ignored stdin rejected pre-spawn) while direct imports of the on-disk dist passed both. After a full pi quit+relaunch, the same calls behave correctly (raw-row mkdir works, argv-mode stdin ignored, record-start invalidation chain intact).Actions:
/reloadis not sufficient for the compiled entrypoint.tryNativereload gap upstream to pi (affects every compiled/multi-file .js extension, not just this package).