cytoscape / cytoscape.js-dagre

The Dagre layout for DAGs and trees for Cytoscape.js
MIT License
249 stars 83 forks source link

Updating dagre dependency #30

Closed janniclas closed 6 years ago

janniclas commented 6 years ago

Hey Guys,

I have just noticed that the dependency for the dagre library is set on 0.7.4 which has been released over 2 years ago. It seems like the project was recently picked up again and it got a few updates over the last couple of months, especially updating their dependencies to newer versions. Wouldn't it be a good idea to update the dependency to this new version?

Best regards, Jan-Niclas

maxkfranz commented 6 years ago

I'll see if it can be rolled into the scaffolding update (https://github.com/cytoscape/cytoscape.js/issues/1926)

Do you know if they made any breaking changes or only minor patches?

janniclas commented 6 years ago

I am not sure, I can look into it tomorrow. Today I just updates the dependency in a local copy of mine and everything seemed to work Fine.

maxkfranz commented 6 years ago

0.8.1 should be semver compatible with ^0.7.4, so it should already be upgrading automatically if you npm update

janniclas commented 6 years ago

You are right, but if you take a look at the published version of cytoscape-dagre ( https://yarnpkg.com/en/package/cytoscape-dagre ), you will see that the 2.1.0 version contains the dependency ~0.7.4 not ^0.7.4. I known I can work around this by getting the master branch instead of the version published at npm but I think it would be good to update the published version anyways.

Edit: and it won't update to 0.8.1, because the 8 is higher ranked than the 7 and will therefore not taken into account by the ^ operand. Caret Dependencies below 1.0.0 Suppose app has a caret dependency on a version below 1.0.0, for example:

"dependencies": { "dep1": "^0.2.0" } npm update will install dep1@0.2.0, because there are no other versions which satisfy ^0.2.0.

If the dependence were on ^0.4.0:

"dependencies": { "dep1": "^0.4.0" } Then npm update will install dep1@0.4.1, because that is the highest-sorting version that satisfies ^0.4.0 (>= 0.4.0 <0.5.0) ( https://docs.npmjs.com/cli/update )

maxkfranz commented 6 years ago

See release cytoscape-dagre@2.2.0