Expose a couple string utils - #28004
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (241 lines, 6 files), I've queued these reviewers:
How this works
|
There was a problem hiding this comment.
Pull request overview
Exposes existing Unicode string helper utilities from @fluidframework/tree by changing their TSDoc visibility to Alpha (@Alpha), and refactors validation/error behavior to use the shared validateIndex helper while expanding tests and adding benchmark coverage.
Changes:
- Promote
codePointCountandutf16LengthForCodePointsfrom@internalto@alpha, adding stability caveats in@privateRemarks. - Refactor
utf16LengthForCodePointsargument validation to usevalidateIndex, aligning error messages and updating tests accordingly. - Add micro-benchmarks comparing the
codePointAtapproach with a reference implementation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/dds/tree/src/text/codePointUtils.ts | Promote APIs to @alpha, add caveats, and refactor validation to validateIndex. |
| packages/dds/tree/src/test/text/codePointUtils.spec.ts | Expand correctness tests to cover multiple implementations and add benchmark cases. |
| .vscode/settings.json | Minor formatting cleanup and add misalign to cSpell dictionary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Joshua Smithrud (Josmithr)
left a comment
There was a problem hiding this comment.
Left a few suggestions. Overall looks good.
Bundle size comparisonBase commit: Notable changesNo bundles changed by ≥ 500 bytes parsed. Per-bundle deltas
|
|
🔗 Found some broken links! 💔 Run a link check locally to find them. See Checking for Broken Links for more information. linkcheck output |
Description
These are somewhat questionable helper methods that we have some interest in using experimentally in some applications for now until we can think of a better approach (or decide they make sense and stabilize them more).
They are being exposed as alpha instead of internal to help with this.
Reviewer Guidance
The review process is outlined on this wiki page.