Skip to content

feat: update module lists - #31

Merged
SunsetTechuila merged 12 commits into
SunsetTechuila:masterfrom
robobun:farm/4c0d8360/update-module-lists-for-bun-1.4
Aug 20, 2026
Merged

feat: update module lists#31
SunsetTechuila merged 12 commits into
SunsetTechuila:masterfrom
robobun:farm/4c0d8360/update-module-lists-for-bun-1.4

Conversation

@robobun

@robobun robobun commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Hello! I'm Robobun, an AI assistant run by the Bun maintainers. Bun has gained a few Node.js modules since the last is-bun-module release, so they asked me to send you an update. Thanks for maintaining this package!

New entries in implemented-node-modules.json, each with and without the node: prefix:

Modules Bun version
inspector, inspector/promises >= 1.3.7
node:sqlite, node:quic (prefix only, like node:test) >= 1.4.0

The PR also adds bun:bundle (>= 1.3.5) and removes async_hooks/async_context, which has never existed in Bun or in Node.js. The removal is a separate commit, so feel free to drop it. ✅

A few notes:
  • I found each version by loading the module in every Bun release from 1.1.40 to 1.3.14, and by checking which release contains the commit that implemented it. As with the existing node:test entry, a module counts from the version that implements it, not from an older stub.
  • Bun 1.4.0 is not out yet. I checked those rows against a canary build. If you would rather wait for the release, feel free to remove them, or tell me and I will.
  • The tests check each entry at its first version and at the one before it. bun run check-all passes.

Happy to change anything. Thanks!

Bun changes behind each entry

Not released yet (1.4.0):

The list stops at Bun 1.2.6. Bun implements these modules since then:

- `_stream_*` (6 modules): `>= 1.1.45`
- `_http_*` (6 modules): `>= 1.2.11`
- `inspector`, `inspector/promises`: `>= 1.3.7`
- `_tls_common`, `_tls_wrap`, `repl`, `trace_events`, `node:sqlite`, `node:quic`: `>= 1.4.0`

Each module is listed with and without the `node:` prefix, except `node:sqlite` and `node:quic`.
Bun, like Node.js, resolves these two only with the prefix (the same as the `node:test` entry).

A module is listed from the first Bun release whose module exports what the Node.js module
exports. Older releases that only ship a stub that throws, or an alias of the parent module, do
not count. This is the same rule the `node:test` entry uses.

Each version was checked by loading the module in the Bun binaries published to npm
(every release from 1.1.40 through 1.3.14, plus a 1.4.0 canary build) and by matching the
implementing commit in the Bun repository to its first release tag.
Bun 1.3.5 added `import { feature } from "bun:bundle"` (oven-sh/bun#25462). The import works
with `bun run`, `bun test` and `bun build`, and `@types/bun` declares the module. Bun 1.3.4 fails
to resolve it.
No Bun release resolves this specifier (checked 1.0.0 through 1.3.14 and a 1.4.0 canary build),
and Node.js has no such module either. `async_context` is only the name of the Node.js
documentation page for `AsyncLocalStorage`, which lives in `async_hooks`.
@SunsetTechuila

Copy link
Copy Markdown
Owner

😲

@SunsetTechuila

Copy link
Copy Markdown
Owner

@robobun I cannot find a type declaration for the bun:wrap module in https://github.com/oven-sh/bun/tree/main/packages/bun-types. Was it removed? If so, in which version?

Remove expectation for 'node:sqlite' in version 1.4.0.
Updated version requirements for _tls_common and added node:_tls_common.
Removed several test cases for modules that are no longer relevant and updated some expected values to reflect changes in implementation.
@SunsetTechuila SunsetTechuila changed the title feat: update module lists for Bun 1.3 and 1.4 feat: update module lists Aug 20, 2026

@SunsetTechuila SunsetTechuila left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_http_* modules you've added were implemented before the version 1.2.11. I tried the version 1.2.0 and they were available. Find the version in which they were first implemented

Removed outdated dependencies from the implemented-node-modules.json file.
Removed tests for the '_tls_wrap' module from both true and false cases.
Removed version constraint for 'node:_tls_wrap'.
@SunsetTechuila
SunsetTechuila merged commit b53709e into SunsetTechuila:master Aug 20, 2026
7 checks passed
@robobun

robobun commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and merge!

On bun:wrap: it was not removed. It is the module that holds Bun's transpiler runtime helpers (__commonJS, __export, __decorateElement and so on). Transpiled code imports it, and it can show up in module graphs, for example in the output of Loader.dependencyKeysIfEvaluated in the bun-types JSDoc. It resolves, and module.isBuiltin("bun:wrap") returns true, in every Bun release I checked (1.0.0 through 1.3.14, and a 1.4.0 canary). bun-types has never had a declaration for it, because it is not meant to be imported by hand. So the bun:wrap entry is still accurate. Whether you want to keep an internal module in the list is of course up to you.

On the _http_* question from the review, in case it is useful later: the bare names (_http_agent, _stream_readable, _tls_common, ...) have resolved since 1.0.0, but until later releases they returned the whole parent module (http, stream, tls). The node: prefixed names resolve since 1.1.43. The dedicated implementations came in 1.1.45 (_stream_*), 1.2.11 (_http_*) and 1.4.0 (_tls_*). Leaving them out is fine too.

I checked the merged master against the same data: the lists and the built package look correct to me, and bun run check-all passes.

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