Skip to content
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 all build suggestion APIs in index.ts #227

Merged

Conversation

james0888215
Copy link
Contributor

@james0888215 james0888215 commented Jul 16, 2024

🤔 What's changed?

Added buildSuggestionFromCucumberExpression and buildSuggestionsFromRegularExpression to suggestions index in order to expose them directly from the package import.

⚡️ What's your motivation?

Allows access to the buildSuggestionFromCucumberExpression function directly.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)

♻️ Anything particular you want feedback on?

📋 Checklist:


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

@kieran-ryan kieran-ryan added the ⚡ enhancement Request for new functionality label Jul 16, 2024
Copy link
Member

@kieran-ryan kieran-ryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers @james0888215! Just requires an npm run eslint-fix (due to alphabetic ordering of singular buildSuggestionFromCucumberExpression) and a changelog entry under the Added section.

You might advise whether is possible to meet your particular use case at present through calling buildSuggestions (which should ideally act as a factory). Just thinking whether possible through existing API or if any present gap or use case to address - including whether any suggested changes for that API? Or otherwise potentially 'could' use existing?

In either case, just thinking separately what would be really valuable (and is missing from this repo) would be to capture a Usage section in the project README; if an example usage is something you'd like to contribute - similar to gherkin, gherkin-utils, cucumber-expressions, etc.?

@james0888215
Copy link
Contributor Author

Thanks for the feedback @kieran-ryan. Updated imports with es-lint and updated changelog

Regarding the use case, for my own case it provides better granular control on how to actually build out the suggestion based on the type of expression I know I am working with. It also just allows users of the service to be able to access these functions without directly referencing in the node_modules.

Would be happy to raise a separate PR for use case section around both functions also.

@kieran-ryan kieran-ryan changed the title Adds other build suggestions to the index.ts file Expose all build suggestion APIs in index.ts Jul 20, 2024
Copy link
Member

@kieran-ryan kieran-ryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers @james0888215 - good to go! 🚀

@kieran-ryan kieran-ryan merged commit 158eb4b into cucumber:main Jul 20, 2024
3 checks passed
@james0888215 james0888215 deleted the feat/add_all_build_suggestions_to_index branch July 22, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants