Skip to content

chore: clarify tseynit indentation handling - #2977

Open
pwkazn wants to merge 1 commit into
software-mansion:mainfrom
pwkazn:codex/issue-2974-tseynit-cleanup
Open

chore: clarify tseynit indentation handling#2977
pwkazn wants to merge 1 commit into
software-mansion:mainfrom
pwkazn:codex/issue-2974-tseynit-cleanup

Conversation

@pwkazn

@pwkazn pwkazn commented Sep 4, 2026

Copy link
Copy Markdown

Summary

  • Rename the statement indentation parameter from ident to indent.
  • Stop threading the unused indentation argument through expression stringification.

Closes #2974

Testing

  • pnpm exec vitest run packages/typegpu/tests/internal/tseynit.test.ts --project=!browser
  • pnpm --filter typegpu test:types
  • pnpm exec oxlint -c oxlint.config.ts --max-warnings=0 --type-aware packages/typegpu/src/shared/tseynit.ts packages/typegpu/tests/internal/tseynit.test.ts --report-unused-disable-directives
  • pnpm exec oxfmt --check packages/typegpu/src/shared/tseynit.ts

Copilot AI lite review requested due to automatic review settings September 4, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The refactor is internally consistent (no remaining call sites with the removed parameter) and does not change expression/statement output behavior aside from the intended naming/cleanup.

Pull request overview

This PR refines the tseynit AST-to-JS stringifier by clarifying indentation parameter naming and simplifying expression stringification, aligning with issue #2974’s request to remove an unused indentation argument from expression handling.

Changes:

  • Renames the statement indentation parameter from ident to indent for clarity.
  • Removes the indentation argument from stringifyExpression and wrapIfComplex, and updates all internal call sites accordingly.
File summaries
File Description
packages/typegpu/src/shared/tseynit.ts Renames the statement indentation parameter and removes unused indentation threading through expression stringification helpers.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • identindent rename in stringifyStatement — clarifies that the parameter carries indentation whitespace, not an identifier.
  • Drop unused indent arg from expression stringification — removed the indent/ident argument threaded through stringifyExpression and wrapIfComplex, since it was never consumed for output.

The argument was threaded but never used in expression stringification, so the removal produces byte-identical output. All call sites are internal to tseynit.ts (stringifyNode is the only export), and pnpm exec vitest run packages/typegpu/tests/internal/tseynit.test.ts --project=!browser passes 29/29 with no snapshot churn — confirming this is a clean, behavior-preserving cleanup.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

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.

chore: Check if indent is required in tseynit stringifyExpression

2 participants