-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Cucumber version in v8 #1853
Comments
Indeed, we should try to find a way before releasing final version of 8.0.0 Thanks for the report! |
Thanks, give me a shout if you'd like me to try it again with any new RCs. |
@jan-molak just pushed a PR: #1866 In your case, to make it work with previous version of cucumber, and incoming ones, you may consider relying on the CLI to retrieve the version of cucumber (executing |
Nice one, thanks @aurelien-reeves, #1866 looks great. |
Is your feature request related to a problem? Please describe.
Serenity/JS currently supports Cucumber versions 1.x to 7.x and I'd like it to be able to support version 8.x as well.
In order to do that, Serenity/JS needs to know what version of Cucumber it's being used with.
At the moment, Serenity/JS figures out the version based on the
version
field present in Cucumber'spackage.json
file.However, in Cucumber 8 RC1
package.json
is not listed inexports
, so trying torequire('@cucumber/cucumber/package.json')
results in:Describe the solution you'd like
It would be great if Cucumber 8 could either:
package.json
to its exports so that Serenity/JS could read the version from itversion
const so that it could be imported by consumer frameworks (e.g.import { version } from '@cucumber/cucumber'
)Describe alternatives you've considered
An alternative solution would be for Serenity/JS to check if
@cucumber/cucumber
module is present, and if it is and it's not possible to load itspackage.json
=> assume it's version 8.It could work, but it smells of a an awful hack ;-)
Additional context
N/A
The text was updated successfully, but these errors were encountered: