Skip to content

fix(locale): fix postcodes and add missing province for id_ID - #4272

Open
insanrizky wants to merge 1 commit into
faker-js:nextfrom
insanrizky:fix/id_ID-location
Open

insanrizky wants to merge 1 commit into
faker-js:nextfrom
insanrizky:fix/id_ID-location

Conversation

@insanrizky

Copy link
Copy Markdown

Indonesian postal codes have five digits from 10110 to 99xxx and never start with 0 (e.g. 10110 Jakarta Pusat, 40111 Bandung, 80111 Denpasar). The id_ID pattern ##### gives a leading 0 in about one in ten results: with seed 42, 975 of 10000 fakerID_ID.location.zipCode() results (v10.6.0) start with 0. This replaces it with 1#### … 9####, the same approach as de_AT and ne.

The id_ID state list also had only 37 of the 38 provinces: Papua Barat Daya (split from Papua Barat in 2022) was missing. This adds it.

I did not add a test because the allowed formats are visible in the data file. The locale-data snapshot is unchanged (no new characters).

Verification: oxfmt --list-different 0.75.0 passes on the changed files; 10000 zip codes generated from the new patterns contain 0 with a leading 0 and 0 that are not five digits; pnpm run preflight passes.

AI-assisted and reviewed by me.

Indonesian postal codes are five digits from 10110 to 99xxx and never
start with 0, but the `#####` pattern produced a leading 0 in about 10%
of results. Also add Papua Barat Daya, the 38th province (est. 2022).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@insanrizky
insanrizky requested a review from a team as a code owner November 14, 2026 04:45
@netlify

netlify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fakerjs ready!

Built without sensitive environment variables

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

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels Nov 14, 2026
@ST-DDT ST-DDT added this to the v11.0 milestone Nov 14, 2026
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (5060c90) to head (52c7c21).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #4272   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files        1180     1180           
  Lines        3977     3977           
  Branches      723      723           
=======================================
  Hits         3943     3943           
  Misses         29       29           
  Partials        5        5           
🚀 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.

@ST-DDT
ST-DDT enabled auto-merge November 14, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: locale Permutes locale definitions m: location Something is referring to the location module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants