Skip to content

Conversation

@wayofthefuture
Copy link
Collaborator

This PR removes the isUpdateableGeoJSON() function and consolidates validation and normalization logic into toUpdateable(). Previously, correctness depended on keeping two separate functions in sync, which risked logic drift and duplicated checks. By handling both validation and conversion in a single place, the update pipeline becomes simpler, more predictable, and easier to maintain. The caller now has a single, clear entry point: attempt to build an updateable map, and rely on undefined to signal invalid input.

@wayofthefuture wayofthefuture marked this pull request as ready for review December 5, 2025 19:24
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.41%. Comparing base (a1d1972) to head (d92a72c).

Files with missing lines Patch % Lines
src/source/geojson_source_diff.ts 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6819      +/-   ##
==========================================
- Coverage   92.42%   92.41%   -0.01%     
==========================================
  Files         288      288              
  Lines       23814    23807       -7     
  Branches     5058     5055       -3     
==========================================
- Hits        22009    22002       -7     
  Misses       1805     1805              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@HarelM HarelM left a comment

Choose a reason for hiding this comment

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

Yeah, I can see how this is cleaner...

@HarelM HarelM merged commit 8d04baa into maplibre:main Dec 5, 2025
26 checks passed
@wayofthefuture wayofthefuture deleted the deprecate-isupdateable branch December 5, 2025 22:09
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.

2 participants