mapbox / node-or-tools

Node.js bindings for or-tools vehicle routing problems
MIT License
147 stars 48 forks source link

replace deprecated getDistances with getMatrix in example #38

Closed andrewharvey closed 7 years ago

andrewharvey commented 7 years ago

mapbox-sdk-js pushed through a breaking change in 1.0.0-beta8 replacing getDistances with getMatrix.

The example has the dependency on mapbox-sdk-js as "mapbox": "^1.0.0-beta6". Due to the carrot operator and the way semver/npm works, npm install will install the latest 1.0.0-beta9 as it assumes no breaking changes in beta version updates. Hence it breaks.

I've opened the upstream ticket https://github.com/mapbox/mapbox-sdk-js/issues/186 to try to avoid this happening next time.

daniel-j-h commented 7 years ago

Ooops, should we keep the carrot for now or be explicit to avoid future problems like this?

andrewharvey commented 7 years ago

Good point, I've added a commit to fix it at a specific version for now. Per https://docs.npmjs.com/misc/semver#ranges no operator means fixed to that version.

daniel-j-h commented 7 years ago

👍 thanks!