Awesome Tools That Saved Us
Tags: productivity, automation, node, javascript
Published: 2019-11-15 20:32:49

In 2017 we were 5 developers maintaining 160 repositories. It felt like tech debt kept piling up and like we would never be able to do productive work outside of maintaining existing projects.

Luckily there are a long list of great tools out there that saved us from drowning in maintenance work. We chose to automate every step of the way and these are the great tools that made it possible.

### [GitLab](https://about.gitlab.com/)

GitLab is able to offer pleasant source code hosting, deeply integrated with a flexible and powerful CI/CD solution. And the best thing? You can use it for free – at least the community edition. [It can be as simple as running `terraform apply` to get your own gitlab instance running.](https://github.com/terraform-google-modules/terraform-google-gke-gitlab) (This does link to a production ready setup of GitLab, using a cluster of servers, so be aware of the cost of that.)

### [Jest](https://jestjs.io/)

Delightful testing that just works out of the box. With snapshots that allow for quick yet effective tests for simple cases.

### [Prettier](https://prettier.io/)

Formatting your code doesn't feel like a lot of work but it's something you have to do all day & every day. When you can delegate that to a tool like prettier, you can focus your attention on business logic and code structure, something the machines can not do for you (yet).

### [`standard-version`](https://github.com/conventional-changelog/standard-version)

Releasing a new version should be simple. `standard-version` makes sure that every time you release a new version of your package, the change log is generated automatically and added to the repository.

### [commitlint](https://commitlint.js.org/)

The above mentioned `standard-version` works well when your commits formatted so that the full changelog can be autogenerated and structured accordingly. Commitlint will make sure that you don't accidentally forget to adhere to the correct commit format.

### [Renovate](https://github.com/renovatebot/renovate)

It's not much fun to keep your dependencies up to date. It doesn't feel like you're doing much productive work and requires you to check if a new version is available in the first place. Renovate does much of that for you: The tool is able to keep many dependencies up to date, it's highly configurable and is able to create pull requests against your repositories as dependencies are updated. You can see my favourite configuration [in this gist](https://gist.github.com/johannes-scharlach/90f44538b3049e95d33592e3b8411f18).

### [Lerna](https://lerna.js.org/)

Lerna allows you to manage multiple related packages in a single repository. Our custom data processing framework `fireant` was made up from multiple components – the runtime `fireant-core`, the adapter to AWS SQS and to Google PubSub (you can [read about how we tried to switch once](https://medium.com/@johannes_scha/switching-from-sqs-to-google-pub-sub-6b13d46f644c), the deployment generator, tooling to quickly run & test `fireant` locally during development and `create-fireant-worker`, a tool that made it very easy to create a new worker & deployment and a couple more. Initially all of those items had their own repositories with tight dependencies between them. Lerna allowed us to manage these related packages in one repository while separating their different concerns clearly in terms of source code structure as well as production bundles.

### Slacker

Unfortunately this is not a public project, so I can't link to it. We built a little ChatOps script that sends a message to one of our Slack channels, every time a new version of any of our packages was published. Since publishing always occurred in the GitLab CI (see above) and always contained a changelog, we were able to reliably post the latest changelog and keep the whole team informed.

### Our Custom Toolkit

I can't imagine that everyone knows all of these tools in and out. Luckily most of them just work out of the box once you have your repository set up. And in order to make it easy to set up a repository with them, I introduced our custom `dev-scripts`, inspired by [Kent C. Dodds' `kcd-scripts`](https://kentcdodds.com/blog/tools-without-config). [For now, I'll let Kent explain why custom toolkits are great.](https://kentcdodds.com/blog/concerning-toolkits)