search/
Start typing to search packages!
package_2
jest-diff
By @eyycheev
Roblox
Mirroredjest-diff
Upstream: https://github.com/facebook/jest/tree/v27.4.7/packages/jest-diff
Display differences clearly so people can review changes confidently.
The diff named export serializes values, compares them line-by-line, and returns a string which includes comparison lines.
Two named exports compare strings character-by-character:
diffStringsUnifiedreturns a string.diffStringsRawreturns an array ofDiffobjects.
Three named exports compare arrays of strings line-by-line:
diffLinesUnifiedanddiffLinesUnified2return a string.diffLinesRawreturns an array ofDiffobjects.
:pencil2: Notes
CleanupSemantic.luais adapted from the Lua version ofdiff-match-patchto resemble the upstreamcleanupSemantics.tsinstead of being a direct port of it.- Tests for it are added, which are not included in the upstream `jest-diff
- Changes to tests:
- Snapshots in
Diff.spec.luahave their leading<g>,<r>,<d>, and<y>ANSI style codes manually removed. - Color formatting specific tests are omitted.
changeColoris assigned to a function that imitateschalk.inverseso we can testdiffStringsUnified.Array[],Object{}are changed toTable{}.
- Snapshots in
Package Details
Install command (Click to copy)
Version
3.14.0-rbx.2
License
MIT
Safe for commercial use
The package archive does not include its license text; the license is declared in its manifest metadata.
Automated license review — not legal advice.
