Skip to content

Enhance binary cast expression handling and add tests for trace entrypoints#18492

Closed
williamquintas wants to merge 2 commits intoprettier:mainfrom
williamquintas:fix-call-new-cast-formatting-18406
Closed

Enhance binary cast expression handling and add tests for trace entrypoints#18492
williamquintas wants to merge 2 commits intoprettier:mainfrom
williamquintas:fix-call-new-cast-formatting-18406

Conversation

@williamquintas
Copy link

@williamquintas williamquintas commented Dec 16, 2025

Fixes #18406

Description

  • Updated printBinaryCastExpression to handle NewExpression in addition to CallExpression.
  • Introduced a new test file for TypeScript chain expressions involving TraceEntryPointsPlugin.
  • Updated snapshots to reflect the new formatting for the added test cases.

Checklist

  • I’ve added tests to confirm my change works.

Tests added/updated:

  • tests/format/typescript/chain-expression/snapshots/format.test.js.snap

  • tests/format/typescript/chain-expression/trace-entrypoints.ts
    How to run: yarn test (and yarn test -u if snapshots were updated).

  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).

  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
    Changelog file: changelog_unreleased/typescript/18492.md

  • I’ve read the contributing guidelines.

… points

- Updated `printBinaryCastExpression` to handle `NewExpression` in addition to `CallExpression`.
- Introduced a new test file for TypeScript chain expressions involving `TraceEntryPointsPlugin`.
- Updated snapshots to reflect the new formatting for the added test cases.
@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for prettier ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 03a7d62
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/69417eb8b8ebcb00089b4baf
😎 Deploy Preview https://deploy-preview-18492--prettier.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Format inconsistent with CallExpression and NewExpression breaking

1 participant