Skip to content

Conversation

@BrianHung
Copy link
Contributor

Description

Allows patch options to be passed to parseDiffFromFile. This comes from the upstream library (https://github.com/kpdecker/jsdiff), and are exposing that as an option to downstream consumers of this diffs lib.

Motivation & Context

I want to customize the context lines for grouping hunks. Default right now is 3. However, coming from CodeMirror, it uses context = 1 (https://github.com/codemirror/merge/blob/main/src/chunk.ts), so I would like this customizability for compatibility there.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)
  • 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)

Related issues

@vercel
Copy link

vercel bot commented Dec 29, 2025

@BrianHung 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
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.

lgtm, thanks for the contribution!

@vercel
Copy link

vercel bot commented Dec 29, 2025

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

Project Deployment Review Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Dec 29, 2025 8:42pm
pierrejs-docs Ready Ready Preview Dec 29, 2025 8:42pm
pierrejs-solid-diff-demo Ready Ready Preview Dec 29, 2025 8:42pm

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