Skip to content

docs(bare): build the runtime reference from src/bare.d.ts - #418

Closed
lucas-tortora wants to merge 2 commits into
publishedfrom
docs/bare-runtime-from-dts-1-35
Closed

lucas-tortora wants to merge 2 commits into
publishedfrom
docs/bare-runtime-from-dts-1-35

Conversation

@lucas-tortora

Copy link
Copy Markdown

Bare 1.35.0 moved its type declarations from npm/index.d.ts to src/bare.d.ts and removed the API section from the README (holepunchto/bare#239). The JSDoc in the new file is now the source for the JavaScript API, and main at v1.35.1 has the identical file.

What changed

  • Doc-state generator. gen-bare-docs-states reads src/bare.d.ts and falls back to npm/index.d.ts for older tags. Without the fallback the tag walk stopped at 1.34.1 and lost all history. Regenerated bare-runtime-docs-states.json: new stable 1.35.0 state, so <Since v="1.35.0" /> validates.
  • Upstream-commit watch. bare-runtime now watches src/bare.d.ts (the old path is gone on main), baselined at 3f7cae81, the commit reviewed here.
  • runtime.mdx, checked against the JSDoc and Bare source at v1.35.1:
    • Addon.loaded(url) and the Thread mount option, both Since 1.35.0
    • addons in a .bundle thread source are treated as on disk (#244)
    • WebAssembly addons stay loadable after Addon.seal() (threat model)
    • bare_module_find() returns void * (was uv_lib_t *)
    • wasi and wasm32 in the bare/target.h macros
    • rewrote the maintainer note that still described seal() as missing from the .d.ts and the README as an audit source

Not in this PR

  • Bare.suspend()/wakeup() clamping of linger and deadline (#250) landed on main after 1.35.1. It's noted in the maintainer comment to revisit on release.
  • The regenerated CLI and Kit state files only gained new release numbers, so I left them out.

Checks

check:docs-versions, check:doctypes, check:internal-links, check:cross-links, and check:bare-c-api --ref v1.35.1 pass, and the page compiles as MDX.

🤖 Generated with Claude Code

Bare 1.35.0 moved its type declarations from npm/index.d.ts to
src/bare.d.ts and dropped the API section from the README (holepunchto/bare#239),
so the JSDoc there is now the source for the JavaScript API.

- gen-bare-docs-states reads src/bare.d.ts and falls back to
  npm/index.d.ts for older tags, so the doc-state history survives the move.
  Regenerated the bare-runtime states: new stable 1.35.0 state.
- Point the upstream-commits watch at src/bare.d.ts and baseline it at the
  reviewed commit; the old path no longer exists on main.
- runtime.mdx: add Addon.loaded() and the Thread mount option (Since 1.35.0),
  bundle addons on threads, WebAssembly addons after sealing, bare_module_find()
  returning void *, and the wasi/wasm32 target macros. Rewrite the maintainer
  note that still described seal() as missing from the .d.ts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kinsta

kinsta Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Preview deployments for pear-docs preview ⚡️

Status Branch preview Commit preview
❌ Failed to deploy N/A N/A

Commit: 49b73c6621a738330bcc8abe5cb30f7fe1626b5a

Deployment ID: 0e3fb151-6fe0-425d-b094-531e22922dc6

Static site name: pear-docs-preview-iimt7

@kinsta

kinsta Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Preview deployments for pear-docs published ⚡️

Status Branch preview Commit preview
✅ Ready Visit preview Visit preview

Commit: 49b73c6621a738330bcc8abe5cb30f7fe1626b5a

Deployment ID: 7532d66f-3ab3-4e08-9790-57611ed1eaa3

Static site name: pear-docs-published-i1yp5

- mount: 'file:///' lets the bundle serve modules at any file: URL, not read
  any file; the thread protocol still reaches nothing. Fold the TypeError note
  into the mount option and give the .bundle sentence a subject.
- Bare.platform and Bare.arch return wasi and wasm32 from 1.35.0, the same
  macros the bare/target.h row lists; the .d.ts unions do not list them yet.
- Bump the bare/version.h example string to 1.35.1.
- Move the bare_module_find uv_lib_t * history to the end of the paragraph.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
preview — 49b73c66 Deployed Oct 14, 2026 by kinsta[bot]
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