New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BREAKING: Upgrade maplibre-gl to v2 #160
Conversation
Codecov Report
@@ Coverage Diff @@
## main #160 +/- ##
=======================================
Coverage 41.90% 41.90%
=======================================
Files 16 16
Lines 1248 1248
Branches 198 193 -5
=======================================
Hits 523 523
Misses 724 724
Partials 1 1
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Looks awesome so far @slaymance ! |
@@ -72,7 +72,7 @@ describe("AmplifyGeofenceControl", () => { | |||
const control = new AmplifyGeofenceControl({ | |||
geofenceCollectionId: "anyString", | |||
}); | |||
control._map = new maplibreMap(); | |||
control._map = new maplibreMap({ container: '', style: '' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slaymance is this the required arguments you were referring to during standup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the MapOptions
type in v2 has those properties marked as required and the options
argument is required, while in v1 it accepted MapboxOptions
and options
was optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome yep this change should be fine as effectively there will be no change to the createMap
function right?
I believe if we prefix this PR title with |
BREAKING CHANGE: removed peer dep on maplibre-gl v1 * Bump maplibre to v2 * Update type names for v2 * Update tests to work with maplibre v2 * Make style property optional for createMap * Add workarounds for JSDOM tests * Cleanup spacing and single quotes
BREAKING CHANGE: removed peer dep on maplibre-gl v1 * Bump maplibre to v2 * Update type names for v2 * Update tests to work with maplibre v2 * Make style property optional for createMap * Add workarounds for JSDOM tests * Cleanup spacing and single quotes
🎉 This PR is included in version 2.0.2-geo.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description of changes
The maplibre-gl v2 release included several breaking changes, mostly regarding TypeScript type exports. This PR bumps the
peerDependency
anddevDependency
onmaplibre-gl
to the latest version and fixes the build-time, run-time, and testing errors generated as a result of the library upgrade.Issue #, if available
#107
Description of how you validated changes
Checklist
yarn test
passes