xterm.js

A terminal for the web

MIT License

Downloads
4.9M
Stars
17.6K
Committers
322

Bot releases are hidden (Show)

xterm.js - 4.8.0

Published by Tyriar over 4 years ago

🐞 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

  • Update vulnerable dev dependencies (#2997) via @Tyriar

🤝 Compatible addon versions

xterm.js - 4.7.0

Published by Tyriar over 4 years ago

🐞 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


🌐 Website

  • Use recommended onData instead of onKey in demo (xtermjs/xtermjs.org#128) via @Tyriar
xterm.js - 4.6.0

Published by Tyriar over 4 years ago

🚀 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.js - 4.5.0

Published by Tyriar over 4 years ago

🚀 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

  • x-terminal (#2723) via @UziTech
  • CoCalc (#2761) via @slel

🤝 Compatible addon versions


🌐 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
xterm.js - 4.4.0

Published by Tyriar over 4 years ago

🚀 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 the xterm-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 default wordSeparator option so more URLs are selected fully with double click (#2680) via @Tyriar
  • Fix DOM renderer not rendering cursor correctly immediately after changing cursorBlink or cursorStyle (#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 of register as it enters stable status (#2651) via @Tyriar

⚠️ Deprecations

  • addMarker is now deprecated, move over to registerMarker which is functionally equivalent (#2651) via @Tyriar

🎉 New real-world use cases

  • Gus (#2631) via @cmeyer90
  • Linode (#2636) via @phillc
  • FluffOS (#2663) via @thefallentree

📥 Addons

xterm-addon-attach

  • Restore IE compatibility by changing the compile target to ES5 (#2654) via @Tyriar

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.js - 4.3.0

Published by Tyriar almost 5 years ago

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.

image

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):

webgl1

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:

webgl2

Read more about why it's so good in https://github.com/microsoft/vscode/pull/84440 🔥

🚀 Features

  • The new option minimumContrastRatio has been added that dynamically changes the foreground color to improve contrast (#2563, #2602) via @Tyriar

    mcr

📦 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 of betaX 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

  • Fix search results missing when searching wrapped lines (#2532) via @glneto

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


🌐 Website

xterm.js - 4.2.0

Published by Tyriar almost 5 years ago

🚀 Features

  • Support several new sequences (#2360) via @jerch
    • SL - Scroll left
    • SR - Scroll right
    • DECIC - Insert columns
    • DECDC - 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 and NaN 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 and textarea correctly with | undefined in the API (#2473) via @Tyriar
  • Add ,, ; and : as default characters included in the wordSeparator 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

  • Seldom used URXVT and UTF8 mouse encodings have been removed (#2507) via @jerch

🎉 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.js - 4.1.0

Published by Tyriar about 5 years ago

🚀 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 and Terminal.writeln now accept an Uint8Array in addition to string (#2422) via @jerch

🐞 Bug fixes

  • Don't handle cmd+arrow (#2448) via @Tyriar

📝 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 of Terminal.write (#2422) via @jerch

    // deprecated
    term.writeUtf8(buffer);
    
    // recommended
    term.write(buffer);
    

📥 Addons

xterm-addon-attach

  • Updated to use Terminal.write instead of Terminal.writeUtf8 (#2422) via @jerch

🤝 Compatible addon versions

xterm.js - 4.0.2

Published by Tyriar about 5 years ago

🐞 Bug fixes

  • Fixed an NPE when calling Terminal.open twice (#2433) via @Tyriar, @leojh
xterm.js - 4.0.1

Published by Tyriar about 5 years ago

🐞 Bug fixes

  • Fixed Terminal constructor export to correctly be at window.Terminal when including just the script (#2415) via @Tyriar
  • Fixed link support in Edge browser (#2418) via @Tyriar, @felixse
  • Updated addon peer dependency to "xterm": "^4.0.0" (#2429) via @Tyriar, @milleniumfrog
xterm.js - 4.0.0

Published by Tyriar about 5 years ago

Finally v4 has arrived! This is our biggest release to date with 128 PRs being merged (v3 had 101). The major focuses for this version were:

  • Shipping the new addon system, including an experimental version of the WebGL renderer addon
  • Improving the build process and minifying the npm distributable
  • Making the parser to be more compatible and extensible
  • Chipping away at the new layered architecture and enabling TypeScript's strict mode
  • Removing deprecated APIs
  • Lots of bug fixes

The plan is for each new minor release to now state which addons are compatible with the library at the bottom, this might not be needed in the future but we'll evaluate that later on. We've also added a dedicated Addons section instead of mixing their updates in with the core library.


🚀 Features

New addon system

The new addon system that was introduced in 3.14.0 is now stable (#2377) via @Tyriar. This new system allows encapsulating additional functionality that leverages the xterm.js API into a module that can be shared between users of xterm.js. The API itself is extremely simple but improves over its previous incarnation with first-class TypeScript support and per-terminal lifecycle management.

export class Terminal implements IDisposable {
  /**
  * Loads an addon into this instance of xterm.js.
  * @param addon The addon to load.
  */
  loadAddon(addon: ITerminalAddon): void;
}

/**
* An addon that can provide additional functionality to the terminal.
*/
export interface ITerminalAddon extends IDisposable {
  /**
  * This is called when the addon is activated.
  */
  activate(terminal: Terminal): void;
}

Creating an addon is as simple as providing an object with the activate and dispose methods available:

class ExampleAddon {
  private _terminal: Terminal | undefined;
  activate(terminal: Terminal): void {
    this._terminal = terminal;
    console.log('activated');
  }
  dispose(): void {
    console.log('disposed');
  }
}

And used like this:

const terminal = new Terminal();
terminal.loadAddon(new ExampleAddon());
// Logs 'activated'
terminal.dispose();
// Logs 'disposed'

Addons shipped by the xterm.js team are listed at the bottom of release notes and can be installed via npm.

📦 API

  • New wordSeparator option that defines what a word boundary is when double click selecting (#2244, #2262) via @MaxRis
    // Include ' and " in words
    const term = new Terminal({ wordSeparator: ' ()[]{}' });
    
  • New addEscHandler, addDcsHandler parser hook APIs and existing addCsiHandler and addOscHandler APIs have been refined (#2346) via @jerch
    // Do something whenever the cursor move (CUP) sequence is triggered
    term.parser.addCsiHandler({ final: 'H' }, params => doSomething(params));
    
    See the API documentation for more information.
  • New paste API that lets embedders pass data they want pasted directly to xterm.js (#2391) via @Tyriar. This is useful when paste isn't triggered in the typical fashion.
    term.paste(await navigator.clipboard.readText());
    

🐞 Bug fixes

  • Update rows after an ECH sequence, this was causing cls under ConPTY to not redraw rows sometimes (#2149) via @Tyriar
  • Correct API for IBufferCell.getCell to correctly indicate it can return undefined (#2184) via @Tyriar
  • Fix repeat preceding character sequence (REP) (#2199) via @jerch
  • Fix saved cursor position of the normal screen buffer when a resize occurs on the alternate screen buffer (#2217) via @thekondr
  • Added the style field to package.json so certain tools can locate the xterm.css file (#2221) via @blink1073
  • Fix screen DPR change not trigger a canvas refresh which caused browser zoom to leave the terminal blank (#2228) via @Tyriar
  • Lower z-index's of xterm components to avoid conflicts with embedder UIs (#2276) via @Tyriar
  • Guard against floats being used in integer-only APIs (#2277) via @Tyriar
  • Reset wrapped line status when using windowsMode (#2278) via @MaxRis
  • Fix issue where you could select half of a wide character (#2283) via @lramos15
  • Fix edge cases in how we handle several sequences (#2288) via @jerch
  • Don't handle the keyup event that is handled by a custom handler (#2294) via @Tyriar
  • Rewrite mouse support from the ground up, improving compatibility and testing (#2321, #2323) via @jerch
  • Announce characters to screen readers when typing and using backspace (#2329, #2343) via @Tyriar
  • Make dispose do nothing when called a second time (#2353) via @Tyriar
  • Fix problems with scroll areas not working due to DECSTBM (#2355) via @jerch
  • Fix exception when first click is a shift+click (#2366) via @Tyriar
  • Fix cursor not changing correctly when open is called after entering mouse events mode (#2371) via @Tyriar
  • Support bubbling scroll events to parent elements when no terminal scroll happens (#2388) via @ShahzadUmair
  • Don't execute move to cell (alt+click) when the user has scrolled up (#2402) via @Tyriar
  • Fine tune when to scroll to bottom and clear selection when the onData event is emitted (#2247) via @Tyriar
  • Fix not rendering when switching from DOM to canvas renderer (#2378) via @Tyriar
  • Show text when cursor blinks in DOM renderer (#2227) via @Tyriar
  • Fix underline cursor style when blink is enabled in DOM renderer (#2374) via @Tyriar
  • Support sequences using colon and mixed colon/semi-colon notation, improving true color compatibility (#2241) via @jerch

📝 Documentation and internal improvements

  • Support absolute imports and minify the distributable (#2132, #2159, #2162, #2169, #2405, #2406) via @Tyriar
  • Clean up dependencies (#2147) via @Tyriar
  • Remove unneeded files from the packaged version of the library (#2153, #2160) via @Tyriar
  • Moved the new addons from separate repos into the xtermjs/xterm.js repo (#2164, #2180, #2194, #2195, #2219, #2398, #2404) via @Tyriar
  • Improving layering and moving to TS strict mode (#2168, #2171, #2183, #2203, #2205, #2206, #2207, #2208, #2209, #2210, #2211, #2214, #2216, #2229, #2231, #2237, #2238, #2239, #2245, #2246, #2247, #2279, #2287, #2289, #2302, #2303, #2304, #2309, #2310, #2311, #2315, #2348, #2381) via @Tyriar
  • Add additional tests and misc test improvements (#2172, #2186, #2188, #2236, #2256, #2274, #2335, #2345, #2376) via @Tyriar
  • Support running a specific text via CLI args (#2176) via @jerch
  • Clean up parser code (#2177, #2187, #2392, #2397) via @jerch
  • Integrate xterm-benchmark into the xtermjs/xterm.js repo to enable convenient performance testing (#2190) via @jerch
  • Actioning security alerts for devDependencies (#2191, #2312, #2313, #2314, #2399, #2400) via @Tyriar, @dependabot
  • Use xterm-256color in demo (#2198) via @jerch
  • Support dry run publishes and automate addon releases (#2232, #2233) via @Tyriar
  • Fix typo in README (#2242) via @VivaLosDoyers
  • Include new CSS file location in packaged version of the library (#2268) via @thekondr
  • Leverage TypeScript's declarationMap compiler option (#2269) via @Tyriar
  • Enforce _ prefix for protected members (#2273) via @Tyriar
  • Create helper script for evaluating mouse mode support (#2316) via @jerch
  • Refine what we log in logLevel is debug (#2328, #2338) via @Tyriar

🛑 Breaking changes

  • node_modules/xterm/lib/xterm.css has been moved to node_modules/xterm/css/xterm.css (#2132) via @Tyriar
  • node_modules/xterm/dist/xterm.js no longer exists and node_modules/xterm/lib/xterm.js is now minified (#2132) via @Tyriar
  • Remove the deprecated old event API (#2029) via @Tyriar
    // before 4.0.0
    term.on('data', data => console.log(data));
    
    // after 4.0.0
    term.onData(data => console.log(data));
    
  • Remove the deprecated destroy API (#2155) via @Tyriar
    // before 4.0.0
    term.destroy();
    
    // after 4.0.0
    term.dispose();
    
  • Remove the deprecated enableBold option (#2156) via @Tyriar
    // before 4.0.0
    term.setOption('enableBold', false);
    
    // after 4.0.0
    term.setOption('fontWeightBold', 'normal');
    
  • Remove the experimentalCharAtlas setting (#2157) via @Tyriar
    // before 4.0.0
    const term = new Terminal({ experimentalCharAtlas: 'static' });
    
    // after 4.0.0
    // No-op, the previous 'dynamic' is the only option available now due to
    // superior performance in every way.
    
  • Remove the blankLine localized string, this improves how screen readers announce blank lines (#2284) via @Tyriar
    // before 4.0.0
    Terminal.strings.blankLine = '<localized string>';
    
    // after 4.0.0
    // No-op
    
  • The old applyAddon-based addon system has been removed (#2377) via @Tyriar. New addons are installed as separate packages via npm and enabled via the non-static Terminal.loadAddon, this improved the overall lifecycle of addons as well as fix issues with typings when working with TypeScript.
    // before 4.0.0
    import { Terminal } from 'xterm';
    import * as fit from 'xterm/lib/addons/fit/fit';
    
    Terminal.applyAddon(fit);
    const terminal = new Terminal();
    terminal.fit();
    
    // after 4.0.0
    import { Terminal } from 'xterm';
    import { FitAddon } from 'xterm-addon-fit';
    
    const terminal = new Terminal();
    const fitAddon = new FitAddon();
    terminal.loadAddon(fitAddon);
    fitAddon.fit();
    

⚠️ Deprecations

  • We no longer explicitly support IE11, we expect the core functionality to still work but will not be going out of our way to fix optional features (#2216) via @Tyriar

🎉 New real-world use cases

  • NgTerminal (#2297) via @qwefgh90
  • tty-share (#2322) via @elisescu

📥 Addons

xterm-addon-search

  • The search result is now centered in the viewport (#2281) via @lramos15
  • Searches are now done from the bottom of the buffer for findPrevious and the top of the buffer for findNext (#2340) via @lramos15
  • Don't scroll the terminal if the new search result is inside the current viewport (#2385) via @lramos15
  • Added tests (#2344) via @lramos15

xterm-addon-serialize

  • A work in progress addon for serializing and restoring the terminal buffer has been merged into the feat/serialize-addon branch (#2298) via @JavaCS3

xterm-addon-webgl

After a long time in PR the WebGL renderer has finally been moved to an addon that can be tried out using xterm.js v4 (#1790, #2235, #2285) via @Tyriar

The addon boasts significant performance improvements over the current canvas and DOM renderers but lacks some features and is still a little rough around the edges. Here are some numbers that were measured when the feature was in development (see #1790 for methodology):

Benchmark Canvas/dynamic (avg ms/frame) WebGL (avg ms/frame) Change (c/w-1)
Macbook 87x26 4.80 0.69 596% faster
Macbook 300x80 15.28 3.69 314% faster
Windows 87x26 7.31 0.73 901% faster
Windows 300x80 19.34 2.06 839% faster
Macbook 87x26 CJK 14.63 5.93 147% faster
Macbook 87x26 Emoji 27.47 19.28 42% faster

See this query for a list of known issues with the WebGL renderer.

🤝 Compatible addon versions

xterm.js - 3.14.5

Published by Tyriar over 5 years ago

🐞 Bug fixes

  • Reset line wrapped status properly when using windowsMode (#2278) via @MaxRis
  • Fix NPE when setting theme before calling Terminal.open (#2222) via @Tyriar
xterm.js - 3.14.4

Published by Tyriar over 5 years ago

🐞 Bug fixes

xterm.js - 3.14.2

Published by Tyriar over 5 years ago

🐞 Bug fixes

  • Fix NPE when calling Terminal.open multiple times (#2179) via @Tyriar
xterm.js - 3.14.1

Published by Tyriar over 5 years ago

🐞 Bug fixes

  • Fix missing xterm.css in dist/ (#2150) via @Tyriar
xterm.js - 3.14.0

Published by Tyriar over 5 years ago

📢 Our next release will be v4, read more here 👉 #2143.

Compatible new addon versions:

🚀 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 and getSelectionPosition APIs (#2078) via @Tyriar
    term.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
    • Allow + in links weblink path (#2046) via @NizamLZ

📝 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
xterm.js - 3.13.2

Published by Tyriar over 5 years ago

🐞 Bug fixes

  • Fix device status reporting (DSR) (#2109) via @Tyriar
xterm.js - 3.13.1

Published by Tyriar over 5 years ago

🐞 Bug fixes

  • Fixes an NPE when screenReaderMode is enabled (#2085) via @Tyriar
xterm.js - 3.13.0

Published by Tyriar over 5 years ago

🚀 Features

📦 API

🐞 Bug fixes

📝 Documentation and internal improvements

🛑 Breaking changes

  • The winptyCompat addon has been moved into core and is now enabled via the windowsMode option:
    // before 3.13.0
    import winptyCompat = require('vscode-xterm/lib/addons/winptyCompat/winptyCompat');
    Terminal.applyAddon(winptyCompat); 
    const term = new Terminal();
    
    // after 3.13.0
    const term = new Terminal({ windowsMode: true });
    
    See the API section for more information.

⚠️ Deprecations

  • The on, off, emit and addDisposableListener APIs are now deprecated and are planned to be removed in v4.0.0 (https://github.com/xtermjs/xterm.js/pull/2008) via @Tyriar, they are replaced with the new "explicit event API".
    // deprecated
    term.on('resize', e => doSomething(e));
    
    // recommended
    term.onResize(e => doSomething(e));
    
    We took this opportunity to slim down the events, cutting out some that we thought are no longer needed. If you are using any events that were not carried over to the new event API please create an issue and let us know how you're using it to see if we should expose it.

🎉 New real-world use cases


A special thanks to @Eugeny of the Terminus project for trialing the beta release and helping catch some nasty bugs before we released ❤️

xterm.js - 3.12.2

Published by Tyriar over 5 years ago

🐞 Bug fixes

  • Published missing dist/ directory (#2013) via @Tyriar
Package Rankings
Top 12.7% on Repo1.maven.org
Top 0.4% on Npmjs.org
Badges
Extracted from project README
xterm.js logo