fix(imports): use stream-json v3 lowercase assembler.js path#473
Merged
Conversation
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.
Contributor
Author
|
🎉 This PR is included in version 0.40.10 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
stream-jsonv3 restructured the package — the old capital-Astream-json/Assemblerentry no longer exists; the Assembler now lives at the lowercasestream-json/assembler.jssubpath. The current import resolves fine on macOS (case-insensitive FS) but fails withMODULE_NOT_FOUNDat runtime on case-sensitive filesystems (Linux/Docker), breaking the testmo-import-worker.Changes:
services/imports/testmo/TestmoExportAnalyzer.ts— import fromstream-json/assembler.js.types/stream-json.d.ts— declare the new lowercase subpath.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
How Has This Been Tested?
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 whilerequire.resolve('stream-json/assembler.js')succeeds, confirming the path moved in v3.Test Configuration:
Checklist
Additional Notes
The same fix is also included in the ZenStack v3 upgrade branch (PR #471); this PR applies it to
maindirectly becausemain's release builds (Linux containers via Colima) hit the same failure.