Skip to content

Conversation

@erezcor
Copy link
Contributor

@erezcor erezcor commented Jan 20, 2026

Description

Removes an empty string entry from the Hebrew locale's lorem word list (src/locales/he/lorem/word.ts).

Problem

When calling faker.lorem.words(n) with the Hebrew locale, occasionally one of the returned "words" is an empty string, resulting in unexpected output like " צש התידם" (leading space, only 2 visible words when 3 were requested).

Solution

Remove the empty string at line 103 of the word list.

Related Issues

Fixes #3697

@erezcor erezcor requested a review from a team as a code owner January 20, 2026 11:37
@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bb7eb51
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/696f68ec77964b0008850e78
😎 Deploy Preview https://deploy-preview-3698.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@matthewmayer
Copy link
Contributor

LGTM, perhaps we should add a test to check for empty strings in locale data?

@matthewmayer matthewmayer disabled auto-merge January 20, 2026 11:49
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (eaef389) to head (bb7eb51).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3698   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files        2995     2995           
  Lines      236324   236323    -1     
  Branches      941      940    -1     
=======================================
- Hits       236267   236266    -1     
  Misses         57       57           
Files with missing lines Coverage Δ
src/locales/he/lorem/word.ts 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.

@xDivisionByZerox xDivisionByZerox added c: bug Something isn't working c: locale Permutes locale definitions m: lorem Something is referring to the lorem module labels Jan 20, 2026
@xDivisionByZerox
Copy link
Member

LGTM, perhaps we should add a test to check for empty strings in locale data?

I'm working on solving #3325. In there we can integrate this for sure 👍

@xDivisionByZerox xDivisionByZerox added the p: 1-normal Nothing urgent label Jan 20, 2026
Copy link
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

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

Thanks for spotting that 🙌

@xDivisionByZerox xDivisionByZerox added this to the v10.x milestone Jan 20, 2026
@xDivisionByZerox xDivisionByZerox requested a review from a team January 20, 2026 21:43
@pkuczynski pkuczynski added this pull request to the merge queue Jan 21, 2026
Merged via the queue into faker-js:next with commit 81a896c Jan 21, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: bug Something isn't working c: locale Permutes locale definitions m: lorem Something is referring to the lorem module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lorem.word() sometimes produces empty word in Hebrew locale

5 participants