Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency xterm to v5 #487

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 18, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
xterm 4.12.0 -> 5.0.0 age adoption passing confidence

⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


Release Notes

xtermjs/xterm.js

v5.0.0

Compare Source

v5 is here! This is our largest release in a long time, maybe ever 👀

Since this was a major version bump, we used the opportunity to clean up the API and make other breaking changes. Many of these changes enabled a significant reduction in the xterm module bundle size which went from 379kb to 265kb for a 30% reduction!

🚀 Features

Underline style and color support (#​3921, #​3976, #​3980, #​4053, #​4068, #​4074, #​4077, #​4109) via @​Tyriar

Underline style and color sequences such as CSI 4:2m ST for double underlines are now supported:

image

Some work was also done to improve underline rendering overall, characters with long descenders don't overlap with the underline:

image

Hyperlink escape sequence support (#​4005, #​4087, #​4088) via @​Tyriar, @​jerch

Building upon the improved underline rendering, hyperlink escapes outlined in this gist are now supported. They will be rendered using a dashed underline (like CSI 4:5m ST):

image

Along with this is a new linkHandler option which allows controling hover, leave and activate events, for example to show a custom tooltip. VS Code's implementation looks like this:

image

Smooth scroll support (#​3940) via @​Tyriar

The new smoothScrollDuration allows setting a duration in milliseconds to animate scroll between the origin and target positions. This is most useful when using a physical mouse (not a trackpad) to help not disorient the user when scrolling with the mouse wheel.

Canvas renderer addon (#​3949, #​3950, #​3954, #​3959, #​3961, #​3981) via @​Tyriar

The canvas renderer has moved into an addon, significantly reducing the bundle size of the xterm module. This used to be the default renderer and is now recommended only as a fallback to the webgl addon if that does not work for some reason (eg. no webgl2 support).

New VT feature support (#​4093, #​4095, #​4098)via @​jerch

xterm.js handles several new VT sequences:

Other features

🐞 Bug fixes

📝 Documentation and internal improvements

🛑 Breaking changes

  • bellSound and bellStyle options as well as the previously builtin sound have been removed (#​3941) via @​Tyriar. This reduces the bundle size while still allowing the embedder to support the terminal bell via the Terminal.onBell API

    // before 5.0.0
    term = new Terminal({
      bellStyle: 'sound'
    });
    
    // after 5.0.0
    term = new Terminal();
    term.onBell(() => {
      // Play a sound
    });
  • The link matcher API registerLinkMatcher and deregisterLinkMatcher have been removed in favor of the link provider API (#​3944) via @​Tyriar.

  • The allowProposedApi option now defaults to false, set this to true to opt-in to proposed API usage if you understand the implications (#​3945) via @​Tyriar

    // before 5.0.0
    term = new Terminal({});
    term.someProposedApi();
    
    // after 5.0.0
    term = new Terminal({
      allowProposedApi: true
    });
    term.someProposedApi();
  • The deprecated addMarker API has been removed in favor of registerMarker (#​3946) via @​Tyriar. They are functionally equivalent.

  • The deprecated getOption and setOption APIs have been removed in favor of options (#​3947) via @​Tyriar

    // before 5.0.0
    term.setOption('scrollback', 1000);
    console.log(term.getOption('scrollback'));
    
    // after 5.0.0
    term.options.scrollback = 1000;
    console.log(term.options.scrollback);
  • The deprecated writeUtf8 API has been removed in favor of write (#​3947) via @​Tyriar.

    const arr = new Uint8Array(10);
    
    // before 5.0.0
    term.writeUtf8(arr);
    
    // after 5.0.0
    term.write(arr);
  • ISelectionPosition have been removed from the API in favor of IBufferRange (#​3952) via @​Tyriar

  • cols and rows options can now only be set in the constructor (#​3960, #​3972, #​4078) via @​Tyriar, @​silamon

    // before 5.0.0
    term.setOption('cols', 10);
    
    // after 5.0.0
    term.resize(10, term.rows);
  • ITheme.selection has been renamed to selectionBackground for consistency (#​3964) via @​Tyriar

    // before 5.0.0
    term.options.theme = { selection: '#​000000' };
    
    // after 5.0.0
    term.options.theme = { selectionBackground: '#​000000' };
  • The Terminal.options getter now returns a Required<ITerminalOptions> instead of just ITerminalOptions for better correctness. Along with this change fastScrollModifier now accepts 'none' instead of undefined

    // before 5.0.0
    new Terminal({ fastScrollModifier: undefined });
    
    // after 5.0.0
    new Terminal({ fastScrollModifier: 'none' });

🎉 New real-world use cases


📥 Addons

xterm-addon-canvas
xterm-addon-fit
xterm-addon-ligatures
xterm-addon-web-links
  • The link matcher-based implementation has been removed in favor of the link provider implementation (#​3944) via @​Tyriar
xterm-addon-webgl

More efficient GPU memory usage using new texture atlas packing strategy (#​3979) via @​Tyriar

The previous naive texture packing strategy which only allowed adding to the "active row" or below has been replaced with a new strategy that uses multiple active rows and adds glyphs to the most suitable row based on its pixel height. This leads to more effective usage of the texture xterm.js uploads to the GPU, meaning it's harder to reset the texture when it becomes filled (which is more likely to happen when screen scale is high).

Before:

image

After:

image

Other changes

🤝 Compatible addon versions

  • xterm-addon-attach@0.7.0
  • xterm-addon-canvas@0.2.0
  • xterm-addon-fit@0.6.0
  • xterm-addon-ligatures@0.6.0
  • xterm-addon-search@0.10.0
  • xterm-addon-serialize@0.8.0
  • xterm-addon-unicode11@&#8203;0.4.0
  • xterm-addon-web-links@0.7.0
  • xterm-addon-webgl@0.13.0

🌐 Website

v4.19.0

Compare Source

🚀 Features
  • The minimum contrast ratio feature will now change luminance in the opposite direction if the contrast ratio isn't met (#​3806, #​3808) via @​Tyriar. For example a red foreground on a slightly darker red background will try lighten the color and if the minimumContrastRatio option isn't met when #FFFFFF is reached it will try moving it towards #000000. This can cause somewhat unexpected results by changing explicitly styled whites to blacks for example but it's really good for accessibility.
  • The library now supports parsing #rgb, #rgba, rgb(r, g, b) and rgba(r, g, b, a) color formats (#​3815, #​3819, #​3823) via @​ChaseKnowlden, @​Tyriar
  • Opaque selectionBackground is now supported in the DOM renderer (#​3839) via @​Tyriar
  • The symbol powerline font glyphs now use custom rendering when ITerminalOptions.customGlyphs is enabled (#​3856, #​3862, #​3866) via @​Tyriar
    image
    This has multiple benefits:
    • A patched powerlines font doesn't need to be installed to render the most common characters
    • Ugly lines due to anti-aliasing that can appear no longer do
    • The glyphs always use greyscale anti-aliasing (not sub-pixel)
    • ITerminalOptions.lineHeight is taken into account when rendering the glyph
📦 API
  • The overview ruler is a companion feature to the decorations introduced in 4.18.0 which shows little indicators on the scroll bar (#​3676, #​3687, #​3688, #​3689, #​3693, #​3694, #​3695, #​3697, #​3702, #​3711, #​3723, #​3730, #​3733, #​3738, #​3788, #​3791, #​3792, #​3841) via @​meganrogge, @​Tyriar. To use it, add the overviewRulerOptions property to a decoration's IDecorationOptions and it will automatically show up in the overview ruler.
    const marker = term.addMarker(1);
    const decoration = term.registerDecoration({
      marker,
      x: 5,
      overviewRulerOptions: {
        color: '#FF0000',
        position: 'left'
      }
    });
    decoration.onRender(() => {
      decoration.element.style.backgroundColor = 'red';
    });
    The width of the resulting overview ruler is controlled by ITerminalOptions.overviewRulerWidth.
  • Decorations can now change a cell's background and foreground colors (#​3775, #​3782) via @​Tyriar. When this is set, the minimum contrast ratio feature will also be in effect.
    const decoration = term.registerDecoration({
      marker,
      backgroundColor: '#ff0000',
      foregroundColor: '#ffffff'
    });
  • Decorations can now specify the layer property to allow rendering above the selection (#​3785, #​3800) via @​Tyriar
    const decoration = term.registerDecoration({
      marker,
      layer: 'top'
    });
  • There's a new selectionForeground theme color, when set this will use a static color for selections (#​3813) via @​Tyriar
    const term = new Terminal({
      theme: {
        selectionBackground: '#&#8203;000000',
        selectionForeground: '#FFFFFF'
      }
    });
🐞 Bug fixes
📝 Documentation and internal improvements
🎉 New real-world use cases

📥 Addons
xterm-addon-search
xterm-addon-serialize
xterm-addon-web-links
xterm-addon-webgl
🤝 Compatible addon versions
  • xterm-addon-attach@0.6.0
  • xterm-addon-fit@0.5.0
  • xterm-addon-ligatures@0.5.3
  • xterm-addon-search@0.9.0
  • xterm-addon-serialize@0.7.0
  • xterm-addon-unicode11@&#8203;0.3.0
  • xterm-addon-web-links@0.6.0
  • xterm-addon-webgl@0.12.0

🌐 Website

v4.18.0

Compare Source

📦 API

  • Support buffer decorations (#​1852) via @​meganrogge

    const marker = term.addMarker(1);
    const decoration = term.registerDecoration({ marker, x: 5 });
    decoration.onRender(() => {
      decoration.element.style.backgroundColor = 'red';
    });

    Screen Shot 2022-02-28 at 11 08 39 AM

  • Make registerMarker's cursor offset optional (#​3663) via @​childrentime

    // Before
    const markerAtCursor = term.registerMarker(0);
    
    // After
    const markerAtCursor = term.registerMarker();

🐞 Bug fixes

📝 Documentation and internal improvements

🎉 New real-world use cases


🤝 Compatible addon versions

  • xterm-addon-attach@0.6.0
  • xterm-addon-fit@0.5.0
  • xterm-addon-ligatures@0.5.3
  • xterm-addon-search@0.8.2
  • xterm-addon-serialize@0.6.2
  • xterm-addon-unicode11@&#8203;0.3.0
  • xterm-addon-web-links@0.5.1
  • xterm-addon-webgl@0.11.4

v4.17.0

Compare Source

🚀 Features

📦 API

🐞 Bug fixes

📝 Documentation and internal improvements

🎉 New real-world use cases


📥 Addons

xterm-addon-ligatures
xterm-addon-web-links

🤝 Compatible addon versions

  • xterm-addon-attach@0.6.0
  • xterm-addon-fit@0.5.0
  • xterm-addon-ligatures@0.5.2
  • xterm-addon-search@0.8.2
  • xterm-addon-serialize@0.6.1
  • xterm-addon-unicode11@&#8203;0.3.0
  • xterm-addon-web-links@0.5.1
  • xterm-addon-webgl@0.11.4

🌐 Website

v4.16.0

Compare Source

Make sure you update your xterm.css file if you have your own copy as there were some changes made there (xtermjs/xterm.js#3579).

🚀 Features

  • Add support for OSC 4/10/11/2 which enables programs to set and report colors within the terminal (#​3524) via @​jerch
📦 API
  • Set multiple options through the Terminal.options API (#​3546, #​3586) via @​silamon
    // before
    term.setOption('rendererType', 'dom');
    term.setOption('fontSize', 12);
    
    // after
    term.options = {
      rendererType: 'dom',
      fontSize: 12
    };
  • The link provider API is no longer marked as experimental (#​3587) via @​Tyriar

🐞 Bug fixes

📝 Documentation and internal improvements

🎉 New real-world use cases


📥 Addons

xterm-addon-search
xterm-addon-web-links
xterm-addon-webgl

🤝 Compatible addon versions

  • xterm-addon-attach@0.6.0
  • xterm-addon-fit@0.5.0
  • xterm-addon-ligatures@0.5.1
  • xterm-addon-search@0.8.2
  • xterm-addon-serialize@0.6.1
  • xterm-addon-unicode11@&#8203;...
  • xterm-addon-web-links@0.5.0
  • xterm-addon-webgl@0.11.4

🌐 Website

v4.15.0

Compare Source

🚀 Features

📦 API

🐞 Bug fixes

📝 Documentation and internal improvements

⚠️ Deprecations

Use term.options over term.setOption/getOption:

// before
term.setOption('rendererType', 'dom');

// after
term.options.rendererType = 'dom';

🎉 New real-world use cases


📥 Addons

xterm-addon-serialize
xterm-addon-webgl

🤝 Compatible addon versions

  • xterm-addon-attach@0.6.0
  • xterm-addon-fit@0.5.0
  • xterm-addon-ligatures@0.5.1
  • xterm-addon-search@0.8.1
  • xterm-addon-serialize@0.6.1
  • xterm-addon-unicode11@&#8203;0.3.0
  • xterm-addon-web-links@0.4.0
  • xterm-addon-webgl@0.11.3

🌐 Website

Pull from https://github.com/xtermjs/xtermjs.org/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Aclosed

v4.14.1

Compare Source

🐞 Bug fixes

v4.14.0

Compare Source

🚀 Features

📦 API
  • The new readonly modes API exposes the terminal's internal modes (#​3418) via @​Tyriar. These are used for example in the xterm-addon-serialize to enable mode serialization.
    if (terminal.modes.applicationCursorKeysMode) {
      // DECCKM is enabled (CSI ? 1 h)
    }

🐞 Bug fixes

📝 Documentation and internal improvements

🎉 New real-world use cases



Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

@classicvalues classicvalues merged commit 0e3d8a1 into dev1 Oct 18, 2022
@classicvalues classicvalues deleted the renovate/major-xterm-monorepo branch October 18, 2022 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant