Repository navigation
fix(module): preserve package interop in async CJS imports - #117
Merged
Merged
Conversation
Keep the parser format hint separate from the package-scope source tag. Adapts oven-sh#40940 for the async runtime loader.
steipete
added a commit
that referenced
this pull request
Oct 5, 2026
Merge oven-sh/bun through 9bd19c9 and pin the published OpenClaw WebKit 42ab38d705d4838748ccee77e7deb0e4e35515ee manifest. Preserve upstream and fork history, with the credited namespace counterpart from #106 and the original package-scope interop fix from #117. Keep the fork resolver, module-loader context, CallSite, cache and idle-accounting behavior. Configure fetch TLS once per connection and preserve PostgreSQL/MySQL query isolation through errors. Repair the inherited fetch leak fixture so it awaits its listener, requests and cleanup and checks actual object reclamation; synchronize the TLS renegotiation fixture with a framed client-ready message. Qualified with direct Linux builds, the fork selection, Node resolver oracle, Linux OpenClaw consumers, TLS before/after controls, both fork CI lanes, and a scoped-clean independent P2 review. No Bun release or tag.
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.
Async imports of
.cjsfiles inside a"type": "module"package lose the package's CommonJS interop behavior:exports.defaultis unwrapped and__esModuledisappears from the namespace. The async transpiler used the extension-derived parser hint as the package-context tag.Carry the parser hint separately and derive the interop tag from the already-resolved package metadata. This preserves CommonJS parsing while matching the synchronous loader's package handling, including cache hits. Adapts the focused parser/tag separation from oven-sh/bun#40940; thanks @robobun.
Node 24 passes the exact fixture. Existing native Windows baseline fails three annotation assertions; the added regression also protects plain
.cjstop-levelthis. P2 review is scoped-clean, all 12 Rust target checks pass without skips on the integration, and scoped formatting passes.Native Windows Server 2022 x64 proof used matched source and verified binaries: the resolver runner improved from 37/42 test files passing on fork main
d2d2a26ef973cdd97b37953f5dba58052acad74fto 42/42 passing, with both dependency-install steps also successful. The passing executable was built from local integration03aa23b6adea8e12235339d8650cae41fa1ea80d(tree1c5084c96b361801cd9f595795774ec41e81e250), combining four independent fixes. This branch's production and test files are byte-identical in that integration. Executable SHA-256:cbd65560d2f8651dc82722d1d957803651e2803f0a1a66ae039b946d3b53b156.OpenClaw consumer before/after qualification remains pending.
Exact-head fork CI passes both required lanes: Linux x64 (15/15 selected and compatibility test files) and macOS arm64 (12/12); both dependency-install steps also pass in each lane. Native Windows proof is recorded above because this PR workflow has no Windows test lane.
Broader native Windows qualification also passes: 29/29 selected compatibility test files and 2/2 dependency-install steps (31/31 runner rows), exit zero, no timeout, in 162.284 seconds. This uses runtime integration
c4cb855cda5787bb55f185bd4cbd3a33a2f0cc79(executable SHA-256b4073b6e8a59bf3365f1b6b5df954c767615a3317feca68067616750fb0fac8d) and the three exact process/TLS test-file blobs from harness commit81c8c5a2a5b5ab69eae1785dac8297717c5b2471, withBUN_TEST_NODE_VERSION=v24.21.0. Test-file bytes were verified before and after the run. This combined integration proof is separate from each PR’s individual CI and from OpenClaw consumer qualification.