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

fix(mapbox) Remove type dependency on mapbox-gl #9279

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Conversation

Pessimistress
Copy link
Collaborator

Closes #9211

Dependency @types/mapbox-gl was removed in v9.0 (unintentionally?) by #8204
It wouldn't be compatible with maplibre-gl anyways...

Change List

  • Remove type dependency on mapbox-gl

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

modules/mapbox/src/mapbox-layer.ts:61

  • Using the non-null assertion operator '!' for 'this.map' assumes it is never null or undefined. Ensure 'this.map' is always defined at this point.
drawLayer(this.deck!, this.map!, this);

@coveralls
Copy link

coveralls commented Dec 6, 2024

Coverage Status

coverage: 91.661%. remained the same
when pulling a513cc1 on x/mapbox-types
into 442108a on master.

Copy link
Collaborator

@chrisgervang chrisgervang left a comment

Choose a reason for hiding this comment

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

Thanks! We could get surprised by a breaking change if we aren't directly importing from the libraries I suppose, but it's unlikely these interfaces will change much.

Copy link
Collaborator

@chrisgervang chrisgervang left a comment

Choose a reason for hiding this comment

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

Should a package.json be changed, or are we still depending on mapbox-gl for something? Nevermind, I just understood your comment about it already being removed.

getFreeCameraOptions?(): FreeCameraOptions;

// This is not a public property
transform?: any;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this benefit from typing the properties we do use?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The Transform classes in mapbox and maplibre are very different, I won't even bother...

@Pessimistress Pessimistress merged commit fcbd43c into master Dec 6, 2024
4 checks passed
@Pessimistress Pessimistress deleted the x/mapbox-types branch December 6, 2024 23:11
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.

[Bug] TypeScript error when using MapboxOverlay with "react-map-gl/maplibre"
3 participants