Skip to content

Refresh 0.15.0 onto upstream node-pty 3d2987d and fix the prebuild matrix - #111

Merged
NorthernMan54 merged 44 commits into
beta-0.15.0from
refresh/upstream-2026-10-22
Oct 25, 2026
Merged

NorthernMan54 merged 44 commits into
beta-0.15.0from
refresh/upstream-2026-10-22

Conversation

@NorthernMan54

Copy link
Copy Markdown

Refreshes beta-0.15.0 onto the latest upstream microsoft/node-pty and re-applies our changes on top. Merging this publishes 0.15.0-beta.4 via Stage 1.

What's in it

  • Upstream 3d2987d (2026-10-22), 36 commits past our previous fork point 8da72bb: ConPTY reparenting (setParentWindow, conpty.cc) and its tests, node-gyp / Visual Studio 2026 and Node 24 build changes, mocha 12, dependency bumps.
  • Our net changes from beta-0.15.0, re-applied as one commit (f541e15): package name and typings, prebuild.js loader with the node-gyp rebuild fallback, glibc 2.28 sysroot pin, clearer native-module load errors, Stage 1 / Stage 2 workflows, README, CODEOWNERS, dependabot. Your 10-18 actions bump (ci: update github actions to their latest versions #109) is included.
  • Fixes found while getting the prebuild matrix green:
    • devEngines warns instead of failing: upstream now requires Node ≥24 / npm ≥11.6.3 for development, which stopped every prebuild job on our older build hosts.
    • Runner-hosted builds and tests use Node 24.22.1, as upstream CI does. On Node 22, win32-arm64 died in upstream's "Regression for Windows ConPTY backend data race in ptyHandles can crash in remove_pty_baton microsoft/node-pty#921" race test. The addon is Node-API; a newer-Node build loads and runs on Node 20/22/24 (checked locally), and Stage 2 still validates 19–26 after publishing.
    • linux-ia32: install from archive.debian.org (bullseye's security pool now 404s on deb.debian.org; staying on bullseye keeps glibc 2.31), and use node-gyp 11.5.0 there, since node-gyp 13 needs Node ≥22.22 and that host is Node 18.4.0.
    • node-gyp devDependency 13.1.0 (VS 2026); upstream dropped it, but our Stage 1 calls it.
    • Engines: dropped the <27 cap (prebuilds are N-API).
  • The last commit merges beta-0.15.0 with -s ours, so this merges without a force push. The tree is exactly the tested refresh.

Testing

  • Stage 1 dry run on this branch (publishPackage=false), run 40243351636: all 11 platforms build and test, including linux-ia32 and win32-arm64, which also fail on Refresh build process #105. linux-musl-arm64 needed one retry (QEMU Illegal instruction during container setup; it has passed on the other runs). The publish step stopped at version stamping only because the shared script needs a beta-x.y.z branch name; it will run normally on beta-0.15.0.
  • Locally on macOS arm64: native build, 24 tests + lint, and a live pty spawn on Node 20, 22, 24 and 26.

After merging

Stage 1 publishes 0.15.0-beta.4. #105 (beta-0.15.0 → main) then shows the clean diff against main.

🤖 Generated with Claude Code

dependabot Bot and others added 30 commits September 3, 2026 09:29
)

Bumps [@humanfs/node](https://github.com/humanwhocodes/humanfs/tree/HEAD/packages/node) from 0.16.7 to 0.16.8.
- [Release notes](https://github.com/humanwhocodes/humanfs/releases)
- [Changelog](https://github.com/humanwhocodes/humanfs/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/humanwhocodes/humanfs/commits/node-v0.16.8/packages/node)

---
updated-dependencies:
- dependency-name: "@humanfs/node"
  dependency-version: 0.16.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.3.1...4.3.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.4.0 to 10.7.2.
- [Release notes](https://github.com/beaugunderson/ip-address/releases)
- [Commits](beaugunderson/ip-address@v10.4.0...v10.7.2)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.7.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…on (microsoft#980)

Bumps [electron](https://github.com/electron/electron) from 42.5.1 to 42.10.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](electron/electron@v42.5.1...v42.10.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 42.10.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
Bumps  and [brace-expansion](https://github.com/juliangruber/brace-expansion). These dependencies needed to be updated together.

Updates `brace-expansion` from 5.0.9 to 5.0.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v5.0.9...v5.0.12)

Updates `brace-expansion` from 2.1.4 to 2.1.7
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v5.0.9...v5.0.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.12
  dependency-type: indirect
- dependency-name: brace-expansion
  dependency-version: 2.1.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…soft#985)

Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](yahoo/serialize-javascript@v7.1.1...v7.1.2)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-version: 7.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…icrosoft#978)

Bumps [undici](https://github.com/nodejs/undici) from 7.29.0 to 7.30.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](nodejs/undici@v7.29.0...v7.30.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 7.30.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/setup-node` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@8207627...949feb2)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add a conptyParentWindow fork option and IPty.setParentWindow(), backed by
ConptyReparentPseudoConsole from conpty.dll. The host window becomes the
owner of the console window returned by GetConsoleWindow(), so windows that
console apps parent to it (for example the WAM sign-in picker) open above the
host instead of behind it.
- Null the HPCON in PtyKill and skip resize/clear/reparent once it is
  closed, instead of relying on JS-side bookkeeping.
- Return whether ConptyReparentPseudoConsole succeeded, and reject BigInt
  handles that don't fit in 64 bits.
- Apply conptyParentWindow inside WindowsPtyAgent, right after the
  pseudoconsole is created, and clean up if that throws.
- Re-enable the parent window when the shell exits if a modal dialog that
  died with it left the window disabled.
- Make IPty.setParentWindow optional in the public typings and show how to
  convert Electron's native window handle.
conpty.dll is no longer experimental, so the APIs added on top of it are
documented as regular APIs.
- Add conptyReenableParentWindowOnExit (defaults to false). Re-enabling the
  window on exit is a heuristic, so hosts have to opt in.
- Look for visible owned windows through the whole owner chain, and compare
  window handles by their low 32 bits.
- Run the recovery off the exit thread, since EnableWindow waits for the
  window's thread.
- Validate handles before creating the pseudoconsole: numbers must be safe
  integers, and bigints must fit in 64 bits.
- Only close the pseudoconsole once in kill().
- setParentWindow returns whether the request was sent; ConPTY applies it
  asynchronously.
- The parent window tests wait for every pty to exit, since exiting while a
  conout worker still flushes its pipe can hang mocha.
It's an exact check: the window is still disabled and no visible window is
owned by it. What it can't tell is why the window is disabled, which is why
hosts opt in.
Remove conptyParentWindow. setParentWindow() isn't deferred, and the
shell is only launched once the conout worker is ready, so calling it
right after spawn() sends the request before the shell starts.

Remove conptyReenableParentWindowOnExit and re-enabling the parent
window on exit. That moves to a follow-up issue, so this PR stays
focused on the parenting change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ode-gyp-windows-arm64

Use Node 24's bundled node-gyp for Visual Studio 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
HWNDs are pointers, so negative handles are now rejected and the handle
is converted to an HWND through uintptr_t in C++, which also covers
32-bit builds. Numbers must be non-negative safe integers, since
Node-API's integer getters silently truncate fractions, map NaN and
Infinity to 0 and lose precision above 2^53.

Remove the JS check, so the native binding is the only place that
validates the handle.
Only Int64Value() loses precision past Number.MAX_SAFE_INTEGER; the 32-bit
getters wrap instead. The invalid handle test also rejects unsafe integers,
so say safe integers in its name.
setParentWindow() now takes the HWND as a Buffer the size of an HWND, in
native byte order, which is how Electron's
BrowserWindow.getNativeWindowHandle() returns it, so hosts can pass that
Buffer directly. The native side copies it into an HWND, which replaces
the number and bigint parsing.
…rent-window

Add ConptyReparentPseudoConsole support
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…24-publish

Use Node 24 in the publish pipeline
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
anthonykim1 and others added 14 commits October 22, 2026 12:53
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…npm-11-6-3

Use npm 11.6.3 for Azure Artifacts publishing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-beta-version-selection

Clarify which registry determines beta versions
Rebuilt on microsoft/node-pty main (2026-10-22, 36 commits past the
previous fork point 8da72bb), with the net Homebridge changes from
beta-0.15.0 applied on top:

- package name @homebridge/node-pty-prebuilt-multiarch, typings module
- prebuild loader (scripts/prebuild.js) and node-gyp rebuild fallback
- glibc 2.28 sysroot pin for Linux prebuilds
- clearer native module load errors in src/utils.ts
- Stage 1 (prebuild + publish) and Stage 2 (validate) workflows
- README, CODEOWNERS, dependabot config

Conflicts: ci.yml takes upstream's Node 24.22.1; package.json takes
upstream's mocha 12.0.2 and keeps node-gyp as a devDependency (the
Stage 1 workflow calls it), bumped to 13.1.0 for VS 2026.
package-lock.json regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prebuilds are N-API, so a new Node major needs no new binaries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream requires Node >=24 / npm >=11.6.3 for development. Our prebuild
matrix deliberately builds on older hosts (Node 22 runners, node:22-alpine,
and Node 18.4.0 for linux-ia32, the last x86 runtime available), so the
hard check stopped every prebuild job before it started. The output is
Node-API, so the build host's Node version does not affect consumers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bullseye's security pool has left deb.debian.org (apt got 404s), so the
i386 container now installs from archive.debian.org; staying on
bullseye keeps the ia32 prebuild on glibc 2.31. That container's Node
18.4.0 (the last x86 runtime) can't run node-gyp 13, so it uses
node-gyp 11.5.0 explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
win32-arm64 died in the "Regression for microsoft#921" race test on Node 22.x,
while upstream's windows-11-arm job passes it on 24.22.1. The addon is
Node-API: a build from a newer Node loads and runs on Node 20, 22 and 24
(checked locally), and Stage 2 validates Node 19-26 after publishing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm 8's npx reused the project's node-gyp 13 instead of fetching
node-gyp@11.5.0, which then failed on Node 18.4. Install 11.5.0 into
/tmp/node-gyp-11 and call it by path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Records beta-0.15.0 (389cc83) as a parent so this branch can be merged
into beta-0.15.0 without a force push. The resulting tree is the
refreshed one: upstream microsoft/node-pty 3d2987d with the Homebridge
changes reapplied; everything from beta-0.15.0 is already carried in
that reapplication.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NorthernMan54
NorthernMan54 requested a review from bwp91 October 25, 2026 23:24
@NorthernMan54
NorthernMan54 enabled auto-merge (squash) October 25, 2026 23:28
@NorthernMan54
NorthernMan54 merged commit 7ba4b47 into beta-0.15.0 Oct 25, 2026
125 of 126 checks passed
@NorthernMan54
NorthernMan54 deleted the refresh/upstream-2026-10-22 branch October 25, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants