refactor: migrate to using esms
To address #69, I read through an article about how to convert packages
to pure ESM ^1. cjstoesm was quite helpful here ^2.
But it didn't talk about how to still support being imported by CJS modules without the use of dynamic imports. It's annoying being forced to change the color of a function ^3.
I came across another article discussing a more streamlined way to build
a package for consumers of either module format ^4, and I wanted to
try out unbuild ^5.
The current version of ava used doesn't support ESMs. Given that
updating to a major version that does support it would lead to more code
changes from breaking changes, I decided to switch to using Vitest.
There were also issues with importing older versions of chalk into
ESMs, so I opted to update chalk to v5 (ESM).
titleize was removed as an unused dependency.
Resolves #69.