Skip to content

Update to @cucumber/cucumber #648

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

Closed
IanMoroney opened this issue Nov 23, 2021 · 21 comments
Closed

Update to @cucumber/cucumber #648

IanMoroney opened this issue Nov 23, 2021 · 21 comments

Comments

@IanMoroney
Copy link

IanMoroney commented Nov 23, 2021

I was wondering if there are any plans to move/upgrade to the @cucumber/cucumber package instead of the now deprecated cucumber package?

I have a list of 10 medium CVE vulnerabilities, primarily around outdated versions of jquery and bootstrap due to the use of the deprecated cucumber version (it's now 4 years old).

I did have a go at trying to update it locally, but ran into several reference issues (as you might expect) as the code has changed a lot in 4 years.


cypress-cucumber-preprocessor/lib/createTestFromScenario.js
  2:26  error  Unable to resolve path to module '@cucumber/cucumber/lib/status'  import/no-unresolved

cypress-cucumber-preprocessor/lib/cukejson/cucumberDataCollector.js
  2:26  error  Unable to resolve path to module '@cucumber/cucumber/lib/status'  import/no-unresolved

cypress-cucumber-preprocessor/lib/cukejson/cucumberDataCollector.test.js
  2:26  error  Unable to resolve path to module '@cucumber/cucumber/lib/status'  import/no-unresolved

cypress-cucumber-preprocessor/lib/cukejson/generateCucumberJson.js
  3:81  error  Insert `⏎··`  prettier/prettier

cypress-cucumber-preprocessor/lib/resolveStepDefinition.js
  4:13  error  Unable to resolve path to module '@cucumber/cucumber/lib/support_code_library_builder/define_helpers'  import/no-unresolved

It would be good to understand what the future is going to look like for cypress-cucumber-preprocessor so we can take a decision whether to keep using it or not 👍

@IanMoroney
Copy link
Author

@lgandecki , any thoughts on this? thanks!

@lgandecki
Copy link
Collaborator

that would definitely be great and shouldn't be too hard, but I've personally been having health issues the last few months and had to reduce my working days to minimum and that also decreased my capacity for Open Source work :-( I've been thinking what to do about this project, but not sure yet.
You could also ping the cypress guys aobut the need for using cucumber with cypress, I reached out to them and asked for help (we are basically doing free work for them where about 10% their users use this library), but just heard that they need time to think and never came back to me. Maybe some pressure from actual users would work better

@wrslatz
Copy link

wrslatz commented Dec 7, 2021

Duplicate of #554

@wrslatz
Copy link

wrslatz commented Feb 15, 2022

You could also ping the cypress guys aobut the need for using cucumber with cypress, I reached out to them and asked for help (we are basically doing free work for them where about 10% their users use this library), but just heard that they need time to think and never came back to me. Maybe some pressure from actual users would work better

If there's not already an issue open for this, I'd be happy to open an issue or discussion for this on https://github.com/cypress-io/cypress

@Yohandah
Copy link

@lgandecki get well soon !
Yes it's definitly free work for Cypress, I don't understand how they still haven't offered a built-in solution for Cucumber ! Will ping

Thanks for the work

@amitguptagwl
Copy link

This is the problem with all open-source projects having very less maintainers. I had also created another cypress-cucumber library to aim some unique features. However, having the core support from Cypress community can make it more usable, fast, and feature full.

@badeball
Copy link
Owner

badeball commented Mar 13, 2022

Upgrading to the latest version of @cucumber/cucumber has been non-trivial to say the least. I made two attempts (in #322), before deciding to just re-write it completely. Most of the difficulty was tied to JSON reporting, which I eventually decided to implement after the people behind Cucumber itself had a change-of-heart.

The work can be found at badeball/cypress-cucumber-preprocessor. It is feature-complete in the sense that it supports everything the original preprocessor does, aside from "*.features" which I've decided to drop, but with some additions such as attachments to JSON reports. Furthermore, it is written entirely in TypeScript and tested more thoroughly. All in all, this should make it vastly easier to maintain.

I decided however some time ago that I'm not going to continue maintaining and invest a lot of effort into something that's not in my name and where I appear to speak on behalf on someone else.

I also wholeheartedly believe that there should be a maintained cypress-cucumber integration at any given point and that OP (@IanMoroney) shouldn't have to worry about the status. I'm fully prepared to maintain my fork though and I continue to be a user of it myself. If the original authors of the preprocessor no longer desire to be maintainers, I'd be fine with them EG. pointing towards my repository.

@lgandecki
Copy link
Collaborator

@Yohandah Thank you for the kind words. I'm better but still quite far from 100%.

@amitguptagwl You are partially right, but not fully. I'm an author and contributor to a lot of open source packages, some of them have a similar number of contributors, but still this one has been among the most difficult to maintain, for additional reasons.

First of all there are two kind of dependencies a package can have, one is external - I can use lodash/underscore to help me with the development of my package, but I don't necessarily have to chase the upgrades, if lodash _.sortBy function worked (for my particular use-case) in 2014, it still works in 2022. Some packages can have zero external dependencies, but even having quite a lot of those dependencies can still ensure a stable and pleasant development.
Another kind of dependency is the one that you have to chase - in our case it's on one hand Cypress and on the other - Cucumber. This requires a continuous and tedious work of keeping things up to date, and having to "fight" with countless issues that are actually not related to a given project, but are related to issues in the dependencies, or the lack of understanding of those dependencies (people ask multiple questions here about basically how to do things in cypress, or how to do things in cucumber).

This project unfortunately is very far on the spectrum on being dependent on other peoples work.

@badeball I thought about it and I'd definitely be open to transfer this repository and the npm name to you. I see one problem - since your project is not really a fork, while it still initially relied on learnings and even code on the work in this repo, I'd like to make sure the existing contributors (we have 62 in this repo!) are still recognized for their work. Do you have an idea how we could do that? I think if I transfer this project to you, and then you create a branch to which you somehow merge your code, the history of the project would continue. There is an obvious way to do it - with you just copying the files, but then you lose the history. Optimal would be somehow merging the history of both projects but I'm unsure how to do that (although I assume it should be possible).

@wrslatz
Copy link

wrslatz commented Mar 14, 2022

It may be worth considering how to get more Cypress community support and awareness at the same time any project transfer would occur.

Has anyone opened issues or discussions directly with Cypress?

Edit: looks like it's already listed right at the top of the Cypress plugins docs. Maybe a clear roadmap and contribution process on the project would make contributing and maintaining easier? And maybe there's a way to follow or get notified of upcoming changes to Cypress where the plugin would need to change?

@badeball
Copy link
Owner

badeball commented Mar 14, 2022

I see one problem - since your project is not really a fork, while it still initially relied on learnings and even code on the work in this repo, I'd like to make sure the existing contributors (we have 62 in this repo!) are still recognized for their work. Do you have an idea how we could do that?

This is nice thinking of you and it can be achieved pretty easily through some git-magic, where the tree will appear to remain the same (IE. my files), but where the history contains both my fork's history AND the original preprocessor's history (IE. two "unrelated histories" in git-terms). This will ensure that Github always shows all contributors from the beginning.

@badeball
Copy link
Owner

I merged the two histories and you can now see all contributors at https://github.com/badeball/cypress-cucumber-preprocessor/graphs/contributors.

@badeball
Copy link
Owner

badeball commented Mar 27, 2022

@lgandecki, I'm ready to take over now if you're serious about letting go of the reigns. I've made a bunch of exciting improvements to my fork already and written an upgrade guide. I've merged the Git histories, as I said, so all contributors appear and added a special attribution to the readme. I don't need to take over the package name though, as I kind of like having everything under my own namespace and not fight over names for potential future packages. Additionally, if you want to, I can close all outstanding issues and pull requests here appropriately and redirect users to my repository, with a text like below.

Due to personal reasons, the current maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I'm very excited about. Furthermore, I'd like to thank @lgandecki ++ for all the work that they've done so far.

The repository is however moving and all outstanding issues are closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket in the new repository. Please make sure to read CONTRIBUTING.md before doing so.

@lgandecki
Copy link
Collaborator

Hey, @badeball , yeah I'm serious about it, thanks for all your work, sorry for being slow with replies.

I think the name transfer might make sense though - there is A TON of videos/tutorials/articles that mention this particular npm package name and github repo. All those people would be directed now to deprecated piece of software.

I was thinking that maybe we should transfer the github repo to you as well, and then you would merge your work in (instead of merging our work in your repo). This way all the existing links will automatically redirect to your repository.

@badeball
Copy link
Owner

No worries with the replies, I'm not in a great hurry here. I agree with all of the things you say, and I can absolutely take ownership of the original repository and the package name. It's just awkward to ask for it, but I agree that it's for the better. I've moved aside my repository and am ready for this one to be transferred any time.

@mike-mccormick
Copy link

I've very little to add to this conversation, other than to say: I'm excited. @badeball, I dropped your preprocessor on top of a pretty large cucumber/cypress test suite (> 200 scenarios so far) to replace my private fork of this repo.

It's working really really well.

@badeball
Copy link
Owner

badeball commented Apr 7, 2022

Hey again, @lgandecki, I hope you're doing well. Since I haven't heard from you since my last comment, I just thought I would get in touch to see if we have understood each other correctly. Do you mean to transfer TheBrainFamily/cypress-cucumber-preprocessor to badeball/cypress-cucumber-preprocessor ?

@lgandecki
Copy link
Collaborator

yes, let me actually try to do this now

@lgandecki
Copy link
Collaborator

It didn't allow me to move from organization to you directly. I had to first transfer to me, and then request a transfer to you. Hopefully that won't break too much things

@badeball
Copy link
Owner

badeball commented Apr 7, 2022

It looks like redirection still works in our favor:

$ curl -v https://github.com/TheBrainFamily/cypress-cucumber-preprocessor |& grep -i location:
< location: https://github.com/badeball/cypress-cucumber-preprocessor

@badeball
Copy link
Owner

badeball commented Apr 8, 2022

Do you have opportunity to give me ownership of the package name as well? Then I can create a new release somewhat immediately and start gathering feedback. I'm also badeball on NPM.

@badeball
Copy link
Owner

Due to personal reasons, the previous maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I'm very excited about. Furthermore, I'd like to thank @lgandecki ++ for all the work that they've done so far.

Read more about the transfer of ownership here.

The repository has however moved and all outstanding issues are being closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket or comment below. Please make sure to read CONTRIBUTING.md before doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants