Skip to content

Commit fd0bb58

Browse files
authored
Merge branch 'master' into 5135
2 parents 13d078e + 1b48cd0 commit fd0bb58

File tree

8 files changed

+32
-33
lines changed

8 files changed

+32
-33
lines changed
2.1 KB
Loading

addons/addon-image/src/IIPMetrics.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const TEST_IMAGES: [string, IMetrics][] = [
2525
['w3c_home_gray.png', { mime: 'image/png', width: 72, height: 48 }],
2626
['w3c_home.jpg', { mime: 'image/jpeg', width: 72, height: 48 }],
2727
['w3c_home.png', { mime: 'image/png', width: 72, height: 48 }],
28+
['w3c_home_noexif.jpg', { mime: 'image/jpeg', width: 72, height: 48 }],
2829
['spinfox.png', { mime: 'image/png', width: 148, height: 148 }],
2930
['iphone_hdr_YES.jpg', { mime: 'image/jpeg', width: 3264, height: 2448 }],
3031
['nikon-e950.jpg', { mime: 'image/jpeg', width: 800, height: 600 }],

addons/addon-image/src/IIPMetrics.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,8 @@ export function imageType(d: Uint8Array): IMetrics {
3232
height: d[20] << 24 | d[21] << 16 | d[22] << 8 | d[23]
3333
};
3434
}
35-
// JPEG: FF D8 FF E0 xx xx JFIF or FF D8 FF E1 xx xx Exif 00 00
36-
if ((d32[0] === 0xE0FFD8FF || d32[0] === 0xE1FFD8FF)
37-
&& (
38-
(d[6] === 0x4a && d[7] === 0x46 && d[8] === 0x49 && d[9] === 0x46)
39-
|| (d[6] === 0x45 && d[7] === 0x78 && d[8] === 0x69 && d[9] === 0x66)
40-
)
41-
) {
35+
// JPEG: FF D8 FF
36+
if (d[0] === 0xFF && d[1] === 0xD8 && d[2] === 0xFF) {
4237
const [width, height] = jpgSize(d);
4338
return { mime: 'image/jpeg', width, height };
4439
}

bin/esbuild.mjs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if (config.addon) {
102102
bundleConfig = {
103103
...bundleConfig,
104104
entryPoints: [`addons/addon-${config.addon}/src/${getAddonEntryPoint(config.addon)}.ts`],
105-
outfile: `addons/addon-${config.addon}/lib/xterm-addon-${config.addon}.mjs`,
105+
outfile: `addons/addon-${config.addon}/lib/addon-${config.addon}.mjs`,
106106
};
107107
outConfig = {
108108
...outConfig,
@@ -132,16 +132,16 @@ if (config.addon) {
132132
alias: {
133133
// Library ESM imports
134134
"@xterm/xterm": ".",
135-
"@xterm/addon-attach": "./addons/addon-attach/lib/xterm-addon-attach.mjs",
136-
"@xterm/addon-clipboard": "./addons/addon-clipboard/lib/xterm-addon-clipboard.mjs",
137-
"@xterm/addon-fit": "./addons/addon-fit/lib/xterm-addon-fit.mjs",
138-
"@xterm/addon-image": "./addons/addon-image/lib/xterm-addon-image.mjs",
139-
"@xterm/addon-search": "./addons/addon-search/lib/xterm-addon-search.mjs",
140-
"@xterm/addon-serialize": "./addons/addon-serialize/lib/xterm-addon-serialize.mjs",
141-
"@xterm/addon-web-links": "./addons/addon-web-links/lib/xterm-addon-web-links.mjs",
142-
"@xterm/addon-webgl": "./addons/addon-webgl/lib/xterm-addon-webgl.mjs",
143-
"@xterm/addon-unicode11": "./addons/addon-unicode11/lib/xterm-addon-unicode11.mjs",
144-
"@xterm/addon-unicode-graphemes": "./addons/addon-unicode-graphemes/lib/xterm-addon-unicode-graphemes.mjs",
135+
"@xterm/addon-attach": "./addons/addon-attach/lib/addon-attach.mjs",
136+
"@xterm/addon-clipboard": "./addons/addon-clipboard/lib/addon-clipboard.mjs",
137+
"@xterm/addon-fit": "./addons/addon-fit/lib/addon-fit.mjs",
138+
"@xterm/addon-image": "./addons/addon-image/lib/addon-image.mjs",
139+
"@xterm/addon-search": "./addons/addon-search/lib/addon-search.mjs",
140+
"@xterm/addon-serialize": "./addons/addon-serialize/lib/addon-serialize.mjs",
141+
"@xterm/addon-web-links": "./addons/addon-web-links/lib/addon-web-links.mjs",
142+
"@xterm/addon-webgl": "./addons/addon-webgl/lib/addon-webgl.mjs",
143+
"@xterm/addon-unicode11": "./addons/addon-unicode11/lib/addon-unicode11.mjs",
144+
"@xterm/addon-unicode-graphemes": "./addons/addon-unicode-graphemes/lib/addon-unicode-graphemes.mjs",
145145

146146
// Non-bundled ESM imports
147147
// HACK: Ligatures imports fs which in the esbuild bundle resolves at runtime _on startup_

demo/server.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,16 @@ function startServer() {
5959
}
6060
const cols = parseInt(req.query.cols);
6161
const rows = parseInt(req.query.rows);
62-
const term = pty.spawn(process.platform === 'win32' ? 'pwsh.exe' : 'bash', [], {
62+
const isWindows = process.platform === 'win32';
63+
const term = pty.spawn(isWindows ? 'pwsh.exe' : 'bash', [], {
6364
name: 'xterm-256color',
6465
cols: cols ?? 80,
6566
rows: rows ?? 24,
66-
cwd: process.platform === 'win32' ? undefined : env.PWD,
67+
cwd: isWindows ? undefined : env.PWD,
6768
env,
68-
encoding: USE_BINARY ? null : 'utf8'
69+
encoding: USE_BINARY ? null : 'utf8',
70+
useConpty: isWindows,
71+
useConptyDll: isWindows,
6972
});
7073

7174
console.log('Created terminal with PID: ' + term.pid);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"jsdom": "^18.0.1",
9696
"mocha": "^10.1.0",
9797
"mustache": "^4.2.0",
98-
"node-pty": "1.1.0-beta5",
98+
"node-pty": "1.1.0-beta19",
9999
"nyc": "^15.1.0",
100100
"source-map-loader": "^3.0.0",
101101
"source-map-support": "^0.5.20",

src/browser/Viewport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class Viewport extends Disposable {
7676
element.appendChild(this._scrollableElement.getDomNode());
7777
this._register(toDisposable(() => this._scrollableElement.getDomNode().remove()));
7878

79-
this._styleElement = coreBrowserService.window.document.createElement('style');
79+
this._styleElement = coreBrowserService.mainDocument.createElement('style');
8080
screenElement.appendChild(this._styleElement);
8181
this._register(toDisposable(() => this._styleElement.remove()));
8282
this._register(Event.runAndSubscribe(themeService.onChangeColors, () => {

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3190,11 +3190,6 @@ mustache@^4.2.0:
31903190
resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64"
31913191
integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==
31923192

3193-
nan@^2.17.0:
3194-
version "2.18.0"
3195-
resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554"
3196-
integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==
3197-
31983193
31993194
version "3.3.3"
32003195
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
@@ -3220,19 +3215,24 @@ neo-async@^2.6.2:
32203215
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
32213216
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
32223217

3218+
node-addon-api@^7.1.0:
3219+
version "7.1.1"
3220+
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558"
3221+
integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==
3222+
32233223
node-preload@^0.2.1:
32243224
version "0.2.1"
32253225
resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301"
32263226
integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==
32273227
dependencies:
32283228
process-on-spawn "^1.0.0"
32293229

3230-
3231-
version "1.1.0-beta5"
3232-
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.1.0-beta5.tgz#364386b7058a93070234064f13164ec1ef914993"
3233-
integrity sha512-j3QdgFHnLY0JWxztrvM3g67RaQLOGvytv+C6mFu0PqD+JILlzqfwuoyqRqVxdZZjoOTUXPfSRj1qPVCaCH+eOw==
3230+
3231+
version "1.1.0-beta19"
3232+
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.1.0-beta19.tgz#a74dc04429903c5ac49ee81a15a24590da67d4f3"
3233+
integrity sha512-/p4Zu56EYDdXjjaLWzrIlFyrBnND11LQGP0/L6GEVGURfCNkAlHc3Twg/2I4NPxghimHXgvDlwp7Z2GtvDIh8A==
32343234
dependencies:
3235-
nan "^2.17.0"
3235+
node-addon-api "^7.1.0"
32363236

32373237
node-releases@^2.0.12:
32383238
version "2.0.13"

0 commit comments

Comments
 (0)