Skip to content

fix(init): correct API docs URL in generated CLAUDE.md - #27969

Closed
robobun wants to merge 1 commit into
mainfrom
claude/fix-init-claude-md-docs-27950
Closed

robobun wants to merge 1 commit into
mainfrom
claude/fix-init-claude-md-docs-27950

Conversation

@robobun

@robobun robobun commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • bun init generates a CLAUDE.md that references node_modules/bun-types/docs/**.mdx, but that path doesn't exist when installing @types/bun
  • Updated the reference to point to the primary Bun documentation at https://bun.sh/docs

Closes #27950
Closes #27964

Test plan

  • Ran bun init with debug build and verified the generated CLAUDE.md contains https://bun.sh/docs instead of the old node_modules/bun-types/docs/**.mdx path
  • Existing init tests pass (3 pre-existing snapshot failures unrelated to this change)

The generated CLAUDE.md referenced `node_modules/bun-types/docs/**.mdx`
which doesn't exist when installing `@types/bun`. Point to the primary
docs at https://bun.sh/docs instead.

Closes #27950
@robobun

robobun commented Mar 10, 2026 •

Copy link
Copy Markdown
Collaborator Author
Updated 8:43 PM PT - Mar 9th, 2026

❌ @claude, your commit b80b0cc has 7 failures in Build #39140 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 27969

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

bun-27969 --bun

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d0aa7359-a213-4839-b698-5f67b9058aca

📥 Commits

Reviewing files that changed from the base of the PR and between 1f2a586 and b80b0cc.

📒 Files selected for processing (1)
  • src/init/rule.md

Walkthrough

Updated the documentation reference in the initialization template from a local node_modules path to the official Bun documentation URL. This corrects an inaccurate file path that was included in the generated CLAUDE.md file.

Changes

Cohort / File(s) Summary
Init Template Documentation
src/init/rule.md
Updated API documentation link from local path node_modules/bun-types/docs/**.mdx to external URL https://bun.sh/docs in the initialization rule template.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: correcting an API docs URL in the generated CLAUDE.md file, which directly matches the linked issues' objectives.
Description check ✅ Passed The description includes both required sections (What does this PR do and How did you verify your code works) with clear details about the issue, solution, and test verification.
Linked Issues check ✅ Passed The PR directly addresses the requirements from issues #27950 and #27964 by updating the CLAUDE.md template to reference the correct Bun documentation URL at https://bun.sh/docs instead of the non-existent local path.
Out of Scope Changes check ✅ Passed The single file change (src/init/rule.md) is narrowly focused on correcting the documentation URL, with no extraneous modifications beyond the scope of the linked issues.

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


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

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM — straightforward docs URL fix.

Extended reasoning...

Overview

This PR changes a single line in src/init/rule.md, updating the Bun API docs reference from a non-existent local path (node_modules/bun-types/docs/**.mdx) to the correct public URL (https://bun.sh/docs).

Security risks

None. This is a documentation-only change in a markdown template file.

Level of scrutiny

Minimal scrutiny needed. This is a one-line text fix in a generated CLAUDE.md template — no code logic, no configuration, no security surface.

Other factors

The fix is clearly correct (the old path does not exist in @types/bun), the replacement URL is the canonical Bun documentation site, no bugs were found, and there are no outstanding reviewer comments.

@alii

alii commented Mar 10, 2026

Copy link
Copy Markdown
Member

@robobun That's not quite true, bun-types DOES vendor the Bun docs in markdown - See https://app.unpkg.com/bun-types@1.3.10/files/docs

@robobun

robobun commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator Author

@alii is correct — bun-types vendors 324 .mdx doc files under docs/. Since @types/bun depends on bun-types, the path node_modules/bun-types/docs/**.mdx is valid after bun init + bun install.

Verified by downloading the tarball:

$ npm pack bun-types@1.3.10
$ tar tzf bun-types-1.3.10.tgz | grep -c 'package/docs/'
324

This PR's change is incorrect — it replaces a useful local reference to vendored docs with a web URL. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect link to API docs in bun init CLAUDE.md Incorrect link to API docs in bun init CLAUDE.md

3 participants