Turf: Versioning, Packages and Releases

Created on 27 Nov 2018  路  2Comments  路  Source: Turfjs/turf

Hello beloved turf contributors and maintainers,

I'm a long-time user of turf and I want to thank all of you for your hard work and patience on this great library. With this issue, I would like to suggest some changes on how you handle releases in the future and hope you can take these into consideration.

Problem

By now, I can't tell anymore what version of Turf is considered stable, what features are where and which bugs are fixed where.

Despite my best efforts, I can't find documentation of what changes in these major releases, not to mention the minor and patch versions.
Maybe I'm alone in this but it confuses the hell out of me to not have Github and npm in sync.

In my naivet茅, I think (and hope) this is just a tooling issue so I would like to describe a possible workflow that makes versioning and releases more user-friendly and transparent from my experience.

Release & Versioning Workflow Proposal

The following guidelines makes versioning and publishing very, very easy and transparent IMHO.

  • Use ZEITs release package for release automation, including the creation of a changelog and Github Release.
  • EVERYTHING to the master branch is done via Pull Requests
  • Ideally, "Squash and Merge" PRs and inside the commit message, say what changed, which issues are affected and if it's a patch, minor or major. Example:
    Added new intersect algorithm. Fixes #123. Closes #55. (minor)

Now, when the master branch (or whatever branch you develop on) is ready for a new release, type in release <type> into your command line.<type> being either major, minor or patch. The package will bump the version in the package.json, do the changelog from the (major), (minor), (patch) comments or asks you about it. It will include contributors and creates a git tag, pushes everything to Github where it creates a Release including the changelog..
Second and last thing to do is npm publish.

Releases will look like this:
image

If you have a new alpha pre-release version, you can also do this via the same procedure. Nonetheless it creates transparency and makes changelog maintenance VERY easy.

Maybe you can pick whatever makes sense to you and if applicable, improves the situation for everyone.

Hope this helps a little - even if it's just about raising the issue again.
Thanks again for your hard work.

Most helpful comment

Hi @codeofsumit

Yeah unfortunately it's been a bit of a tough year for the Turf project as we lost a key maintainer but we're slowly trying to get things back on track.

My rough summary of what happened

  • v5 was the last full stable release
  • At the beginning of the year a number of modules were published as v6 in an attempt to transition to typescript, although the conversion work was never completed and a full release of Turf was never completed

    • This wasn't done with any tagging like alpha etc which should've happened
    • The previous publishing approach required lerna.js which is supposed to keep all packages in sync, but again the syncing didn't happen. LernaJS is it's own complicated beast.
  • I'm currently working towards a v7 release which is tracking ok

    • This is tagged as alpha and available here
    • v7 will move to being fully ES6 modules and will remove LernaJS from publishing, this approach will greatly simplify publishing moving forward
    • The challenge has been that all modules that we rely on also have to be published as ES6 for treeshaking to work properly so I'm having to do some work to track those down and make changes (eg here)

TurfJS is a labour of love and so everything that gets done is on the free time of a couple of people, this means that things like docs etc tend to fall behind a bit. My hope is that one things get a little settled in terms of the ES6 publishing we'll be able to consolidate the docs and processes etc.

Thanks for your patience and suggestions - we will get there :) Once I've got a few more of the dependencies sorted I'd like to put a call out to people to help us better manage the project moving forward.

Cheers
Rowan

All 2 comments

Hi @codeofsumit

Yeah unfortunately it's been a bit of a tough year for the Turf project as we lost a key maintainer but we're slowly trying to get things back on track.

My rough summary of what happened

  • v5 was the last full stable release
  • At the beginning of the year a number of modules were published as v6 in an attempt to transition to typescript, although the conversion work was never completed and a full release of Turf was never completed

    • This wasn't done with any tagging like alpha etc which should've happened
    • The previous publishing approach required lerna.js which is supposed to keep all packages in sync, but again the syncing didn't happen. LernaJS is it's own complicated beast.
  • I'm currently working towards a v7 release which is tracking ok

    • This is tagged as alpha and available here
    • v7 will move to being fully ES6 modules and will remove LernaJS from publishing, this approach will greatly simplify publishing moving forward
    • The challenge has been that all modules that we rely on also have to be published as ES6 for treeshaking to work properly so I'm having to do some work to track those down and make changes (eg here)

TurfJS is a labour of love and so everything that gets done is on the free time of a couple of people, this means that things like docs etc tend to fall behind a bit. My hope is that one things get a little settled in terms of the ES6 publishing we'll be able to consolidate the docs and processes etc.

Thanks for your patience and suggestions - we will get there :) Once I've got a few more of the dependencies sorted I'd like to put a call out to people to help us better manage the project moving forward.

Cheers
Rowan

It would be great if we could get a new release that pulls in the latest versions of each package.

There are definitely parts of 5.1.6 that don't work. Notably square/triangle grid bombs if you provide an options object, regardless of it's contents. The standalone packages work as expected. Kind of a bummer to have to _also_ install the standalone in addition to this main library just to get those broken pieces working.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amishas157 picture amishas157  路  3Comments

morganherlocker picture morganherlocker  路  5Comments

DenisCarriere picture DenisCarriere  路  3Comments

stebogit picture stebogit  路  5Comments

Spown picture Spown  路  3Comments