Skip to content

docs: correct typo - #30696

Closed
pnodet wants to merge 3 commits into
oven-sh:mainfrom
pnodet:pnodet-5
Closed

pnodet wants to merge 3 commits into
oven-sh:mainfrom
pnodet:pnodet-5

Conversation

@pnodet

@pnodet pnodet commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Fix minor typo in docs

@pnodet
pnodet requested a review from alii as a code owner May 14, 2026 13:42

@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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 85e0884f-e752-4a6b-9be9-64c50bbfa10f

📥 Commits

Reviewing files that changed from the base of the PR and between 3f8fec0 and 15a5980.

📒 Files selected for processing (1)
  • packages/bun-types/bun.d.ts

Walkthrough

This PR updates wording for StringWidthOptions.ambiguousIsNarrow in the TypeScript definitions and user docs to state that ambiguous-width characters and emoji count as 1 column when true and 2 columns when false. No code or type signatures changed.

Changes

stringWidth Documentation

Layer / File(s) Summary
ambiguousIsNarrow option documentation
packages/bun-types/bun.d.ts, docs/runtime/utils.mdx
JSDoc and user-facing documentation for the ambiguousIsNarrow option are corrected to clarify that ambiguous-width characters and emoji are counted as 1 column when the option is true and 2 columns when false.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is minimal and does not follow the required template with 'What does this PR do?' and 'How did you verify your code works?' sections. Expand the description to include both required template sections: explain what the typo correction addresses and provide verification details.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: correcting a typo in documentation related to the Bun.stringWidth function's ambiguousIsNarrow option.
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.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/runtime/utils.mdx`:
- Line 441: Update the sentence describing ambiguousIsNarrow to fix grammar and
reflect the actual behavior: replace the emoji-centric wording with
"ambiguous-width characters" and correct plurality to "1 character" and "2
characters", and state that when ambiguousIsNarrow is true those ambiguous-width
characters are counted as 1 character (narrow) and when false they are counted
as 2 characters (wide); ensure the phrasing matches the option name
ambiguousIsNarrow and is consistent with surrounding docs.

In `@packages/bun-types/bun.d.ts`:
- Line 556: Update the JSDoc for ambiguousIsNarrow to fix grammar and clarify
behavior: change the wording to explicitly mention "ambiguous-width characters
(e.g., some emoji)" and state that when ambiguousIsNarrow is true those
characters are treated as occupying one column (narrow), and when false they are
treated as occupying two columns (wide); update the docstring near the
ambiguousIsNarrow property to use singular/plural correctly and include the
example parenthetical.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2a34959f-2a8f-40cd-97d8-c58fbd286a19

📥 Commits

Reviewing files that changed from the base of the PR and between 19d8ade and 8412a79.

📒 Files selected for processing (2)
  • docs/runtime/utils.mdx
  • packages/bun-types/bun.d.ts

Comment thread docs/runtime/utils.mdx Outdated
Comment thread packages/bun-types/bun.d.ts Outdated
@robobun

robobun commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the fix. I am closing this PR as a duplicate. Here is the state on main.

The packages/bun-types/bun.d.ts part of this change already landed in #33112 (commit 16a7269). The JSDoc for ambiguousIsNarrow on main now reads: "If true, count ambiguous-width characters as 1 character wide. If false, count them as 2 characters wide." That is why this branch shows a conflict.

The docs/runtime/utils.mdx line is the only part still wrong on main. #41090 fixes that line and merges cleanly, so it carries the fix now. I left a note there that suggests your wording, because it matches the bun.d.ts text on main.

If you prefer to rebase this branch instead, you can reopen this PR.

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