In 2024 I forked Postlight Parser to use in Capy Reader and returned the name to Mercury Parser. I really, really wanted to use the upstream version of the parser to avoid maintaining something off to the side. But nearly two years on, I feel I made the right choice for the scope of the app.

That’s why I’m happy to announce Mercury Parser version 3.0. My fork of this project follows romantic versioning, or romver meaning that version 3 represents a major overhaul to how the project is developed.

For starters, the app no longer uses jQuery. The previous version of the app used jQuery for the web-based version of the parser. This was completely removed by upgrading Cheerio to the latest version. Cheerio is responsible for much of the parsing in Mercury Parser and follows a similar interface to jQuery, just without the jQuery.

Next, I replaced moment.js with dayjs for article date handling. This was another necessary shift since moment.js had been deprecated for several years. The shift was mostly one-to-one but there were a few trade-offs. Date patterns like DD are now replaced by D which was something lenient in moment.js. Date boundaries and timezone suffixes were also changed. This required manual code in the date-published cleaner.

I also migrated from Karma for web tests to Vitest with Playwright. For now this means that the fixtures are only tested in node due to the constraint of the node-only fs import. This is something I may revisit in future for broader test coverage. Lastly, I migrated the project from yarn v1 to npm. There’s safety in defaults, and npm has come along way with performance since Mercury Parser launched in 2016.

All in all, these changes have been easy to manage because my fork of Mercury Parser is a hobby project. There’s no stakeholders, no mission critical applications. That, and Claude Code Opus 4.5 is just leagues better than me at catching package conflicts. It’s been a fun journey to continue to revitalize this project in my spare time and use it in Capy Reader.


If you use this fork and have feedback, let me know! If you use the full content extractor in Capy Reader and enjoy its benefits, consider sponsoring my efforts on GitHub or Ko-fi.