Skip to content

Rebuilt Bolivia countryData and added a test for the postal code handler function#698

Open
kaio-donadelli wants to merge 5 commits into
4.xfrom
l10n_fix-BOL-4.x
Open

Rebuilt Bolivia countryData and added a test for the postal code handler function#698
kaio-donadelli wants to merge 5 commits into
4.xfrom
l10n_fix-BOL-4.x

Conversation

@kaio-donadelli

@kaio-donadelli kaio-donadelli commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request?

Backport of #697 to 4.x: fix missing and incorrect Bolivia postal code and location data using INE 2024 Census sources, and ensure geolocation resolves the correct postal code from the administrative hierarchy.

Summary

  • Rebuilt BOL country data from INE 2024
  • Added shared createPostalCodeFromHierarchyHandler; migrated BOL, COL, CRI, PER, CHL
  • Added unit and BOL integration tests for the geolocation postal code handler

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

Related

…r the postal code handler function.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

Correct Tarija Avilez OEP codes, make the handler immutable, harden
geolocation test helpers, and exclude helpers from Jest discovery.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vtex-pr-sentinel

vtex-pr-sentinel Bot commented Jul 1, 2026

Copy link
Copy Markdown

🛡️ SDD Check — action required

I couldn't detect an SDD in this PR. Please check one option below (requires write access to the repo):

  • SDD lives in another PR — paste the SDD PR URL here:
  • This PR doesn't need an SDD
  • SDD applies, but I'm not adopting it in this PR

@kaio-donadelli kaio-donadelli requested review from Lurian and fdaciuk July 1, 2026 13:23
Extract createPostalCodeFromHierarchyHandler in JavaScript, migrate BOL,
COL, CRI, PER, and CHL, and restrict integration tests to Bolivia only.

Co-authored-by: Cursor <cursoragent@cursor.com>

@fdaciuk fdaciuk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Aprovado — a factoria compartilhada e os testes de não-mutação resolvem os pontos mais importantes. Fica só uma sugestão não bloqueante inline.

Comment thread react/__tests__/helpers/geolocationPostalCodeHandler.js Outdated
kaio-donadelli and others added 2 commits July 1, 2026 15:18
Search explicitly for two administrative paths whose postal codes differ
instead of assuming the first municipality of two provinces always differs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use lodash/get for hierarchy lookup and fail explicitly when alternate
hierarchy sample is missing in tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants