cucumber / cucumber-js

Cucumber for JavaScript
https://cucumber.io
MIT License
5.04k stars 1.09k forks source link

Add formatter plugins and start reimplementing builtins #2400

Closed davidjgoss closed 5 months ago

davidjgoss commented 5 months ago

🤔 What's changed?

The formatter plugin has a very lean interface for now - it can listen for messages, write to the output, and access the formatOptions from the configuration. The idea is to reimplement more builtin formatters and in doing so find and fill limitations, and probably also build out a useful test harness or pattern for people writing their own formatters.

So far we have only changes formatters that are not exported, to avoid any breaking changes and give us room to alter course if we need to in the short term. Next candidates for reimplementing will be:

⚡️ What's your motivation?

Per https://github.com/cucumber/cucumber-js/discussions/2091 we're working towards a plugin system, and that includes bring formatters into that with a leaner message-based interface.

🏷️ What kind of change is this?

📋 Checklist:


This text was originally generated from a template, then edited by hand. You can modify the template here.

coveralls commented 5 months ago

Coverage Status

coverage: 98.233% (-0.2%) from 98.402% when pulling 8ff54d6a174ef629da2502440d4b458d9e3e3180 on feat/new-formatter-part-1 into 6dae044bb83206a93209e2cb4868bc3e274a36b2 on main.