mocha icon indicating copy to clipboard operation
mocha copied to clipboard

📌 Project Status: Maintenance Reboot

Open JoshuaKGoldberg opened this issue 2 years ago • 15 comments
trafficstars

👋 Hi all! @Uzlopak, @voxpelli, and I are happy to announce that we've picked up maintenance of the Mocha organization and packages. That primarily includes the mocha test framework.

Shoutout and thanks to @boneskull for inviting us on and helping set up many of the documentation and processes still in use today, as well as the other recent Mocha core team members: @giltayar, @juergba, @Munter, and @outsideris.

Context

Mocha was not actively maintained for most of 2023. It was maintained off-and-on through 2022. This is natural in open source projects: because they are run by volunteers, maintenance often is dependent on personal voluntary availability in out-of-work hours.

The three of us "reboot" maintainers are joining on to:

  • Get the project back into active maintenance, including regularly triaged issues and reviewed pull requests
  • Update the project's tooling to reduce the overhead of maintenance
  • Update Mocha as needed to stay up-to-date with the surrounding JavaScript ecosystem

Project Charter

Mocha has been a core part of the JavaScript ecosystem for over a decade. Per its PROJECT_CHARTER.md:

Mocha is a unopinionated, general-purpose testing framework for the JavaScript community. Mocha favors flexibility over rigidity, stability over disruption, and deliberation over agility. Mocha aims to do one thing, and do it well. Mocha will strive to evolve with the needs of the community, but will make every effort not to abandon its current users in doing so.

We intend to keep to this project charter. Mocha is positioned differently from other popular test frameworks in the ecosystem. Notably:

  • Higher-level frameworks Jest and Vitest provide more abstractions and utilities on top of testing
  • Node's built-in runner integrates closely with Node itself at a lower level

We aim to keep Mocha positioned as a stable test framework, minimizing breaking changes or significant new feature additions. Our priority is for the existing users who do not want to be broken by or have to spend time reacting to changes.

Next Steps

Our current plan is to:

  • [x] Discuss this pinned issue and announce it
  • [x] Tidy up the existing contributing and maintenance documentation and processes, such as issue and PR templates: https://github.com/mochajs/mocha/pull/5038
    • [x] Migrate https://gitter.im/mochajs/contributors to a new Mocha Discord server with a #help Q&A channel
  • [x] Review and triage existing issues and PRs
    • [x] Align existing issues and PRs to the new templates
    • [x] Close out duplicate, stale, or clearly wontfix-level issues
    • [x] Triage pending bug reports and feature requests
    • [x] Review open PRs
  • [ ] Add tooling such as automatic security updates and static analysis to help with long-term maintenance
    • [x] Refreshed linting, such as a new ESLint configuration: #5058 -> #5060
    • [x] Unused code detection with Knip: #5041 -> #5042
    • [ ] Automatic security updates with Renovate: #5055
  • [x] Make a new release with no new features to test the release pipeline: https://github.com/mochajs/mocha/issues/5081
    • [x] Merge a small chore refactor: #5056
    • [x] Ship a pre-release minor version on npm
    • [x] Ship a true minor version release on npm
  • [x] Publicly propose and get approved an invoicing system for https://opencollective.com/mochajs, then reach out to previous maintainers to compensate them for their time

Updated January 8th, 2023 with more detail.

Items might be tackled out of order. You can see the full list of work items and their statuses on the public Maintenance Reboot project board.

Out of Scope

Note also that we're new to maintaining this project. We'll need to ramp up over the next few months. Don't expect any major overhauls anytime soon.

We don't intend to make any major breaking changes unless absolutely necessary for the project. We will drop support for EOL Node versions in occasional breaking changes well after those Node versions go EOL.

We don't intend to overhaul any currently-useful resources such as https://mochajs.org or https://github.com/mochajs/mocha/wiki. Though, we will happily accept issue reports if those resources need improvement.


We're excited to help keep Mocha going forward as a project. Please do post feedback if you have any questions or suggestions. Cheers all! ❤️

JoshuaKGoldberg avatar Nov 14 '23 18:11 JoshuaKGoldberg

Nice! I helped with the esm part, and while not a big contributor, would be glad to help in some way.

giltayar avatar Nov 14 '23 20:11 giltayar

Excited about these news! To this day mocha remains my favourite testing framework and I'm using it quite extensively. I always come back to it because it just works how you expect it to and it's execution speed.

marvinhagemeister avatar Nov 14 '23 20:11 marvinhagemeister

Awesome! I will help you if there are something I can help you. It's great to see the project revitalized thanks to you guys.

outsideris avatar Nov 15 '23 00:11 outsideris

Mocha is an essential framework integration used by many other testing frameworks as well, like WebdriverIO, and I am happy to see it continue to be maintained and remain the most popular framework in the space. If there is anything I can do to help, please reach out!

christian-bromann avatar Nov 15 '23 01:11 christian-bromann

Mocha is still the best runner out there. It will be an honor to be a part of keeping this going.

@JoshuaKGoldberg do we have a timeline as to when open issues can start getting managed?

cozzbie avatar Dec 10 '23 20:12 cozzbie

The goal is first to implement a reliable CI with all the fancy stuff. Then we can start merging PRs ;).

Uzlopak avatar Dec 10 '23 21:12 Uzlopak

timeline

None yet, I'm afraid. Perhaps weeks or months?

JoshuaKGoldberg avatar Dec 11 '23 20:12 JoshuaKGoldberg

Thanks for the enthusiasm and ❤️s everyone! Things are going well so far. We've trimmed about a quarter of the backlog out, triaged much of the rest of it, and have started working on codebase tooling. We're getting a more familiar with the project as a result.

I updated the Next Steps checklist just now with a bit more detail. Our plan is to ship a new minor release soon with no features or fixes in it - to test that we can do releases at all. After that, we'll start being more aggressive on merging PRs that actually change Mocha for the better. 🚀

Note: there are still quite a few yet-to-be-triaged bug reports and feature requests out there. ACK - we will get to those soon! We just are taking our time. We don't want to commit to something and then later learn we'd missed something big in the project.

JoshuaKGoldberg avatar Jan 08 '24 15:01 JoshuaKGoldberg

https://www.npmjs.com/package/mocha/v/10.3.0-preminor.0: is released under the next tag. You can install it with npm i mocha@next. 🚀

npm i mocha@next

We'll wait a week or so to be careful, then release it as a 10.3.0 / latest.

JoshuaKGoldberg avatar Jan 30 '24 16:01 JoshuaKGoldberg

✨ https://www.npmjs.com/package/mocha/v/10.3.0 ✨

npm i mocha@latest

JoshuaKGoldberg avatar Feb 08 '24 14:02 JoshuaKGoldberg

Yay @JoshuaKGoldberg 🎉 🎉 🎉

voxpelli avatar Feb 08 '24 15:02 voxpelli

Review open PRs

All open PRs should now have a review on them! They're each at one of the following statuses:

  • status: blocked: waiting on something else, such as an issue discussion or us not being ramped up to a semver-major change yet
  • status: in triage: one of us approved (🥳!) and we're waiting on >=1 other maintainer to also review
  • status: waiting for author: at least one maintainer posted a review and is waiting for the author to respond to / resolve feedback

We'll start work on releasing approved features & fixes in new Mocha versions soon. 🚀

JoshuaKGoldberg avatar Mar 04 '24 19:03 JoshuaKGoldberg

You should also take a look at https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mocha because currently it's a pain to use.

For example, I like the fact that I can import test/suite with EsModules, but in DefinitelyTyped there are TypeScript declarations of global test and suite, which is misleading, because those variables are not global in mocha thank god.

danon avatar Jun 24 '24 14:06 danon

@danon Tracking in https://github.com/mochajs/mocha/issues/4228 and https://github.com/mochajs/mocha/issues/4154 – the former ensures that the internal types are correct so that the generation of the latter is easier.

Eventually, in an upcoming major, Mocha should ship with types rather than relying on @types/mocha, at least that's my hope

voxpelli avatar Jun 24 '24 15:06 voxpelli