Skip to content

refactor: extract shared NumberOrRange type#3939

Open
Shinigami92 wants to merge 2 commits into
nextfrom
refactor-extract-number-or-range-type
Open

refactor: extract shared NumberOrRange type#3939
Shinigami92 wants to merge 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 92a370d
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6a4e77edc408ba00087da0ec
😎 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.84%. Comparing base (c2cd91d) to head (92a370d).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3939   +/-   ##
=======================================
  Coverage   98.84%   98.84%           
=======================================
  Files         923      923           
  Lines        3216     3216           
  Branches      583      566   -17     
=======================================
  Hits         3179     3179           
  Misses         33       33           
  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 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
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 do NOT merge yet Do not merge this PR into the target branch yet 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.

2 participants