Support cucumber-js 7
mattwynne opened this issue · comments
I love this thing, thanks so much for making and maintaining it!
As of cucumber-js 7, the import/require statements now need to be @cucumber/cucumber
The RC for v7 was just released today.
Just a heads up that we (the cucumber core team) intend to implement common formatters (such as pretty
) as libraries in the cucumber/cucumber monorepo.
By doing this we can have a shared test suite across different implementations. Here is a simple example: https://github.com/cucumber/cucumber/tree/master/demo-formatter
Here is a slightly more complicated one: https://github.com/cucumber/cucumber/tree/master/html-formatter
If you have energy to maintain a pretty formatter, I'd prefer if you wanted to join efforts on that instead.
I've tried updating to 7 and @cucumber/cucumber
but it doesn't seem to be printing anything anymore. Do I understand it correctly that the event protocol has been completely removed in favour of cucumber-message
so the formatter needs to be rewritten from scratch?
When are you planning to release the pretty formatter? I'll add it to the README and archive this project in favour of the native implementation.
Do I understand it correctly that the event protocol has been completely removed in favour of cucumber-message
@kozhevnikov I'm not as close to the v7 implementation as Aslak, but that's my understanding, yes.
so the formatter needs to be rewritten from scratch?
I had a quick look, and it struck me we could probably build a little adapter that turns thecucumber-message
protocol into something similar enough to the event protocol that we could get this working again quite quickly.
When are you planning to release the pretty formatter?
As far as I'm aware this is more of a strategic aim than something that's in progress right now. For me, it might be more pragmatic to get this one working again, and then see if we can extract something from it as a basis for a starting point for a more generic one.
The Cucumber 7-compatible pretty formatter has been published: https://www.npmjs.com/package/@cucumber/pretty-formatter. See #17 (comment) and https://github.com/jbpros/cucumber-pretty-formatter/blob/master/CHANGELOG.md#v100-alpha0 for more info.
When do we get an update for this issue? cucumber-pretty supporting @cucumber/cucumber (Cucumber 7) ?
@satabdisikdar See my comment right before yours.
@satabdisikdar please use official pretty formatter for Cucumber 7 and beyond. This project has served its purpose and there is no reason to have a competing implementation. It'll remain open until Cucumber 6 users migrate over to 7 and then will be archived.
@kozhevnikov should we close this ticket here?
Leave it. I should really update the readme and put upper limit on the peer version supported.
@kozhevnikov Thank you for the quick response but I was still seeing the issue-
Error: Cannot find module 'node_modules/@cucumber/pretty-formatter'
Require stack:- /home/abc/Documents/xyz/FY_web_test/web/test/index.js
dependencies:
@satabdisikdar you should ask maintainers of that package.