Skip to content

feat(js-api): add spanInBytesToSpanInCodeUnits in subpath exports#9940

Open
regseb wants to merge 1 commit intobiomejs:nextfrom
regseb:spanInBytesToSpanInCodeUnits
Open

feat(js-api): add spanInBytesToSpanInCodeUnits in subpath exports#9940
regseb wants to merge 1 commit intobiomejs:nextfrom
regseb:spanInBytesToSpanInCodeUnits

Conversation

@regseb
Copy link
Copy Markdown
Contributor

@regseb regseb commented Apr 12, 2026

Summary

Export the new spanInBytesToSpanInCodeUnits function (issue #4035 / PR #8944) to the subpath exports of the @biomejs/js-api package.

The goal is to have the same exports in both the main and the subpaths.

Test Plan

n/a

Docs

n/a

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 12, 2026

🦋 Changeset detected

Latest commit: 11ea2f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@biomejs/js-api Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 12, 2026

Walkthrough

A new helper function, spanInBytesToSpanInCodeUnits, has been exported from @biomejs/js-api across its subpath entry points (nodejs, bundler, and web). The helper converts diagnostic spans expressed in bytes to code-unit offsets, allowing correct text extraction via slice operations. A Changesets entry documents this addition as a minor version bump for the package.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: exporting spanInBytesToSpanInCodeUnits to subpath exports of @biomejs/js-api.
Description check ✅ Passed The description clearly explains the PR's purpose: exporting a new function to subpath exports to align APIs.

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

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

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.

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