Skip to content

test: module-hooks inline-typescript tests + upstream TS fixture (+4 tests) - #35695

Draft
cirospaciari wants to merge 8 commits into
claude/node-esm-loader-hooksfrom
claude/node-module-hooks-ts
Draft

cirospaciari wants to merge 8 commits into
claude/node-esm-loader-hooksfrom
claude/node-module-hooks-ts

Conversation

@cirospaciari

Copy link
Copy Markdown
Member

⚠️ Size call for review: this vendors upstream's test/fixtures/snapshot/typescript.js — a 10.5MB text fixture (the bundled TypeScript compiler) — byte-verbatim. It is what Node's own suite ships; the 4 vendored module-hooks inline-typescript tests chain registerHooks (landed in #35690) through it. If 10.5MB in-repo is unacceptable, the alternative is generating/downloading it at test time, which trades hermeticity.

…eam TypeScript fixture

The four inline-typescript module-hooks tests exercise registerHooks-driven
TypeScript transpilation. They need upstream's bundled TypeScript compiler
fixture (test/fixtures/snapshot/typescript.js, 10.5MB, vendored byte-verbatim).
@github-actions

Copy link
Copy Markdown
Contributor

Found 3 issues this PR may fix:

  1. node:module is missing the named ESM export registerHooks #34171 - PR's parent (node:module: implement synchronous module.registerHooks() (+49 tests) #35690) implements the missing registerHooks named ESM export from node:module; this PR validates it with tests
  2. Bun does not support module.registerHooks #27369 - module.registerHooks was returning undefined; the implementation validated by these tests resolves this
  3. Bun throws TypeError when using createImportFresh from import-fresh #31472 - import-fresh throws because registerHooks is not a function; implementing registerHooks (tested here) fixes the root cause

If this is helpful, copy the block below into the PR description to auto-close these issues on merge.

Fixes #34171
Fixes #27369
Fixes #31472

🤖 Generated with Claude Code

@robobun

robobun commented Jul 25, 2026 •

Copy link
Copy Markdown
Collaborator
Updated 11:50 PM PT - Aug 21st, 2026

❌ @robobun, your commit 7b9c96f has 6 failures in Build #103297 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 35695

That installs a local version of the PR into your bun-35695 executable, so you can run:

bun-35695 --bun

This branch has not been deployed

No deployments
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.

2 participants