Skip to content

Conversation

@ds1371dani
Copy link

Currently the finance > iban is missing IR locale

after i added the patterns, my test didn't pass because of validator.js isIBAN validation (it had wrong pattern)

validator.js was fixed in this PR and so the validator package in faker was also updated

@ds1371dani ds1371dani requested a review from a team as a code owner December 20, 2025 08:24
@netlify
Copy link

netlify bot commented Dec 20, 2025

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f3145e0
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/694793ba86a28f00074b93ff
😎 Deploy Preview https://deploy-preview-3678.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.

@ds1371dani ds1371dani changed the title feat(finance): add IR iban feat(finance): add IR iban Dec 20, 2025
@xDivisionByZerox xDivisionByZerox changed the base branch from v10 to next December 20, 2025 23:09
@xDivisionByZerox
Copy link
Member

Hi @ds1371dani. Thanks for this contribution 🙌.

We are handing development on the "next" branch. Please only provide PRs against it. I did go ahead and updated the target branch. This introduced conflicts in the package file, since the next branch is already using version 13.15.23 of validator. Would you be so kind and resolve the conflicts by merging "origin/next" into your branch or rebasing your branch onto "origin/next"?
Although, I'm trying to get renovate to update the package file on "next" right now, to include this dependency update separately. Thanks for bringing this valuable validator.js update to our attention.

Also, I se that the snapshot tests are failing. Would you be so kind and resolve that issue as well? You can find infos about this problem in our contribution guide on our website. To resolve this concrete issue all you need to run is pnpm run test:update-snapshots.

@xDivisionByZerox xDivisionByZerox added c: feature Request for new feature p: 1-normal Nothing urgent c: locale Permutes locale definitions m: finance Something is referring to the finance module labels Dec 20, 2025
@xDivisionByZerox
Copy link
Member

I worked though renovate requirements and let it create #3680 to update validator.js - that you don't need to resolve the conflicts and can simply revert the dependency update commit.

@ds1371dani
Copy link
Author

ds1371dani commented Dec 21, 2025

Thanks @xDivisionByZerox for your quick answer, i rebased onto "origin/next" branch and also ran "preflight" script and rolled back validator package version

I initially made my PR against v10 branch because i preferred this update to be included in the current major version. after merging into next branch when will it be released?

@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (82f44dd) to head (f3145e0).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3678   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files        2995     2995           
  Lines      236313   236324   +11     
  Branches      940      939    -1     
=======================================
+ Hits       236256   236267   +11     
  Misses         57       57           
Files with missing lines Coverage Δ
src/modules/finance/iban.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.

@xDivisionByZerox xDivisionByZerox added this to the v10.x milestone Dec 21, 2025
@xDivisionByZerox
Copy link
Member

I initially made my PR against v10 branch because i preferred this update to be included in the current major version. after merging into next branch when will it be released?

This will happen with the next release. We rarely do backport, only for docs and security related issues.
We do not have a date for the next release in mind, but in the team meeting this week (18th of December) we agreed that we want to schedule another release soon. I'll be looking through open PRs and merge the once that are complete, so that we might be able to bring out another version before the end of the year.

I sadly can't give you a more concrete day. Please remember that the entire Faker team is doing this project in their free time and likely wants to spend time with their family and friends just as anyone else. Thanks for understanding 🫶

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.

Direct wikipeda link for other reviewers to verify the schema:

Comment on lines +390 to +398
expect(
26,
`IR IBAN would be 26 chars length, given is ${iban.length}`
).toBe(iban.length);

expect(
32,
`IR formatted IBAN would be 32 chars length, given is ${ibanFormated.length}`
).toBe(ibanFormated.length);
Copy link
Member

Choose a reason for hiding this comment

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

For other reviewer:

Usually I would suggest the following here:

By using the toHaveLength() matcher, you do not need to provide an additional error message, since the matcher already take care of that. This would also align more closely with other test setups."

Suggested change
expect(
26,
`IR IBAN would be 26 chars length, given is ${iban.length}`
).toBe(iban.length);
expect(
32,
`IR formatted IBAN would be 32 chars length, given is ${ibanFormated.length}`
).toBe(ibanFormated.length);
expect(iban).toHaveLength(26);
expect(ibanFormated).toHaveLength(32);

But looking at the other test implementations for iban, this is not the case. So we should stay consistent with the other test in this file for now.
We should probably update the test file to use more self descripting matchers in a separate PR. By doing this we benefit from better, "native" error messages and a more coherent usage of matchers across all test files.

@xDivisionByZerox xDivisionByZerox requested review from a team December 21, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: feature Request for new feature c: locale Permutes locale definitions m: finance Something is referring to the finance module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants