Skip to content

Conversation

@derberg
Copy link
Member

@derberg derberg commented Nov 14, 2025

TODO:

Resolves: #1720

Breaking Changes

  • Nunjucks renderer removed — React is now the sole rendering engine. No need to specify render engine in config anymore
  • Nunjucks filters package and its public filters removed; filter-based template APIs no longer available.
  • ag CLI is no longer available. Long time ago it was already announced that it will be removed and people should move to AsyncAPI CLI. Old CLI code without watcher is still there but moved to tests as purely local-dev solution

Migration Guides

Summary by CodeRabbit

Release Notes

  • Removed Features

    • Nunjucks template renderer is no longer supported; React is now the sole rendering engine.
    • The ag CLI and its entry points have been removed; use AsyncAPI CLI instead.
    • Nunjucks filters and filter functionality are no longer available.
  • Breaking Changes

    • Templates using Nunjucks syntax will no longer work; migrate to React-based templates.
    • Template configurations specifying the nunjucks renderer option are no longer valid.
    • Migration guides to React rendering and AsyncAPI CLI are provided in documentation.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Nov 14, 2025

🦋 Changeset detected

Latest commit: 112a5ab

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 Major

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

@coderabbitai
Copy link

coderabbitai bot commented Nov 14, 2025

Walkthrough

Removes Nunjucks renderer and nunjucks-filters package, makes React the sole renderer, deletes filter-registration and watcher/CLI watch code, updates generator core and template manifests, and removes Nunjucks-related tests and documentation across the repo.

Changes

Cohort / File(s) Summary
Renderer & filters removal
apps/generator/lib/renderer/nunjucks.js, apps/generator/lib/filtersRegistry.js, apps/nunjucks-filters/*, apps/nunjucks-filters/src/*
Deleted Nunjucks renderer module, filters registry, and entire nunjucks-filters package (source, tests, docs, package manifest); removed associated exported APIs.
Generator core updates
apps/generator/lib/generator.js, apps/generator/lib/utils.js
Removed Nunjucks paths, filter registration, isReactTemplate helper, and unified rendering to React-only flow; cleaned related imports/constants.
Watcher & test CLI
apps/generator/lib/watcher.js, apps/generator/test/cli.js
Deleted file-watcher module and removed watcher logic from test CLI; updated test CLI imports and removed --watch-template.
Tests & fixtures
apps/generator/test/*.js, apps/generator/test/test-project/package.json, apps/generator/test/test-templates/nunjucks-template/*, apps/generator/test/test-templates/react-template/.ageneratorrc, apps/generator/test/utils.test.js
Removed mocks, tests and fixtures referencing Nunjucks/filtersRegistry; deleted nunjucks test template and adjusted Jest mappings and test cases.
Configuration & validation
apps/generator/lib/templates/config/validator.js, apps/generator/test/templateConfigValidator.test.js, apps/generator/test/integration.test.js
Removed nunjucks from supported renderers and related tests; updated error messages and removed nunjucks-related integration test.
Package manifests & deps
apps/generator/package.json, package.json, apps/nunjucks-filters/package.json
Removed nunjucks, @asyncapi/nunjucks-filters, chokidar deps; deleted nunjucks-filters package.json and removed bin/CLI entries and nunjucks-related npm scripts.
Template manifests across repo
packages/templates/.../.ageneratorrc (e.g. packages/templates/clients/kafka/java/quarkus/.ageneratorrc, packages/templates/clients/websocket/.../.ageneratorrc)
Removed explicit renderer: react entries from multiple template .ageneratorrc files.
Docs & migration guides
README.md, Development.md, apps/generator/docs/* (removed: nunjucks-*, migration-nunjucks-react.md, migration-cli.md, etc.)
Deleted Nunjucks-specific docs/pages, removed filter references, simplified Hooks wording, and adjusted examples to React-only guidance.
Nunjucks-filters internals & docs/tests
apps/nunjucks-filters/docs/api.md, apps/nunjucks-filters/src/*.test.js, apps/nunjucks-filters/src/*.js
Removed API docs, all filter source files (custom and lodash filters), their tests, and index aggregation/export.
Template development & examples
apps/generator/docs/template*.md, apps/generator/docs/file-templates.md, apps/generator/docs/template-development.md, apps/generator/docs/asyncapi-document.md
Removed Nunjucks-related instructions and examples; updated wording to reflect React-only template context and examples.
Test template manifests/content
apps/generator/test/test-templates/nunjucks-template/package.json, apps/generator/test/test-templates/nunjucks-template/template/test-file.md
Deleted Nunjucks test template package.json and template file content.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Pay extra attention to apps/generator/lib/generator.js for correct unified React rendering, file typing, and write logic.
  • Verify removal of watcher and chokidar does not break any tooling or tests that relied on watch behavior.
  • Confirm CI/test scripts and package.json/bin removals (apps/generator and root) do not break test invocation paths.
  • Check remaining tests/fixtures still provide adequate coverage for core generation behavior.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat!: remove nunjucks support and ag CLI' is specific and clearly summarizes the primary changes in the changeset.
Linked Issues check ✅ Passed All major coding objectives from issue #1720 are implemented: Nunjucks code removed from apps/generator, apps/nunjucks-filters package deleted, ag CLI code removed, React is now default renderer, and comprehensive documentation cleanup performed.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #1720 objectives. Changes systematically remove Nunjucks support, nunjucks-filters package, ag CLI functionality, and update documentation accordingly. No unrelated modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@asyncapi-bot
Copy link
Contributor

What reviewer looks at during PR review

The following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.

  1. PR Title: Use a concise title that follows our Conventional Commits guidelines and clearly summarizes the change using imperative mood (it means spoken or written as if giving a command or instruction, like "add new helper for listing operations")

    Note - In Generator, prepend feat: or fix: in PR title only when PATCH/MINOR release must be triggered.

  2. PR Description: Clearly explain the issue being solved, summarize the changes made, and mention the related issue.

    Note - In Generator, we use Maintainers Work board to track progress. Ensure the PR Description includes Resolves #<issue-number> or Fixes #<issue-number> this will automatically close the linked issue when the PR is merged and helps automate the maintainers workflow.

  3. Documentation: Update the relevant Generator documentation to accurately reflect the changes introduced in the PR, ensuring users and contributors have up-to-date guidance.

  4. Comments and JSDoc: Write clear and consistent JSDoc comments for functions, including parameter types, return values, and error conditions, so others can easily understand and use the code.

  5. DRY Code: Ensure the code follows the Don't Repeat Yourself principle. Look out for duplicate logic that can be reused.

  6. Test Coverage: Ensure the new code is well-tested with meaningful test cases that pass consistently and cover all relevant edge cases.

  7. Commit History: Contributors should avoid force-pushing as much as possible. It makes it harder to track incremental changes and review the latest updates.

  8. Template Design Principles Alignment: While reviewing template-related changes in the packages/ directory, ensure they align with the Assumptions and Principles. If any principle feels outdated or no longer applicable, start a discussion these principles are meant to evolve with the project.

  9. Reduce Scope When Needed: If an issue or PR feels too large or complex, consider splitting it and creating follow-up issues. Smaller, focused PRs are easier to review and merge.

  10. Bot Comments: As reviewers, check that contributors have appropriately addressed comments or suggestions made by automated bots. If there are bot comments the reviewer disagrees with, react to them or mark them as resolved, so the review history remains clear and accurate.

@asyncapi-bot
Copy link
Contributor

🚀 Docs preview deployed
Below link points directly to the generator docs preview. May the force be with you!
https://6916d4c0145e21b0ff0e2f12--asyncapi-website.netlify.app/docs/tools/generator

@asyncapi-bot
Copy link
Contributor

🚀 Docs preview deployed
Below link points directly to the generator docs preview. May the force be with you!
https://6916d4dab5243f1995309f10--asyncapi-website.netlify.app/docs/tools/generator

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Nov 19, 2025

🚀 Docs preview deployed
Below link points directly to the generator docs preview. May the force be with you!
https://69221f8673fb3670dbd72ac7--asyncapi-website.netlify.app/docs/tools/generator

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
Development.md (1)

61-61: Clarify path references for template location.

Line 61 states the template is located at apps/generator/test/templates, but the instructions at lines 68 and 73 reference it at ./test/test-templates/react-template. Ensure the path references are consistent so developers can accurately follow the manual testing steps without confusion.

Update line 61 to align with the actual path used in the instructions:

-To test template features manually we have `react-template` in `apps/generator/test/templates`, you can use this template to manually test your changes like this:
+To test template features manually we have `react-template` in `./test/test-templates`, you can use this template to manually test your changes like this:

Alternatively, if ./test/test-templates/react-template is the incorrect path, update lines 68 and 73 accordingly.

Also applies to: 68-68, 73-73

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77bf8b5 and e75afe6.

⛔ Files ignored due to path filters (3)
  • apps/generator/test/__snapshots__/integration.test.js.snap is excluded by !**/*.snap
  • apps/generator/test/test-templates/nunjucks-template/package-lock.json is excluded by !**/package-lock.json
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (31)
  • Development.md (1 hunks)
  • README.md (0 hunks)
  • apps/generator/docs/typescript-support.md (1 hunks)
  • apps/generator/jest.config.js (0 hunks)
  • apps/generator/lib/filtersRegistry.js (0 hunks)
  • apps/generator/lib/generator.js (4 hunks)
  • apps/generator/lib/renderer/nunjucks.js (0 hunks)
  • apps/generator/lib/templates/config/validator.js (1 hunks)
  • apps/generator/lib/utils.js (0 hunks)
  • apps/generator/package.json (0 hunks)
  • apps/generator/test/generator.test.js (0 hunks)
  • apps/generator/test/integration.test.js (0 hunks)
  • apps/generator/test/templateConfigValidator.test.js (1 hunks)
  • apps/generator/test/test-project/package.json (0 hunks)
  • apps/generator/test/test-templates/nunjucks-template/package.json (0 hunks)
  • apps/generator/test/test-templates/nunjucks-template/template/test-file.md (0 hunks)
  • apps/generator/test/test-templates/react-template/.ageneratorrc (0 hunks)
  • apps/generator/test/utils.test.js (0 hunks)
  • apps/nunjucks-filters/docs/api.md (0 hunks)
  • apps/nunjucks-filters/package.json (0 hunks)
  • apps/nunjucks-filters/src/customFilters.js (0 hunks)
  • apps/nunjucks-filters/src/customFilters.test.js (0 hunks)
  • apps/nunjucks-filters/src/index.js (0 hunks)
  • apps/nunjucks-filters/src/lodashFilters.js (0 hunks)
  • apps/nunjucks-filters/src/lodashFilters.test.js (0 hunks)
  • package.json (0 hunks)
  • packages/templates/clients/kafka/java/quarkus/.ageneratorrc (0 hunks)
  • packages/templates/clients/websocket/dart/.ageneratorrc (0 hunks)
  • packages/templates/clients/websocket/java/quarkus/.ageneratorrc (0 hunks)
  • packages/templates/clients/websocket/javascript/.ageneratorrc (0 hunks)
  • packages/templates/clients/websocket/python/.ageneratorrc (0 hunks)
💤 Files with no reviewable changes (26)
  • apps/generator/test/integration.test.js
  • apps/nunjucks-filters/docs/api.md
  • apps/generator/test/generator.test.js
  • apps/generator/lib/filtersRegistry.js
  • apps/generator/lib/utils.js
  • package.json
  • packages/templates/clients/kafka/java/quarkus/.ageneratorrc
  • packages/templates/clients/websocket/java/quarkus/.ageneratorrc
  • apps/nunjucks-filters/src/lodashFilters.test.js
  • apps/nunjucks-filters/src/customFilters.test.js
  • apps/generator/package.json
  • apps/nunjucks-filters/src/lodashFilters.js
  • packages/templates/clients/websocket/javascript/.ageneratorrc
  • apps/nunjucks-filters/src/index.js
  • apps/generator/lib/renderer/nunjucks.js
  • apps/generator/test/test-project/package.json
  • packages/templates/clients/websocket/dart/.ageneratorrc
  • apps/nunjucks-filters/src/customFilters.js
  • apps/generator/test/utils.test.js
  • apps/generator/test/test-templates/nunjucks-template/template/test-file.md
  • apps/nunjucks-filters/package.json
  • packages/templates/clients/websocket/python/.ageneratorrc
  • README.md
  • apps/generator/jest.config.js
  • apps/generator/test/test-templates/nunjucks-template/package.json
  • apps/generator/test/test-templates/react-template/.ageneratorrc
🧰 Additional context used
🧬 Code graph analysis (2)
apps/generator/lib/templates/config/validator.js (1)
apps/generator/lib/templates/config/loader.js (1)
  • templateConfig (17-17)
apps/generator/lib/generator.js (1)
apps/react-sdk/src/utils/isJsFile.ts (1)
  • isJsFile (9-12)
🪛 markdownlint-cli2 (0.18.1)
apps/generator/docs/typescript-support.md

6-6: Link fragments should be valid

(MD051, link-fragments)


8-8: Spaces inside code span elements

(MD038, no-space-in-code)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: preview
🔇 Additional comments (8)
Development.md (1)

61-61: Properly reflects the Nunjucks removal and React consolidation.

The change to reference only the react-template aligns well with the PR's objective of removing Nunjucks and making React the sole rendering engine. The wording is clear and accurate.

apps/generator/docs/typescript-support.md (1)

6-11: Documentation correctly updated.

The removal of filters references aligns with the nunjucks deprecation, and the TypeScript support documentation now accurately reflects hooks-only support.

apps/generator/lib/templates/config/validator.js (1)

133-144: LGTM! Validator correctly updated for React-only rendering.

The changes properly remove nunjucks from supported renderers and update the error message accordingly. The logic correctly allows undefined (defaulting to react) and explicit 'react' values.

apps/generator/test/templateConfigValidator.test.js (1)

36-42: LGTM! Test expectations align with validator changes.

The error message expectation correctly reflects that only 'react' is now supported. The test properly validates the validator's behavior for unsupported renderers.

apps/generator/lib/generator.js (4)

402-406: LGTM! Simplified configuration logic.

The conditional configuration correctly handles the compile flag: when true, it compiles the React template; when false, it uses the pre-transpiled version from TRANSPILED_TEMPLATE_LOCATION. This aligns with the removal of nunjucks-specific configuration.


866-872: LGTM! Rendering path simplified to React-only.

The rendering workflow now exclusively uses React-based rendering, which is correct given the nunjucks removal. The function correctly delegates to saveRenderedReactContent for all rendered output.


982-987: LGTM! Non-renderable file detection simplified.

The simplified logic correctly identifies non-renderable files for React templates by checking if the file is not a JavaScript/TypeScript file. This is appropriate since React templates require JS/TS files for rendering.


971-973: Verify that external templates receive proper migration guidance for breaking change.

The change to renderFile exclusively using renderReact is confirmed as a breaking change. All baked-in templates in this codebase appear to be React-compatible (no Nunjucks rendering logic remains in the codebase). However, any external or community templates that specify "renderer": "nunjucks" in their configuration will break. Ensure:

  • A clear breaking change notice is documented
  • Migration guidance is provided for external template maintainers
  • Error messages guide users if they use a Nunjucks template

---

The AsyncAPI generator has TypeScript support for [hooks](#hooks) and Nunjucks's [filters](#filters). Assumptions:
The AsyncAPI generator has TypeScript support for [hooks](#hooks). Assumptions:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Verify the link fragment for hooks.

The markdown linter flags that the link fragment #hooks may be invalid. Please verify this anchor exists in the target document to ensure navigation works correctly.

Based on static analysis hints.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

6-6: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
In apps/generator/docs/typescript-support.md around line 6, the link fragment
`#hooks` may be invalid; verify the target document contains a heading that
generates the `hooks` anchor (case-insensitive, spaces/punctuation normalized)
and if it does not, either update the link to the correct fragment (e.g.,
`#hook-usage`, `#lifecycle-hooks`, or the exact heading slug) or add the
corresponding "Hooks" heading to the document so the anchor resolves; ensure the
fragment matches the actual generated Markdown heading slug.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/generator/docs/file-templates.md (1)

8-8: Optional: Consider minor wording refinement for conciseness.

The phrase "large number of files with varying content" is clear but slightly wordy. For brevity, you could simplify to "many files" or "numerous files."

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e75afe6 and 26cf037.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • apps/generator/docs/api.md (1 hunks)
  • apps/generator/docs/asyncapi-document.md (1 hunks)
  • apps/generator/docs/configuration-file.md (0 hunks)
  • apps/generator/docs/file-templates.md (1 hunks)
  • apps/generator/docs/generator-template-java.md (0 hunks)
  • apps/generator/docs/generator-template.md (1 hunks)
  • apps/generator/docs/index.md (1 hunks)
  • apps/generator/docs/migration-nunjucks-react.md (0 hunks)
  • apps/generator/docs/nunjucks-render-engine.md (0 hunks)
  • apps/generator/docs/react-render-engine.md (1 hunks)
  • apps/generator/docs/template-development.md (2 hunks)
  • apps/generator/docs/template.md (1 hunks)
💤 Files with no reviewable changes (4)
  • apps/generator/docs/migration-nunjucks-react.md
  • apps/generator/docs/configuration-file.md
  • apps/generator/docs/generator-template-java.md
  • apps/generator/docs/nunjucks-render-engine.md
✅ Files skipped from review due to trivial changes (2)
  • apps/generator/docs/api.md
  • apps/generator/docs/react-render-engine.md
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-05-12T14:57:35.024Z
Learnt from: Adi-204
Repo: asyncapi/generator PR: 1557
File: packages/templates/clients/websocket/javascript/components/SendOperation.js:21-21
Timestamp: 2025-05-12T14:57:35.024Z
Learning: In the AsyncAPI generator templates, particularly in the JavaScript WebSocket client, single quotes are used for string literals inside template-generated code (which is itself inside backticks) to preserve template placeholders like ${variable} as literal text in the generated code output.

Applied to files:

  • apps/generator/docs/template-development.md
  • apps/generator/docs/template.md
  • apps/generator/docs/file-templates.md
📚 Learning: 2025-04-23T09:18:38.333Z
Learnt from: derberg
Repo: asyncapi/generator PR: 1512
File: packages/templates/clients/websocket/javascript/components/AvailableOperations.js:10-15
Timestamp: 2025-04-23T09:18:38.333Z
Learning: In the asyncapi/generator repository, keys aren't required when mapping over operations array in the AvailableOperations component, contrary to the typical React pattern.

Applied to files:

  • apps/generator/docs/template-development.md
🪛 LanguageTool
apps/generator/docs/file-templates.md

[style] ~8-~8: To reduce wordiness, try specifying a number or using “many” or “numerous” instead.
Context: ... templates or when you need to generate a large number of files with varying content. ### Exampl...

(LARGE_NUMBER_OF)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: preview
🔇 Additional comments (8)
apps/generator/docs/asyncapi-document.md (1)

24-24: Approved: Clear and accurate restriction to React render engine.

The change correctly specifies that Template Context is accessible to the React render engine. The reference link [react](react-render-engine) provides proper documentation linkage.

apps/generator/docs/file-templates.md (1)

8-8: Approved: React multi-file capability clearly documented.

The updated description accurately explains the React render engine's support for returning arrays of File components. The examples remain valid and demonstrate practical use cases.

apps/generator/docs/index.md (1)

27-28: Approved: Accurate single-engine (React) architecture description.

The updated steps 6 and 7 correctly specify the React render engine and its role in template processing. The transition from multi-engine to single-engine messaging is clear and aligns with PR objectives.

apps/generator/docs/template.md (1)

48-49: Approved: Clear and accurate React render engine specification.

The updated steps 5 and 6 explicitly identify the React render engine and accurately describe the template processing flow. This change resolves any ambiguity from the original dual-engine documentation.

apps/generator/docs/template-development.md (2)

6-6: Approved: Accurate reference to React render engine in template guidance.

The updated note correctly specifies the React render engine when advising against manual templating of models. This aligns with the removal of multi-engine support.


43-43: Clarify intent: Is the empty "generator": {} object intentional?

The example shows an empty generator object, which is valid. However, verify this is intentionally minimal (e.g., for simplicity in the example) versus incomplete. If developers typically include configuration options like apiVersion or supportedProtocols, the example may need expansion for completeness.

apps/generator/docs/generator-template.md (2)

114-118: Approved: Accurate and complete package.json generator configuration example.

The example correctly omits the renderer field and includes the necessary apiVersion, generator, and supportedProtocols fields. This aligns with the PR's removal of Nunjucks and the renderer option, establishing React as the implicit default.


328-332: Approved: Consistent generator configuration across all examples.

The later example in the scripts section maintains the same configuration pattern without the deprecated renderer field, ensuring consistency throughout the tutorial.

@derberg
Copy link
Member Author

derberg commented Nov 19, 2025

Tests are green but of what is left:

And I did not even touch CLI ag removal topic

@aeworxet
Copy link

/bounty

@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty program related label label Nov 19, 2025
@aeworxet
Copy link

@asyncapi/bounty_team

@aeworxet aeworxet moved this to In Progress in Bounty Program Nov 19, 2025
@derberg derberg changed the title feat: remove nunjucks support feat!: remove nunjucks support Nov 19, 2025
derberg and others added 3 commits November 19, 2025 12:38
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@derberg
Copy link
Member Author

derberg commented Nov 22, 2025

deprecated cli

@derberg derberg changed the title feat!: remove nunjucks support feat!: remove nunjucks support and ag CLI Nov 22, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 886bc20 and e5efa5b.

📒 Files selected for processing (1)
  • .changeset/remove-deprecated-nunjucks-cli.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
.changeset/remove-deprecated-nunjucks-cli.md

6-6: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


7-7: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


8-8: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: Test NodeJS PR - ubuntu-latest
  • GitHub Check: preview
🔇 Additional comments (1)
.changeset/remove-deprecated-nunjucks-cli.md (1)

11-12: Verify version tag in migration guide links.

The migration guide links reference a specific version tag (@asyncapi/generator@2.8.4), which seems misaligned for a major version release. For a breaking change that introduces a new major version, these links should likely reference a more general path (e.g., the main branch or the new version tag) rather than a prior release version.

Please confirm whether this version reference is intentional or should be updated.

derberg and others added 3 commits November 22, 2025 21:05
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

21-25: TOC still links to removed “Filters” section

The table of contents includes - [Filters](#filters), but there is no longer a ## Filters section in the README. This leaves a broken anchor after the filters/Nunjucks removal.

Apply a small diff to drop the stale TOC entry:

- - [List of official generator templates](#list-of-official-generator-templates)
-- [Filters](#filters)
-- [Hooks](#hooks)
+ - [List of official generator templates](#list-of-official-generator-templates)
+ - [Hooks](#hooks)
🧹 Nitpick comments (1)
README.md (1)

64-69: Hooks section text is consistent with hook behavior

The Hooks section now gives a concise, accurate description of how hooks are invoked during generation and points to the dedicated hooks docs. This matches the current generator behavior and React‑only rendering model.

If you want slightly tighter copy, consider reducing repetition and tightening phrasing:

-[Hooks](https://www.asyncapi.com/docs/tools/generator/hooks) are functions called by the generator at specific moments in the generation process. Hooks can be anonymous functions, but you can also assign them function names. These hooks can have arguments provided to them, or they may be expected to return a value.
+[Hooks](https://www.asyncapi.com/docs/tools/generator/hooks) are functions the generator calls at specific moments in the generation process. They can be anonymous or named and may accept arguments or return values, depending on the hook type.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5efa5b and 925a5dd.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .changeset/remove-deprecated-nunjucks-cli.md (1 hunks)
  • Development.md (2 hunks)
  • README.md (2 hunks)
  • apps/generator/docs/typescript-support.md (1 hunks)
  • apps/generator/lib/watcher.js (0 hunks)
  • apps/generator/package.json (0 hunks)
  • apps/generator/test/cli.js (1 hunks)
💤 Files with no reviewable changes (2)
  • apps/generator/lib/watcher.js
  • apps/generator/package.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/generator/docs/typescript-support.md
  • Development.md
  • .changeset/remove-deprecated-nunjucks-cli.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-04-23T09:18:38.333Z
Learnt from: derberg
Repo: asyncapi/generator PR: 1512
File: packages/templates/clients/websocket/javascript/components/AvailableOperations.js:10-15
Timestamp: 2025-04-23T09:18:38.333Z
Learning: In the asyncapi/generator repository, keys aren't required when mapping over operations array in the AvailableOperations component, contrary to the typical React pattern.

Applied to files:

  • README.md
🪛 LanguageTool
README.md

[style] ~66-~66: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ific moments in the generation process. Hooks can be anonymous functions, but you can...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test NodeJS PR - ubuntu-latest
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: Test NodeJS PR - macos-latest
  • GitHub Check: preview
🔇 Additional comments (3)
apps/generator/test/cli.js (2)

3-9: Deprecation header is clear and aligned with the migration story

The new header communicates that this CLI is deprecated, test-only, and points users to AsyncAPI CLI, which matches the broader deprecation/removal goals. No changes needed here.


16-18: Updated imports correctly target production modules

Switching the requires to ../package.json, ../lib/generator, and ../lib/utils makes this test CLI use the same modules as production. This looks correct given the file’s location under apps/generator/test/.

Please just double‑check locally that any tests or docs that reference this script still work with the new import paths and that there are no surprises from picking up the real lib/generator implementation.

README.md (1)

7-7: Hooks package description remains accurate post‑Nunjucks removal

The updated one‑liner for apps/hooks still accurately explains the purpose of hooks in the generation lifecycle and fits the new React‑only architecture. No change required.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bounty AsyncAPI Bounty program related label

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Complete Nunjuck and ag deprecation -> remove it

3 participants