generator icon indicating copy to clipboard operation
generator copied to clipboard

feat: add hooks library to generator

Open derberg opened this issue 1 year ago • 5 comments

Resolves https://github.com/asyncapi/generator/issues/1270

I added inline comments for some more context on the PR

What this PR does? from the changeset:

  • Package @asyncapi/generator-hooks is now part of generator repo and won't be released separately. Source code is stored under apps/hooks but the package/library name stays as it was originally for backward compatibility,
  • By default @asyncapi/generator-hooks package, known as package with a lot of different hooks used in templates, is available in the generator and you no longer have to configure it in your package.json in dependencies. Package @asyncapi/generator-hooks will no longer be published to NPM separately and is deprecated. You can still have your own hooks, and you can still store them in a separate package and configure with your template,
  • Remember that the fact that hooks package is now included by default, doesn't mean all hooks from it are enabled by default. You still have to enable given hook in the configuration explicitly because some hooks can execute automatically without passing a specific parameter. Also hook's supported parameters also need to be defined in your template's config.

Also, next steps after it is merged:

  • archive https://github.com/asyncapi/generator-hooks
  • deprecate https://www.npmjs.com/package/@asyncapi/generator-hooks

derberg avatar Oct 14 '24 17:10 derberg

🦋 Changeset detected

Latest commit: 42493f2daec999f7f0f0cbfbcb9c9a6d35eca262

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/generator Minor

Not sure what this means? Click here to learn what changesets are.

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

changeset-bot[bot] avatar Oct 14 '24 17:10 changeset-bot[bot]

@asyncapi/bounty_team

aeworxet avatar Oct 16 '24 10:10 aeworxet

@Florence-Njeri can you have a look on docs changes?

derberg avatar Oct 21 '24 11:10 derberg

@Florence-Njeri thanks for detailed review, all changes applied!

derberg avatar Oct 21 '24 12:10 derberg

/rtm

derberg avatar Oct 30 '24 08:10 derberg