Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8338418
Added exports field to headless package.json
iSuslov Dec 4, 2025
b41d3ef
Fix ESM export path for addon-unicode-graphemes
iSuslov Dec 4, 2025
a3e1ecf
Fix tsc build - upgrade glob version
iSuslov Dec 4, 2025
7228e2e
Add synchronized output support (DEC mode 2026)
chrislloyd Dec 4, 2025
6b63c5f
Address PR review feedback for synchronized output
chrislloyd Dec 9, 2025
5d0eae8
Fix spec URL to use master branch
chrislloyd Dec 9, 2025
af5dbfc
Add DECRQM support for synchronized output mode
chrislloyd Dec 9, 2025
7f81df5
Add BSU and ESU to VT tab in demo
Tyriar Dec 10, 2025
7cdf3f9
Prefer const enum so the number is inlined
Tyriar Dec 10, 2025
9ea059d
Move SynchronizedOutputHandler to bottom of file
Tyriar Dec 10, 2025
bd361af
Fix lint
Tyriar Dec 10, 2025
7f50b56
Fix one playwright test
Tyriar Dec 10, 2025
832aa54
Fix colors and clear cached frames to pass tests
Tyriar Dec 20, 2025
32553ff
Add synchronizedOutputMode to xterm-headless.d.ts
Tyriar Dec 20, 2025
20c1674
Update package-lock.json
Tyriar Dec 20, 2025
1eee5cd
Add synchronizedOutput mode to headless terminal object
Tyriar Dec 20, 2025
2edd121
Add node about serialize addon support
Tyriar Dec 20, 2025
0741f8b
Merge pull request #5452 from iSuslov/upgrade-glob-version-fix-tsc-build
Tyriar Dec 20, 2025
ed0ab5f
Add missing property to headless API test assertion
Tyriar Dec 20, 2025
e9ba31f
Explicitly set background color in playwright tests
Tyriar Dec 20, 2025
12c4f95
Use underline cursor style to ensure cursor color isn't reported
Tyriar Dec 20, 2025
5396243
Merge pull request #5450 from iSuslov/fix-esm-path-addon-unicode-grap…
Tyriar Dec 20, 2025
ad07f2c
Revert last frame request cache clearing
Tyriar Dec 20, 2025
6733e13
Invert initial assertion
Tyriar Dec 20, 2025
5e9cd62
Git ignore test-results/
Tyriar Dec 20, 2025
7335f15
Merge pull request #5460 from Tyriar/tyriar/test-results
Tyriar Dec 20, 2025
34fd0dc
Remove need for glob module
Tyriar Dec 20, 2025
cb4d1ef
Merge pull request #5453 from chrislloyd/feat/synchronized-output
Tyriar Dec 20, 2025
a9d3ca1
Merge pull request #5449 from iSuslov/exports/esm-headless-node
Tyriar Dec 20, 2025
92b43bd
Remove only
Tyriar Dec 20, 2025
d1c50c1
Merge pull request #5461 from Tyriar/tyriar/glob
Tyriar Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ npm-debug.log
build/
.DS_Store
yarn.lock
test-results/

# Keep bundled code out of Git
dist/
Expand Down
1 change: 1 addition & 0 deletions addons/addon-serialize/src/SerializeAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ export class SerializeAddon implements ITerminalAddon , ISerializeApi {
if (modes.originMode) content += '\x1b[?6h';
if (modes.reverseWraparoundMode) content += '\x1b[?45h';
if (modes.sendFocusMode) content += '\x1b[?1004h';
// synchronizedOutputMode doesn't need to be serialized as it's a temporary mode

// Default: true
if (modes.wraparoundMode === false) content += '\x1b[?7l';
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-unicode-graphemes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://xtermjs.org/"
},
"main": "lib/addon-unicode-graphemes.js",
"module": "lib/.addon-unicode-graphemes.mjs",
"module": "lib/addon-unicode-graphemes.mjs",
"types": "typings/addon-unicode-graphemes.d.ts",
"repository": "https://github.com/xtermjs/xterm.js/tree/master/addons/addon-unicode-graphemes",
"license": "MIT",
Expand Down
36 changes: 19 additions & 17 deletions demo/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1310,23 +1310,25 @@ function addVtButtons(): void {
}
const vtFragment = document.createDocumentFragment();
const buttonSpecs: { [key: string]: { label: string, description: string, paramCount?: number }} = {
A: { label: 'CUU ↑', description: 'Cursor Up Ps Times' },
B: { label: 'CUD ↓', description: 'Cursor Down Ps Times' },
C: { label: 'CUF →', description: 'Cursor Forward Ps Times' },
D: { label: 'CUB ←', description: 'Cursor Backward Ps Times' },
E: { label: 'CNL', description: 'Cursor Next Line Ps Times' },
F: { label: 'CPL', description: 'Cursor Preceding Line Ps Times' },
G: { label: 'CHA', description: 'Cursor Character Absolute' },
H: { label: 'CUP', description: 'Cursor Position [row;column]', paramCount: 2 },
I: { label: 'CHT', description: 'Cursor Forward Tabulation Ps tab stops' },
J: { label: 'ED', description: 'Erase in Display' },
'?|J': { label: 'DECSED', description: 'Erase in Display' },
K: { label: 'EL', description: 'Erase in Line' },
'?|K': { label: 'DECSEL', description: 'Erase in Line' },
L: { label: 'IL', description: 'Insert Ps Line(s)' },
M: { label: 'DL', description: 'Delete Ps Line(s)' },
P: { label: 'DCH', description: 'Delete Ps Character(s)' },
' q': { label: 'DECSCUSR', description: 'Set Cursor Style', paramCount: 1 }
A: { label: 'CUU ↑', description: 'Cursor Up Ps Times' },
B: { label: 'CUD ↓', description: 'Cursor Down Ps Times' },
C: { label: 'CUF →', description: 'Cursor Forward Ps Times' },
D: { label: 'CUB ←', description: 'Cursor Backward Ps Times' },
E: { label: 'CNL', description: 'Cursor Next Line Ps Times' },
F: { label: 'CPL', description: 'Cursor Preceding Line Ps Times' },
G: { label: 'CHA', description: 'Cursor Character Absolute' },
H: { label: 'CUP', description: 'Cursor Position [row;column]', paramCount: 2 },
I: { label: 'CHT', description: 'Cursor Forward Tabulation Ps tab stops' },
J: { label: 'ED', description: 'Erase in Display' },
'?|J': { label: 'DECSED', description: 'Erase in Display' },
K: { label: 'EL', description: 'Erase in Line' },
'?|K': { label: 'DECSEL', description: 'Erase in Line' },
L: { label: 'IL', description: 'Insert Ps Line(s)' },
M: { label: 'DL', description: 'Delete Ps Line(s)' },
P: { label: 'DCH', description: 'Delete Ps Character(s)' },
' q': { label: 'DECSCUSR', description: 'Set Cursor Style' },
'?2026h': { label: 'BSU', description: 'Begin synchronized update', paramCount: 0 },
'?2026l': { label: 'ESU', description: 'End synchronized update', paramCount: 0 }
};
for (const s of Object.keys(buttonSpecs)) {
const spec = buttonSpecs[s];
Expand Down
5 changes: 5 additions & 0 deletions headless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"main": "lib-headless/xterm-headless.js",
"module": "lib-headless/xterm-headless.mjs",
"types": "typings/xterm-headless.d.ts",
"exports": {
"types": "./typings/xterm-headless.d.ts",
"import": "./lib-headless/xterm-headless.mjs",
"require": "./lib-headless/xterm-headless.js"
},
"repository": "https://github.com/xtermjs/xterm.js",
"license": "MIT",
"keywords": [
Expand Down
171 changes: 141 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"@types/deep-equal": "^1.0.1",
"@types/express": "4",
"@types/express-ws": "^3.0.1",
"@types/glob": "^7.2.0",
"@types/jsdom": "^16.2.13",
"@types/mocha": "^9.0.0",
"@types/node": "^18.16.0",
Expand All @@ -93,7 +92,6 @@
"eslint-plugin-jsdoc": "^46.9.1",
"express": "^4.19.2",
"express-ws": "^5.0.2",
"glob": "^7.2.0",
"jsdom": "^18.0.1",
"mocha": "^10.1.0",
"mustache": "^4.2.0",
Expand Down
12 changes: 7 additions & 5 deletions src/browser/Terminal2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* @license MIT
*/

import * as glob from 'glob';
import * as path from 'path';
import * as os from 'os';
import * as fs from 'fs';
Expand All @@ -15,7 +14,10 @@ import { IDisposable } from '@xterm/xterm';
const COLS = 80;
const ROWS = 25;

const TESTFILES = glob.sync('**/escape_sequence_files/*.in', { cwd: path.join(__dirname, '../..')});
const escapeSequenceFilesDir = path.join(__dirname, '../../fixtures/escape_sequence_files');
const TESTFILES = fs.readdirSync(escapeSequenceFilesDir)
.filter(f => f.endsWith('.in'))
.map(f => path.join(escapeSequenceFilesDir, f));
const SKIP_FILES = [
't0055-EL.in', // EL/ED handle cursor at cols differently (see #3362)
't0084-CBT.in',
Expand All @@ -33,7 +35,7 @@ if (os.platform() === 'darwin') {
);
}
// filter skipFilenames
const FILES = TESTFILES.filter(value => !SKIP_FILES.includes(value.split('/').slice(-1)[0]));
const FILES = TESTFILES.filter(value => !SKIP_FILES.includes(path.basename(value)));

describe('Escape Sequence Files', function(): void {
this.timeout(1000);
Expand Down Expand Up @@ -62,7 +64,7 @@ describe('Escape Sequence Files', function(): void {
});

for (const filename of FILES) {
(process.platform === 'win32' ? it.skip : it)(filename.split('/').slice(-1)[0], async () => {
(process.platform === 'win32' ? it.skip : it)(path.basename(filename), async () => {
// reset terminal and handler
if (customHandler) {
customHandler.dispose();
Expand All @@ -88,7 +90,7 @@ describe('Escape Sequence Files', function(): void {
});

// compare with expected output (right trimmed)
const expected = fs.readFileSync(filename.split('.')[0] + '.text', 'utf8');
const expected = fs.readFileSync(filename.replace(/\.in$/, '.text'), 'utf8');
const expectedRightTrimmed = expected.split('\n').map(l => l.replace(/\s+$/, '')).join('\n');
if (content !== expectedRightTrimmed) {
throw new Error(formatError(fs.readFileSync(filename, 'utf8'), content, expected));
Expand Down
1 change: 1 addition & 0 deletions src/browser/public/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export class Terminal extends Disposable implements ITerminalApi {
originMode: m.origin,
reverseWraparoundMode: m.reverseWraparound,
sendFocusMode: m.sendFocus,
synchronizedOutputMode: m.synchronizedOutput,
wraparoundMode: m.wraparound
};
}
Expand Down
Loading
Loading