Add a new "formatter" kind of plugin (still internal)
Reimplement a couple of builtin formatters (html and message) as plugins and ensure they still work
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:
junit (recently added, not exported)
json (because of #2239, will still export legacy version for a compatibility period)
progress-bar (not exported, needs direct access to the stream)
@cucumber/pretty-formatter (separate package, needs access to snippet syntax)
coverage: 98.233% (-0.2%) from 98.402%
when pulling 8ff54d6a174ef629da2502440d4b458d9e3e3180 on feat/new-formatter-part-1
into 6dae044bb83206a93209e2cb4868bc3e274a36b2 on main.
🤔 What's changed?
html
andmessage
) as plugins and ensure they still workThe 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:
junit
(recently added, not exported)json
(because of #2239, will still export legacy version for a compatibility period)progress-bar
(not exported, needs direct access to the stream)@cucumber/pretty-formatter
(separate package, needs access to snippet syntax)⚡️ 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.