Skip to content

refactor: extract shared NumberOrRange type - #3939

Merged
xDivisionByZerox merged 2 commits into
nextfrom
refactor-extract-number-or-range-type
Jul 25, 2026
Merged

xDivisionByZerox merged 2 commits into
nextfrom
refactor-extract-number-or-range-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:41
@netlify

netlify Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit f53525b
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6a5e492526486300098298ad
😎 Deploy Preview https://deploy-preview-3939.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.

@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
@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.91%. Comparing base (974490f) to head (f53525b).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3939   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files         924      924           
  Lines        3224     3224           
  Branches      585      585           
=======================================
  Hits         3189     3189           
  Misses         31       31           
  Partials        4        4           
Files with missing lines Coverage Δ
src/modules/airline/module.ts 100.00% <ø> (ø)
src/modules/date/module.ts 100.00% <ø> (ø)
src/modules/helpers/module.ts 94.84% <100.00%> (ø)
src/modules/lorem/module.ts 100.00% <100.00%> (ø)
src/modules/string/module.ts 100.00% <100.00%> (ø)
src/modules/system/module.ts 100.00% <ø> (ø)
src/modules/word/filter-word-list-by-length.ts 100.00% <ø> (ø)
src/modules/word/module.ts 96.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
@ST-DDT ST-DDT added p: 1-normal Nothing urgent m: utils Something related to public utils (methods/types) labels Jul 6, 2026
@ST-DDT ST-DDT added this to the v10.x milestone Jul 6, 2026

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

I added a preview link to the description.
If possible/relevant, please add a docs link for easy verification yourself.

Comment thread scripts/apidocs/processing/type.ts Outdated
@Shinigami92
Shinigami92 force-pushed the refactor-extract-number-or-range-type branch from 1e4fbaa to ba201fc Compare July 6, 2026 18:53
ST-DDT
ST-DDT previously approved these changes Jul 6, 2026
@ST-DDT

ST-DDT commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

Note: this is no longer detected as option like if used as standalone parametern.

https://fakerjs.dev/api/string.html#sample

grafik

https://deploy-preview-3939.fakerjs.dev/api/string.html#sample

grafik

Should we remove jsdoc @param length.min/max in that case?

@Shinigami92

Copy link
Copy Markdown
Member Author

Note: this is no longer detected as option like if used as standalone parametern.

fakerjs.dev/api/string.html#sample

grafik [deploy-preview-3939.fakerjs.dev/api/string.html#sample](https://deploy-preview-3939.fakerjs.dev/api/string.html#sample) grafik Should we remove jsdoc `@param length.min/max` in that case?

I not really sure yet, while working on the doc script implementation, I was already thinking why there is only newUnionType and newSimpleType, and I felt like I miss somehow a newObjectType 🤔 And maybe this here is the thing uncovered it 🤔

@ST-DDT

ST-DDT commented Jul 7, 2026

Copy link
Copy Markdown
Member

If you want to restore the previous behavior, you may need to look at this:

if (!isOptionsLikeType(type)) {

Though I'm not sure the parameter is an object type in the first place.

Stepping away from the previous behavior for this case, may be an option as well.

@Shinigami92

Copy link
Copy Markdown
Member Author

If you want to restore the previous behavior, you may need to look at this:

if (!isOptionsLikeType(type)) {

Though I'm not sure the parameter is an object type in the first place.

Stepping away from the previous behavior for this case, may be an option as well.

Thanks for the context, I won't have time today to work on that, earliest tomorrow evening.

@Shinigami92
Shinigami92 force-pushed the refactor-extract-number-or-range-type branch from ba201fc to 92a370d Compare July 8, 2026 16:16
@Shinigami92 Shinigami92 added the do NOT merge yet Do not merge this PR into the target branch yet label Jul 8, 2026
@Shinigami92
Shinigami92 force-pushed the refactor-extract-number-or-range-type branch from 92a370d to d8249b1 Compare July 16, 2026 15:21
@Shinigami92
Shinigami92 force-pushed the refactor-extract-number-or-range-type branch from d8249b1 to 951171a Compare July 17, 2026 08:40
@Shinigami92 Shinigami92 removed the do NOT merge yet Do not merge this PR into the target branch yet label Jul 17, 2026
@Shinigami92
Shinigami92 requested a review from ST-DDT July 17, 2026 08:49
@Shinigami92
Shinigami92 force-pushed the refactor-extract-number-or-range-type branch from 951171a to f53525b Compare July 20, 2026 16:13
@xDivisionByZerox
xDivisionByZerox added this pull request to the merge queue Jul 25, 2026
Merged via the queue into next with commit 181bfe8 Jul 25, 2026
23 checks passed
@xDivisionByZerox
xDivisionByZerox deleted the refactor-extract-number-or-range-type branch July 25, 2026 08:55
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

3 participants