From 7ec41471da52dae5686f82bfca612bcea6fd2ef2 Mon Sep 17 00:00:00 2001 From: ScottMorse Date: Fri, 6 Mar 2026 00:10:32 -0700 Subject: [PATCH 1/2] Fix deprecated references of xterm-headless to @xterm/headless --- README.md | 2 +- headless/README.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d001f1606..d8d3fb144 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Since xterm.js is typically implemented as a developer tool, generally only mode ### Node.js Support -We also publish [`xterm-headless`](https://www.npmjs.com/package/xterm-headless) which is a stripped down version of xterm.js that runs headless in Node.js. An example use case for this is to keep track of a terminal's state where the process is running and using the [serialize addon](https://www.npmjs.com/package/@xterm/addon-serialize) so it can get all state restored upon reconnection. +We also publish [`@xterm/headless`](https://www.npmjs.com/package/@xterm/headless) which is a stripped down version of xterm.js that runs headless in Node.js. An example use case for this is to keep track of a terminal's state where the process is running and using the [serialize addon](https://www.npmjs.com/package/@xterm/addon-serialize) so it can get all state restored upon reconnection. ## API diff --git a/headless/README.md b/headless/README.md index 205fd79c5..fe98e12fd 100644 --- a/headless/README.md +++ b/headless/README.md @@ -2,17 +2,17 @@ ⚠ This package is experimental -`xterm-headless` is a headless terminal that can be run in node.js. This is useful in combination with the frontend [`xterm`](https://www.npmjs.com/package/xterm) for example to keep track of a terminal's state on a remote server where the process is hosted. +`@xterm/headless` is a headless terminal that can be run in node.js. This is useful in combination with the frontend [`xterm`](https://www.npmjs.com/package/xterm) for example to keep track of a terminal's state on a remote server where the process is hosted. ## Getting Started First, you need to install the module, we ship exclusively through npm, so you need that installed and then add xterm.js as a dependency by running: ```sh -npm install xterm-headless +npm install @xterm/headless ``` -Then import as you would a regular node package. The recommended way to load `xterm-headless` is with TypeScript and the ES6 module syntax: +Then import as you would a regular node package. The recommended way to load `@xterm/headless` is with TypeScript and the ES6 module syntax: ```javascript import { Terminal } from '@xterm/headless'; @@ -20,12 +20,12 @@ import { Terminal } from '@xterm/headless'; ## API -The full API for `xterm-headless` is contained within the [TypeScript declaration file](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm-headless.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API. +The full API for `@xterm/headless` is contained within the [TypeScript declaration file](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm-headless.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API. Note that some APIs are marked *experimental*, these are added to enable experimentation with new ideas without committing to support it like a normal [semver](https://semver.org/) API. Note that these APIs can change radically between versions, so be sure to read release notes if you plan on using experimental APIs. ### Addons -Addons in `xterm-headless` work the [same as in `xterm`](https://github.com/xtermjs/xterm.js/blob/master/README.md#addons) with the one caveat being that the addon needs to be packaged for node.js and not use any DOM APIs. +Addons in `@xterm/headless` work the [same as in `xterm`](https://github.com/xtermjs/xterm.js/blob/master/README.md#addons) with the one caveat being that the addon needs to be packaged for node.js and not use any DOM APIs. Currently no official addons are packaged on npm. From f7a353cd341866efb122d825f5cd6edd555e0fd5 Mon Sep 17 00:00:00 2001 From: ScottMorse Date: Fri, 6 Mar 2026 00:14:20 -0700 Subject: [PATCH 2/2] Fix npm link to deprecated xterm package to @xterm/xterm --- headless/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headless/README.md b/headless/README.md index fe98e12fd..cf9169ec9 100644 --- a/headless/README.md +++ b/headless/README.md @@ -2,7 +2,7 @@ ⚠ This package is experimental -`@xterm/headless` is a headless terminal that can be run in node.js. This is useful in combination with the frontend [`xterm`](https://www.npmjs.com/package/xterm) for example to keep track of a terminal's state on a remote server where the process is hosted. +`@xterm/headless` is a headless terminal that can be run in node.js. This is useful in combination with the frontend [`xterm`](https://www.npmjs.com/package/@xterm/xterm) for example to keep track of a terminal's state on a remote server where the process is hosted. ## Getting Started