Skip to content

fix(imports): use stream-json v3 lowercase assembler.js path#473

Merged
therealbrad merged 1 commit into
mainfrom
fix/stream-json-assembler-import
Jun 26, 2026
Merged

fix(imports): use stream-json v3 lowercase assembler.js path#473
therealbrad merged 1 commit into
mainfrom
fix/stream-json-assembler-import

Conversation

@therealbrad

@therealbrad therealbrad commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

stream-json v3 restructured the package — the old capital-A stream-json/Assembler entry no longer exists; the Assembler now lives at the lowercase stream-json/assembler.js subpath. The current import resolves fine on macOS (case-insensitive FS) but fails with MODULE_NOT_FOUND at runtime on case-sensitive filesystems (Linux/Docker), breaking the testmo-import-worker.

Changes:

  • services/imports/testmo/TestmoExportAnalyzer.ts — import from stream-json/assembler.js.
  • types/stream-json.d.ts — declare the new lowercase subpath.
  • Delete services/imports/testmo/TestmoExportAnalyzer.original.ts — dead backup (nothing imported it; leftover from the initial public release) that still carried the broken import.

Related Issue

N/A — surfaced while building the Docker image on a Linux host.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement

How Has This Been Tested?

  • Manual testing

The Docker image now builds and the worker require-graph resolves on a case-sensitive Linux host. require.resolve('stream-json/Assembler') also fails locally while require.resolve('stream-json/assembler.js') succeeds, confirming the path moved in v3.

Test Configuration:

  • OS: Linux (Docker) + macOS
  • Node version: 22

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Additional Notes

The same fix is also included in the ZenStack v3 upgrade branch (PR #471); this PR applies it to main directly because main's release builds (Linux containers via Colima) hit the same failure.

stream-json v3 restructured the package: the old capital-A "stream-json/Assembler"
entry no longer exists and fails to resolve with MODULE_NOT_FOUND at runtime on
case-sensitive filesystems (Linux/Docker) — breaking the testmo-import-worker. It
stayed latent on macOS (case-insensitive FS). Point the import at the new
"stream-json/assembler.js" subpath and update the ambient declaration to match.

Also deletes the dead TestmoExportAnalyzer.original.ts backup (nothing imported
it; a leftover from the initial public release) which still carried the broken
import — so the legacy capital-A type declaration is no longer needed.
@therealbrad therealbrad merged commit 0cfe557 into main Jun 26, 2026
5 checks passed
@therealbrad therealbrad deleted the fix/stream-json-assembler-import branch June 26, 2026 21:50
@therealbrad

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 0.40.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant