Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature: Match VSCode's diff output

Aperta
#734 1 commento 5 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
tooling

Direzione di ricerca

Start by reading the @pierre/diffs diff-generation and rendering entry points, including parseDiffFromFile and its ignoreWhitespace option. Compare its output with VSCode for the mixed-change example in the issue, then determine whether an existing configuration or extension point can produce the match. Done means the same change reads like VSCode's diff, or the issue identifies the remaining behavior that requires a library change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

diffs enhancement
Prerequisites
Proposal

Proposal
Make @pierre/diffs produce diffs that visually match what VSCode's diff editor shows for the same change.

Two screenshots of the same diff, side by side:

Current @pierre/diffs output:
Image

VSCode's diff editor output:
Image
As you can see, the VSCode one is much cleaner.

How can we get pierre's output to match VSCode's? Is this something the lib could do by default, or is there a configuration / extension point we've missed? Saw #366 in passing ignoreWhitespace: true on parseDiffFromFile helps for whitespace-only changes, but the gap above remains on hunks with mixed changes.

Motivation and context

We're building a PR reviewer on top of @pierre/diffs. Reviewers spend most of their day in VSCode's diff editor, so they notice immediately when a diff in our app reads differently than VSCode for the same files.

Lingua principale
TypeScript
Stelle
6.2k
Fork
226
Merge medio
1g 3h
PR unite (30g)
39

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pierrecomputer/pierre

Tutte le issue di pierrecomputer/pierre

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.