Skip to content

v4.0.0 – The Great Rewrite

Compare
Choose a tag to compare
@boennemann boennemann released this 19 Jul 14:50
· 1440 commits to master since this release

This is a pre-release tagged as next on npm, so nobody will get it by default. You have to explicitly install it:

npm i -D semantic-release@next

Features

This is a complete rewrite of semantic-release with a new structure and architecture. Everything is more modular and more extensible. It's easier than ever to write plugins, there are more plugins and semantic-release itself consists of plugins.

On top of that there are a lot new features. For example private module support (for real this time) and support for release channels, which means you can maintain multiple releases like "latest" and "next", or "beta", "canary" and the stable "latest".

Another huge thing is that the setup got about 4937 times easier and semantic-release is no longer using the old npm auth token format. There is even a single command setup that takes care of everything (Thank you @christophwitzko).

npm install -g semantic-release-cli

cd your-module
semantic-release-cli setup

CLI

If you want to get a feeling for how much easier it got, then compare the .travis.yml of master and the .travis.yml of next.

Tests

There is now a unit test suite and integration tests were rewritten so they run against the official npm-registry-couchapp and not sinopia anymore. The problem is that they don't yet run on Travis. Let me know if you want to help with this.

almost

Breaking Changes

Ironically the changelog generation doesn't work here, because this a complete rewrite with no shared history. I'll write them up manually, but there is a migration guide already.

Migrate from semantic-release <=3.x to 4.x

package.json

  1. Remove semantic-release pre from the prepublish script.
  2. Remove semantic-release post from the postpublish script.

.travis.yml

  1. If you had a setup with multiple node versions and travis_after_all remove python travis_after_all.py and export $(cat .to_export_back) from the after_failure script and remove rm -f travis_after_all.py .to_export_back from before_deploy.
  2. Add npm run semantic-release at the end of your after_success script.
  3. If you had a custom script in the before_deploy script, then move it right in front of npm run semantic-release.
  4. If you had a custom script in the after_deploy script, then move it right after npm run semantic-release.
  5. Entirely delete the deploy section.

semantic-release-cli

If you haven't already install the new semantic-release-cli.

npm install -g semantic-release-cli

Run semantic-release-cli setup inside your module's folder and enter your details.
When it comes to "What kind of .travis.yml do you want?" select "Create no .travis.yml".

This PR to pouchdb-hoodie-api is an execution of above guide so you can see what the diff looks like.

One More Thing

semantic-release has its own GitHub Organisation and a beautfiul logo now. Thank you @lewiscowper!

semantic-release logo