Skip to content

fix: circular dependency issue, add raw filters, type gen fixes #1101

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

Merged
merged 3 commits into from
Jul 4, 2025

Conversation

ChiragAgg5k
Copy link
Member

What does this PR do?

  • Add raw filter to sdk changelogs to allow usage of < and similar symbols
  • Add comment docblocks to generated typing's files
  • Add some small formatting fixes to generated types
  • Fix circular dependency issue due to usage of success method in utils from parser

Test Plan

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

yes.

@ChiragAgg5k ChiragAgg5k requested review from Copilot and stnguyen90 July 4, 2025 08:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a circular dependency in the CLI utils, enables raw rendering of changelog content across all SDK templates, and adds standardized file headers with docblocks to generated type files.

  • Use the Twig raw filter for sdk.changelog in every CHANGELOG.md.twig to support < and similar symbols.
  • Replace the success helper call in showConsoleLink with a chalk-styled console.log to remove a parser dependency.
  • Insert consistent getCurrentDirectory methods and header docblocks in all CLI type-generation language templates.

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

File Description
templates/*/CHANGELOG.md.twig Switched {{sdk.changelog}} to `{{sdk.changelog
templates/cli/lib/utils.js.twig Removed success import, added chalk import and styled output
templates/cli/lib/type-generation/languages/*.js.twig Added getCurrentDirectory() and standardized comment headers
Comments suppressed due to low confidence (2)

templates/web/CHANGELOG.md.twig:1

  • There are no tests covering the new raw filter behavior for the changelog templates; consider adding a unit test to verify correct rendering of special characters.
{{sdk.changelog | raw}}

templates/web/CHANGELOG.md.twig:1

  • Applying the raw filter bypasses HTML escaping and may introduce XSS risks if sdk.changelog contains untrusted content; ensure inputs are sanitized or only contain Markdown.
{{sdk.changelog | raw}}

@Meldiron Meldiron merged commit 60122cb into master Jul 4, 2025
37 checks passed
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