Skip to content
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

Merged
merged 8 commits into from Jul 7, 2022
Merged

BREAKING: Upgrade maplibre-gl to v2 #160

merged 8 commits into from Jul 7, 2022

Conversation

slaymance
Copy link
Contributor

Description of changes

The maplibre-gl v2 release included several breaking changes, mostly regarding TypeScript type exports. This PR bumps the peerDependency and devDependency on maplibre-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

  • PR description included
  • yarn test passes
  • Tests are [changed or added]
  • Relevant documentation is changed or added (and PR referenced)

@slaymance slaymance added the dependencies Pull requests that update a dependency file label May 27, 2022
@slaymance slaymance self-assigned this May 27, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 27, 2022

Codecov Report

Merging #160 (3263566) into main (9bc43e7) will not change coverage.
The diff coverage is 78.57%.

@@           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           
Impacted Files Coverage Δ
src/AmplifyMapLibreRequest.ts 64.70% <0.00%> (ø)
src/drawUnclusteredLayer.ts 58.20% <75.00%> (ø)
src/drawClusterLayer.ts 47.05% <100.00%> (ø)
src/utils.ts 63.63% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@thaddmt
Copy link
Contributor

thaddmt commented Jun 2, 2022

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: '' });
Copy link
Contributor

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?

Copy link
Contributor Author

@slaymance slaymance Jun 7, 2022

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.

Copy link
Contributor

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?

@slaymance slaymance marked this pull request as ready for review June 23, 2022 19:48
@thaddmt
Copy link
Contributor

thaddmt commented Jun 23, 2022

I believe if we prefix this PR title with BREAKING or perf (per semantic release docs) it will do the major version bump for us when we square and merge

@slaymance slaymance changed the title chore: Upgrade maplibre-gl to v2 perf: Upgrade maplibre-gl to v2 Jun 23, 2022
@slaymance slaymance changed the title perf: Upgrade maplibre-gl to v2 chore!: Upgrade maplibre-gl to v2 Jun 23, 2022
@thaddmt thaddmt changed the title chore!: Upgrade maplibre-gl to v2 BREAKING: Upgrade maplibre-gl to v2 Jul 5, 2022
@thaddmt thaddmt merged commit 6a210a9 into main Jul 7, 2022
thaddmt pushed a commit to thaddmt/maplibre-gl-js-amplify that referenced this pull request Jul 7, 2022
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
thaddmt pushed a commit to thaddmt/maplibre-gl-js-amplify that referenced this pull request Jul 7, 2022
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
@github-actions
Copy link

github-actions bot commented Jul 8, 2022

🎉 This PR is included in version 2.0.2-geo.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file released on @geo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants