react-wrapper icon indicating copy to clipboard operation
react-wrapper copied to clipboard

Use @googlemaps/js-api-loader as a peer dependency

Open cgarrovillo opened this issue 1 year ago • 3 comments

@googlemaps/js-api-loader should be used as a peer dependency due to issues like this.

https://github.com/googlemaps/js-api-loader/issues/825

Using this as a dependency expands the blast radius of the dependencies of this package.

cgarrovillo avatar Feb 16 '24 00:02 cgarrovillo

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.

@cgarrovillo Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

wangela avatar Feb 16 '24 00:02 wangela

@cgarrovillo Thanks. It works!

IsraelVazquezEsparza avatar Feb 16 '24 02:02 IsraelVazquezEsparza

I don't think that would have helped much, and most of the time - when dependencies aren't broken - it would only make it more complicated to install this package.

What happened last week was a published version of @googlemaps/js-api-loader that was broken. That would have had mostly the same effect if it was installed as a peer-dependency instead of a transitive dependency.

The only thing you can do in such a situation is to pin the dependency to an older version, and that can be done for both peerDependencies as well as for transitive dependencies (by specifying a resolution for the package in the package.json).

usefulthink avatar Feb 23 '24 16:02 usefulthink