Upgrade to Pro — share decks privately, control downloads, hide ads and more …

We fail to follow SemVer – and why it needn’t matter

We fail to follow SemVer – and why it needn’t matter

Recording: https://www.youtube.com/watch?v=tc2UgG5L7WM

If extensive libraries and even the tiniest module followed SemVer strictly, dependency hell would be a thing of the past … but humans weren’t made to follow rules. There are over 125.000 packages on npm today. By the time of this conference, at least another 10.000 will have been added. Using the right packages in your own modules and applications makes JavaScript the joy to develop it is today. But if even immensely popular libraries fail to properly declare breaking changes, how can we trust the over 50.000 strangers who developed all these modules? Currently we can’t. Let me show you how to write confidence-inspiring modules by leaving package publishing up to the machines – instead of buggy humans.

http://jsconfbp.com/#boennemann

Stephan Bönnemann

May 14, 2015
Tweet

More Decks by Stephan Bönnemann

Other Decks in Programming

Transcript


  1. Hi, I’m Stephan
    @boennemann
    @boennemann
    "

    View Slide

  2. 125,000
    @boennemann
    packages on npm

    View Slide

  3. @boennemann
    148,247
    packages on npm

    View Slide

  4. A package is
    a solved problem
    @boennemann

    View Slide

  5. 1. npmsearch.com
    @boennemann

    View Slide

  6. 1. npmsearch.com
    2. npm install
    @boennemann

    View Slide

  7. 1. npmsearch.com
    2. npm install
    3. ?
    @boennemann

    View Slide

  8. 1. npmsearch.com
    2. npm install
    3. ?
    4. profit
    @boennemann

    View Slide

  9. X.Y.Z
    @boennemann

    View Slide

  10. X.Y.Z
    @boennemann
    Major Minor Patch
    http://semver.org

    View Slide

  11. @boennemann
    Major Minor Patch
    http://semver.org
    1.0.0

    View Slide

  12. @boennemann
    Major Minor Patch
    http://semver.org
    1.0.1

    View Slide

  13. @boennemann
    Major Minor Patch
    http://semver.org
    1.1.0

    View Slide

  14. @boennemann
    Major Minor Patch
    http://semver.org
    2.0.0

    View Slide

  15. 2.0.0
    @boennemann
    Major Minor Patch

    View Slide

  16. 2.0.0
    @boennemann
    Patch
    Breaking Feature

    View Slide

  17. 2.0.0
    @boennemann
    Breaking Feature Patch
    http://semver.npmjs.com/

    View Slide

  18. 2.0.0
    @boennemann
    Breaking Feature Patch
    http://semver.npmjs.com/
    ~

    View Slide

  19. 2.0.0
    @boennemann
    Breaking Feature Patch
    http://semver.npmjs.com/
    ^

    View Slide

  20. Nein
    @boennemann

    View Slide

  21. We fail to
    follow SemVer
    @boennemann

    View Slide

  22. @boennemann
    http://npmbynumbers.bocoup.com/
    0.y.z >0.y.z

    View Slide

  23. Anything may change
    at any time
    @boennemann

    View Slide

  24. @boennemann

    View Slide

  25. No changelogs
    @boennemann

    View Slide

  26. @boennemann

    View Slide

  27. @boennemann

    View Slide

  28. @boennemann

    View Slide

  29. Hauptversionsnummern-
    erhöhungsangst1
    @boennemann
    1 Fear of increasing the major version

    View Slide

  30. If we strictly followed “semantic”
    versioning, it would probably be
    Backbone.js 43.0.0 by now — which
    doesn't help anyone evaluate the actual
    progress of the project.
    – Jeremy Ashkenas, http://backbonejs.org/
    @boennemann

    View Slide

  31. evaluate the actual
    progress of the project
    @boennemann

    View Slide

  32. Versions are
    not for humans
    @boennemann

    View Slide

  33. @boennemann

    View Slide

  34. @boennemann

    View Slide

  35. @boennemann
    1.x
    2.x

    View Slide

  36. @boennemann
    1.x
    1.x

    View Slide

  37. Versions are
    not for humans –
    names are
    @boennemann

    View Slide

  38. Our tools are so bad,
    we value human readability in
    computer protocols when it really
    doesn’t. fucking. matter.
    @boennemann
    – Stephan Seidt, http://fucking.engineering/

    View Slide

  39. We fail to follow
    SemVer and why it
    needn’t matter
    @boennemann

    View Slide

  40. not so live
    live-coding
    @boennemann

    View Slide

  41. @boennemann

    View Slide

  42. ⭐⭐⭐
    git.io/semantic-release
    npm.im/semantic-release
    @boennemann

    View Slide

  43. @boennemann

    View Slide

  44. Thank you
    @boennemann

    View Slide