Compatibility
How paratext's three drop-ins are graded — each incumbent's own test suite, unedited — the current grades, and the differences that remain, term-img's six path cases included.
paratext (the ansi-escapes surface), paratext/terminal-link and paratext/term-img are
graded, not described as compatible. Each is run against its incumbent's own test suite, by
compat-oracle,
in CI.
✓ yes · ◐ partial, with what is missing · ✗ no · — does not apply. Every mark links to its evidence: our test or grade, or the incumbent’s source at the version compat-oracle grades.
| Capability | paratext | ansi-escapes | terminal-link | term-img |
|---|---|---|---|---|
| Compatibility | ||||
| Passes ansi-escapes' own test suiteparatext's root is graded by ansi-escapes 7.3.0's own tests, unedited, and its CSI half is byte-exact with it. | paratext: yes4 / 4 of its own tests | ansi-escapes: yesits own suite, the control run | terminal-link: does not applya different API | term-img: does not applya different API |
Passes terminal-link's own test suiteparatext/terminal-link is graded by terminal-link 5.0.0's own tests, unedited. | paratext: yes8 / 8 of its own tests | ansi-escapes: does not applya different API | terminal-link: yesits own suite, the control run | term-img: does not applya different API |
Passes term-img's own test suiteparatext/term-img is graded by term-img 7.1.0's own tests, unedited, and passes every case that hands it image bytes. | paratext: partialpartial12 / 18 of its own tests | ansi-escapes: does not applya different API | terminal-link: does not applya different API | term-img: yesits own suite, the control run |
Compatibility
Passes ansi-escapes' own test suite
paratext's root is graded by ansi-escapes 7.3.0's own tests, unedited, and its CSI half is byte-exact with it.
ansi-escapes- ansi-escapes: yesits own suite, the control run
terminal-link- terminal-link: does not applya different API
Passes terminal-link's own test suite
paratext/terminal-linkis graded by terminal-link 5.0.0's own tests, unedited.ansi-escapes- ansi-escapes: does not applya different API
terminal-link- terminal-link: yesits own suite, the control run
Passes term-img's own test suite
paratext/term-imgis graded by term-img 7.1.0's own tests, unedited, and passes every case that hands it image bytes.ansi-escapes- ansi-escapes: does not applya different API
terminal-link- terminal-link: does not applya different API
The counts are compat-oracle's baselines, the pass count each drop-in is held to. The family's compatibility page is generated from the oracle's last run and is the authority for the current figures.
| incumbent | graded version | drop-in | cases |
|---|---|---|---|
| ansi-escapes | 7.3.0 | import ansiEscapes from 'paratext' | 4 / 4 |
| terminal-link | 5.0.0 | import terminalLink from 'paratext/terminal-link' | 8 / 8 |
| term-img | 7.1.0 | import terminalImage from 'paratext/term-img' | 12 / 18 |
How a suite is graded
- The incumbent's repository is cloned at the release tag of the graded version and its test
file copied into
packages/compat-oracle/vendor/. No incumbent ships its tests to npm. Each copy'sPROVENANCEfile names the tag, the commit and the command that reproduces it. - The only edit is the import that reaches the library: it is rewritten to a shim generated per run. Assertions and fixtures are upstream's, byte for byte.
- A control run points the shim at the real incumbent first, which proves the harness and sets the total every rate is measured against.
- The target run points the same shim at paratext's path.
term-img: 12 of 18, and why that is the ceiling
The six cases that fail are the same six every run — iTerm2 support, WezTerm support,
Konsole support, Rio support, VSCode support and handles options parameter correctly —
and each hands a file path to a terminal the suite has just declared supported.
paratext/term-img takes image bytes, so that node:fs stays out of a package that otherwise
touches nothing but strings (decision D-030). Passing them would mean reading a file, which is
the dependency the package declines. A caller that passes paths makes one edit:
- terminalImage('unicorn.jpg', { width: '50%' });
+ terminalImage(await readFile('unicorn.jpg'), { width: '50%' });Known differences
- The root's OSC members project off a terminal.
link,imageandsetCwdfromparatextreturn the incumbent's bytes where the terminal is believed to understand them, and the static projection everywhere else; ansi-escapes returns the bytes everywhere. The CSI half is byte-exact and never degrades (The ansi-escapes surface). iTermandConEmuare declared andundefined. A program that imports them loads; one that calls them is a compile error in TypeScript.paratext/term-imgtakes bytes, not a path (above).paratext/term-imgreads iTerm2's whole version number. term-img takes the first character, which would read iTerm2 10 as 1; nothing in the suite tells the two apart.paratext/terminal-linkneedsargvandplatformfor two of supports-hyperlinks' rules — the--no-hyperlinkflag and the Windows check — and reads them from the process, as the incumbent does.
Types and CommonJS
Each path exports its incumbent's names and types. Every entry is ESM with a default
condition, so require('paratext/terminal-link') works from CommonJS on Node 20.19+ and 22.13+.
Why paratext
paratext against ansi-escapes, terminal-link and term-img, one capability per row, every cell linked to the test, grade or source that proves it.
Coming from ansi-escapes
An ansi-escapes alternative with a drop-in path: import ansiEscapes from paratext, graded 4 / 4 by ansi-escapes' own test suite — then hyperlinks, images and the working directory that project to plain text for pipes and agents instead of raw escape bytes.