DEV Community

Cover image for What's new in Undercut 0.6.0
spyke
spyke

Posted on

What's new in Undercut 0.6.0

✂ We continue to add handy utilities into Undercut with release 0.6.0 while polishing its API. But this time there are also many internal changes making maintenance easier and users happier.

Code coverage

Code coverage is back where it should be above 80% mark, so using Undercut shouldn't be so scary anymore :) In fact, coverage was good from the beginning, but our monorepo structure were interfering with Jest/Istanbul processing. As result, most operation tests weren't considered as hits.

Website

Website have moved to Netlify. In past we were using GitHub Pages for hosting, but it isn't that convenient.

For example, one of the issues with GHP was the requirement to have full write access on CI as it needs to push files to the gh-pages branch on build. With Netlify you can continue using read-only keys. On top of that Netlify allows you to have a preview for Pull Requests and even separate deployments for non-main branches.

The setup was as easy as specifying yarn build command and a path to a directory to deploy.

Conventional Commits

Some time ago we started to adopt Conventional Commits and 0.6.0 release is the first one having its changelog generated from commit messages. Lerna supports Conventional Commits out of the box, which is nice.

Release Highlights

  • getObjectType for retrieving more detailed type name like AsyncFunction from Object's toString method.
  • Classic helpers in a form of head/tail utilities for working with Iterables. Unfortunately, the head utility have replaced former peekIterable, so we have a breaking change here.
  • A pack of utilities to quickly filter/map/collect object keys and values. You were able to do this with Pull already, but sometimes you only want a short single operation instead of the full power and ceremony of the pipelines.
  • A set of randomized functions like randomDecimal or randomIndex utilities.
  • Somehow missing isPromise utility.

Lots of other code and documentation improvements. Check out the list commits from previous version or view our full release notes.

Undercut Demo

Visit GitHub for code and undercut.js.org for documentation.

Photo by Florian Cario on Unsplash.

Top comments (0)