@xterm/xterm 6.1.0-beta.251 → 6.1.0-beta.253

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "6.1.0-beta.251",
4
+ "version": "6.1.0-beta.253",
5
5
  "main": "lib/xterm.js",
6
6
  "module": "lib/xterm.mjs",
7
7
  "style": "css/xterm.css",
@@ -75,41 +75,42 @@
75
75
  "prepublishOnly": "npm run package"
76
76
  },
77
77
  "devDependencies": {
78
+ "@eslint/js": "^10.0.1",
78
79
  "@lunapaint/png-codec": "^0.2.0",
79
- "@playwright/test": "^1.57.0",
80
- "@stylistic/eslint-plugin": "^4.4.1",
81
- "@types/chai": "^4.2.22",
82
- "@types/express": "4",
80
+ "@playwright/test": "^1.59.1",
81
+ "@stylistic/eslint-plugin": "^5.10.0",
82
+ "@types/chai": "^5.2.3",
83
+ "@types/express": "^5.0.6",
83
84
  "@types/express-ws": "^3.0.1",
84
- "@types/jsdom": "^27.0.0",
85
- "@types/mocha": "^9.0.0",
85
+ "@types/jsdom": "^28.0.1",
86
+ "@types/mocha": "^10.0.10",
86
87
  "@types/node": "^22.19.3",
87
88
  "@types/webpack": "^5.28.0",
88
89
  "@types/ws": "^8.2.0",
89
- "@typescript-eslint/eslint-plugin": "^8.50.1",
90
- "@typescript-eslint/parser": "^8.50.1",
91
- "@typescript/native-preview": "^7.0.0-dev.20260213.1",
92
- "chai": "^4.3.4",
90
+ "@typescript-eslint/eslint-plugin": "^8.59.2",
91
+ "@typescript-eslint/parser": "^8.59.2",
92
+ "@typescript/native-preview": "^7.0.0-dev.20260509.2",
93
+ "chai": "^6.2.2",
93
94
  "concurrently": "^9.1.2",
94
- "esbuild": "~0.25.2",
95
- "eslint": "^9.39.2",
96
- "eslint-plugin-jsdoc": "^50.8.0",
97
- "express": "^4.19.2",
95
+ "esbuild": "^0.28.0",
96
+ "eslint": "^10.3.0",
97
+ "eslint-plugin-jsdoc": "^62.9.0",
98
+ "express": "^5.2.1",
98
99
  "express-ws": "^5.0.2",
99
- "jsdom": "^27.3.0",
100
- "mocha": "^10.1.0",
100
+ "jsdom": "^29.1.1",
101
+ "mocha": "^11.7.5",
101
102
  "mustache": "^4.2.0",
102
103
  "node-pty": "^1.2.0-beta.9",
103
- "nyc": "^17.1.0",
104
- "source-map-loader": "^3.0.0",
104
+ "nyc": "^18.0.0",
105
+ "source-map-loader": "^5.0.0",
105
106
  "source-map-support": "^0.5.20",
106
- "ts-loader": "^9.3.1",
107
+ "ts-loader": "^9.5.7",
107
108
  "typescript": "^5.9.3",
108
- "typescript-eslint": "^8.50.1",
109
- "webpack": "^5.61.0",
110
- "webpack-cli": "^4.9.1",
111
- "ws": "^8.2.3",
112
- "xterm-benchmark": "^0.3.1"
109
+ "typescript-eslint": "^8.59.2",
110
+ "webpack": "^5.106.2",
111
+ "webpack-cli": "^7.0.2",
112
+ "ws": "^8.20.0",
113
+ "xterm-benchmark": "^0.3.2"
113
114
  },
114
- "commit": "c2ecfe744688be7ebe8728004fd8f36717d0de33"
115
+ "commit": "b2003861ecb4acf5b07f49eaadf8403e3e89826c"
115
116
  }
@@ -212,7 +212,7 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
212
212
  if (!this._themeService) return;
213
213
  for (const req of event) {
214
214
  let acc: 'foreground' | 'background' | 'cursor' | 'ansi';
215
- let ident = '';
215
+ let ident: string;
216
216
  switch (req.index) {
217
217
  case SpecialColorIndex.FOREGROUND: // OSC 10 | 110
218
218
  acc = 'foreground';
@@ -90,14 +90,14 @@ export class DomRendererRowFactory {
90
90
  let charElement: HTMLSpanElement | undefined;
91
91
  let cellAmount = 0;
92
92
  let text = '';
93
- let i = 0;
93
+ let i;
94
94
  let oldBg = 0;
95
95
  let oldFg = 0;
96
96
  let oldExt = 0;
97
97
  let oldLinkHover: number | boolean = false;
98
98
  let oldSpacing = 0;
99
99
  let oldIsInSelection: boolean = false;
100
- let spacing = 0;
100
+ let spacing;
101
101
  let skipJoinedCheckUntilX = 0;
102
102
  const classes: string[] = [];
103
103
 
@@ -231,6 +231,7 @@ export class DomRendererRowFactory {
231
231
  }
232
232
  charElement = this._document.createElement('span');
233
233
  cellAmount = 0;
234
+ // eslint-disable-next-line no-useless-assignment
234
235
  text = '';
235
236
  }
236
237
  }
@@ -110,7 +110,7 @@ export class WidthCache implements IDisposable {
110
110
  * `variant` denotes the font variant to be used.
111
111
  */
112
112
  public get(c: string, bold: boolean | number, italic: boolean | number): number {
113
- let cp = 0;
113
+ let cp: number;
114
114
  if (!bold && !italic && c.length === 1 && (cp = c.charCodeAt(0)) < WidthCacheSettings.FLAT_SIZE) {
115
115
  if (this._flat[cp] !== WidthCacheSettings.FLAT_UNSET) {
116
116
  return this._flat[cp];
@@ -367,7 +367,7 @@ export class Gesture extends Disposable {
367
367
  private _dispatchEvent(event: IGestureEvent): void {
368
368
  if (event.type === EventType.TAP) {
369
369
  const currentTime = (new Date()).getTime();
370
- let setTapCount = 0;
370
+ let setTapCount;
371
371
  if (currentTime - this._lastSetTapCountTime > Gesture._clearTapCountTime) {
372
372
  setTapCount = 1;
373
373
  } else {
@@ -918,10 +918,10 @@ export class SelectionService extends Disposable implements ISelectionService {
918
918
  // Calculate the start _column_, converting the the string indexes back to
919
919
  // column coordinates.
920
920
  let start =
921
- startIndex // The index of the selection's start char in the line string
922
- + charOffset // The difference between the initial char's column and index
923
- - leftWideCharCount // The number of wide chars left of the initial char
924
- + leftLongCharOffset; // The number of additional chars left of the initial char added by columns with strings longer than 1 (emojis)
921
+ startIndex // The index of the selection's start char in the line string
922
+ + charOffset // The difference between the initial char's column and index
923
+ - leftWideCharCount // The number of wide chars left of the initial char
924
+ + leftLongCharOffset; // The number of additional chars left of the initial char added by columns with strings longer than 1 (emojis)
925
925
 
926
926
  // Calculate the length in _columns_, converting the the string indexes back
927
927
  // to column coordinates.
@@ -74,10 +74,10 @@ abstract class TaskQueue implements ITaskQueue {
74
74
 
75
75
  private _process(deadline: ITaskDeadline): void {
76
76
  this._idleCallback = undefined;
77
- let taskDuration = 0;
77
+ let taskDuration: number;
78
78
  let longestTask = 0;
79
79
  let lastDeadlineRemaining = deadline.timeRemaining();
80
- let deadlineRemaining = 0;
80
+ let deadlineRemaining: number;
81
81
  while (this._i < this._tasks.length) {
82
82
  taskDuration = performance.now();
83
83
  if (!this._tasks[this._i]()) {
@@ -6,4 +6,4 @@
6
6
  /**
7
7
  * The xterm.js version. This is updated by the publish script from package.json.
8
8
  */
9
- export const XTERM_VERSION = '6.1.0-beta.251';
9
+ export const XTERM_VERSION = '6.1.0-beta.253';
@@ -98,8 +98,7 @@ CHARSETS['4'] = {
98
98
  * ESC (C or ESC (5
99
99
  * Reference: http://vt100.net/docs/vt220-rm/table2-7.html
100
100
  */
101
- CHARSETS['C'] =
102
- CHARSETS['5'] = {
101
+ CHARSETS['C'] = CHARSETS['5'] = {
103
102
  '[': 'Ä',
104
103
  '\\': 'Ö',
105
104
  ']': 'Å',
@@ -185,8 +184,7 @@ CHARSETS['Y'] = {
185
184
  * ESC (E or ESC (6
186
185
  * Reference: http://vt100.net/docs/vt220-rm/table2-12.html
187
186
  */
188
- CHARSETS['E'] =
189
- CHARSETS['6'] = {
187
+ CHARSETS['E'] = CHARSETS['6'] = {
190
188
  '@': 'Ä',
191
189
  '[': 'Æ',
192
190
  '\\': 'Ø',
@@ -220,8 +218,7 @@ CHARSETS['Z'] = {
220
218
  * ESC (H or ESC (7
221
219
  * Reference: http://vt100.net/docs/vt220-rm/table2-14.html
222
220
  */
223
- CHARSETS['H'] =
224
- CHARSETS['7'] = {
221
+ CHARSETS['H'] = CHARSETS['7'] = {
225
222
  '@': 'É',
226
223
  '[': 'Ä',
227
224
  '\\': 'Ö',
@@ -148,7 +148,7 @@ export class Utf8ToUtf32 {
148
148
  let byte2: number;
149
149
  let byte3: number;
150
150
  let byte4: number;
151
- let codepoint = 0;
151
+ let codepoint;
152
152
  let startPos = 0;
153
153
 
154
154
  // handle leftover bytes
@@ -572,8 +572,8 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
572
572
  * ```
573
573
  */
574
574
  public parse(data: Uint32Array, length: number, promiseResult?: boolean): void | Promise<boolean> {
575
- let code = 0;
576
- let transition = 0;
575
+ let code: number;
576
+ let transition: number;
577
577
  let start = 0;
578
578
  let handlerResult: void | boolean | Promise<boolean>;
579
579
 
@@ -88,12 +88,10 @@ export class DecorationService extends Disposable implements IDecorationService
88
88
  if (!bucket) {
89
89
  return;
90
90
  }
91
- let xmin = 0;
92
- let xmax = 0;
93
91
  for (const d of bucket) {
94
- xmin = d.options.x ?? 0;
95
- xmax = xmin + (d.options.width ?? 1);
96
- if (x >= xmin && x < xmax && (!layer || (d.options.layer ?? 'bottom') === layer)) {
92
+ $xmin = d.options.x ?? 0;
93
+ $xmax = $xmin + (d.options.width ?? 1);
94
+ if (x >= $xmin && x < $xmax && (!layer || (d.options.layer ?? 'bottom') === layer)) {
97
95
  yield d;
98
96
  }
99
97
  }