Skip to content

remove graphemeSegments pinning, which is not tree-shakable - #146

Merged
cometkim merged 2 commits into
mainfrom
unpin-segmenter
Jul 26, 2026
Merged

remove graphemeSegments pinning, which is not tree-shakable#146
cometkim merged 2 commits into
mainfrom
unpin-segmenter

Conversation

@cometkim

Copy link
Copy Markdown
Owner

It was a hack to make the CodSpeed benchmark happy.

Ok-ish while splitGraphemes and countGraphemes wrap the graphemeSegments as the core. But now they have their own loop.

They are now fully tree-shakable unless the graphemeSegments is pinned in the module scope.

@changeset-bot

changeset-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3ec929d

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

This PR includes changesets to release 1 package
Name Type
unicode-segmenter Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/unicode-segmenter@146

commit: 3ec929d

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9925197) to head (3ec929d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #146   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines         1057      1045   -12     
=========================================
- Hits          1057      1045   -12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Jul 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 48 untouched benchmarks


Comparing unpin-segmenter (3ec929d) with main (9925197)

Open in CodSpeed

@cometkim
cometkim merged commit 7374446 into main Jul 26, 2026
5 checks passed
@cometkim
cometkim deleted the unpin-segmenter branch July 26, 2026 19:55
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