Skip to content

Fix CommonJS runtime compatibility - #59

Merged
zth merged 1 commit into
mainfrom
agent/fix-commonjs-runtime
Aug 5, 2026
Merged

Fix CommonJS runtime compatibility#59
zth merged 1 commit into
mainfrom
agent/fix-commonjs-runtime

Conversation

@zth

@zth zth commented Aug 5, 2026

Copy link
Copy Markdown
Owner

What changed

  • normalize the DataLoader constructor through a CommonJS compatibility helper
  • provide true CommonJS stable-stringify and Relay connection helpers
  • make compiler-generated CJS and ESM runtimes reference the compatible helpers
  • exercise DataLoader loads, connection/base64 helpers, CommonJS dependency paths, and packed artifacts
  • run package/release tests on Node 20.11.0
  • prepare the 1.3.4 patch release

Root cause

The CommonJS DataLoader binding compiled to require("dataloader").default, although dataloader 2.x exports its constructor directly. The generated CommonJS runtime also synchronously required local .mjs helpers, which is unsupported on the lower end of ResGraph’s declared Node range.

Validation

  • npm run build
  • npm run test:package
  • opam exec -- make test

@zth
zth merged commit 3756a5c into main Aug 5, 2026
5 checks passed
@zth
zth deleted the agent/fix-commonjs-runtime branch August 5, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant