fix(simplelog): repair the /otel entry, which threw on import in 2.0.0 - #14
Merged
Merged
Conversation
SyntaxError: Export named 'setSpanContextReader' not found in module
.../@murky-web/simplelog/dist/logger_factory.js
The build runs two tsdown config blocks, one `platform: "node"` and one
`platform: "neutral"`, writing to the same `outDir`. `logger_factory` was an
entry in neither, so each block emitted it keeping only the exports its own
entries used, and whichever finished last decided the file. The neutral block's
entries — deno, hono, web — never call `setSpanContextReader`, so when it won,
the export was gone and `dist/otel.js` imported a binding that did not exist.
The order is not fixed. Rebuilding the broken config five times produced a
working file once and a broken one four times, which is how this reached npm:
the release build happened to land on the losing order.
Naming `logger_factory` as an entry in both blocks preserves its full export
surface regardless of order. Verified stable over repeated builds.
`smoke:entries` imports every subpath in the `exports` map from the built
output and fails when one will not load or exports nothing. It runs in
`release:verify:simplelog`. Nothing already in place could have caught this:
lint and typecheck read the source, and the generated `otel.d.ts` described the
very export the JavaScript lacked, so the declaration agreed with the code that
was never emitted. Only loading the built files shows it. Bisected: the new
check fails on the unfixed build and passes on the fixed one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015zGgcXsDCDPNCSzhAWn1Zm
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.
The build runs two tsdown config blocks, one
platform: "node"and oneplatform: "neutral", writing to the sameoutDir.logger_factorywas an entry in neither, so each block emitted it keeping only the exports its own entries used, and whichever finished last decided the file. The neutral block's entries — deno, hono, web — never callsetSpanContextReader, so when it won, the export was gone anddist/otel.jsimported a binding that did not exist.The order is not fixed. Rebuilding the broken config five times produced a working file once and a broken one four times, which is how this reached npm: the release build happened to land on the losing order.
Naming
logger_factoryas an entry in both blocks preserves its full export surface regardless of order. Verified stable over repeated builds.smoke:entriesimports every subpath in theexportsmap from the built output and fails when one will not load or exports nothing. It runs inrelease:verify:simplelog. Nothing already in place could have caught this: lint and typecheck read the source, and the generatedotel.d.tsdescribed the very export the JavaScript lacked, so the declaration agreed with the code that was never emitted. Only loading the built files shows it. Bisected: the new check fails on the unfixed build and passes on the fixed one.Claude-Session: https://claude.ai/code/session_015zGgcXsDCDPNCSzhAWn1Zm