Skip to content

fix(codegen): remove spaces around = in minified type parameter defaults#17989

Merged
graphite-app[bot] merged 1 commit intomainfrom
fix/codegen-minify-equals-space
Jan 14, 2026
Merged

fix(codegen): remove spaces around = in minified type parameter defaults#17989
graphite-app[bot] merged 1 commit intomainfrom
fix/codegen-minify-equals-space

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Jan 14, 2026

Summary

  • Remove unnecessary spaces around = in type parameter defaults
  • Remove unnecessary spaces around = in import equals declarations

Changes

  • <Props = any><Props=any>
  • import a = require("a")import a=require("a")

Both syntaxes parse correctly without spaces (verified).

Test plan

  • All codegen tests pass
  • All coverage tests pass (100%)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings January 14, 2026 09:58
@github-actions github-actions bot added A-codegen Area - Code Generation C-bug Category - Bug labels Jan 14, 2026
Copy link
Contributor

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 optimizes minified output by removing unnecessary spaces around the = operator in TypeScript type parameter defaults and import equals declarations. The changes leverage the existing print_soft_space() method which only prints spaces in non-minified mode.

Changes:

  • Remove spaces around = in type parameter defaults (e.g., <Props = any><Props=any>)
  • Remove spaces around = in TypeScript import equals declarations (e.g., import a = require("a")import a=require("a"))
  • Update test snapshots to reflect the new minified output

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
crates/oxc_codegen/src/gen.rs Replace hardcoded " = " with print_soft_space() + '=' + print_soft_space() in TSTypeParameter and TSImportEqualsDeclaration implementations
crates/oxc_codegen/tests/integration/snapshots/minify.snap Update expected minified output to reflect removal of spaces around =

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 14, 2026

Merging this PR will not alter performance

✅ 42 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing fix/codegen-minify-equals-space (e1098fd) with main (6ac67bc)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
Copy link
Member Author

Boshen commented Jan 14, 2026

Merge activity

  • Jan 14, 10:46 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 14, 10:46 AM UTC: Boshen added this pull request to the Graphite merge queue.
  • Jan 14, 10:50 AM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Test Linux').
  • Jan 14, 11:53 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 14, 11:53 AM UTC: Boshen added this pull request to the Graphite merge queue.
  • Jan 14, 12:27 PM UTC: Merged by the Graphite merge queue.

graphite-app bot pushed a commit that referenced this pull request Jan 14, 2026
…aults (#17989)

## Summary
- Remove unnecessary spaces around `=` in type parameter defaults
- Remove unnecessary spaces around `=` in import equals declarations

## Changes
- `<Props = any>` → `<Props=any>`
- `import a = require("a")` → `import a=require("a")`

Both syntaxes parse correctly without spaces (verified).

## Test plan
- [x] All codegen tests pass
- [x] All coverage tests pass (100%)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app bot force-pushed the fix/codegen-minify-equals-space branch from e1098fd to 30db4d4 Compare January 14, 2026 10:46
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
graphite-app bot pushed a commit that referenced this pull request Jan 14, 2026
…aults (#17989)

## Summary
- Remove unnecessary spaces around `=` in type parameter defaults
- Remove unnecessary spaces around `=` in import equals declarations

## Changes
- `<Props = any>` → `<Props=any>`
- `import a = require("a")` → `import a=require("a")`

Both syntaxes parse correctly without spaces (verified).

## Test plan
- [x] All codegen tests pass
- [x] All coverage tests pass (100%)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app bot force-pushed the fix/codegen-minify-equals-space branch from 30db4d4 to 9d83519 Compare January 14, 2026 12:15
…aults (#17989)

## Summary
- Remove unnecessary spaces around `=` in type parameter defaults
- Remove unnecessary spaces around `=` in import equals declarations

## Changes
- `<Props = any>` → `<Props=any>`
- `import a = require("a")` → `import a=require("a")`

Both syntaxes parse correctly without spaces (verified).

## Test plan
- [x] All codegen tests pass
- [x] All coverage tests pass (100%)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app bot force-pushed the fix/codegen-minify-equals-space branch from 9d83519 to 4c16ae7 Compare January 14, 2026 12:21
@graphite-app graphite-app bot merged commit 4c16ae7 into main Jan 14, 2026
21 checks passed
@graphite-app graphite-app bot deleted the fix/codegen-minify-equals-space branch January 14, 2026 12:27
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants