Releases: xtermjs/xterm.js
4.8.0
🐞 Bug fixes
- Always sync textarea with cursor (#2996) via @jeanp413
- Fix renderer pausing inadvertently in some cases (#2999) via @andrew-schlackman
📝 Documentation and internal improvements
🤝 Compatible addon versions
[email protected]
[email protected]
[email protected]
(this addon may have issues)[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
4.7.0
🐞 Bug fixes
- Prevent warning in some browsers by explicitly indicating whether event handlers are passive (#2931) via @DavidSichau
- Fix an exception when disposing
Terminal
more than once (#2934) via @Tyriar - Support opaque selection colors in dom and canvas renderers (#2952) via @Puneethnaik
- Fix an exception when disposing
Terminal
if a framework like React has already unmounted the element (#2962) via @JoshuaKGoldberg - Fix
getSelection
sometimes not working for single character selections (#2973) via @daniel-j-davis
📝 Documentation and internal improvements
- Updated typescript (#2940, #2967) via @dependabot-preview
- Fix several lint issues with help from the putout linter (#2953) via @coderaiser
- Update Dockerfile's node version to v12 (#2965) via @JoshuaKGoldberg
- Add helper for removing elements from their parents (#2966) via @Tyriar
- Fix ligatures addon install breaking the build (#2971) via @Tyriar
🎉 New real-world use cases
- DockerStacks (#2942) via @sfx101
- Codecademy (#2950) via @JoshuaKGoldberg
- Laravel SSH web client (#2951) via @roke22
🤝 Compatible addon versions
[email protected]
[email protected]
[email protected]
(this addon may have issues)[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
🌐 Website
- Use recommended
onData
instead ofonKey
in demo (xtermjs/xtermjs.org#128) via @Tyriar
4.6.0
🚀 Features
- Support alt+enter sending
\e\r
(#2718) via @kumaran-14 - Reverse wraparound mode (#2724) via @jerch
📦 API
- Add
linkTooltipHoverDuration
setting, this is a workaround for the old deprecated link matcher system (#2835) via @Tyriar - There is a new
enableProposedApi
setting that currently defaults to true, in v5 this will switch to false to require the embedder to opt-in to using the experimental APIs that may break across versions (#2921) via @Tyriar
🐞 Bug fixes
- Fix selection wrapping to end when not beyond viewport (#2834) via @Tyriar
- Link providers
- Fix links not clearing when leaving the xterm container (#2852) via @Tyriar
- Allow hiding of link underline (#2854) via @Tyriar
- Allow mouse to hover tooltips without firing the leave event (#2855) via @Tyriar
- Prevent hover callbacks firing if the mouse is outside the viewport (#2856) via @Tyriar
- Allow customizing of the underline and cursor decorations independently (#2857) via @Tyriar
- Invalidate all links on scroll (#2869) via @Tyriar
- Change API to return all links for a line, instead of just the one at the cell (#2908) via @Tyriar
- Prevent hover from firing multiple times (#2912) via @Tyriar
- Remove lower priority links that intersect high priority links (#2916) via @Tyriar
- Fix textures getting messed up when using 2 different DPI monitors (#2892) via @Eugeny
- Fix some memory leaks (#2899) via @Tyriar
📝 Documentation and internal improvements
- Add internal to support underline styles/colors (#2751) via @jerch
- Fix lgtm.com warnings (#2829) via @Tyriar
- Support --debug flag in playwright tests (#2830) via @kumaran-14
- Enforce explicit access modifier (#2844) via @Tyriar
- Merge the ligatures addon into the core repo (#2847) via @LabhanshAgrawal, this is the first step in making the addon stable and keeping it that way
- Support dependency injection in UnicodeService (#2871) via @Tyriar
- Fix missing ybase in print function (#2873) via @jerch
- Finish moving files into strict TS projects 🎉 (#2874, 2876) via @Tyriar
- Polish eslint usage (#2895, #2898) via @Tyriar
- Clear addons box after recreating terminal in demo (#2914) via @drauggres
🎉 New real-world use cases
- Dank Domain (#2903) via @theflyingape
📥 Addons
xterm-addon-search
- Fix find not working when there are 2 results both on the same line (#2867) via @rishab-pdx
xterm-addon-web-links
- Add @ as a valid URL character (#2888) via @lunaroyster
xterm-addon-webgl
- Fix link provider links not working correctly (#2837) via @Tyriar
- Center text vertically to avoid top-alignment on some fonts (#2864) via @Tyriar
- Refresh model colors after changing themes (#2868) via @Tyriar
- Redraw selection when switching renderers (#2870) via @Tyriar
🤝 Compatible addon versions
[email protected]
[email protected]
[email protected]
(this addon may have issues)[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
4.5.0
🚀 Features
📦 API
- New experimental link provider API (#2530, #2710) via @jmbockhorst. This flips around how links in the terminal work by asking an addon what links are available at a particular cell when its hovered, instead of pre-parsing the entire viewport using the current link matcher API. The plan is for this to eventually replace the
registerLinkMatcher
API. You can test this new API by setting the_useLinkProvider
parameter on the web links addon. - The alternate buffer can now be accessed via the experimental buffer API (#2713) via @JavaCS3. This breaks the previous API so if you're an early adopter be sure to update accordingly.
🐞 Bug fixes
- Remove duplicate CSS rule being added (#2715) via @kumaran-14
- Make cursor display on the last cell if it's off the edge of the screen (#2731) via @jerch
- Fix transparent theme colors on old Edge (#2739) via @felixse
- Fix addDisposableDomListener leaking events (#2767) via @JavaCS3
- Use role=list attribute when screenReaderMode is enabled (#2814) via @Tyriar
- Ensure multiple cursor blink animations aren't occurring at same time (#2817) via @Tyriar
📝 Documentation and internal improvements
- Typo, improving wording (#2698, #2766) via @Tyriar
- Consolidate integration test helper functions (#2711) via @jmbockhorst
- Migrate from puppeteer to playwright (#2712) @jmbockhorst
- Run tests in Firefox and WebKit (#2722, #2725) via @Tyriar
- Update to TypeScript 3.8 (#2730) via @Tyriar
- Document VT features in code and extract for the website (#2754) via @jerch
- Upgrade several dev dependencies (#2758, #2760, #2770, #2772, #2779, #2780, #2783, #2795, #2801, #2803, #2805, #2810, #2815, #2819, #2820) via @Tyriar, @dependabot, @dependabot-preview
- Migrate from tslint to eslint (#2786, #2799, #2827) via @Tyriar
- Upgrade mac agent in pipelines (#2800) via @Tyriar
- Use debug instead of warn log level for open on non-attached element (#2825) via @Tyriar
🛑 Breaking changes
- The buffer API has changed significantly:
// before 4.5.0 const activeBuffer = term.buffer // after 4.5.0 const activeBuffer = term.buffer.active
🎉 New real-world use cases
🤝 Compatible addon versions
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
🌐 Website
- Remove unused google analytics script (xtermjs/xtermjs.org#122) via @Tyriar
- Document VT features (xtermjs/xtermjs.org#121) via @jerch
- Add a guide on using the parser hooks API (xtermjs/xtermjs.org#123) via @jerch
- Upgrade dependencies (xtermjs/xtermjs.org#120, xtermjs/xtermjs.org#124, xtermjs/xtermjs.org#125) via @Tyriar, @dependabot
4.4.0
🚀 Features
- A new addon is available that serializes the buffer as a string, allowing restoring the majority of the state to a new terminal by calling
Terminal.write(serializedState)
. See thexterm-addon-serialize
section below for more info. - A new addon to enable unicode 11 support, which can fix many emoji-width related bugs on modern operating systems. See the
xterm-addon-unicode11
section below for more info. - Support alt-clicking in multi-line prompts in the normal buffer (#2670) via @kumaran-14
📦 API
- Support for some window manipulation/reporting sequences (#2393) via @jerch. These must be enabled explicitly via the new
windowOptions
option as they have security implications. - Allow the thickness of the bar cursor to be configured (#2590) via @npezza93
new Terminal({ cursorStyle: 'bar', cursorBarWidth: 3 });
- The parser API is now stable (#2689) via @Tyriar
🐞 Bug fixes
- Speed up double disposing an object (#2616) via @sdegutis
- Implement hidden attribute rendering in DOM renderer (#2625) via @Tyriar
- Fix canvas selection supporting
#rrggbbaa
color format (#2629) via @ivanwonder - Improve handling of full width characters in buffer writes (#2644) via @jerch
- Flag lines as being wrapped after a CUP occurs at the end of a line in windowsMode (#2667) via @Tyriar
- Properly separate DOM renderer cursor animations for each terminal to avoid conflicts when multiple terminals are visible with different themes (#2676) via @jeffbaier
- Fix various characters in the DEC graphics charset (#2679) via @jerch
- Remove
;
and:
from the defaultwordSeparator
option so more URLs are selected fully with double click (#2680) via @Tyriar - Fix DOM renderer not rendering cursor correctly immediately after changing
cursorBlink
orcursorStyle
(#2684) via @Tyriar - Handle links safely by removing opener from window (#2688) via @Tyriar
📝 Documentation and internal improvements
- Implement tooling to document and extract the supported VT features of xterm.js (#2386) via @jerch
- Update node-pty to v0.9 (#2621) via @jerch
- Reducing internal circular dependencies (#2637, #2640) via @Tyriar
- Improve the structure of the color helper library (#2653) via @Tyriar
- Fix failing Linux unit tests not failing job in CI (#2682) via @Tyriar
- Remove old unused options from codebase and API (#2685) via @Tyriar
🛑 Breaking changes
- APIs starting with
add
in the experimental parser API have been removed in favor ofregister
as it enters stable status (#2651) via @Tyriar
⚠️ Deprecations
addMarker
is now deprecated, move over toregisterMarker
which is functionally equivalent (#2651) via @Tyriar
🎉 New real-world use cases
📥 Addons
xterm-addon-attach
xterm-addon-serialize
This new addon has allows serializing terminal state (text, color and style currently) and writing it to new Terminal
objects to restore it (#2369, #2618, #2687) via @JavaCS3
const t = new Terminal();
const serializeAddon = new SerializeAddon();
t.loadAddon(serializeAddon);
await new Promise(r => t.write('foo \x1b[31mbar', r));
const state = serializeAddon.serialize();
console.log(state); // 'foo \x1b[31mbar'
xterm-addon-unicode11
This new addon can be enabled to resolve unicode character widths based on version 11 of unicode (#2568) via @jerch.
const t = new Terminal();
// 🤣 is now single width (unicode 6)
const unicode11Addon = new Unicode11Addon();
t.loadAddon(unicode11Addon);
t.unicode.activeVersion = '11';
// 🤣 is now treated as double width
xterm-addon-webgl
- Implement hidden attribute rendering (#2625) via @Tyriar
- Fix adding the webgl texture atlas to the DOM (#2626, #2628) via @Tyriar
- Fix rendering of selection over inverse cells (#2650) via @Tyriar
🤝 Compatible addon versions
4.3.0
The WebGL renderer addon got quite a bit of work done on it this release and is quickly approaching parity with the other renderers. It has also been integrated into VS Code as an experimental option.
From our benchmarks the WebGL renderer renders frames up to 900% faster than the canvas renderer and even more in extreme cases where there are hardware issues with the canvas renderer.
Here's a comparison of example frames rendered using the canvas and webgl renderers (Windows 10, Intel Xeon E5-1620 @ 3.5GHz, AMD FirePro W2100):
Faster rendering also means more frames overall and faster commands. The below is a run of ls -lR
on the same machine inside the VS Code codebase:
Read more about why it's so good in microsoft/vscode#84440 🔥
🚀 Features
-
The new option
minimumContrastRatio
has been added that dynamically changes the foreground color to improve contrast (#2563, #2602) via @Tyriar
📦 API
- The new
onBinary
event enabled support for some mouse report events that cannot be expressed in JS strings (UTF8) (#2566) via @jerch
🐞 Bug fixes
- Only re-render rows that have changed (#2536, #2582) via @Tyriar
- Re-render rows when options have changed (#2550) via @Tyriar
- Force foreground color to be opaque when using a transparent background (#2560) via @ivanwonder
- Include the backtick as a default word separator (#2583) via @Tyriar
📝 Documentation and internal improvements
- Addon dependencies are installed on
yarn
in repo root (#2516) via @jerch - Support disposing of EventEmitters (#2517) via @revanthmahesh
- Support toggling addons in the demo (#2518) via @Tyriar
- Fix several typos in the API .d.ts files (#2521) via @alberto
- Support test coverage reporting (#2525, #2527, #2559) via @Tyriar
- Update to TypeScript 3.7 (#2540) via @Tyriar
- Polish and optimize pipeline (#2541, #2546, #2580) via @Tyriar
- Move remaining renderer parts into the browser layer (#2547) via @Tyriar
- Speed up API tests significantly (#2551, #2553) via @Tyriar
- Prefer non-relative imports in VS Code (#2561) via @Tyriar
- Move windows mode into the common layer (#2569) via @Tyriar
- Direct questions on GitHub to Stack Overflow (#2574) via @Tyriar
- Use
beta.X
format instead ofbetaX
to better follow semver (#2577, #2579) via @Tyriar - Remove unused imports and functions (#2585) via @Tyriar
🎉 New real-world use cases
- Next Tech (#2562) via @AndrewSverdrup
📥 Addons
xterm-addon-search
xterm-addon-webgl
- Implement the dispose method (#2548) via @Tyriar
- Support true color and move off legacy cell structure (#2552, #2557, #2558) via @Tyriar
- Force foreground color to be opaque when using a transparent background (#2560) via @ivanwonder, @Tyriar
- Prevent exceptions when initializing the atlas when the element is not attached (#2575, #2578) via @Tyriar
🤝 Compatible addon versions
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
🌐 Website
- New article on dealing with encodings (xtermjs/xtermjs.org#95, xtermjs/xtermjs.org#106) via @jerch
- New article on setting up flow control (xtermjs/xtermjs.org#103) via @jerch
- New article on security guidance (xtermjs/xtermjs.org#105) via @jerch
- Make
<h4>
more prominent (xtermjs/xtermjs.org#107) via @Tyriar - Improve API table formatting (xtermjs/xtermjs.org#108, xtermjs/xtermjs.org#109, xtermjs/xtermjs.org#110) via @sdegutis
4.2.0
🚀 Features
- Support several new sequences (#2360) via @jerch
SL
- Scroll leftSR
- Scroll rightDECIC
- Insert columnsDECDC
- Delete columns
📦 API
- New base scroll sensitivity setting (#2485) via @eamodio
// Scroll 2 times faster than normal const term = new Terminal({ scrollSensitivity: 2 });
- Support fast scrolling while holding a modifier key (alt by default) (#2375) via @csurquin
// Scroll 10 times faster than normal when holding alt const term = new Terminal({ fastScrollSensitivity: 10, fastScrollModifier: 'alt' });
- Surface the range of a link in its hover callback (#2470, #2492) via @jmbockhorst
interface ILinkMatcherOptions { tooltipCallback?: (event: MouseEvent, uri: string, location: IViewportRange) => boolean | void; }
🐞 Bug fixes
- Throw when
Infinity
andNaN
are provided to an API that expects an integer (#2451) via @Tyriar - Have the unfocused cursor style match the normal cursor style (#2455) via @JeffreyCA
- Send correct sequence for ctrl+up/down on macOS (#2467) via @Tyriar
- Mark
element
andtextarea
correctly with| undefined
in the API (#2473) via @Tyriar - Add
,
,;
and:
as default characters included in thewordSeparator
option (#2474) via @glneto - Protect against exception when clicking on links (#2475) via @Tyriar
- Fix scrollback going missing when increasing terminal size under conpty (#2476) via @Tyriar
- Fix alerts provided by lgtm.com (#2496, #2505) via @Tyriar
- Fix edge case in text decoder (#2504) via @jerch
- Limit parse buffer size (#2508) via @jerch
- Set
IMarker.line
to-1
when disposed (#2510) via @Tyriar - Apply
scrollSensitivity
when fast scrolling (#2514) via @Tyriar
📝 Documentation and internal improvements
- Log a warning when calling
open
on an element not attached to the DOM (#2450, #2497) via @Tyriar - Add integration test for terminal disposing (#2469) via @leomoty
- Improve automation for publishing patch releases (#2481) via @Tyriar
- Automate website update PR on release (#2482) via @Tyriar
- Fix integration tests running within dev container (#2477) via @leomoty
- Forbid the use of mocha's
.only
in CI (#2493) via @leomoty - Minor API clean up (#2501, #2511) via @Tyriar
- Use an mp3 as the default bell sound instead of wav (#2506) via @Tyriar
- Refine new
IViewportRange
API (#2512) via @Tyriar
🛑 Breaking changes
🎉 New real-world use cases
- Ten Hands (#2454) via @saisandeepvaddi
- WebAssembly.sh (#2465) via @syrusakbary
📥 Addons
xterm-addon-fit
- Prevent
proposeDimensions
from returning values less than the minimum dimensions (#2483) via @leomoty - Add integration tests (#2483, #2489) via @leomoty
xterm-addon-search
- Reveal search results properly when found in the line immediately below the viewport (#2453) via @Tyriar
- Prevent single search result from being deselected when re-searching (#2491) via @miggs125
xterm-addon-webgl
- Have the unfocused cursor style match the normal cursor style (#2455) via @JeffreyCA
🤝 Compatible addon versions
4.1.0
🚀 Features
📦 API
-
A callback can now be specified when calling
Terminal.write
that fires when the terminal has parsed the provided data (#2422) via @jerch. This is useful to know when the terminal state has definitely been updated after a write since writes are deferred and done in chunks to avoid locking up the web page.const term = new Terminal(); term.write('hello world', () => console.log('processed'));
We decided to use a callback-based approach here rather than promise-based since
write
is one of the most performance critical parts of xterm.js and it can easily be adapted into a promise:const p = new Promise(r => term.write('hello world', r));
-
Terminal.write
andTerminal.writeln
now accept anUint8Array
in addition tostring
(#2422) via @jerch
🐞 Bug fixes
📝 Documentation and internal improvements
- Debug logging now logs character codes in addition to the actual string representation (#2424) via @Tyriar
- Clean up keyboard handling logic and inaccurate comments (#2425) via @Tyriar
- Remove redundant build step in publish Azure Pipelines job (#2427) via @Tyriar
- Add tests for IL, DL and DCH sequences (#2431) via @Tyriar
- Correct addon example in readme (#2437) via @kafeg
- Fix demo on Windows (#2442) via @Tyriar
- Upgrade to typescript 3.6 (#2447) via @Tyriar
⚠️ Deprecations
-
Terminal.writeUtf8
has been deprecated in favor ofTerminal.write
(#2422) via @jerch// deprecated term.writeUtf8(buffer); // recommended term.write(buffer);