mapbox / mapbox/mapbox-gl-directions

Incorrect mapbox-gl peer dependency range (npm7 workspaces)

Open Beginner friendly
#268 13 comments 6 reactions 0 assignees View on GitHub
auto-triaged bug
Dominant language
JavaScript
Stars
255
Forks
130
PR merge metrics
No merged PRs in 30d

Description

```json
{
"peerDependencies": {
"mapbox-gl": "^0.41.0 <2.0.0"
}
}
```

This semver range computes to `>=0.41.0 <0.42.0-0 <2.0.0`.
This range can only be satisfied with mapbox-gl versions `>= 0.41.0 < 0.42.0`.

This becomes a problem when using npm 7.x and workspaces.

Suggested fix is to change the semver range for the mapbox-gl peer dependency to `0.41.0 <2.0.0`, this will allow mapbox-gl any version below 2.0.0 and above or equal to 0.41.0 to meet the peer dependency which I believe was the original intention.

Contributor guide

Open the contributing guide

Research direction

Inspect the package manifest's mapbox-gl peerDependencies declaration and confirm how npm 7 workspaces evaluates the current range. Change the range to accept versions from 0.41.0 through below 2.0.0, then verify that the intended mapbox-gl versions satisfy it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.