Skip to content

🐛 Skip non-documentable .wasm exports in doc generation#1157

Merged
cowboyd merged 1 commit intov4from
fix/skip-wasm-exports-in-docs
Apr 21, 2026
Merged

🐛 Skip non-documentable .wasm exports in doc generation#1157
cowboyd merged 1 commit intov4from
fix/skip-wasm-exports-in-docs

Conversation

@cowboyd
Copy link
Copy Markdown
Member

@cowboyd cowboyd commented Apr 21, 2026

Motivation

The website build crashes when generating docs for @effectionx/inline because its package.json exports include a ./swc entry pointing to a WASM binary (swc/target/wasm32-wasip1/release/swc_plugin_inline.wasm). This file is a Rust build artifact that:

  1. Doesn't exist in the git clone (it's in .gitignore)
  2. Isn't parseable as TypeScript/JavaScript even if it did exist

The doc loader's Deno.readTextFile() call hits an ENOENT, breaking the entire site build.

Approach

Add an isDocumentable() filter in normalizeExports() that skips .wasm file exports before they reach the doc generation pipeline.

Possible Drawbacks or Risks

If a future package legitimately needs documentation generated from a .wasm export, it would be silently skipped. This seems unlikely since WASM binaries aren't source-documentable.

The @effectionx/inline package exports a ./swc entry pointing to a
WASM binary build artifact. This file doesn't exist in git clones and
isn't parseable as TypeScript, causing the website build to crash with
a readTextFile ENOENT error.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 21, 2026

Open in StackBlitz

npm i https://pkg.pr.new/effection@1157

commit: 336e876

@cowboyd cowboyd requested review from jbolda and taras April 21, 2026 18:43
@cowboyd cowboyd merged commit d4a39f1 into v4 Apr 21, 2026
14 of 16 checks passed
@cowboyd cowboyd deleted the fix/skip-wasm-exports-in-docs branch April 21, 2026 18:51
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