Skip to content

docs: tolerate missing Node API docs declarations#94

Merged
rapids-bot[bot] merged 1 commit into
NVIDIA:mainfrom
willkill07:wkk_docs/missing-node-api-declarations
May 13, 2026
Merged

docs: tolerate missing Node API docs declarations#94
rapids-bot[bot] merged 1 commit into
NVIDIA:mainfrom
willkill07:wkk_docs/missing-node-api-declarations

Conversation

@willkill07
Copy link
Copy Markdown
Member

@willkill07 willkill07 commented May 13, 2026

Overview

Make the Node.js API docs artifact builder tolerate optional declaration files that are absent when sphinx-multiversion builds older release tags.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Keep the root index.d.ts artifact required so a broken Node package build still fails loudly.
  • Filter subpath docs modules to the declaration files present in the checked-out version before staging declarations, writing TypeDoc entrypoints, and rendering generated pages.
  • Log skipped optional modules, such as observability.d.ts in the 0.1.0 tag, instead of throwing ENOENT during multi-version docs builds.

Validation:

  • node --check scripts/docs/build_node_docs_artifacts.mjs
  • just docs-github-pages
  • SKIP=lychee git commit -s -m "docs: tolerate missing Node API docs declarations" because the commit hook's docs markdown linkcheck failed on pre-existing generated Rust API links unrelated to this change.

Where should the reviewer start?

Start with scripts/docs/build_node_docs_artifacts.mjs, especially the new availableModules() filtering path and the places that now pass the filtered module list through staging, entrypoint generation, and page rendering.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Relates to: none

Summary by CodeRabbit

  • Refactor
    • Updated Node API documentation build to dynamically validate available modules and gracefully skip missing optional ones.
    • Improved build pipeline reliability by threading computed modules list through documentation generation stages.

Review Change Stack

Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07 willkill07 requested a review from a team as a code owner May 13, 2026 13:02
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: fd8324a3-9ad0-4174-86ab-93036249ee34

📥 Commits

Reviewing files that changed from the base of the PR and between 64a9710 and 60e1028.

📒 Files selected for processing (1)
  • scripts/docs/build_node_docs_artifacts.mjs
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (2)
{.github/**/*.{yml,yaml},*.patch,scripts/**/*,*.sh,*.bat,Dockerfile*}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update CI configuration, patch files, and build scripts with new functional identifiers after rename operations

Files:

  • scripts/docs/build_node_docs_artifacts.mjs
{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}

⚙️ CodeRabbit configuration file

{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}: Review automation changes for reproducibility, pinned versions where appropriate, secret handling, and consistency with the documented validation matrix.
Pay attention to commands that need generated native artifacts, FFI libraries, or platform-specific environment variables.

Files:

  • scripts/docs/build_node_docs_artifacts.mjs
🔇 Additional comments (1)
scripts/docs/build_node_docs_artifacts.mjs (1)

28-28: LGTM!

Also applies to: 162-167, 201-217, 248-259, 325-338


Walkthrough

The build script now determines which Node API documentation modules are available by checking whether their TypeDoc declaration artifacts exist. The index.d.ts module is marked required, so missing it throws an error; optional modules with missing artifacts are skipped with a warning. This filtered module list is computed and threaded through the staging, entrypoint, and page generation steps, replacing previous static module usage.

Changes

Module availability and pipeline threading

Layer / File(s) Summary
Module availability detection
scripts/docs/build_node_docs_artifacts.mjs
MODULES config marks index.d.ts as required. New declarationPath() helper and availableModules() function filter modules by checking artifact existence, throwing for missing required modules and warning for missing optional modules.
Build pipeline threading
scripts/docs/build_node_docs_artifacts.mjs
main() computes available modules and passes the list to stageDeclarationSources(), writeModuleEntrypoints(), and writeModulePages(). Each function now operates on the provided modules instead of the static MODULES constant, ensuring only available modules are staged, have entrypoints written, and have pages emitted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title follows Conventional Commits format with 'docs' type and clearly describes the change: tolerating missing Node API documentation declarations.
Description check ✅ Passed Description includes all required template sections with specific details: overview context, implementation details, reviewer guidance, and validation steps.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:S PR is small Documentation documentation-related lang:js PR changes/introduces Javascript/Typescript code labels May 13, 2026
@willkill07 willkill07 self-assigned this May 13, 2026
@willkill07
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit 4107db0 into NVIDIA:main May 13, 2026
22 checks passed
@willkill07 willkill07 added this to the 0.2 milestone May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation documentation-related lang:js PR changes/introduces Javascript/Typescript code size:S PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants