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

feat: show latest compatible generator version in template compatibility errors #1355

Closed

Conversation

Manancode
Copy link

solves this issue
Issue - When using a template that's not compatible with the current version of the generator, we get an error with a message saying it's not compatible.
It would be great to get an error message saying which is the latest compatible version of the template in regards to the generator version the user is using

Proposed Solution -
Made a new file and added version fetching from NPM registry in versions.js
Updated templateConfigValidator.js to fetch compatible versions and show latest compatible version

Test cases are not included in this PR. Looking for maintainer feedback on this proposed solution.

Copy link

changeset-bot bot commented Feb 4, 2025

⚠️ No Changeset found

Latest commit: 9bc125f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Feb 5, 2025

@Manancode thanks a lot. Can you please share some details from local terminal to see how you run this functionality, how it works in action. Not sure you noticed in the issue, we wrote explicitly we do not see a point in adding this feature cause of planned refactor - but if you opened a PR, please at least provide some proof of how it works.

although the best would be to close the PR to not cause unnecessary reviews

I also encourage you yo join https://www.asyncapi.com/slack-invite and #generator channel if you are interested in more organized contribution to generator

Copy link

sonarqubecloud bot commented Feb 6, 2025

@Manancode
Copy link
Author

Hi @derberg,
I wasn't aware of the planned refactor, and I understand the reasoning now. I tried reproducing the issue locally but unfortunately, I didn’t get the desired results.

I’ve pushed the latest commit which shows how to undo the changes, and as per your suggestion, I’ll go ahead and close this PR to avoid unnecessary reviews.

I’m definitely interested in discussing this further and contributing to the project, so I’ll join the Slack team and the #generator channel to continue the conversation.

@Manancode Manancode closed this Feb 6, 2025
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

Successfully merging this pull request may close these issues.

2 participants