Repository navigation
feat: add prebuilds to published package - #804
Merged
Merged
Conversation
Robo (deepak1556)
requested changes
Oct 6, 2025
Robo (deepak1556)
left a comment
Contributor
There was a problem hiding this comment.
Can you add an option in scripts/prebuild.js to skip prebuilds if npm_config_build_from_source env is set.
Robo (deepak1556)
approved these changes
Oct 7, 2025
Closed
Northern Man (NorthernMan54)
added a commit
to homebridge/node-pty-prebuilt-multiarch
that referenced
this pull request
Aug 31, 2026
* chore: use node 20 and fix build (microsoft#730) * chore: use node 20 and fix build * chore: bump macOS deployment target * spec: reduce flakyness * Revert "chore: bump macOS deployment target" This reverts commit d9d18b3. --------- Co-authored-by: deepak1556 <hop2deep@gmail.com> * chore: add new publish pipeline (microsoft#727) Also allows the CI pipeline to use the Unofficial template * fix: ensure proper cleanup of console process on shutdown * fix: publish pipeline broken APIScan task (microsoft#756) * chore: improve cleanup with useConptyDll mode * chore: update tests * chore: auto-publish beta versions (microsoft#757) * chore: work around blocked release integration (microsoft#758) * Update to conpty v1.22 (microsoft#759) * Update to conpty v1.22 Fixes microsoft#490 * Add logs to show the problem happening * spec: increase exit delay * refactor: input and output handling with conpty * Close the input read and output write handles after creating the client process * Call ReleasePseudoConsole after creating the client process which will cause the output read handle to close when there is no more data from the session * For manual termination via Kill, we close the input write handle and call into ClosePseudoConsole, we should then drain the output handle NB: ideally draining the output handle should have been enough to cause the client process to close but it doesn't work, we call TerminateProcess to fix this case. * chore: restore legacy conpty path --------- Co-authored-by: deepak1556 <hop2deep@gmail.com> * chore: remove old publishing stage (microsoft#761) * fix: restore conpty non-dll path (microsoft#766) * chore: add BinSkim flags to winpty (microsoft#767) * chore: add BinSkim flags to winpty * Apply PR feedback * conpty@1.22.250204002 * Change buffer size to 128KiB Fixes microsoft#765 * chore: match trigger with perf-bot's (microsoft#773) * chore: match exclude with latest conpty (microsoft#774) * chore: use folder wildcard (microsoft#775) * Revert "conpty@1.22.250204002" This reverts commit 247ae7d. * fix: gate conpty-exclusive call behind conpty check (microsoft#778) * Remove package-lock=false from .npmrc Missed this when migrating from yarn * Update brace-expansion * Remove npmrc unsafe perm doesn't seem to be needed * chore: create GitHub Actions workflow (microsoft#796) * chore: split compile commands to separate task (microsoft#801) * chore: lock node-gyp used for compile commands (microsoft#802) * feat: scaffolding for prebuilt files (microsoft#803) * feat: add prebuilds to published package (microsoft#804) * fix: add missing lines * Fix job names * Use Ubuntu for linux_arm64 * Add combining archive stage for prebuilds * Ref artifact from publish script * Add check for npm_config_build_from_source * simplify * chore: exclude Linux prebuilds (microsoft#805) * chore: fix publish pipeline parameters again (microsoft#806) * chore: fix mismatch between shell and command (microsoft#807) * Load native addons directly from prebuilds directory (microsoft#809) * Load native addons directly from prebuilds directory * feat: remove prebuilds when npm_config_build_from_source is set * feat: change the load order to local builds and unbundled first * chore: skip copying prebuilds to build dir * Update conpty to 1.23.251008001 Part of microsoft/vscode#224488 * Support Buffer in write API Part of microsoft/vscode#269213 * chore: exclude unscannable binaries * chore: update SDL flags (microsoft#815) * Add OpenBSD includes for termios and util Fix build for OpenBSD * add "Enjoy Git" Real-world Uses * chore: add D_FORTIFY_SOURCE flag (microsoft#820) * chore: re-enable 4244, 4267 * chore: npm audit fix * Remove excess quotes (microsoft#823) * chore: use UseNode (microsoft#824) * feat: support to build with mingw-w64 in windows * Use standard -lshlwapi in binding.gyp so gyp/node-gyp can handle linking for both mingw-w64 and MSVC, enabling builds with mingw-w64. Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com> * fix: delete all prebuilds if not using any (microsoft#829) * chore: remove ADO CI (microsoft#826) * fix: do not delete for mismatch (microsoft#830) * Speculative fix for stream backpressure Part of microsoft/vscode#283056 Part of microsoft/vscode#246204 * Add additional change needed to fix it * Use raw write stream, handle partial writes/kernel backpressure * Remove unneeded write stream * Remove unwanted logs * Tidy up comments * Add setting of encoding on the read socket back * Move props to top * Use os.constants.errno * Revert "Use os.constants.errno" This reverts commit 6bb38cc. errno.EAGAIN is coming through as 35 (positive) on macOS, not -35. * Ensure partial writes are handled on EAGAIN Following up on microsoft#831 * Fix string slicing for fs.write * Bring comments and timeouts back (for now) * Remove use of any * Remove timeouts and update details in comments Fixes microsoft#833 * Encapsulate write queue in separate class Fixes microsoft#838 * Add default watch task * Avoid excessive listeners on data and other events Fixes microsoft#215 * Bump v1.1 * Add contributing file Fixes microsoft#836 * Update electron example - Get working on Windows by moving node-pty into main proc - Fix eslint warnings Fixes microsoft#821 * chore(deps): bump electron from 33.4.11 to 35.7.5 in /examples/electron Bumps [electron](https://github.com/electron/electron) from 33.4.11 to 35.7.5. - [Release notes](https://github.com/electron/electron/releases) - [Commits](electron/electron@v33.4.11...v35.7.5) --- updated-dependencies: - dependency-name: electron dependency-version: 35.7.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update electron example to xterm 6 * Point at local node-pty * Update contributing * Remove node-pty dep * Pass error details in apple spawn exception Part of microsoft#845 * Add sysroot to compile Linux prebuilds against glibc 2.28 (microsoft#853) * Add sysroot to compile Linux prebuilds against glibc 2.28 Fixes microsoft#851 * Add CI check for glibc version * Fix linker flags to include sysroot library paths * Revert package-lock change * Ensure 755 permissions on prebuild spawn-helper Fixes microsoft#850 * Pin Python 3.12 * Set compiler on mac too * Fix linux arm compiling and add CI for cross-compiled builds (microsoft#857) * Remove duplicate slash * Run CI on cross-arch builds * Install cross-arch compiler * Install cross-arch compiler for azure pipeline * chore: enable warning 4146 (microsoft#861) * chore: elevate warnings to errors (microsoft#862) Exclude winpty from this process because it is legacy code. * fix: ensure spawn-helper is executable for macos prebuilds Fixes microsoft#850 * fix: Use authenticated download for sysroot to avoid rate limiting * fix: add parsing to reduce flakiness on macOS * chore: set -e to make failure point clear * chore: direct debug logs to stderr * chore: add log for token use in downloading sysroot * Revert "Ensure 755 permissions on prebuild spawn-helper" This reverts commit d08cd36. * fix: close inherited file descriptors in child process on Linux Prevents leaking file descriptors (pty master FDs, sockets, etc.) to child processes spawned via forkpty(). Uses close_range() syscall on Linux 5.9+, falling back to /proc/self/fd iteration, then brute force. macOS already handles this via POSIX_SPAWN_CLOEXEC_DEFAULT flag. Fixes microsoft#657 Part of microsoft/vscode#58814 * chore: update Actions CI to use native runners instead of cross-compilation (microsoft#865) * chore: update Actions CI to use native runners instead of cross-compilation * Remove cross-compiler installation for linux-arm * chore: move lint to a separate job * Skip compiling native addon for lint job Co-authored-by: Simon Lydell <simon.lydell@gmail.com> * ci: switch to using native objdump in verify-glibc script --------- Co-authored-by: Simon Lydell <simon.lydell@gmail.com> * Remove support for winpty * Remove winpty.cc , references in native.d.ts * Remove winpty from windowsPtyAgent.ts * Remove useConpty as that's default now * index.js, post-install.js, spam-close.js * README.md winpty support removed note * Remove dep\winpty * Remove useConpty from test.ts since we got rid of it * See if import were problem for pty.node (old winpty binding) * More conditional unixTerminal file import * See if unixTerminal as UnixTerminalType would help * Stop messing with UnixTerminal camelCase * We dont want to fall back to winpty * Update src/unix/pty.cc Co-authored-by: Robo <hop2deep@gmail.com> * Update src/unix/pty.cc Co-authored-by: Robo <hop2deep@gmail.com> * Polish * Add SetCloseOnExec * chore: remove fortify-source flag * chore: polish prebuilds pipeline * chore: add explicit include * Scrap explicit include in case of gyp or other changes * chore: force commit hashes to match * Update src/win/conpty.cc Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> * Update src/win/conpty.cc Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> * Only add back interface of useConpty + deprecation message * Update typings/node-pty.d.ts Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> * Delete emulation in winpty is deprecated * See if we can remove conditional check for UnixTerminal * Try doing the conditional import again on UnixTerminal.test.ts * Trigger CI rebuild * Update UnixTerminal import comments and check constraint * UnixTerminalType * Fix promise handling in poll functions to avoid test timeout * Fix Unix test: setTimeout await bug and add proper timeout * try only keepign catch done() * Fix CLOSE_RANGE_CLOEXEC build error on Alpine (microsoft#873) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> * Exclude unnecessary files from npm package * chore(deps-dev): bump tar from 7.4.4 to 7.5.3 Bumps [tar](https://github.com/isaacs/node-tar) from 7.4.4 to 7.5.3. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.4.4...v7.5.3) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump tar from 7.5.3 to 7.5.6 (microsoft#878) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.3 to 7.5.6. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.3...v7.5.6) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump lodash from 4.17.21 to 4.17.23 (microsoft#879) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.21...4.17.23) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.17.23 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: add stack-protector-strong flag (microsoft#880) * Add pixel size support to resize() * Align naming in native.d.ts to pixel_width, height * Better explain pixelSize in interfaces.ts and node-pty.d.ts * fix: /dev/ptmx leak on macOS (microsoft#882) * fix: /dev/ptmx leak on macOS * fix: flaky test * fix: ignore spawn_helper in process title getter * chore(deps-dev): bump tar from 7.5.6 to 7.5.7 Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.6 to 7.5.7. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.6...v7.5.7) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * fix: avoid blocking Node.js event loop in ConnectNamedPipe on Windows Fixes microsoft#763 The issue was that conptyNative.connect() called ConnectNamedPipe() synchronously for both input and output pipes. While the input pipe was connected via fs.openSync() before the call, the output pipe connection happened asynchronously in a worker thread. If the worker thread hadn't connected yet when ConnectNamedPipe was called, it would block the Node.js event loop waiting for the connection. This caused a deadlock when a debugger was attached (which slows down the event loop and worker thread startup). The fix defers the conptyNative.connect() call until the worker thread signals it has connected to the output pipe (via the onReady callback). This ensures both pipes have clients connected before ConnectNamedPipe is called, so it returns immediately without blocking. * test: add regression tests for deferred connection fix (microsoft#763) * Update README.md * test: add non-blocking event loop verification test (microsoft#763) * fix: add timeout fallback for worker connection (microsoft#763) If the worker fails to signal ready within 5 seconds, complete the connection anyway to avoid leaving the PTY in a zombie state. * fix: prevent deferred connection after kill() (microsoft#763) Clear _pendingPtyInfo in kill() to prevent the timeout or onReady callback from calling connect() on an already-killed PTY handle. * fix: update pid after agent connection completes (microsoft#763) The public pid property was only set once at construction, before the deferred connection. Update it in the ready_datapipe handler so users get the correct pid value. * test: verify pid is set after ready_datapipe (microsoft#763) Add test to ensure WindowsTerminal.pid is correctly updated after the deferred connection completes. This closes the test coverage gap for the public pid property. * Don't get process list on kill if not yet connected * Make lint happy * Prevent OOM in test * chore(deps-dev): bump tar from 7.5.7 to 7.5.9 (microsoft#888) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.7 to 7.5.9. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.7...v7.5.9) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump minimatch (microsoft#889) Bumps and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together. Updates `minimatch` from 3.1.2 to 3.1.5 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) Updates `minimatch` from 5.1.6 to 5.1.9 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) Updates `minimatch` from 9.0.5 to 9.0.9 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) --- updated-dependencies: - dependency-name: minimatch dependency-version: 3.1.5 dependency-type: indirect - dependency-name: minimatch dependency-version: 5.1.9 dependency-type: indirect - dependency-name: minimatch dependency-version: 9.0.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump tar from 7.5.9 to 7.5.11 (microsoft#896) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.9 to 7.5.11. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.9...v7.5.11) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.11 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix typo in documentation comment * release conpty 1.25 * Fix publishing pipeline to download prebuilds from current branch (microsoft#899) * Initial plan * Fix publishing pipeline to use current branch for prebuild artifact lookup Co-authored-by: rzhao271 <7199958+rzhao271@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> * chore(deps): bump picomatch (microsoft#903) Bumps and [picomatch](https://github.com/micromatch/picomatch). These dependencies needed to be updated together. Updates `picomatch` from 2.3.1 to 2.3.2 - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) Updates `picomatch` from 4.0.3 to 4.0.4 - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) --- updated-dependencies: - dependency-name: picomatch dependency-version: 2.3.2 dependency-type: indirect - dependency-name: picomatch dependency-version: 4.0.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: migrate to ESLint 9 with flat config (microsoft#895) * Initial plan * chore: migrate to ESLint 9 with flat config and typescript-eslint v8 Co-authored-by: rzhao271 <7199958+rzhao271@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> * chore: bump flatted from 3.4.1 to 3.4.2 (microsoft#906) Agent-Logs-Url: https://github.com/microsoft/node-pty/sessions/8da1ccd3-6de6-45a5-a9e8-e84269e612d3 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> * chore(deps-dev): bump brace-expansion from 1.1.12 to 1.1.13 (microsoft#908) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.12 to 1.1.13. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v1.1.12...v1.1.13) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.13 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump diff from 5.2.0 to 5.2.2 (microsoft#909) Bumps [diff](https://github.com/kpdecker/jsdiff) from 5.2.0 to 5.2.2. - [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md) - [Commits](kpdecker/jsdiff@v5.2.0...v5.2.2) --- updated-dependencies: - dependency-name: diff dependency-version: 5.2.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump electron from 35.7.5 to 39.8.4 in /examples/electron (microsoft#910) Bumps [electron](https://github.com/electron/electron) from 35.7.5 to 39.8.4. - [Release notes](https://github.com/electron/electron/releases) - [Commits](electron/electron@v35.7.5...v39.8.4) --- updated-dependencies: - dependency-name: electron dependency-version: 39.8.4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump electron from 39.8.4 to 39.8.5 in /examples/electron (microsoft#911) Bumps [electron](https://github.com/electron/electron) from 39.8.4 to 39.8.5. - [Release notes](https://github.com/electron/electron/releases) - [Commits](electron/electron@v39.8.4...v39.8.5) --- updated-dependencies: - dependency-name: electron dependency-version: 39.8.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump ip-address from 10.0.1 to 10.2.0 (microsoft#920) Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.0.1 to 10.2.0. - [Commits](https://github.com/beaugunderson/ip-address/commits) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(win): use-after-free from unsynchronized access to ptyhandles (microsoft#922) The windows backend keeps a global vector of `ptyHandles`. Since the cleanup of the baton was moved into the per-pty watcher thread (commit 17062cd): - The watcher thread called `remove_pty_baton` without any lock, racing with other watchers and with JS-thread reads. - `emplace_back` in `startProcess` could reallocate the vector while another thread was iterating it. * chore(deps-dev): bump brace-expansion from 5.0.5 to 5.0.6 (microsoft#925) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.5 to 5.0.6. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.5...v5.0.6) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 5.0.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Upgrade Electron example dependency to 42.2.0 (microsoft#928) * Initial plan * chore(examples/electron): update electron to 42.2.0 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Migrate linting to ESLint 10.4.0 (microsoft#927) * Initial plan * chore: bump eslint to 10.4.0 * chore: declare globals for eslint config --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * fix: close kqueue fd in SetupExitCallback on macOS (microsoft#931) SetupExitCallback opens a kqueue() per spawned pty to wait on NOTE_EXIT, but never closes it before the watcher thread returns, leaking one kqueue fd per pty.spawn() for the host process lifetime. The Chromium kill_mac.cc this is based on closes the kqueue via ScopedFD; the equivalent here is an explicit close(kq) once the kevent wait completes. * chore(deps): bump undici from 7.27.0 to 7.28.0 in /examples/electron (microsoft#930) Bumps [undici](https://github.com/nodejs/undici) from 7.27.0 to 7.28.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.27.0...v7.28.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.28.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 (microsoft#933) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.1...4.2.0) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump tar from 7.5.11 to 7.5.16 (microsoft#932) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.11 to 7.5.16. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.11...v7.5.16) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.16 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: close pipe handles and free attribute list when conpty spawn fails (microsoft#935) * fix: surface CreateProcessW failures as 'exit' instead of uncaughtException on Windows (microsoft#934) * chore: onboard to ADO feed (microsoft#936) * chore: onboard to ADO feed * Fix relative path * chore(deps-dev): bump tar from 7.5.16 to 7.5.22 (microsoft#941) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.16 to 7.5.22. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.16...v7.5.22) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.22 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * windows: avoid conPTY deadlock when debugger pauses conout worker (microsoft#943) The conPTY output connection is established on a worker thread before the main Node.js thread calls the native connect implementation. Calling conptyNative.connect() before that worker reports readiness is unsafe because the native implementation synchronously calls ConnectNamedPipe() for the input and output pipes. ETW stacks from the frozen Code - OSS agent host showed: agentHostTerminalManager._spawnPty -> node-pty.spawn -> WindowsTerminal -> WindowsPtyAgent -> ConoutConnection -> Worker The conout worker was stopped in the Node inspector startup message loop while processing Debugger.enable. Five seconds later, the agent-host event loop thread entered the WindowsPtyAgent timeout fallback and proceeded through conptyNative.connect() into NtFsControlFile/ConnectNamedPipe. Since the paused worker had not connected the output side, ConnectNamedPipe waited synchronously and blocked the event loop. Consequently, CDP's Runtime.enable request could not complete and the debugger attachment appeared frozen. The worker-ready handshake was originally introduced to prevent this deadlock, but a later timeout fallback called connect() anyway to avoid leaving the PTY in a zombie state. That fallback violated the handshake invariant and restored the blocking path under debugger induced worker delays. Make worker readiness a hard prerequisite for calling connect(): - Fail and clean up the pending PTY when the readiness watchdog expires instead of attempting the native connection. - Propagate worker startup errors and premature exits to WindowsPtyAgent. - Kill the pending native PTY, dispose the worker, destroy its sockets, and report the failure through onError. - Clear the watchdog after readiness, connection failure, or explicit kill. - Ignore readiness and error events arriving after timeout or termination. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * WIP * WIP * WIP * WIP * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update node-pty.d.ts * Verbose logging * Update prebuild.js * Update prebuilds.yml Update prebuilds.yml Update install-sysroot.js Update checksums.txt Update prebuilds.yml Update prebuilds.yml Update prebuilds.yml Update prebuilds.yml * Update prebuilds.yml * ia32 tweaks * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Validation * Revert "Merge branch 'main' into alpha-0.15.0" This reverts commit f2cf98c, reversing changes made to 69fe173. --------- Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Simon Lydell <simon.lydell@gmail.com> Co-authored-by: Devraj Mehta <devm33@github.com> Co-authored-by: Oliver Gassner <42lizard@42lizard.dev> Co-authored-by: huangcs <huangcs427@163.com> Co-authored-by: Zhou Qiankang <wszqkzqk@qq.com> Co-authored-by: Leonard Hecker <leonard@hecker.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: anthonykim1 <anthonykim@microsoft.com> Co-authored-by: Anthony Kim <62267334+anthonykim1@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Aditya Mandaleeka <adityam@microsoft.com> Co-authored-by: Amiya167 <naweilaite002@gmail.com> Co-authored-by: ritschwumm <ritschwumm@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Northern Man (NorthernMan54)
added a commit
to homebridge/node-pty-prebuilt-multiarch
that referenced
this pull request
Oct 29, 2026
* chore: remove old publishing stage (microsoft#761) * fix: restore conpty non-dll path (microsoft#766) * chore: add BinSkim flags to winpty (microsoft#767) * chore: add BinSkim flags to winpty * Apply PR feedback * conpty@1.22.250204002 * Change buffer size to 128KiB Fixes microsoft#765 * chore: match trigger with perf-bot's (microsoft#773) * chore: match exclude with latest conpty (microsoft#774) * chore: use folder wildcard (microsoft#775) * Revert "conpty@1.22.250204002" This reverts commit 247ae7d. * fix: gate conpty-exclusive call behind conpty check (microsoft#778) * Remove package-lock=false from .npmrc Missed this when migrating from yarn * Update brace-expansion * Remove npmrc unsafe perm doesn't seem to be needed * chore: create GitHub Actions workflow (microsoft#796) * chore: split compile commands to separate task (microsoft#801) * chore: lock node-gyp used for compile commands (microsoft#802) * feat: scaffolding for prebuilt files (microsoft#803) * feat: add prebuilds to published package (microsoft#804) * fix: add missing lines * Fix job names * Use Ubuntu for linux_arm64 * Add combining archive stage for prebuilds * Ref artifact from publish script * Add check for npm_config_build_from_source * simplify * chore: exclude Linux prebuilds (microsoft#805) * chore: fix publish pipeline parameters again (microsoft#806) * chore: fix mismatch between shell and command (microsoft#807) * Load native addons directly from prebuilds directory (microsoft#809) * Load native addons directly from prebuilds directory * feat: remove prebuilds when npm_config_build_from_source is set * feat: change the load order to local builds and unbundled first * chore: skip copying prebuilds to build dir * Update conpty to 1.23.251008001 Part of microsoft/vscode#224488 * Support Buffer in write API Part of microsoft/vscode#269213 * chore: exclude unscannable binaries * chore: update SDL flags (microsoft#815) * Add OpenBSD includes for termios and util Fix build for OpenBSD * add "Enjoy Git" Real-world Uses * chore: add D_FORTIFY_SOURCE flag (microsoft#820) * chore: re-enable 4244, 4267 * chore: npm audit fix * Remove excess quotes (microsoft#823) * chore: use UseNode (microsoft#824) * feat: support to build with mingw-w64 in windows * Use standard -lshlwapi in binding.gyp so gyp/node-gyp can handle linking for both mingw-w64 and MSVC, enabling builds with mingw-w64. Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com> * fix: delete all prebuilds if not using any (microsoft#829) * chore: remove ADO CI (microsoft#826) * fix: do not delete for mismatch (microsoft#830) * Speculative fix for stream backpressure Part of microsoft/vscode#283056 Part of microsoft/vscode#246204 * Add additional change needed to fix it * Use raw write stream, handle partial writes/kernel backpressure * Remove unneeded write stream * Remove unwanted logs * Tidy up comments * Add setting of encoding on the read socket back * Move props to top * Use os.constants.errno * Revert "Use os.constants.errno" This reverts commit 6bb38cc. errno.EAGAIN is coming through as 35 (positive) on macOS, not -35. * Ensure partial writes are handled on EAGAIN Following up on microsoft#831 * Fix string slicing for fs.write * Bring comments and timeouts back (for now) * Remove use of any * Remove timeouts and update details in comments Fixes microsoft#833 * Encapsulate write queue in separate class Fixes microsoft#838 * Add default watch task * Avoid excessive listeners on data and other events Fixes microsoft#215 * Bump v1.1 * Add contributing file Fixes microsoft#836 * Update electron example - Get working on Windows by moving node-pty into main proc - Fix eslint warnings Fixes microsoft#821 * chore(deps): bump electron from 33.4.11 to 35.7.5 in /examples/electron Bumps [electron](https://github.com/electron/electron) from 33.4.11 to 35.7.5. - [Release notes](https://github.com/electron/electron/releases) - [Commits](electron/electron@v33.4.11...v35.7.5) --- updated-dependencies: - dependency-name: electron dependency-version: 35.7.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update electron example to xterm 6 * Point at local node-pty * Update contributing * Remove node-pty dep * Pass error details in apple spawn exception Part of microsoft#845 * Add sysroot to compile Linux prebuilds against glibc 2.28 (microsoft#853) * Add sysroot to compile Linux prebuilds against glibc 2.28 Fixes microsoft#851 * Add CI check for glibc version * Fix linker flags to include sysroot library paths * Revert package-lock change * Ensure 755 permissions on prebuild spawn-helper Fixes microsoft#850 * Pin Python 3.12 * Set compiler on mac too * Fix linux arm compiling and add CI for cross-compiled builds (microsoft#857) * Remove duplicate slash * Run CI on cross-arch builds * Install cross-arch compiler * Install cross-arch compiler for azure pipeline * chore: enable warning 4146 (microsoft#861) * chore: elevate warnings to errors (microsoft#862) Exclude winpty from this process because it is legacy code. * fix: ensure spawn-helper is executable for macos prebuilds Fixes microsoft#850 * fix: Use authenticated download for sysroot to avoid rate limiting * fix: add parsing to reduce flakiness on macOS * chore: set -e to make failure point clear * chore: direct debug logs to stderr * chore: add log for token use in downloading sysroot * Revert "Ensure 755 permissions on prebuild spawn-helper" This reverts commit d08cd36. * fix: close inherited file descriptors in child process on Linux Prevents leaking file descriptors (pty master FDs, sockets, etc.) to child processes spawned via forkpty(). Uses close_range() syscall on Linux 5.9+, falling back to /proc/self/fd iteration, then brute force. macOS already handles this via POSIX_SPAWN_CLOEXEC_DEFAULT flag. Fixes microsoft#657 Part of microsoft/vscode#58814 * chore: update Actions CI to use native runners instead of cross-compilation (microsoft#865) * chore: update Actions CI to use native runners instead of cross-compilation * Remove cross-compiler installation for linux-arm * chore: move lint to a separate job * Skip compiling native addon for lint job Co-authored-by: Simon Lydell <simon.lydell@gmail.com> * ci: switch to using native objdump in verify-glibc script --------- Co-authored-by: Simon Lydell <simon.lydell@gmail.com> * Remove support for winpty * Remove winpty.cc , references in native.d.ts * Remove winpty from windowsPtyAgent.ts * Remove useConpty as that's default now * index.js, post-install.js, spam-close.js * README.md winpty support removed note * Remove dep\winpty * Remove useConpty from test.ts since we got rid of it * See if import were problem for pty.node (old winpty binding) * More conditional unixTerminal file import * See if unixTerminal as UnixTerminalType would help * Stop messing with UnixTerminal camelCase * We dont want to fall back to winpty * Update src/unix/pty.cc Co-authored-by: Robo <hop2deep@gmail.com> * Update src/unix/pty.cc Co-authored-by: Robo <hop2deep@gmail.com> * Polish * Add SetCloseOnExec * chore: remove fortify-source flag * chore: polish prebuilds pipeline * chore: add explicit include * Scrap explicit include in case of gyp or other changes * chore: force commit hashes to match * Update src/win/conpty.cc Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> * Update src/win/conpty.cc Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> * Only add back interface of useConpty + deprecation message * Update typings/node-pty.d.ts Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> * Delete emulation in winpty is deprecated * See if we can remove conditional check for UnixTerminal * Try doing the conditional import again on UnixTerminal.test.ts * Trigger CI rebuild * Update UnixTerminal import comments and check constraint * UnixTerminalType * Fix promise handling in poll functions to avoid test timeout * Fix Unix test: setTimeout await bug and add proper timeout * try only keepign catch done() * Fix CLOSE_RANGE_CLOEXEC build error on Alpine (microsoft#873) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> * Exclude unnecessary files from npm package * chore(deps-dev): bump tar from 7.4.4 to 7.5.3 Bumps [tar](https://github.com/isaacs/node-tar) from 7.4.4 to 7.5.3. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.4.4...v7.5.3) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps-dev): bump tar from 7.5.3 to 7.5.6 (microsoft#878) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.3 to 7.5.6. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.3...v7.5.6) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump lodash from 4.17.21 to 4.17.23 (microsoft#879) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.21...4.17.23) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.17.23 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: add stack-protector-strong flag (microsoft#880) * Add pixel size support to resize() * Align naming in native.d.ts to pixel_width, height * Better explain pixelSize in interfaces.ts and node-pty.d.ts * fix: /dev/ptmx leak on macOS (microsoft#882) * fix: /dev/ptmx leak on macOS * fix: flaky test * fix: ignore spawn_helper in process title getter * chore(deps-dev): bump tar from 7.5.6 to 7.5.7 Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.6 to 7.5.7. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.6...v7.5.7) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * fix: avoid blocking Node.js event loop in ConnectNamedPipe on Windows Fixes microsoft#763 The issue was that conptyNative.connect() called ConnectNamedPipe() synchronously for both input and output pipes. While the input pipe was connected via fs.openSync() before the call, the output pipe connection happened asynchronously in a worker thread. If the worker thread hadn't connected yet when ConnectNamedPipe was called, it would block the Node.js event loop waiting for the connection. This caused a deadlock when a debugger was attached (which slows down the event loop and worker thread startup). The fix defers the conptyNative.connect() call until the worker thread signals it has connected to the output pipe (via the onReady callback). This ensures both pipes have clients connected before ConnectNamedPipe is called, so it returns immediately without blocking. * test: add regression tests for deferred connection fix (microsoft#763) * Update README.md * test: add non-blocking event loop verification test (microsoft#763) * fix: add timeout fallback for worker connection (microsoft#763) If the worker fails to signal ready within 5 seconds, complete the connection anyway to avoid leaving the PTY in a zombie state. * fix: prevent deferred connection after kill() (microsoft#763) Clear _pendingPtyInfo in kill() to prevent the timeout or onReady callback from calling connect() on an already-killed PTY handle. * fix: update pid after agent connection completes (microsoft#763) The public pid property was only set once at construction, before the deferred connection. Update it in the ready_datapipe handler so users get the correct pid value. * test: verify pid is set after ready_datapipe (microsoft#763) Add test to ensure WindowsTerminal.pid is correctly updated after the deferred connection completes. This closes the test coverage gap for the public pid property. * Don't get process list on kill if not yet connected * Make lint happy * Prevent OOM in test * chore(deps-dev): bump tar from 7.5.7 to 7.5.9 (microsoft#888) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.7 to 7.5.9. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.7...v7.5.9) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump minimatch (microsoft#889) Bumps and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together. Updates `minimatch` from 3.1.2 to 3.1.5 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) Updates `minimatch` from 5.1.6 to 5.1.9 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) Updates `minimatch` from 9.0.5 to 9.0.9 - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) --- updated-dependencies: - dependency-name: minimatch dependency-version: 3.1.5 dependency-type: indirect - dependency-name: minimatch dependency-version: 5.1.9 dependency-type: indirect - dependency-name: minimatch dependency-version: 9.0.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump tar from 7.5.9 to 7.5.11 (microsoft#896) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.9 to 7.5.11. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.9...v7.5.11) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.11 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix typo in documentation comment * release conpty 1.25 * Fix publishing pipeline to download prebuilds from current branch (microsoft#899) * Initial plan * Fix publishing pipeline to use current branch for prebuild artifact lookup Co-authored-by: rzhao271 <7199958+rzhao271@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> * chore(deps): bump picomatch (microsoft#903) Bumps and [picomatch](https://github.com/micromatch/picomatch). These dependencies needed to be updated together. Updates `picomatch` from 2.3.1 to 2.3.2 - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) Updates `picomatch` from 4.0.3 to 4.0.4 - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) --- updated-dependencies: - dependency-name: picomatch dependency-version: 2.3.2 dependency-type: indirect - dependency-name: picomatch dependency-version: 4.0.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: migrate to ESLint 9 with flat config (microsoft#895) * Initial plan * chore: migrate to ESLint 9 with flat config and typescript-eslint v8 Co-authored-by: rzhao271 <7199958+rzhao271@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> * chore: bump flatted from 3.4.1 to 3.4.2 (microsoft#906) Agent-Logs-Url: https://github.com/microsoft/node-pty/sessions/8da1ccd3-6de6-45a5-a9e8-e84269e612d3 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> * chore(deps-dev): bump brace-expansion from 1.1.12 to 1.1.13 (microsoft#908) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.12 to 1.1.13. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v1.1.12...v1.1.13) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.13 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump diff from 5.2.0 to 5.2.2 (microsoft#909) Bumps [diff](https://github.com/kpdecker/jsdiff) from 5.2.0 to 5.2.2. - [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md) - [Commits](kpdecker/jsdiff@v5.2.0...v5.2.2) --- updated-dependencies: - dependency-name: diff dependency-version: 5.2.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump electron from 35.7.5 to 39.8.4 in /examples/electron (microsoft#910) Bumps [electron](https://github.com/electron/electron) from 35.7.5 to 39.8.4. - [Release notes](https://github.com/electron/electron/releases) - [Commits](electron/electron@v35.7.5...v39.8.4) --- updated-dependencies: - dependency-name: electron dependency-version: 39.8.4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump electron from 39.8.4 to 39.8.5 in /examples/electron (microsoft#911) Bumps [electron](https://github.com/electron/electron) from 39.8.4 to 39.8.5. - [Release notes](https://github.com/electron/electron/releases) - [Commits](electron/electron@v39.8.4...v39.8.5) --- updated-dependencies: - dependency-name: electron dependency-version: 39.8.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump ip-address from 10.0.1 to 10.2.0 (microsoft#920) Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.0.1 to 10.2.0. - [Commits](https://github.com/beaugunderson/ip-address/commits) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(win): use-after-free from unsynchronized access to ptyhandles (microsoft#922) The windows backend keeps a global vector of `ptyHandles`. Since the cleanup of the baton was moved into the per-pty watcher thread (commit 17062cd): - The watcher thread called `remove_pty_baton` without any lock, racing with other watchers and with JS-thread reads. - `emplace_back` in `startProcess` could reallocate the vector while another thread was iterating it. * chore(deps-dev): bump brace-expansion from 5.0.5 to 5.0.6 (microsoft#925) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.5 to 5.0.6. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.5...v5.0.6) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 5.0.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Upgrade Electron example dependency to 42.2.0 (microsoft#928) * Initial plan * chore(examples/electron): update electron to 42.2.0 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Migrate linting to ESLint 10.4.0 (microsoft#927) * Initial plan * chore: bump eslint to 10.4.0 * chore: declare globals for eslint config --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * fix: close kqueue fd in SetupExitCallback on macOS (microsoft#931) SetupExitCallback opens a kqueue() per spawned pty to wait on NOTE_EXIT, but never closes it before the watcher thread returns, leaking one kqueue fd per pty.spawn() for the host process lifetime. The Chromium kill_mac.cc this is based on closes the kqueue via ScopedFD; the equivalent here is an explicit close(kq) once the kevent wait completes. * chore(deps): bump undici from 7.27.0 to 7.28.0 in /examples/electron (microsoft#930) Bumps [undici](https://github.com/nodejs/undici) from 7.27.0 to 7.28.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.27.0...v7.28.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.28.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 (microsoft#933) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.1...4.2.0) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump tar from 7.5.11 to 7.5.16 (microsoft#932) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.11 to 7.5.16. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.11...v7.5.16) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.16 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: close pipe handles and free attribute list when conpty spawn fails (microsoft#935) * fix: surface CreateProcessW failures as 'exit' instead of uncaughtException on Windows (microsoft#934) * chore: onboard to ADO feed (microsoft#936) * chore: onboard to ADO feed * Fix relative path * chore(deps-dev): bump tar from 7.5.16 to 7.5.22 (microsoft#941) Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.16 to 7.5.22. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v7.5.16...v7.5.22) --- updated-dependencies: - dependency-name: tar dependency-version: 7.5.22 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * windows: avoid conPTY deadlock when debugger pauses conout worker (microsoft#943) The conPTY output connection is established on a worker thread before the main Node.js thread calls the native connect implementation. Calling conptyNative.connect() before that worker reports readiness is unsafe because the native implementation synchronously calls ConnectNamedPipe() for the input and output pipes. ETW stacks from the frozen Code - OSS agent host showed: agentHostTerminalManager._spawnPty -> node-pty.spawn -> WindowsTerminal -> WindowsPtyAgent -> ConoutConnection -> Worker The conout worker was stopped in the Node inspector startup message loop while processing Debugger.enable. Five seconds later, the agent-host event loop thread entered the WindowsPtyAgent timeout fallback and proceeded through conptyNative.connect() into NtFsControlFile/ConnectNamedPipe. Since the paused worker had not connected the output side, ConnectNamedPipe waited synchronously and blocked the event loop. Consequently, CDP's Runtime.enable request could not complete and the debugger attachment appeared frozen. The worker-ready handshake was originally introduced to prevent this deadlock, but a later timeout fallback called connect() anyway to avoid leaving the PTY in a zombie state. That fallback violated the handshake invariant and restored the blocking path under debugger induced worker delays. Make worker readiness a hard prerequisite for calling connect(): - Fail and clean up the pending PTY when the readiness watchdog expires instead of attempting the native connection. - Propagate worker startup errors and premature exits to WindowsPtyAgent. - Kill the pending native PTY, dispose the worker, destroy its sockets, and report the failure through onError. - Clear the watchdog after readiness, connection failure, or explicit kill. - Ignore readiness and error events arriving after timeout or termination. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * WIP * WIP * WIP * WIP * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update node-pty.d.ts * Verbose logging * Update prebuild.js * chore(deps): bump brace-expansion (microsoft#945) Bumps and [brace-expansion](https://github.com/juliangruber/brace-expansion). These dependencies needed to be updated together. Updates `brace-expansion` from 5.0.6 to 5.0.9 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.6...v5.0.9) Updates `brace-expansion` from 2.1.0 to 2.1.4 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.6...v5.0.9) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 5.0.9 dependency-type: indirect - dependency-name: brace-expansion dependency-version: 2.1.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump js-yaml from 4.2.0 to 4.3.1 (microsoft#949) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.2.0 to 4.3.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.1/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.2.0...4.3.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.3.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump ip-address from 10.2.0 to 10.4.0 (microsoft#944) Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.2.0 to 10.4.0. - [Release notes](https://github.com/beaugunderson/ip-address/releases) - [Commits](beaugunderson/ip-address@v10.2.0...v10.4.0) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.4.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump undici from 7.28.0 to 7.29.0 in /examples/electron (microsoft#946) Bumps [undici](https://github.com/nodejs/undici) from 7.28.0 to 7.29.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.28.0...v7.29.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.29.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Pin GitHub Actions to full-length commit SHAs (microsoft#958) * chore(deps): bump the github-actions group with 2 updates (microsoft#959) Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-node](https://github.com/actions/setup-node). Updates `actions/checkout` from 4.4.0 to 7.0.1 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@11d5960...3d3c42e) Updates `actions/setup-node` from 4.4.0 to 7.0.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@49933ea...8207627) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump electron from 42.2.0 to 42.5.1 in /examples/electron (microsoft#948) Bumps [electron](https://github.com/electron/electron) from 42.2.0 to 42.5.1. - [Release notes](https://github.com/electron/electron/releases) - [Commits](electron/electron@v42.2.0...v42.5.1) --- updated-dependencies: - dependency-name: electron dependency-version: 42.5.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update prebuilds.yml Update prebuilds.yml Update install-sysroot.js Update checksums.txt Update prebuilds.yml Update prebuilds.yml Update prebuilds.yml Update prebuilds.yml * Update prebuilds.yml * ia32 tweaks * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Update prebuilds.yml * Validation * chore: restore repository ownership and dependency settings * chore: exclude debug symbols from npm package * Workflow naming * ci: update github actions to their latest versions (#109) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Refresh 0.15.0 onto upstream node-pty 3d2987d and fix the prebuild matrix (#111) * chore(deps-dev): bump @humanfs/node from 0.16.7 to 0.16.8 (microsoft#964) 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> * chore(deps-dev): bump js-yaml from 4.3.1 to 4.3.2 (microsoft#968) 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> * chore(deps-dev): bump ip-address from 10.4.0 to 10.7.2 (microsoft#979) 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> * chore(deps): bump electron from 42.5.1 to 42.10.0 in /examples/electron (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> * Upgrade Mocha dependencies to v12 (microsoft#981) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> * chore(deps): bump brace-expansion (microsoft#984) 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> * chore(deps-dev): bump serialize-javascript from 7.1.1 to 7.1.2 (microsoft#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> * chore(deps): bump undici from 7.29.0 to 7.30.0 in /examples/electron (microsoft#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> * chore(deps): bump actions/setup-node (microsoft#992) 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 ConptyReparentPseudoConsole support 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. * Address review: native kill guard, return value, parent re-enable - 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. * Don't mark conptyParentWindow and setParentWindow as experimental conpty.dll is no longer experimental, so the APIs added on top of it are documented as regular APIs. * Address review: make re-enabling the parent window opt-in - 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. * Don't call the parent window re-enable a heuristic 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. * Keep setParentWindow as the only new API 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. * Upgrade node-gyp for Visual Studio 2026 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Delay newly published npm dependencies Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * build: use Node 24's bundled node-gyp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * build: pin Node 24.18.0 in CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(win): collect console processes before closing ConPTY Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "fix(win): collect console processes before closing ConPTY" This reverts commit 271faf3. * Address review: accept only unsigned, pointer-sized window handles 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. * Reword the window handle comment and test name 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. * Address review: take the window handle as a Buffer 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. * Use Node 24 in the publish pipeline Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update Node.js to 24.22.1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use npm 11.6.3 for Azure Artifacts publishing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Document beta version selection Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Keep beta version documentation with its lookup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Reapply Homebridge prebuilt-multiarch changes on upstream 3d2987d 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> * chore: drop the Node <27 engines cap Prebuilds are N-API, so a new Node major needs no new binaries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: warn instead of failing on devEngines 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> * ci(ia32): build from archive.debian.org with node-gyp 11 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> * ci: build and test prebuilds on Node 24.22.1, as upstream CI does 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> * ci(ia32): run node-gyp 11 from its own prefix 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> * ci(ia32): drop an apostrophe that broke the container's quoted script Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> Co-authored-by: anthonykim1 <anthonykim@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Anthony Kim <62267334+anthonykim1@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Co-authored-by: Devraj Mehta <devm33@github.com> Co-authored-by: Oliver Gassner <42lizard@42lizard.dev> Co-authored-by: huangcs <huangcs427@163.com> Co-authored-by: Zhou Qiankang <wszqkzqk@qq.com> Co-authored-by: Leonard Hecker <leonard@hecker.io> Co-authored-by: Simon Lydell <simon.lydell@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: anthonykim1 <anthonykim@microsoft.com> Co-authored-by: Anthony Kim <62267334+anthonykim1@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Aditya Mandaleeka <adityam@microsoft.com> Co-authored-by: Amiya167 <naweilaite002@gmail.com> Co-authored-by: ritschwumm <ritschwumm@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Dan Fiedler <151573964+danfiedler-msft@users.noreply.github.com> Co-authored-by: Ben <43026681+bwp91@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds onto #803 and #794.
This PR fixes up the new native prebuilds ADO pipeline to produce a combined artifact, and it allows the ADO publishing pipeline to consume that artifact.