Skip to content

Support passing diff options to React components#416

Merged
amadeus merged 3 commits intopierrecomputer:mainfrom
gsabran:whitespace-changes
Mar 30, 2026
Merged

Support passing diff options to React components#416
amadeus merged 3 commits intopierrecomputer:mainfrom
gsabran:whitespace-changes

Conversation

@gsabran
Copy link
Copy Markdown
Contributor

@gsabran gsabran commented Mar 24, 2026

Description

Support passing diff options to React components

Motivation & Context

I wanted a way to ignore whitespace only changes

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality). You must have
    first discussed with the dev team and they should be aware that this PR is
    being opened
  • Breaking change (fix or feature that would change existing functionality).
    You must have first discussed with the dev team and they should be aware
    that this PR is being opened
  • Documentation update

Checklist

  • I have read the
    contributing guidelines
  • My code follows the code style of the project (bun run lint)
  • My code is formatted properly (bun run format)
  • I have updated the documentation accordingly (if applicable)
  • I have added tests to cover my changes (if applicable)
  • All new and existing tests pass (bun run diffs:test)

How was AI used in generating this PR

I directed Claude to make the changes, reviewed and tested them carefully manually

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

@gsabran is attempting to deploy a commit to the Pierre Computer Company Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Member

@amadeus amadeus left a comment

Choose a reason for hiding this comment

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

Sorry for the delays on this, it's been a busy last couple weeks for me.

A couple small nits/questions/feedback, but pretty close I think

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Mar 30, 2026 6:17pm
pierrejs-docs Ready Ready Preview Mar 30, 2026 6:17pm

Request Review

@amadeus
Copy link
Copy Markdown
Member

amadeus commented Mar 27, 2026

looks like there will be some conflicts to sort out as well

* Options forwarded to the underlying diff algorithm when computing diffs
* from file contents (oldFile/newFile). Has no effect on pre-parsed patches.
*/
diffOptions?: ParseDiffOptions;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry my bad, i meant the name of this option, not the type. parseDiffOptions: CreatePatchOptionsNonabortable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can also just merge this and do the rename myself too if you're tied up

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sry I didn't mean to push yet

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no worries, imo PR is good to go now, is there more you need to do on it?

…sNonabortable type

Address PR review feedback:
- Rename diffOptions → parseDiffOptions to align with parseDiffFromFile
- Expose full CreatePatchOptionsNonabortable instead of a two-field subset
- Remove unnecessary ?? {} coercion in areOptionsEqual
- Pass parseDiffOptions through in FileDiff base class calls
Copy link
Copy Markdown
Member

@amadeus amadeus left a comment

Choose a reason for hiding this comment

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

Sick! Thanks for bearing with me on this! 🙏

@amadeus amadeus merged commit dbf491b into pierrecomputer:main Mar 30, 2026
8 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