Skip to content

Conversation

@derberg
Copy link
Member

@derberg derberg commented Nov 14, 2025

Blockers removed:

Resolves: #1720

Breaking Changes

  • Node 24 and npm 11 must have
  • 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

  • Removed Features

    • Nunjucks renderer, filters package, related filter helpers, legacy file-watcher, Docker release workflow, and test Nunjucks templates removed.
  • Breaking Changes

    • React is now the sole renderer; CLI entrypoints deprecated/removed; Node and npm minimums raised.
  • Documentation

    • Nunjucks migration guides and Nunjucks-specific docs deleted; docs streamlined for React.
  • Tests

    • Nunjucks-related tests and fixtures removed or reduced.

✏️ 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: f53a520

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

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • packages/templates/clients/kafka/test/integration-test/__snapshots__/integration.test.js.snap is excluded by !**/*.snap
  • packages/templates/clients/websocket/test/integration-test/__snapshots__/integration.test.js.snap is excluded by !**/*.snap

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Removes Nunjucks renderer and the nunjucks-filters package, deletes the in-repo file watcher and the deprecated ag test CLI surfaces, and makes React the sole render engine. Updates generator core, utilities, tests, templates, docs, manifests, CI workflows, Docker release, and Node/NPM engine requirements.

Changes

Cohort / File(s) Summary
Renderer & filters
apps/generator/lib/renderer/nunjucks.js, apps/generator/lib/filtersRegistry.js, apps/nunjucks-filters/*, apps/nunjucks-filters/src/*, apps/nunjucks-filters/docs/*
Deleted the Nunjucks renderer integration, the filters registry, and the entire apps/nunjucks-filters package (sources, tests, docs); removed public filter exports and related APIs.
Generator core & utils
apps/generator/lib/generator.js, apps/generator/lib/utils.js, apps/generator/lib/templates/config/validator.js
Removed Nunjucks branches and filter registration; dropped isReactTemplate / isLocalTemplate helpers; unified rendering to React-only and updated renderer validation/messages.
Watcher & test CLI
apps/generator/lib/watcher.js, apps/generator/test/cli.js
Deleted the file-watcher implementation and watcher features; removed --watch-template and watcher logic; modified test CLI for test-only usage and adjusted imports/paths.
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/lib/__mocks__/utils.js
Removed Nunjucks-related tests, fixtures and mocks (filtersRegistry, isReactTemplate); updated Jest mappings to drop @asyncapi/nunjucks-filters alias; adjusted test templates and CLI usage.
Package manifests & deps
apps/generator/package.json, apps/nunjucks-filters/package.json, top-level package.json
Removed deps nunjucks, @asyncapi/nunjucks-filters, chokidar; removed apps/generator bin entries; deleted apps/nunjucks-filters manifest and scripts; bumped Node/NPM engine requirements and upgraded some parser/modelina versions.
Template manifests
packages/templates/.../.ageneratorrc (e.g. packages/templates/clients/.../*.ageneratorrc)
Removed explicit renderer: react entries from multiple template .ageneratorrc files and normalized description strings.
Docs & migration guides
README.md, Development.md, apps/generator/docs/* (deleted: nunjucks-*, migration-nunjucks-react.md, migration-cli.md, etc.)
Removed Nunjucks-specific docs and migration guides; deleted Filters section; simplified Hooks/usage docs to React-only and updated development/testing guidance.
Template docs & examples
apps/generator/docs/template*.md, apps/generator/docs/file-templates.md, apps/generator/docs/asyncapi-document.md, apps/generator/docs/template-development.md, apps/generator/docs/generator-template*.md
Removed renderer fields from examples and Nunjucks-specific instructions; updated wording/validation examples to React-only.
Test template content removals
apps/generator/test/test-templates/nunjucks-template/package.json, .../template/test-file.md
Deleted Nunjucks test template manifest and template file content.
CI, Docker & workflows
.github/workflows/*, apps/generator/Dockerfile, packages/templates/.../test/*/microcks-*.yml
Updated workflows to use Node 24 or resolve Node from lockfile; removed Docker release workflow; deleted apps/generator/Dockerfile; updated Podman test images to Node 24; simplified CI matrix/steps.
Changeset
.changeset/remove-deprecated-nunjucks-cli.md
Added changeset documenting breaking changes: Node/NPM engine bumps, removal of Nunjucks renderer/filters, and deprecation/removal of ag CLI and watcher features.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • apps/generator/lib/generator.js — verify React-only rendering flow and ensure no residual Nunjucks paths remain.
    • apps/generator/lib/watcher.js and apps/generator/test/cli.js — validate local dev/test workflows after watcher/CLI removals.
    • Tests & mocks — confirm no remaining references to @asyncapi/nunjucks-filters, filtersRegistry, isReactTemplate, or removed fixtures.
    • Package/manifest changes — confirm Node/NPM engine bumps and removed bin entries do not break consumers or release automation.
    • CI/workflows — ensure removal of Docker publish workflow and Node version changes align with release processes.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: removal of Nunjucks support and the ag CLI, which are the primary objectives of this PR.
Linked Issues check ✅ Passed All coding objectives from issue #1720 are met: Nunjucks code removed, nunjucks-filters package deleted, ag CLI removed, React made default (no renderer config needed), docs refactored, and local development CLI in tests provided.
Out of Scope Changes check ✅ Passed All changes align with issue #1720 objectives. Updates to Node/npm versions, dependency upgrades, and GitHub Actions workflows are necessary supporting changes for the major version bump.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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://69370bbc58214595a3cb6181--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
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/[email protected]), 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.

@derberg
Copy link
Member Author

derberg commented Dec 3, 2025

addressing first blocker that is also blocker for releases after security issues: asyncapi/.github#369

@derberg
Copy link
Member Author

derberg commented Dec 5, 2025

@aeworxet I just updated the description. Blockers removed. I continue with the task.

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 9eaad55 and d20805c.

📒 Files selected for processing (2)
  • .changeset/remove-deprecated-nunjucks-cli.md (1 hunks)
  • package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
🪛 LanguageTool
.changeset/remove-deprecated-nunjucks-cli.md

[grammar] ~6-~6: Ensure spelling is correct
Context: ...Changes * You must use Node.js 24.11 or higner, and NPM 11.5.1 or higher * Nunjucks ren...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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 (1)
.changeset/remove-deprecated-nunjucks-cli.md (1)

7-9: Clear and well-structured breaking changes documentation.

The breaking changes are clearly documented with proper list formatting (addressing the previous indentation concern). Migration guides are appropriately linked and organized.

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

Caution

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

⚠️ Outside diff range comments (2)
.github/workflows/release-with-changesets.yml (2)

100-104: Action source inconsistency between test and release jobs.

The test-nodejs job (line 48) references asyncapi/.github/.github/actions/get-node-version-from-package-lock@master, but the release job (line 101) references derberg/.github-asyncapi/.github/actions/get-node-version-from-package-lock@fixnodereelase. Both jobs should use the same official action source for consistency and maintainability. The release job should not depend on a personal fork or a feature branch.

Apply this diff to align the release job with the test-nodejs job:

       - if: steps.packagejson.outputs.exists == 'true'
         name: Check package-lock version
-        uses: derberg/.github-asyncapi/.github/actions/get-node-version-from-package-lock@fixnodereelase
+        uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
         with:
           node-version: ${{ vars.NODE_VERSION }}
         id: lockversion

120-120: Update step comment to reflect Docker Hub removal.

Line 82 correctly removed Docker Hub from the job name, but the step comment on line 120 still references "Publish to any of NPM, Github, and Docker Hub." This is a stale comment that should be updated for consistency.

Apply this diff to update the comment:

-        name: Publish to any of NPM, Github, and Docker Hub
+        name: Publish to any of NPM and GitHub
📜 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 8dc94c2 and adb550d.

📒 Files selected for processing (5)
  • .github/workflows/release-docker.yml (0 hunks)
  • .github/workflows/release-with-changesets.yml (2 hunks)
  • apps/generator/Dockerfile (0 hunks)
  • apps/generator/docs/react-render-engine.md (2 hunks)
  • apps/generator/test/cli.js (1 hunks)
💤 Files with no reviewable changes (2)
  • .github/workflows/release-docker.yml
  • apps/generator/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/generator/test/cli.js
🧰 Additional context used
🧠 Learnings (1)
📚 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/react-render-engine.md
🪛 markdownlint-cli2 (0.18.1)
apps/generator/docs/react-render-engine.md

8-8: Link fragments should be valid

(MD051, link-fragments)

⏰ 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). (2)
  • GitHub Check: Test generator as dependency with Node 24
  • GitHub Check: preview
🔇 Additional comments (3)
.github/workflows/release-with-changesets.yml (2)

47-51: Good alignment with Node version handling changes.

The safety comment and addition of the node-version parameter align well with the PR's Node version updates.


82-82: Job name correctly reflects Docker Hub removal.

The rename from "Publish to any of NPM, GitHub, or Docker Hub" to "Publish to any of NPM and GitHub" is accurate.

apps/generator/docs/react-render-engine.md (1)

8-8: Fix invalid markdown link fragment.

The link [debugging](#debugging-react-template) references a heading that does not exist in this file, triggering an MD051 linting error. Either remove the link and reference, or ensure the corresponding ## Debugging React template section exists in this file.

derberg and others added 3 commits December 8, 2025 17:24
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@derberg
Copy link
Member Author

derberg commented Dec 8, 2025

@magicmatatjahu ready for review

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

♻️ Duplicate comments (1)
apps/generator/docs/react-render-engine.md (1)

48-48: Clarify the file template support statement.

Line 48 remains unclear from prior review: "All the file templates are supported where the variables are provided after the default props as listed above." The phrase "where the variables are provided" is ambiguous—does it specify a required location of variables, a condition for support, or something else?

Rephrase to explicitly state the requirement (e.g., "All file templates are supported when variables are supplied after the defaultProps listed above").

-1. All the file templates are supported where the variables are provided after the default props as listed above.
+1. All file templates are supported when variables are supplied after the default props listed above.
📜 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 cd48cc5 and 57c32e1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • apps/generator/docs/react-render-engine.md (2 hunks)
  • apps/generator/package.json (2 hunks)
  • apps/react-sdk/package.json (1 hunks)
  • packages/components/package.json (1 hunks)
  • packages/templates/clients/kafka/java/quarkus/package.json (1 hunks)
  • packages/templates/clients/websocket/dart/package.json (1 hunks)
  • packages/templates/clients/websocket/java/quarkus/package.json (1 hunks)
  • packages/templates/clients/websocket/javascript/package.json (1 hunks)
  • packages/templates/clients/websocket/python/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-05-12T14:23:48.919Z
Learnt from: derberg
Repo: asyncapi/generator PR: 1551
File: apps/generator/docs/generator-template.md:45-73
Timestamp: 2025-05-12T14:23:48.919Z
Learning: AsyncAPI 3.0.0 specification introduces significant structural changes from 2.x:
1. Operations become top-level elements with references to channels
2. Channels use 'address' for the topic path instead of having nested publish/subscribe
3. Messages are defined under a 'messages' container in channels
4. Servers can use a 'host' property

Applied to files:

  • packages/templates/clients/websocket/python/package.json
  • packages/templates/clients/websocket/javascript/package.json
📚 Learning: 2025-05-12T14:23:48.919Z
Learnt from: derberg
Repo: asyncapi/generator PR: 1551
File: apps/generator/docs/generator-template.md:45-73
Timestamp: 2025-05-12T14:23:48.919Z
Learning: AsyncAPI 3.0.0 specification introduces significant structural changes from 2.x:
1. Operations become top-level elements with action property (send/receive) and references to channels
2. Channels use 'address' for the topic path instead of having nested publish/subscribe operations
3. Messages are defined under a 'messages' container in channels
4. The specification decouples operations, channels and messages to improve reusability
5. Servers can use a 'host' property

Applied to files:

  • packages/templates/clients/websocket/python/package.json
  • packages/templates/clients/websocket/javascript/package.json
📚 Learning: 2025-03-15T20:29:28.279Z
Learnt from: derberg
Repo: asyncapi/generator PR: 1416
File: packages/templates/clients/python/websocket/template/requirements.txt.js:8-8
Timestamp: 2025-03-15T20:29:28.279Z
Learning: The certifi Python package uses date-based versioning (YYYY.MM.DD format). In the python websocket client template, a forward-looking version (2025.1.31) is intentionally used to ensure up-to-date certificates when deployed.

Applied to files:

  • packages/templates/clients/websocket/python/package.json
📚 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/react-render-engine.md
🪛 markdownlint-cli2 (0.18.1)
apps/generator/docs/react-render-engine.md

8-8: Link fragments should be valid

(MD051, link-fragments)

⏰ 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 24
  • GitHub Check: Test NodeJS PR - macos-latest
  • GitHub Check: Test NodeJS PR - ubuntu-latest
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: preview
🔇 Additional comments (10)
packages/templates/clients/websocket/python/package.json (1)

19-19: LGTM!

The upgrade to @asyncapi/parser ^3.4.0 is valid and consistent with the broader dependency updates across templates in this PR. As a devDependency used for testing and linting, a minor version bump within the 3.x range poses minimal risk.

packages/templates/clients/websocket/javascript/package.json (1)

20-20: Routine dependency upgrade.

The @asyncapi/parser upgrade from ^3.0.14 to ^3.4.0 is a minor version bump within the caret range and is consistent with coordinated parser upgrades across the repository.

apps/react-sdk/package.json (1)

32-32: Routine dependency upgrade in public SDK.

The @asyncapi/parser upgrade from ^3.1.0 to ^3.4.0 is a minor version bump and maintains backward compatibility within the caret range.

packages/components/package.json (1)

33-33: Routine dependency upgrade.

The @asyncapi/modelina upgrade from ^5.3.5 to ^5.10.1 is a minor version bump within the caret range and is consistent with coordinated modelina upgrades across the repository.

packages/templates/clients/websocket/java/quarkus/package.json (1)

27-28: Routine dependency upgrades consistent with repo-wide updates.

The @asyncapi/modelina (^5.2.5 → ^5.10.1) and @asyncapi/parser (^3.0.14 → ^3.4.0) upgrades are minor version bumps within caret ranges and align with coordinated upgrades across related templates.

packages/templates/clients/kafka/java/quarkus/package.json (1)

26-27: Routine dependency upgrades consistent with repo-wide updates.

The @asyncapi/modelina (^5.2.5 → ^5.10.1) and @asyncapi/parser (^3.0.14 → ^3.4.0) upgrades are minor version bumps within caret ranges and align with coordinated upgrades across related templates.

packages/templates/clients/websocket/dart/package.json (1)

19-19: Routine dependency upgrade.

The @asyncapi/parser upgrade from ^3.0.14 to ^3.4.0 is a minor version bump within the caret range and is consistent with coordinated parser upgrades across the repository.

apps/generator/package.json (3)

7-8: Major intentional breaking changes documented.

The engine requirement updates (Node >=24.11, npm >=11.5.1) constitute breaking changes as explicitly stated in the PR objectives and are appropriately enforced through package.json engines constraints.


55-56: Coordinated dependency updates.

The @asyncapi/multi-parser (^2.1.1 → ^2.2.0) and @asyncapi/parser (^3.0.14 → ^3.4.0) upgrades are minor version bumps within caret ranges and are consistent with coordinated upgrades across related packages. These should maintain backward compatibility.

Verify that the minor version upgrades to @asyncapi/multi-parser and @asyncapi/parser do not introduce breaking changes in the generator's usage of these libraries. Given the PR summary states "tests are green," this is likely already validated, but confirmation would be helpful.


1-90: Removal of Nunjucks and CLI infrastructure aligns with PR scope.

The removal of @asyncapi/nunjucks-filters, chokidar, and nunjucks dependencies, along with the bin field (which eliminated the asyncapi-generator and ag CLI entry points), are as specified in the PR objectives. These changes reflect the transition to React as the sole rendering engine and the deprecation of the ag CLI in favor of the AsyncAPI CLI.

derberg and others added 3 commits December 8, 2025 18:19
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

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

4 participants