Xterm.js – 完整的浏览器终端支持输入法和身体滚动
Xterm.js – 完整的浏览器终端支持输入法和身体滚动
📦
API
- Add number support to
fontWeight
andfontWeightBold
options (#3062) via @IllusionMH, this now matches the types that the CSS style supports. - Support optional
dispose
function onILink
(#3073) via @Tyriar, this allows consumers to be notified when links are no longer needed which was difficult to observe before.
🐞
Bug fixes
- Fix renderer pausing when
Terminal.open
is called during an animation (#3008) via @andrew-schlackman - Use document role instead of list for the terminal (#3020) via @Tyriar
- Constructor options are now validated just like when using
setOption
(#3064) via @IllusionMH - Fix rendering of multi-line selection when only top row is visible (#3081) via @Tyriar
- Fix first/last line of selection sometimes not rendering with the canvas renderer (#3082) via @Tyriar
📝
Documentation and internal improvements
- Remove the no longer supported Dockerfile from the repo (#3026) via @Tyriar
- Update to TypeScript 4 (#3059) via @Tyriar
🛑
Breaking changes
getOption('fontWeight')
andgetOption('fontWeightBold')
now returnsstring | number
instead ofstring
:// before 4.9.0 const weight: string = term.getOption('fontWeight'); // after 4.9.0 const weight: string | number = term.getOption('fontWeight');
🎉
New real-world use cases
- Repl.it (#3021) via @sergeichestakov
- TeleType (#3040) via @akshaykmr
- Intervue (#3046) via @Intervue
📥
Addons
xterm-addon-serialize
xterm-addon-webgl
- Expose
WebglAddon.clearTextureAtlas
API (#3075) via @Tyriar, this is useful to completely clear the atlas when corruption may have happened (eg. when canvas textures are lost after system sleep/resume). - Fix rendering of multi-line selection when only top row is visible (#3081) via @Tyriar
🤝
Compatible addon versions
xterm-addon-attach@0.6.0
xterm-addon-fit@0.4.0
xterm-addon-ligatures@0.3.0
(this addon may have issues)xterm-addon-search@0.7.0
xterm-addon-serialize@0.4.0
xterm-addon-unicode11@0.2.0
xterm-addon-web-links@0.4.0
xterm-addon-webgl@0.9.0
Assets
2
🐞
Bug fixes
Assets
2
🐞
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
xterm-addon-attach@0.6.0
xterm-addon-fit@0.4.0
xterm-addon-ligatures@0.3.0
(this addon may have issues)xterm-addon-search@0.7.0
xterm-addon-serialize@0.3.0
xterm-addon-unicode11@0.2.0
xterm-addon-web-links@0.4.0
xterm-addon-webgl@0.8.0
🌐
Website
- Use recommended
onData
instead ofonKey
in demo (xtermjs/xtermjs.org#128) via @Tyriar
Assets
2
🚀
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
xterm-addon-attach@0.6.0
xterm-addon-fit@0.4.0
xterm-addon-ligatures@0.3.0
(this addon may have issues)xterm-addon-search@0.7.0
xterm-addon-serialize@0.3.0
xterm-addon-unicode11@0.2.0
xterm-addon-web-links@0.4.0
xterm-addon-webgl@0.7.0
Assets
2
🚀
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
xterm-addon-attach@0.5.0
xterm-addon-fit@0.3.0
xterm-addon-search@0.6.0
xterm-addon-serialize@0.2.0
xterm-addon-ligatures@0.2.1
xterm-addon-unicode11@0.1.1
xterm-addon-web-links@0.3.0
xterm-addon-webgl@0.6.0
🌐
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
Assets
2
🚀
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
xterm-addon-attach@0.5.0
xterm-addon-fit@0.3.0
xterm-addon-search@0.4.0
xterm-addon-serialize@0.1.1
xterm-addon-ligatures@0.2.1
xterm-addon-unicode11@0.1.1
xterm-addon-web-links@0.2.1
xterm-addon-webgl@0.5.0
Assets
2
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
- xterm-addon-attach@0.4.0
- xterm-addon-fit@0.3.0
- xterm-addon-search@0.4.0
- xterm-addon-ligatures@0.2.1
- xterm-addon-web-links@0.2.1
- xterm-addon-webgl@0.4.0
🌐
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
Assets
2
🚀
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
xterm-addon-attach@0.3.0
xterm-addon-fit@0.3.0
xterm-addon-search@0.3.0
xterm-addon-ligatures@0.2.1
xterm-addon-web-links@0.2.1
xterm-addon-webgl@0.3.0
Assets
2
Tyriar released this
🚀
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);
📥
Addons
xterm-addon-attach
🤝
Compatible addon versions
- xterm-addon-attach@0.3.0
- xterm-addon-fit@0.2.1
- xterm-addon-search@0.2.1
- xterm-addon-ligatures@0.2.1
- xterm-addon-web-links@0.2.1
- xterm-addon-webgl@0.2.1
Assets
2
Assets
2
🐞
Bug fixes
Assets
2
🐞
Bug fixes
Assets
2
Assets
2
Assets
2
Tyriar released this
🚀
Features
📦
API
For the complete details on the new APIs, see the typings file. For APIs marked experimental we're hoping to stabilize them in v4 and want feedback from the community to make sure they are useful.
- Support writing raw UTF-8 data directly, which may help avoid an unnecessary conversion to a relatively heavy JS string (#1904) via @jerch
const data = new Uint8Array([102, 111, 111]); term.writeUtf8(data);
- New experimental addon API (#2065, #2116) via @Tyriar
// A simple example addon const addon = { activate: (term: Terminal) => { console.log('addon activated'); }, dispose: () => { } } term.loadAddon(addon);
- New experimental buffer API (#2074) via @Tyriar. Consumers can finally query the textual state of the terminal.
// Print the line that the cursor is on as text term.buffer.getLine(term.buffer.cursorY).translateToString(true);
- New
select
andgetSelectionPosition
APIs (#2078) via @Tyriarterm.select(5, 2, 10); console.log(term.getSelectionPosition()); // {startColumn: 5, startRow: 2, endColumn: 15, endRow: 2}
🐞
Bug fixes
- Add missing typings for
windowsMode
option (#2062) via @Tyriar - Improve spacing between characters in DOM renderer (#2067) via @starpit
- Dispose of old data in the write buffer once it's been written if xterm.js hasn't caught up (#2120) via @jerch
- Fix wrong colors printing for 256 color mode (#2125) via @jerch
- Fix loss of data during a RIS (full reset) (#2127) via @jerch
- Only update the accessibiltiy announcements during an animation frame (#2128) via @Tyriar
- Fix a NPE in reflow (#2131) via @Tyriar
- Ensure underline is rendered correctly in canvas renderer (#2134) via @Tyriar
- Fix a font rendering issue where settings/colors wouldn't be picked up (#2140) via @Tyriar
- webLinks addon
📝
Documentation and internal improvements
- Update terminal dimensions after line height changes in demo (#2050) via @Tyriar
- Replace deprecated prepublish npm script (#2051) via @Tyriar
- Update year in README (#2053) via @Tyriar
- Minor clean up (#2056, #2073, #2101, #2133) via @Tyriar, @jerch
- Refine automated release system (#2057, #2061, #2113) via @Tyriar
- Improving code layering (#2059, #2066, #2092, #2094) via @Tyriar
- Introduce puppeteer-based integrated test system and tests (#2068, #2081, #2110, #2114, #2118, #2130) via @Tyriar
- Support
writeUtf8
in the demo (#2080) via @jerch - Fix coverage reporting (#2088) via @Tyriar
- Introduce a RenderCoordinator that shares common components previously duplicated in each renderer (#2096, #2100) via @Tyriar
- Use logo as favicon in demo (#2098) via @Tyriar
- Update TypeScript to 3.5 (#2141) via @Tyriar
Assets
2
Assets
2
Assets
2
Assets
2
🐞
Bug fixes
- Allow incremental searches to shorten and still retain selection (#1916) via @skyway777
- Fix NPE when
\x1b[?1003h
or\x1b[?1003l
is sent to the terminal before open is called (for good this time) (#1905) via @pfitzseb - Fix renderer incorrectly pausing under some environments (#1929) via @coderaiser
- Fix an NPE when resizing both dimensions (#1930) via @Tyriar
- Fix variable substitution in docker-compose.yml file (#1934) via @ahtshamraziq
- Fix some characters being drawn with the wrong line height (#1938) via @Tyriar
- Disable reflow completely when winptycompat is enabled (#1950) via @Tyriar
- Fix link underline/hover not deactivating when on boundary of terminal (#1959) via @nikonso
📝
Documentation and internal improvements
- Use a time-based limit for parsing time, this should make frame drops much less likely (#1818) via @juancampa
- Create a roadmap and link it in the README (#1925) via @Tyriar
- Update license year (#1928) via @Tyriar
- Remove redundant font-family declaration in CSS file (#1936) via @Tyriar
- Documentation style improvements (#1953) via @cherouvim
- Remove costly Array.shift call during data input (#1956) via @JesseStolwijk
🎉
New real-world use cases
Assets
2
Assets
2
🆕
Features
- Text is now wrapped and unwrapped when the terminal is horizontally resized (#1864) via @Tyriar, this was the most upvoted feature on GitHub
🆕
API
- These properties on
Terminal
are now marked asreadonly
:element
,textarea
,rows
,cols
,markers
(#1871, #1917) via @Tyriar
🐞
Bug fixes
- Links on lines that start with
\t
are no longer offset incorrectly (#1887) via @jerch - Fix NPE when
\x1b[?1003h
or\x1b[?1003l
is sent to the terminal beforeopen
is called (#1905) via @pfitzseb - Make textarea positioning work with css transformations (#1912) via @mofux
📝
Documentation and internal improvements
- Boost parser performance by working on typed arrays over strings (#1796) via @jerch
- Removed old js array-based buffer implementation (#1877) via @jerch
- Fixed various typos in the code/comments (#1886) via @epicfaace
- Prevent the
charsizechanged
internal event from firing unnecessarily (#1897) via @juancampa - Remove unused var and unnecessary defensive check (#1900) via @Tyriar
- Call out in the
Terminal.resize
API docs that it's best to debounce calls to it (#1919) via @Tyriar
Assets
2
- Fixed the security vulnerability described in CVE-2019-0542 via @Tyriar, @jerch. (Thanks to Felix Wilhelm from the Google Security Team)
- Fixed keys like volume up and context menu printing their names when pressed (#1881) via @Tyriar
Assets
2
🆕
Features
- Allow holding a key down to send multiple characters (#1849) via @epicfaace
search
addon:- Find multiple instances on the same line (#1763) via @noamyogev84
- Support incremental searching, a.k.a. search as you type (#1826) via @nojvek
🆕
API
- Add experimental hooks for adding custom CSI and OSC functionality (#1853) via @PerBothner, see
Terminal.addCsiHandler
andTerminal.addOscHandler
🐞
Bug fixes
- Fix selection when using positioning the terminal using
position: fixed
(#1788) via @gou4shi1 - Don't recreate the renderer when the char atlas changes (#1820) via @Tyriar
- Dispose of char atlases when they're no longer used by any terminals (#1821) via @Tyriar
- Optimize OSC_STRING parsing (#1822) via @PerBothner
- Fix NPE in linkifier (#1841) via @jerch
- Fix calls to translateToString when endCol === 0 (#1843) via @Tyriar
- Fix text being top aligned on Chrome and Firefox (#1859) via @Tyriar
- Fix NPE in DOM renderer underline code (#1861) via @Tyriar
fullscreen
addon: Fix illegal invocation error (#1851) via @robins1212search
addon: Fix bug preventing searching backwards (#1865) via @ntchjbwebLinks
addon: Don't allow quotes at the end of a URL (#1846) via @linrockwinptyCompat
addon: Fix wrapped line heuristic (#1850) via @Tyriar
📝
Documentation and internal improvements
- Differentiate whitespace and "null" cells in the buffer (#1775) via @jerch
- Allow decimal line heights in the demo (#1819) via @Tyriar
- Remove old AUTHORS file (#1827) via @Tyriar
- Refactors towards new layering structure (#1828) via @Tyriar
- Remove unused dependency (#1832) via @Tyriar
- Add VS Code debugging launch targets (#1834) via @Tyriar
- Fix build when using node 10+ (#1847) via @linrock
- Fix missing quotes in README code example (#1848) via @linrock
- Remove Gitter and improve README (#1856) via @Tyriar
- Whitespace fix (#1863) via @vincentwoo
Assets
2
Tyriar released this
Assets
2
🆕
Features
-
Introduced a new buffer implementation based on typed arrays that recycles memory (#1641, #1731, #1736, #1740, #1793, #1812) via @jerch.
Comparison of the buffer implementations, benchmarked with the demo with 1000 lines scrollback and typical payload (
ls
output):buffer based on memory footprint GC runtime input throughput JS Array 25 - 50 MB JS Heap, 6 MB C++ Heap 15 - 25 % 7 - 8 MB/s Typed Array 8 - 15 MB JS Heap, 1.5 MB C++ Heap < 3 % 17 - 19 MB/s The typed array based implementation is the new default, if you run into issues please report them and switch back to the old buffer using:
new Terminal({ experimentalBufferLineImpl: 'JsArray' })
-
Support the lineHeight option in the DOM renderer (#1733) via @leomoty
🐞
Bug fixes
- Fill lines inserted from scrolling with erase attributes (#1706) via @whydoubt
- Clear the isWrapped flag on erased lines (eg. from a
clear
call) (#1720) via @alexr00 - Fix an infinite loop in character print code (#1735) via @Tyriar
- Fix inverse colors in the DOM renderer and dynamic char atlas (#1739) via @Tyriar
- Fix docker image build (#1742) via @AndrienkoAleksandr
- Fix NPE in DOM renderer when using the underline attribute (#1748) via @Tyriar
- Fix some CJK characters rendering incorrectly when using dynamic char atlas (#1758) via @Tyriar
- Improve alt buffer cursor handling to align more with xterm (#1764) via @whydoubt
- Only show crosshair cursor when using column select if the terminal has focus (#1772) via @whydoubt
- Fix the DOM renderer overlapping with the scroll bar (#1780) via @whydoubt
- Fix wheel up event never firing on Firefox (#1782) via @astefanutti
- Fix missing control characters in parser (#1783) via @jerch
- Fix edge cases in click in selection function which could lead to the wrong cells being selected when double clicking (#1784) via @Tyriar
- Fix error preventing the bell audio from working when using multiple terminals (#1787) via @jerch
- Web links addon
- Search addon
- Don't consider
_
a word separator in the search addon (#1743) via @alexr00 - Clear selection when no results are found (#1756) via @skprabhanjan
- Search from the top of the viewport when there is no selection (#1760) via @skprabhanjan
- Don't consider
📝
Documentation and internal improvements
- Start moving parts of the codebase to use TypeScript strict null checks (#1699) via @Tyriar
- Use yarn integrity checks (#1728) via @Tyriar
- Improve reliability/speed of the demo (#1744) via @jerch
- Update Azure Data Studio's name in README (#1745) via @Tyriar
- Improve API for consumers using TypeScript strict null checks (#1752) via @Tyriar
- Run tests & tslint on addons (#1754) via @vladimirze
- Fix typos in source comments (#1759) via @stkvrs
- Significantly improve wcwidth performance (#1789) via @jerch
- Significantly improve DOM renderer performance, especially in large terminals (#1792) via @Tyriar
- Improve contribution documentation (#1791) via @Tyriar
- Remove unused function parameters (#1794) via @Tyriar
- Refactors towards new code layering structure (#1795, #1799) via @Tyriar
- Upgrade to TypeScript 3.1 (#1800) via @Tyriar
🎉
New real-world use cases
- WebSSH (#1768) via @huashengdun
- Info beamer hosted (#1806) via @dividuum
🆕
Features
- Add experimental character joiner API, this will be used for eventual ligature support (#1460) via @princjef. You can view the current shape of the API here.
- Allow DOM and canvas renderers to be switched at runtime (#1590) via @Tyriar
🐞
Bug fixes
- Fix JS engine deoptimization in the parser (#1555) via @jerch
- Fix exception related to links on wrapped lines (#1570) via @nikonso
- Fix bug in the DOM renderer where column and row values were flipped (#1574) via @vincentwoo
- Fix exception in parser (#1578) via @Tyriar
- Make double click to select words word across wrapped lines (#1585) via @Tyriar
- Do not scroll to bottom when device status is reported (#1586) via @Tyriar, @tylerl0706
- Fix rendering issues with column selection (#1594) via @Tyriar
- Fix exception in accessibility manager (#1597) via @Tyriar
- Fix bold inverted text when using dynamic texture atlas (#1599) via @7PH
📝
Documentation and internal improvements
- Better surface API documentation in the README (#1556) via @Tyriar
- Move developer documentation to wiki (#1558) via @Tyriar
- Use yarn (#1563) via @Tyriar
- Remove Travis.CI (#1564, #1598) via @Tyriar
- Add clarifying note about how experimental APIs work (#1581) via @Tyriar
- Remove jsdoc types (#1583) via @Tyriar
- Use constants for null cell values (#1588) via @Tyriar
- Fix sourcemaps in the demo (#1601) via @segevfiner
⚠️
Deprecations
Terminal.emit
is being deprecated with no replacement, see #1505 for additional context (#1569) via @Tyriar
🎉
New real-world use cases
3.5.0
Tyriar released this
This was a 2 month release due to unavailability of some team members.
🆕
Features
-
The parser was rewritten, increasing ANSI compliance and boosting speed by about 30% (#1399) via @jerch
-
A fallback DOM-based renderer is now available (#1432, #1524) via @Tyriar. This is useful for machines that have rendering issues with canvas:
var term = new Terminal({ rendererType: "dom" });
-
Column selection is now supported on alt+click (#1538) via @vsinha
🐞
Bug fixes
- Prevent Safari from calling createImageBitmap as it's implemented but returns a rejection (#1469) via @tmpfs
- Select entire wrapped line on triple click (#1486) via @Tyriar
- Explicitly mark event listneers as not passive (#1495) via @nikonso
- Prevent mouse mode events from being sent when mouse mode is exited while the mouse is down (#1503) via @Tyriar
- Prevent NPE on beginFrame call (#1512) via @Tyriar
- Redraw the screen after drawBoldTextInBrightColors changes (#1513) via @Tyriar
- Track character attributes when using save/restore cursor sequences (#1522) via @7PH
- Ensure all references are released when Terminal.dispose is called, preventing memory leaks (#1525) via @Tyriar
- Don't hide cursor when reset is triggered (#1535) via @7PH
- Tracked the selection render state correctly (#1543) via @nikonso
📝
Documentation and internal improvements
- Several improvements to the npm test scripts (#1388) via @Tyriar
- Add more naming conventions to linter (#1421) via @Tyriar
- Added VSTS build badge (#1457) via @Tyriar
- Performance improvements to adding characters to the buffer (#1466) via @jerch
- Correct lib values in tsconfig (#1472) via @Tyriar
- Support incremental xterm.js builds (#1474) via @Tyriar
- Replace let with const where possible (#1477) via @lgeiger
- Clean up TS references (#1483) via @AndrienkoAleksandr
- Add readme for fit addon (#1485) via @Tyriar
- Enable noImplicitAny TS compiler option (#1487) via @Tyriar
- Improve demo to show all options in a nice way (#1488) via @Tyriar
- Fix npm start on Windows (#1489) via @nikonso
- Fix demo string options (#1490) via @nikonso
- Fix typo in README (#1491) via @pro-src
- Fix copyright line breaks (#1497) via @Tyriar
- Add a code of conduct (#1500) via @Tyriar
- Add more granular github issue templates (#1501) via @Tyriar
- Start of code layering improvements (#1508) via @Tyriar
- Pin node-pty to 0.7.6 (#1531) via @Tyriar
- Allow the terminal to be recreated after disposing the terminal in the demo (#1542) via @nikonso
- Fix typo in function name (#1537) via @Tyriar
- Remove old parser code (#1547) via @Tyriar
xtermjs.org
- Generate docs using typedoc (xtermjs/xtermjs.org#44) via @pro-src
- Validate links in generated docs (xtermjs/xtermjs.org#46) via @pro-src
- Synchronize site with xterm.js README (xtermjs/xtermjs.org#49) via @pro-src
- Update terminado guide for new addon API (xtermjs/xtermjs.org#50) via @pro-src
- Move real world uses section below getting started (xtermjs/xtermjs.org#55) via @pro-src
- Add favicon (xtermjs/xtermjs.org#56) via @pro-src
🛑
Breaking changes
-
Since column selection is now the default for alt+click, on macOS there is a new setting to allow forcing of selection within mouse mode:
var term = new Terminal({ macOptionClickForcesSelection: true });
🎉
New real-world use cases
- GoTTY (#1475) via @cathy-zhao
- genact (#1494) via @svenstaro
- cPanel & WHM (#1510) via @FGasper
- Nutanix (#1517) via @JonKohler
3.4.1
Tyriar released this
🆕
Features
-
Added an experimental LRU-based dynamic texture atlas, this should improve both start up and overall performance when used (#1327) via @bgw. You can turn it on using the
experimentalCharAtlas
option in theTerminal
constructor:const term = new Terminal({ experimentalCharAtlas: 'dynamic' });
-
Improved web font support is available through the external addon xterm-webfont (#1164, #1390) via @vincentwoo
-
Added the
drawBoldTextInBrightColors
option to allow bold colors not to use the bright colors (#1391) via @LinusU
🐞
Bug fixes
- Fix a memory leak where
Terminal
resources were not being released afterdestroy
/dispose
was called (#1372) via @Tyriar, @hansonw - Don't ship the zmodem demo in the npm module (#1376) via @Tyriar
- Don't ship test files in the npm module (#1417) via @pro-src
- Prevent NPE when
Terminal.setOption
is called beforeTerminal.open
(#1384) via @Tyriar - Prevent NPE when
Terminal.resize
is called beforeTerminal.open
(#1385) via @johnpoth - Fix an exception that could happen when clicking in the terminal (#1401) via @npezza93
- Ensure the link pointer cursor shows up when in application mode (#1446) via @Tyriar
⚠️
Deprecations
-
Terminal.destroy()
is now deprecated, useTerminal.dispose()
:// v3.3 term.destroy(); // v3.4 term.dispose();
📝
Documentation and internal improvements
- Made the linter more strict and apply to more files (#1365, #1374, #1404, #1407, #1433) via @Tyriar
- Remove some unused code (#1369, #1375, #1377) via @Tyriar
- Separate foreground and background render passes (#1393) via @bgw
- Boosted performance by minimizing the use of getters in performance critical code (#1403) via @jerch
- Reduce the number of draws by batching background draws together (#1413) via @bgw
- Use hex instead of octal escapes in the readme (#1420) via @pro-src
- Call save and restore correctly on the context when drawing text (#1442) via @bgw
- Improve import addon documentation in the README (#1444) via @pengx17
- Fix build error related to
@types/node
(#1445) via @pro-src - Update tagline in demo (#1450) via @Tyriar
- Update coveralls badge (#1452) via @Tyriar
🎉
New real-world use cases
- Hyper (#1299) via @jonaustin
- diag.ai (#1438) via @ledbit
We have recently welcomed @bgw as a maintainer on the project due to his significant contributions around improving the character texture atlas and refactoring work.
🆕
Features
- Use of the mouse wheel in the alt buffer will be translated into arrow events, enabling scrolling in applications like
vim
(#1310) via @Tyriar - Handle blob data in the attach addon (#1355) via @AlexandrePetit-Pas
🆕
API
For the latest version of the API, check the typings file for the version you're interested in.
-
Added a new experimental "Markers" API (#1338) via @Tyriar, this allows tracking specific lines within the terminal. This is needed as line indexes are insufficient since the terminal can trim lines from the top of the scrollback buffer and lines within the viewport can change.
export interface IMarker extends IDisposable { readonly id: number; readonly isDisposed: boolean; readonly line: number; } export class Terminal { /** * (EXPERIMENTAL) Get all markers registered against the buffer. If the alt * buffer is active this will always return []. */ markers: IMarker[]; /** * (EXPERIMENTAL) Adds a marker to the normal buffer and returns it. If the * alt buffer is active, undefined is returned. * @param cursorYOffset The y position offset of the marker from the cursor. */ addMarker(cursorYOffset: number): IMarker; }
Any feedback on this API would be appreciated as it's not set in stone.
-
Added an API to select a range of lines (#1338) via @Tyriar:
/** * Selects text in the buffer between 2 lines. * @param start The 0-based line index to select from (inclusive). * @param end The 0-based line index to select to (inclusive). */ selectLines(start: number, end: number): void;
-
Added an API to scroll to a particular line (#1338) via @Tyriar:
/** * Scrolls to a line within the buffer. * @param line The 0-based line index to scroll to. */ scrollToLine(line: number): void;
🐞
Bug fixes
- Theme colors are now validated and color names such as
lime
andred
are now accepted (#1293) via @nikonso - Improve handling of transparent theme colors and allow additional formats such as
#RGB
(#1346) via @bgw - Pasting new lines on non-Windows are now normalized to
\r
, just like on Windows (#1296) via @olsonpm - Multi-line links should now work (#1303) via @Tyriar, there are still issues when you resize the terminal after a line has printed which will be resolved when reflow is implemented (#622)
- Do not mutate options object used in the
Terminal
constructor (#1326) via @LucianBuzzo - Fix terminal when it's container specifies a rtl text layout (#1350) via @FGasper
- Prevent falsy write values (#1366) via @Tyriar
- Fix exception when
Terminal.reset
is called beforeTerminal.open
) is called (#1381) via @Tyriar
📝
Documentation and internal improvements
- Refactors for the character texture atlas (#1307) via @bgw
- Always check whether the character texture atlas needs to be refreshed, regardless of whether we think character size has changed or not (#1308) via @bgw
- Reduce duplication of interfaces around the character texture atlas (#1317) via @bgw
- Add note about stance on shipping third party dependencies (#1332) via @Tyriar
- Reduce use of inline styles (#1336) via @mareklibra
- Several debt/lint related items (#1315, #1316, #1318, #1320, #1329, #1340, #1344) via @Tyriar
🎉
New real-world use cases
3.2.0
Tyriar released this
🆕
Features
- Screen reader support (#1182) via @Tyriar
- alt+ctrl+{key} and alt+shift+{key} is now sent to be handled by the process (#1231) via @saamalik
🆕
API
- Screen reader support can be turned on/off with the
screenReaderMode
option. This is disabled by default as it adds additional perf overhead (#1182) via @Tyriar - Web link support is now activated by loading the
webLinks
addon and callingwebLinksInit
(#1298) via @Tyriar
🐞
Bug fixes
- Fix exception when resizing the terminal instance before
open
is called (#1280) via @AndrienkoAleksandr - Fix terminal screen overlaying scroll bar (#1288) via @dgriffen
- Fix exception when double clicking scroll bar (#1290) via @Tyriar
- Only move horizontally when alt clicking in the normal buffer (#1309) via @Tyriar
📝
Documentation and internal improvements
- The web audio API is now used for the bell sound (#1200) via @nikonso
- Add typings for the
cols
androws
options (#1302) via @nikonso - Add xterm.js Docker image to documentation (#1313) via @parisk
🛑️
Breaking changes
- Bell support has been dropped in IE11 (#1200)
🎉
New real-world use cases
- FreeMAN (#1282) via @matthew-matvei
🆕
Features
- Alt+click to move cursor (#896) via @npezza93
- Select word on right click, defaults to true for macOS (#1114) via @nikonso
- Support setting fontWeight and fontWeightBold (#1119, #1208) via @nikonso
- Pause rendering automatically when terminal is offscreen or hidden (#1144) via @Tyriar
- Ship automatically generates typings for addons (#1197) via @jsmecham - blink1073
- Support setting terminal padding via CSS, where the scroll bar remains in the outer, padded area (#1208) via @mofux
- Support translating option to meta on macOS (#1225, #1228) via @saamalik
- Support transparent background via explicit setting (#1236) via @chabou
🆕
API
🐞
Bug fixes
- Correctly reset parser state for certain escape sequences (#1137) via @damz
- Use the normal cursor not text cursor when mousing over the scroll bar (#1142) via @Tyriar
- Fix a null pointer exception when selecting to the bottom of the buffer (#1168) via @Tyriar
- Fix character texture atlas becoming corrupted when switching monitors with different DPI (#1172) via @Tyriar
- Enable alt+backspace to delete a word on most shells (#1180) via @Tyriar
- Fix issues with resizing the terminal (#1206) via @amejia1
- Fix search addon for lines with emojis and wide chars (#1211) via @Tyriar
- Fix cursor lagging behind when blink is on (#1217) via @Tyriar
- Fix links sometimes not correctly activating until scroll (#1234) via @Tyriar
- Prevent a crash that could happen after resizing the alt buffer (#1235) via @Tyriar
- Fix context menu paste in Firefox on Windows (#1253) via @sitzmar
- Change an id to a class that could occur multiple times (#1256) via @Tyriar, @zxdong262
- Prevent terminal occasionally scrolling to top when hiding (#1266) via @Tyriar
⚠️
Deprecations
-
The setting
enableBold
is now deprecated in favor offontWeight
andfontWeightBold
which can be used to achieve the same result:// v3.0 term.setOption('enableBold', false); // v3.1 term.setOption('fontWeightBold', 'normal');
📝
Documentation and internal improvements
- Remove repo redirect in package.json (#1188) via @Tyriar
- Set master package.json version to x.y.z-master (#1192) via @Tyriar
- Refactor char atlas generation to enable generation with web worker in the future (#1198) via @Tyriar
- tslint improvements/refactors (#1214, #1249) via @Tyriar
- Remove OSX from TravisCI (#1218) via @Tyriar
- Refactors to reduce duplication of interfaces and increase type checking (#1222, #1224, #1227) via @Tyriar
- Remove legacy .gitignore rules (#1244) via @Tyriar
- Run tsc as a TravisCI job (#1258) via @Tyriar
- Upgrade to TypeScript 2.7 (#1263) via @Tyriar
- Fix getting started steps in README (#1271) via @krasimir
- Add watch gulp task (#1273) via @parisk
🎉
New real-world use cases
- electerm (#1177) via @zxdong262
- Kubebox (#1191) via @astefanutti
- Azure Cloud Shell (#1205) via @jluk
- atom-xterm (#1207) via @amejia1
- rtty (#1223) via @zhaojh329
- Pisth (#1229) via @ColdGrub1384
- AbstruseCI (#1230) via @jkuri
- SQL Operations Studio (#1250) via @Tyriar
❓
Experimental changes
3.0.2
Tyriar released this
3.0.1
Tyriar released this
#1190: Fixes the typings/
directory not being published to npm
Watchers:179 |
Star:9953 |
Fork:1040 |
创建时间: 2014-03-25 00:04:04 |
最后Commits: 16天前 |
许可协议:MIT |
分类:其它杂项 / JavaScript开发 |
收录时间:2016-08-23 16:13:15 |
4b29b8a
Compare
Verified
xterm-addon-fit
xterm-addon-ligatures
xterm-addon-search
xterm-addon-serialize
xterm-addon-attach@0.6.0
xterm-addon-fit@0.5.0
xterm-addon-ligatures@0.4.0
xterm-addon-search@0.8.0
xterm-addon-serialize@0.4.0
xterm-addon-unicode11@0.2.0
xterm-addon-web-links@0.4.0
xterm-addon-webgl@0.9.0