generator icon indicating copy to clipboard operation
generator copied to clipboard

feat: introduce the generator filters and new release to the generator.

Open ayushnau opened this issue 1 year ago • 5 comments

Changes Added.

  1. Added the new Release with changesets.

Related issue(s)

Related to: https://github.com/asyncapi/generator/issues/1044

ayushnau avatar Jun 27 '24 21:06 ayushnau

@derberg I have added the changes for Changesets. I have used the changelog in the ci @changesets/changelog-git (didnt make it false in the config) cause there is ongoing bug in the changesets which they have not given the solution yet. And this is basically causing changesets still search for the CHANGELOG.md inspite of making it false in the config. here is the link https://github.com/changesets/action/issues/256

Also I was needed to install the @changesets/cli in the ci also cause once I run the chagnesets/cli command directly with npx in ci it is installing the cli version and correctly working fine, but then the same ci flow changelog is not getting detected causing the error.

ayushnau avatar Jun 27 '24 21:06 ayushnau

@ayushnau

  1. Regarding your comment about @changesets/cli that can be used with npx, but changelong-git must be installed. Please adda proper comment to YAML file, with link to an issue, so we overtime can followup and improve - otherwise this knowledge will get out of our heads in few months.

  2. why are there changes to package-lock

  3. please add a section in readme, that explain how releasing works now. What has to be done to release minor/patch/major

  4. please explain what will happen once we merge this PR. Btw did you test it somewhere already? can you show results?

  5. please explore how to make it happen, that new filters package is also in dependencies of generator. How to make it happen that once we merge a PR that is marked as "filter", it is automatically bumped in generator

derberg avatar Jul 01 '24 11:07 derberg

@derberg

  1. Added the comment regarding it.

  2. The Changes in package.lockare expected as the generator-filters is also added. Turborepo will add the required dependency together in package.lock for both the packgaes. Also I have updated the jest version to 27.3.1 without it some test were getting broke. I was getting Error node:events not found. found the solution here https://github.com/Azure/azure-sdk-for-js/issues/29014

  3. Added the section in the readmd.md.

  4. I thing the repo will be published to respective npm directories will add the test results.

  5. In 5th point you mean. how to bump the version of generator when there is changes in the generator-filter is that right? If that is the question than it is possible.

  6. Also in beginning you told me to setup the filter in such a way that it is not required to add them to package.json and the filters should get loaded by itself. I checked this one. and found this straightforward. we just need to set the filter object in generator this.templateParams = {filter: "@asyncapi/generator-filters"}; and update other places if the template params is set to {}.

  7. Also we dont want to push the generator-filters as a seprate package like you said before the in the issue??

"generator-filters and generator-hooks also natively a part of generator (we still want to enable people to provide theirs independently)"

ayushnau avatar Jul 01 '24 20:07 ayushnau

@asyncapi/bounty_team

aeworxet avatar Jul 03 '24 11:07 aeworxet

@derberg test release https://www.npmjs.com/package/@ayushnautiyal706020/generator first ci link: https://github.com/ayushnau/generator/actions/runs/10017954285 created pr link: https://github.com/ayushnau/generator/pull/6 second ci link: https://github.com/ayushnau/generator/actions/runs/10017959613/job/27692765169

ayushnau avatar Jul 20 '24 05:07 ayushnau

@derberg i think i have added all the required functionality. please check.

ayushnau avatar Jul 21 '24 16:07 ayushnau

@ayushnau please notice that in my comment about docs there were 2 screenshots about two different docs

derberg avatar Jul 24 '24 22:07 derberg

also I see tests are failing, did you change do ker compose setting as mentioned in slack?

derberg avatar Jul 24 '24 22:07 derberg

also I see tests are failing, did you change do ker compose setting as mentioned in slack?

i was still working on it. but now it is fixed basically i mounted complete project in the volume. and adjusted other directories used.

ayushnau avatar Jul 25 '24 07:07 ayushnau

@derberg I think now all tests are passing can we proceed with this.

ayushnau avatar Jul 25 '24 07:07 ayushnau

@ayushnau please notice that in my comment about docs there were 2 screenshots about two different docs

checking

ayushnau avatar Jul 25 '24 15:07 ayushnau

added 2 questions to code and also please have a look on this one that you missed -> https://github.com/asyncapi/generator/pull/1225#issuecomment-2248972858

derberg avatar Jul 25 '24 15:07 derberg

@derberg @lmgyuan please check made all the required changes.

ayushnau avatar Jul 25 '24 18:07 ayushnau

@derberg @lmgyuan please check the pr.

ayushnau avatar Jul 29 '24 07:07 ayushnau

/rtm

derberg avatar Jul 29 '24 11:07 derberg