Skip to content

refactor: extract shared LengthStrategy type#3940

Draft
Shinigami92 wants to merge 2 commits into
nextfrom
refactor-extract-length-strategy-type
Draft

refactor: extract shared LengthStrategy type#3940
Shinigami92 wants to merge 2 commits into
nextfrom
refactor-extract-length-strategy-type

Conversation

@Shinigami92

@Shinigami92 Shinigami92 commented Jul 6, 2026

Copy link
Copy Markdown
Member

@Shinigami92 Shinigami92 self-assigned this Jul 6, 2026
@Shinigami92 Shinigami92 requested a review from a team as a code owner July 6, 2026 16:52
@Shinigami92 Shinigami92 added the c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs label Jul 6, 2026
@netlify

netlify Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit f476ad6
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6a4faceff338b80009c33028
😎 Deploy Preview https://deploy-preview-3940.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.85%. Comparing base (c2cd91d) to head (f476ad6).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3940   +/-   ##
=======================================
  Coverage   98.84%   98.85%           
=======================================
  Files         923      924    +1     
  Lines        3216     3222    +6     
  Branches      583      566   -17     
=======================================
+ Hits         3179     3185    +6     
  Misses         33       33           
  Partials        4        4           
Files with missing lines Coverage Δ
src/modules/lorem/module.ts 100.00% <ø> (ø)
src/modules/word/filter-word-list-by-length.ts 100.00% <ø> (ø)
src/modules/word/module.ts 96.00% <ø> (ø)
src/utils/types.ts 100.00% <100.00%> (ø)
🚀 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.

Comment thread src/utils/types.ts Outdated
@ST-DDT ST-DDT added this to the v10.x milestone Jul 6, 2026
@ST-DDT ST-DDT added p: 1-normal Nothing urgent m: utils Something related to public utils (methods/types) labels Jul 6, 2026
@Shinigami92

Shinigami92 commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

I will add the docs here when #3939 got merged, to not fall into to many merge conflicts

@ST-DDT

ST-DDT commented Jul 6, 2026

Copy link
Copy Markdown
Member

I will add the docs here when #3939 got merged, to not fall into to many merge conflicts

I have added a preview link for ease of verifcation.
AFAICT this PR does not need a docs upgrade, since the union type is already covered.

@Shinigami92 Shinigami92 force-pushed the refactor-extract-length-strategy-type branch from e802502 to f476ad6 Compare July 9, 2026 14:15

@xDivisionByZerox xDivisionByZerox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We would loose the information describing each strategy itself with this PR:

Before After

@Shinigami92

Copy link
Copy Markdown
Member Author

We would loose the information describing each strategy itself with this PR:

Before After

That is a blocker for me 🙁
I can throw Claude on this again in next few days

@Shinigami92 Shinigami92 marked this pull request as draft July 10, 2026 18:09
@ST-DDT

ST-DDT commented Jul 10, 2026

Copy link
Copy Markdown
Member

Should we add a Types page?

@Shinigami92

Copy link
Copy Markdown
Member Author

Should we add a Types page?

If so, it needs clickable links from the method docs. But then you might loose the context / back history and get lost. How about hover tooltips? But these might introduce problems with mobile device docs. 🤔 Do you have further ideas?

@ST-DDT

ST-DDT commented Jul 10, 2026

Copy link
Copy Markdown
Member

Use the shadow type system and add the description as hoverable text.
Aka use the detected types to do actual work.

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

Labels

c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: utils Something related to public utils (methods/types) p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants