Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bun-pty for openSUSE:Factory checked 
in at 2026-11-06 19:58:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bun-pty (Old)
 and      /work/SRC/openSUSE:Factory/.bun-pty.new.3759290 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bun-pty"

Fri Nov  6 19:58:18 2026 rev:6 rq:1395824 version:0.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/bun-pty/bun-pty.changes  2026-10-27 
16:49:07.561899106 +0100
+++ /work/SRC/openSUSE:Factory/.bun-pty.new.3759290/bun-pty.changes     
2026-11-06 20:04:57.924816328 +0100
@@ -1,0 +2,14 @@
+Fri Nov  6 07:40:31 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 0.6.0:
+  * Breaking: Bun 1.4.0 or newer is required (engine-native
+    bun:ffi); the JavaScript API is unchanged
+  * Length argument of bun_pty_read/bun_pty_write is now usize:
+    rebuild any self-built native library pointed to by
+    BUN_PTY_LIB from this version
+  * write() with an empty string no longer throws on Bun 1.4;
+    library load failures now include the dlerror() message
+  * Refresh the vendored dependencies (lazy_static 1.5,
+    crossbeam 0.8.5, shell-words 1.1.1)
+
+-------------------------------------------------------------------

Old:
----
  bun-pty-0.5.2.tar.gz

New:
----
  bun-pty-0.6.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bun-pty.spec ++++++
--- /var/tmp/diff_new_pack.uQubDt/_old  2026-11-06 20:04:59.817895606 +0100
+++ /var/tmp/diff_new_pack.uQubDt/_new  2026-11-06 20:04:59.821895773 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           bun-pty
-Version:        0.5.2
+Version:        0.6.0
 Release:        0
 Summary:        Pseudo-terminal library for Bun FFI consumers
 License:        MIT
@@ -27,6 +27,7 @@
 URL:            https://github.com/sursaone/bun-pty
 Source0:        
https://github.com/sursaone/bun-pty/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Source1:        vendor.tar.zst
+# Source-Binary-Exception: 
vendor.tar.zst:rust-pty/vendor/winapi-*-gnu-*/lib/*.a -- other-platform: 
Windows MinGW import libraries the Linux build never links
 BuildRequires:  cargo-packaging
 ExclusiveArch:  %{rust_tier1_arches}
 
@@ -45,13 +46,19 @@
 # leave the debuginfo package empty.
 export CARGO_PROFILE_RELEASE_STRIP=none
 # The vendor tarball unpacks next to the crate, so cargo has to run there
-# to see its .cargo/config.toml; the macro still writes to ../target.
+# to see its .cargo/config.toml; the library lands in rust-pty/target.
 cd rust-pty
-%{cargo_build}
+%cargo_build
 
 %install
-install -Dpm 0755 target/release/librust_pty.so \
-    %{buildroot}%{_libdir}/%{name}/librust_pty.so
+# CARGO_TARGET_DIR moved across cargo-packaging vintages (top-level
+# target/ vs rust-pty/target/): install whichever the build produced.
+lib=
+for d in target/release rust-pty/target/release; do
+    [ -f "$d/librust_pty.so" ] && lib="$d/librust_pty.so"
+done
+[ -n "$lib" ] || { echo "librust_pty.so not found"; exit 1; }
+install -Dpm 0755 "$lib" %{buildroot}%{_libdir}/%{name}/librust_pty.so
 
 %check
 # All eight entry points the TypeScript side dlopens.

++++++ _service ++++++
--- /var/tmp/diff_new_pack.uQubDt/_old  2026-11-06 20:04:59.954901344 +0100
+++ /var/tmp/diff_new_pack.uQubDt/_new  2026-11-06 20:04:59.968901930 +0100
@@ -1,6 +1,6 @@
 <services>
   <service name="cargo_vendor" mode="manual">
-    <param name="srctar">bun-pty-0.5.2.tar.gz</param>
+    <param name="srctar">bun-pty-0.6.0.tar.gz</param>
     <param name="cargotoml">rust-pty/Cargo.toml</param>
     <param name="compression">zst</param>
   </service>

++++++ bun-pty-0.5.2.tar.gz -> bun-pty-0.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/.github/workflows/publish.yml 
new/bun-pty-0.6.0/.github/workflows/publish.yml
--- old/bun-pty-0.5.2/.github/workflows/publish.yml     2026-10-26 
05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/.github/workflows/publish.yml     2026-10-30 
07:43:50.000000000 +0100
@@ -53,7 +53,9 @@
             rustflags: -C target-feature=+crt-static
 
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v7
+        with:
+          persist-credentials: false
 
       - name: Install Rust
         uses: dtolnay/rust-toolchain@stable
@@ -93,14 +95,14 @@
           [[ ${#src[@]} -gt 0 ]] || { echo "❌ no lib"; exit 1; }
           cp "${src[0]}" "out/${{ matrix.out }}"
 
-      - uses: actions/upload-artifact@v4
+      - uses: actions/upload-artifact@v7
         with:
           name: compiled-libs-${{ matrix.target }}
           path: out/*
 
       - name: Upload to GitHub Release
         if: github.event_name == 'release'
-        uses: softprops/action-gh-release@v1
+        uses: softprops/action-gh-release@v3
         with:
           files: out/*
           fail_on_unmatched_files: true
@@ -110,14 +112,16 @@
     runs-on: ubuntu-latest
 
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v7
+        with:
+          persist-credentials: false
       - name: Set up Node
-        uses: actions/setup-node@v4
+        uses: actions/setup-node@v7
         with:
           node-version: 24
           registry-url: https://registry.npmjs.org/
 
-      - uses: oven-sh/setup-bun@v1
+      - uses: oven-sh/setup-bun@v2
         with:
           bun-version: latest
 
@@ -125,7 +129,7 @@
         run: bun install
 
       - name: Download all compiled libs
-        uses: actions/download-artifact@v4
+        uses: actions/download-artifact@v8
         with:
           path: downloaded-libs
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/.github/workflows/test.yml 
new/bun-pty-0.6.0/.github/workflows/test.yml
--- old/bun-pty-0.5.2/.github/workflows/test.yml        2026-10-26 
05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/.github/workflows/test.yml        2026-10-30 
07:43:50.000000000 +0100
@@ -18,6 +18,11 @@
           - runner: ubuntu-latest
             target: x86_64-unknown-linux-gnu
             zigbuild_target: x86_64-unknown-linux-gnu.2.17
+          # The oldest Bun that package.json "engines" allows
+          - runner: ubuntu-latest
+            target: x86_64-unknown-linux-gnu
+            zigbuild_target: x86_64-unknown-linux-gnu.2.17
+            bun-version: 1.4.0
           - runner: macos-latest
             target: x86_64-apple-darwin
           - runner: macos-latest
@@ -29,12 +34,12 @@
             rustflags: -C target-feature=+crt-static
 
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v7
 
       - name: Install Bun
         uses: oven-sh/setup-bun@v2
         with:
-          bun-version: latest
+          bun-version: ${{ matrix.bun-version || 'latest' }}
 
       - name: Install Rust
         uses: dtolnay/rust-toolchain@stable
@@ -66,6 +71,11 @@
       - name: Install dependencies
         run: bun install
 
+      # bun check arrived in Bun 1.4.3, so skip it on the pinned 1.4.0 job
+      - name: Type check
+        if: runner.os == 'Linux' && !matrix.bun-version
+        run: bun run typecheck
+
       - name: Prepare Windows ARM64 library
         if: matrix.target == 'aarch64-pc-windows-msvc'
         shell: pwsh
@@ -86,16 +96,16 @@
 
       - name: Upload coverage to artifacts
         if: always()
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v7
         with:
-          name: coverage-${{ matrix.runner }}-${{ matrix.target }}
+          name: coverage-${{ matrix.runner }}-${{ matrix.target }}-bun-${{ 
matrix.bun-version || 'latest' }}
           path: coverage/lcov.info
           if-no-files-found: ignore
 
   build-musl-lib:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v7
 
       - name: Install Rust
         uses: dtolnay/rust-toolchain@stable
@@ -115,7 +125,7 @@
         run: cd rust-pty && cargo zigbuild --release --target 
x86_64-unknown-linux-musl
 
       - name: Upload musl library
-        uses: actions/upload-artifact@v4
+        uses: actions/upload-artifact@v7
         with:
           name: librust_pty_musl
           path: 
rust-pty/target/x86_64-unknown-linux-musl/release/librust_pty.so
@@ -124,15 +134,15 @@
     needs: build-musl-lib
     runs-on: ubuntu-latest
     container:
-      image: alpine:3.23
+      image: alpine:3.24
     steps:
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v7
 
       - name: Install system dependencies
         run: apk add --no-cache bash curl libgcc libstdc++
 
       - name: Download musl library
-        uses: actions/download-artifact@v4
+        uses: actions/download-artifact@v8
         with:
           name: librust_pty_musl
           path: rust-pty/target/release/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/CHANGELOG.md 
new/bun-pty-0.6.0/CHANGELOG.md
--- old/bun-pty-0.5.2/CHANGELOG.md      2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/CHANGELOG.md      2026-10-30 07:43:50.000000000 +0100
@@ -5,6 +5,24 @@
 The format is based on [Keep a 
Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic 
Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [0.6.0] - 2026-10-30
+
+### Changed
+- **Breaking:** bun-pty now requires Bun 1.4.0 or newer (#52)
+  - It uses the engine-native `bun:ffi` that arrived in Bun 1.4, which Bun 
reports as up to 3x faster per call
+  - On an older Bun, importing still works and `spawn()` throws "bun-pty needs 
Bun 1.4.0 or newer"; run `bun upgrade`
+- Reads and writes pass the buffer and its byte length as one view (`"buffer"` 
+ `"buffer_length"`), so the two cannot disagree; the command line and `cwd` go 
to the native library as plain strings (#52)
+  - The `bun_pty_read` and `bun_pty_write` length argument is now `usize`; a 
custom library set with `BUN_PTY_LIB` must be built from this version
+- Library load failures now include the operating system's `dlerror()` message 
(Bun 1.4)
+
+### Fixed
+- `write("")` no longer throws `bun:ffi cannot convert argument to 'ptr'` on 
Bun 1.4 (#52)
+
+### Internal
+- Update `@types/bun` 1.4.4, `@types/node` 26.6.6 and TypeScript 7.0.2, and 
move `bun.lock` to version 2 (#52)
+- Update the Rust crates; `portable-pty` stays at 0.8.1 because of 
wezterm/wezterm#6783 (#52)
+- Update GitHub Actions to their current major versions, drop persisted 
checkout credentials in the publish workflow, test on Alpine 3.24 and on Bun 
1.4.0, and add a `bun check` type check (`bun run typecheck`) (#52)
+
 ## [0.5.2] - 2026-10-26
 
 ### Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/CONTRIBUTING.md 
new/bun-pty-0.6.0/CONTRIBUTING.md
--- old/bun-pty-0.5.2/CONTRIBUTING.md   2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/CONTRIBUTING.md   2026-10-30 07:43:50.000000000 +0100
@@ -87,6 +87,9 @@
 
 # Run all tests
 bun run test:all
+
+# Type check the sources and tests
+bun run typecheck
 ```
 
 ## Project Structure
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/README.md new/bun-pty-0.6.0/README.md
--- old/bun-pty-0.5.2/README.md 2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/README.md 2026-10-30 07:43:50.000000000 +0100
@@ -2,7 +2,7 @@
 
 [![NPM 
Version](https://img.shields.io/npm/v/bun-pty.svg)](https://www.npmjs.com/package/bun-pty)
 [![License: 
MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
-[![Bun 
Compatible](https://img.shields.io/badge/Bun-%E2%89%A51.0.0-black)](https://bun.sh)
+[![Bun 
Compatible](https://img.shields.io/badge/Bun-%E2%89%A51.4.0-black)](https://bun.sh)
 
 A cross-platform pseudo-terminal (PTY) implementation for Bun, powered by 
Rust's portable-pty library and Bun's FFI capabilities.
 
@@ -23,7 +23,7 @@
 
 ## ⚙️ Requirements
 
-- **Bun** 1.0.0 or higher
+- **Bun** 1.4.0 or higher (bun-pty uses the engine-native `bun:ffi` added in 
Bun 1.4)
 - **Rust** is only needed if you're building from source (the npm package 
includes pre-built binaries)
 
 ## 📋 Platform Support
@@ -34,6 +34,16 @@
 | Linux    | ✅     | Fully supported |
 | Windows  | ✅     | Fully supported |
 
+## 🆚 bun-pty or `Bun.Terminal`?
+
+Bun 1.4 has a built-in PTY, 
[`Bun.Terminal`](https://bun.com/docs/runtime/child-process#terminal-pty-support)
 (`Bun.spawn({ terminal })`). If you are writing new code and only need Bun's 
own API, try it first: it needs no native library.
+
+bun-pty is the better fit when you want:
+
+- **The core of the node-pty API** - `spawn()`, `write()`, `onData`, `onExit`, 
`resize()` and `kill()`, with node-pty's option and event shapes, so code that 
sticks to these ports with little or no change. Not supported: the `uid`, 
`gid`, `encoding`, `handleFlowControl` and `useConpty` options, and `pause()`, 
`resume()` and `clear()`
+- **node-pty's environment rules** - `env` is the child's whole environment, 
`TERM` comes from `name`, and `PWD` follows `cwd`
+- **The same backend on every platform** - one Rust 
([portable-pty](https://crates.io/crates/portable-pty)) implementation on 
macOS, Linux (glibc and musl) and Windows (x64 and ARM64)
+
 ## 🚦 Usage
 
 ### Basic Example
@@ -204,6 +214,9 @@
 
 # View test coverage
 bun run test:coverage
+
+# Type check the sources and tests (bun check, Bun 1.4.3+)
+bun run typecheck
 ```
 
 ## 🔧 Building from Source
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/bun.lock new/bun-pty-0.6.0/bun.lock
--- old/bun-pty-0.5.2/bun.lock  2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/bun.lock  2026-10-30 07:43:50.000000000 +0100
@@ -1,25 +1,65 @@
 {
-  "lockfileVersion": 1,
-  "configVersion": 0,
+  "lockfileVersion": 2,
+  "configVersion": 1,
   "workspaces": {
     "": {
       "name": "bun-pty",
       "devDependencies": {
-        "@types/bun": "1.3.3",
-        "@types/node": "24.10.1",
-        "typescript": "5.9.3",
+        "@types/bun": "1.4.4",
+        "@types/node": "26.6.6",
+        "typescript": "7.0.2",
       },
     },
   },
   "packages": {
-    "@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": 
"1.3.3" } }, 
"sha512-ogrKbJ2X5N0kWLLFKeytG0eHDleBYtngtlbu9cyBKFtNL3cnpDZkNdQj8flVf6WTZUX5ulI9AY1oa7ljhSrp+g=="],
+    "@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": 
"1.4.4" } }, 
"sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="],
 
-    "@types/node": ["@types/[email protected]", "", { "dependencies": { 
"undici-types": "~7.16.0" } }, 
"sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ=="],
+    "@types/node": ["@types/[email protected]", "", { "dependencies": { 
"undici-types": "~8.9.0" } }, 
"sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="],
 
-    "bun-types": ["[email protected]", "", { "dependencies": { "@types/node": 
"*" } }, 
"sha512-z3Xwlg7j2l9JY27x5Qn3Wlyos8YAp0kKRlrePAOjgjMGS5IG6E7Jnlx736vH9UVI4wUICwwhC9anYL++XeOgTQ=="],
+    "@typescript/typescript-aix-ppc64": 
["@typescript/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, 
"sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],
 
-    "typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", 
"tsserver": "bin/tsserver" } }, 
"sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
+    "@typescript/typescript-darwin-arm64": 
["@typescript/[email protected]", "", { "os": "darwin", "cpu": 
"arm64" }, 
"sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],
 
-    "undici-types": ["[email protected]", "", {}, 
"sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
+    "@typescript/typescript-darwin-x64": 
["@typescript/[email protected]", "", { "os": "darwin", "cpu": "x64" 
}, 
"sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],
+
+    "@typescript/typescript-freebsd-arm64": 
["@typescript/[email protected]", "", { "os": "freebsd", "cpu": 
"arm64" }, 
"sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],
+
+    "@typescript/typescript-freebsd-x64": 
["@typescript/[email protected]", "", { "os": "freebsd", "cpu": 
"x64" }, 
"sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],
+
+    "@typescript/typescript-linux-arm": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": "arm" }, 
"sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],
+
+    "@typescript/typescript-linux-arm64": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": 
"arm64" }, 
"sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],
+
+    "@typescript/typescript-linux-loong64": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": 
"none" }, 
"sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],
+
+    "@typescript/typescript-linux-mips64el": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": 
"none" }, 
"sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],
+
+    "@typescript/typescript-linux-ppc64": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": 
"ppc64" }, 
"sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],
+
+    "@typescript/typescript-linux-riscv64": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": 
"none" }, 
"sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],
+
+    "@typescript/typescript-linux-s390x": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": 
"s390x" }, 
"sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],
+
+    "@typescript/typescript-linux-x64": 
["@typescript/[email protected]", "", { "os": "linux", "cpu": "x64" }, 
"sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],
+
+    "@typescript/typescript-netbsd-arm64": 
["@typescript/[email protected]", "", { "os": "none", "cpu": 
"arm64" }, 
"sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],
+
+    "@typescript/typescript-netbsd-x64": 
["@typescript/[email protected]", "", { "os": "none", "cpu": "x64" }, 
"sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],
+
+    "@typescript/typescript-openbsd-arm64": 
["@typescript/[email protected]", "", { "os": "openbsd", "cpu": 
"arm64" }, 
"sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],
+
+    "@typescript/typescript-openbsd-x64": 
["@typescript/[email protected]", "", { "os": "openbsd", "cpu": 
"x64" }, 
"sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],
+
+    "@typescript/typescript-sunos-x64": 
["@typescript/[email protected]", "", { "os": "sunos", "cpu": "x64" }, 
"sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],
+
+    "@typescript/typescript-win32-arm64": 
["@typescript/[email protected]", "", { "os": "win32", "cpu": 
"arm64" }, 
"sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],
+
+    "@typescript/typescript-win32-x64": 
["@typescript/[email protected]", "", { "os": "win32", "cpu": "x64" }, 
"sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],
+
+    "bun-types": ["[email protected]", "", { "dependencies": { "@types/node": 
"*", "undici-types": "*" } }, 
"sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ=="],
+
+    "typescript": ["[email protected]", "", { "optionalDependencies": { 
"@typescript/typescript-aix-ppc64": "7.0.2", 
"@typescript/typescript-darwin-arm64": "7.0.2", 
"@typescript/typescript-darwin-x64": "7.0.2", 
"@typescript/typescript-freebsd-arm64": "7.0.2", 
"@typescript/typescript-freebsd-x64": "7.0.2", 
"@typescript/typescript-linux-arm": "7.0.2", 
"@typescript/typescript-linux-arm64": "7.0.2", 
"@typescript/typescript-linux-loong64": "7.0.2", 
"@typescript/typescript-linux-mips64el": "7.0.2", 
"@typescript/typescript-linux-ppc64": "7.0.2", 
"@typescript/typescript-linux-riscv64": "7.0.2", 
"@typescript/typescript-linux-s390x": "7.0.2", 
"@typescript/typescript-linux-x64": "7.0.2", 
"@typescript/typescript-netbsd-arm64": "7.0.2", 
"@typescript/typescript-netbsd-x64": "7.0.2", 
"@typescript/typescript-openbsd-arm64": "7.0.2", 
"@typescript/typescript-openbsd-x64": "7.0.2", 
"@typescript/typescript-sunos-x64": "7.0.2", 
"@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-
 x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, 
"sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],
+
+    "undici-types": ["[email protected]", "", {}, 
"sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],
   }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/examples/package.json 
new/bun-pty-0.6.0/examples/package.json
--- old/bun-pty-0.5.2/examples/package.json     2026-10-26 05:52:44.000000000 
+0100
+++ new/bun-pty-0.6.0/examples/package.json     2026-10-30 07:43:50.000000000 
+0100
@@ -8,7 +8,7 @@
     "@types/bun": "latest"
   },
   "peerDependencies": {
-    "typescript": "^5"
+    "typescript": "^7"
   },
   "dependencies": {
     "bun-pty": "^0.4.7"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/package.json 
new/bun-pty-0.6.0/package.json
--- old/bun-pty-0.5.2/package.json      2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/package.json      2026-10-30 07:43:50.000000000 +0100
@@ -1,6 +1,6 @@
 {
        "name": "bun-pty",
-       "version": "0.5.2",
+       "version": "0.6.0",
        "description": "Cross-platform pseudoterminal (PTY) implementation for 
Bun with native performance",
        "main": "./src/index.ts",
        "types": "./dist/index.d.ts",
@@ -45,6 +45,7 @@
                "prepack": "bun run build",
                "build:rust": "cd rust-pty && cargo build --release",
                "build:ts": "tsc --emitDeclarationOnly --declaration --outDir 
dist",
+               "typecheck": "bun check src/*.test.ts",
                "build": "bun run build:rust && bun run build:ts",
                "test": "bun test",
                "test:unit": "bun test src/interfaces.test.ts 
src/terminal.test.ts src/index.test.ts src/env.test.ts",
@@ -54,7 +55,7 @@
                "clean": "rm -rf ./dist && cd rust-pty && cargo clean"
        },
        "engines": {
-               "bun": ">=1.0.0"
+               "bun": ">=1.4.0"
        },
        "files": [
                "src",
@@ -68,9 +69,9 @@
                "rust-pty/target/release/*.dll"
        ],
        "devDependencies": {
-               "@types/bun": "1.3.3",
-               "@types/node": "24.10.1",
-               "typescript": "5.9.3"
+               "@types/bun": "1.4.4",
+               "@types/node": "26.6.6",
+               "typescript": "7.0.2"
        },
        "publishConfig": {
                "access": "public"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/rust-pty/Cargo.lock 
new/bun-pty-0.6.0/rust-pty/Cargo.lock
--- old/bun-pty-0.5.2/rust-pty/Cargo.lock       2026-10-26 05:52:44.000000000 
+0100
+++ new/bun-pty-0.6.0/rust-pty/Cargo.lock       2026-10-30 07:43:50.000000000 
+0100
@@ -4,15 +4,15 @@
 
 [[package]]
 name = "anyhow"
-version = "1.0.98"
+version = "1.0.104"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
+checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
 
 [[package]]
 name = "autocfg"
-version = "1.4.0"
+version = "1.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
 
 [[package]]
 name = "bitflags"
@@ -22,15 +22,15 @@
 
 [[package]]
 name = "cfg-if"
-version = "1.0.0"
+version = "1.0.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
 
 [[package]]
 name = "crossbeam"
-version = "0.8.4"
+version = "0.8.5"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8"
+checksum = "e71406cd8807725f7ac2f999a4cdd32e98f829fdf65f528343cebf945e41df1e"
 dependencies = [
  "crossbeam-channel",
  "crossbeam-deque",
@@ -41,18 +41,18 @@
 
 [[package]]
 name = "crossbeam-channel"
-version = "0.5.15"
+version = "0.5.17"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
+checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1"
 dependencies = [
  "crossbeam-utils",
 ]
 
 [[package]]
 name = "crossbeam-deque"
-version = "0.8.6"
+version = "0.8.8"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
+checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"
 dependencies = [
  "crossbeam-epoch",
  "crossbeam-utils",
@@ -60,27 +60,27 @@
 
 [[package]]
 name = "crossbeam-epoch"
-version = "0.9.18"
+version = "0.9.21"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"
 dependencies = [
  "crossbeam-utils",
 ]
 
 [[package]]
 name = "crossbeam-queue"
-version = "0.3.12"
+version = "0.3.14"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115"
+checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae"
 dependencies = [
  "crossbeam-utils",
 ]
 
 [[package]]
 name = "crossbeam-utils"
-version = "0.8.21"
+version = "0.8.23"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
+checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
 
 [[package]]
 name = "downcast-rs"
@@ -110,33 +110,33 @@
 
 [[package]]
 name = "itoa"
-version = "1.0.15"
+version = "1.0.18"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
 
 [[package]]
 name = "lazy_static"
-version = "1.5.0"
+version = "1.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
 
 [[package]]
 name = "libc"
-version = "0.2.172"
+version = "0.2.191"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
 
 [[package]]
 name = "log"
-version = "0.4.27"
+version = "0.4.34"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
 
 [[package]]
 name = "memchr"
-version = "2.7.4"
+version = "2.8.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
 
 [[package]]
 name = "memoffset"
@@ -163,9 +163,9 @@
 
 [[package]]
 name = "pin-utils"
-version = "0.1.0"
+version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+checksum = "13bee6c73da26345c729282832b60b0363cf3dd9f4bfd81d8551b7a1c889a113"
 
 [[package]]
 name = "portable-pty"
@@ -192,18 +192,18 @@
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.95"
+version = "1.0.107"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
 dependencies = [
  "unicode-ident",
 ]
 
 [[package]]
 name = "quote"
-version = "1.0.40"
+version = "1.0.47"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
 dependencies = [
  "proc-macro2",
 ]
@@ -221,41 +221,46 @@
 ]
 
 [[package]]
-name = "ryu"
-version = "1.0.20"
+name = "serde"
+version = "1.0.229"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
 
 [[package]]
-name = "serde"
-version = "1.0.219"
+name = "serde_core"
+version = "1.0.229"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.219"
+version = "1.0.229"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn",
+ "syn 3.0.9",
 ]
 
 [[package]]
 name = "serde_json"
-version = "1.0.140"
+version = "1.0.154"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
+checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
 dependencies = [
  "itoa",
  "memchr",
- "ryu",
  "serde",
+ "serde_core",
+ "zmij",
 ]
 
 [[package]]
@@ -312,15 +317,26 @@
 
 [[package]]
 name = "shell-words"
-version = "1.1.0"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77"
+
+[[package]]
+name = "syn"
+version = "2.0.119"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
 
 [[package]]
 name = "syn"
-version = "2.0.101"
+version = "3.0.9"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
+checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -353,14 +369,14 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn",
+ "syn 2.0.119",
 ]
 
 [[package]]
 name = "unicode-ident"
-version = "1.0.18"
+version = "1.0.27"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
 
 [[package]]
 name = "winapi"
@@ -392,3 +408,9 @@
 dependencies = [
  "winapi",
 ]
+
+[[package]]
+name = "zmij"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/rust-pty/Cargo.toml 
new/bun-pty-0.6.0/rust-pty/Cargo.toml
--- old/bun-pty-0.5.2/rust-pty/Cargo.toml       2026-10-26 05:52:44.000000000 
+0100
+++ new/bun-pty-0.6.0/rust-pty/Cargo.toml       2026-10-30 07:43:50.000000000 
+0100
@@ -14,10 +14,11 @@
 crate-type = ["cdylib"]
 
 [dependencies]
+# Held at 0.8.1: 0.9.0 returns garbage from reads on Windows, still open in
 # https://github.com/wezterm/wezterm/issues/6783
 portable-pty = { version = "0.8.1", features = ["serde_support"] }
-lazy_static = "1.4"
-crossbeam = { version = "0.8.4", features = ["crossbeam-channel"] }
+lazy_static = "1.5"
+crossbeam = { version = "0.8.5", features = ["crossbeam-channel"] }
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
-shell-words = "1.1.0"
+shell-words = "1.1.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/rust-pty/src/lib.rs 
new/bun-pty-0.6.0/rust-pty/src/lib.rs
--- old/bun-pty-0.5.2/rust-pty/src/lib.rs       2026-10-26 05:52:44.000000000 
+0100
+++ new/bun-pty-0.6.0/rust-pty/src/lib.rs       2026-10-30 07:43:50.000000000 
+0100
@@ -412,21 +412,22 @@
 pub unsafe extern "C" fn bun_pty_write(
     handle: c_int,
     data:   *const u8,
-    len:    c_int,
+    len:    usize,                         // bun:ffi "buffer_length" (u64)
 ) -> c_int {
-    if handle <= 0 || data.is_null() || len < 0 { return ERROR; }
-    with(handle as u32, |p| p.write(data, len as usize))
+    if handle <= 0 || data.is_null() { return ERROR; }
+    with(handle as u32, |p| p.write(data, len))
 }
 
 #[unsafe(no_mangle)]
 pub unsafe extern "C" fn bun_pty_read(
     handle: c_int,
     buf:    *mut u8,
-    len:    c_int,
+    len:    usize,                         // bun:ffi "buffer_length" (u64)
 ) -> c_int {
-    if handle <= 0 || buf.is_null() || len <= 0 { return ERROR; }
+    if handle <= 0 || buf.is_null() || len == 0 { return ERROR; }
     with(handle as u32, |pty| {
-        let max = len as usize;
+        // the byte count is returned as c_int
+        let max = len.min(c_int::MAX as usize);
 
         // 1) serve pending data first
         let mut pend = pty.pending.lock().unwrap();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/src/library.ts 
new/bun-pty-0.6.0/src/library.ts
--- old/bun-pty-0.5.2/src/library.ts    2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/src/library.ts    2026-10-30 07:43:50.000000000 +0100
@@ -18,3 +18,14 @@
                ? ["librust_pty_arm64.so", "librust_pty.so"]
                : ["librust_pty.so"];
 }
+
+// The FFI signatures use the "buffer_length" type and pass JS strings as
+// cstring args, both new in Bun 1.4.0.
+export const MIN_BUN_VERSION = "1.4.0";
+
+// Checks for the FFI feature itself rather than comparing versions: an early
+// 1.4.0 canary lacks "buffer_length", and Bun 1.0.0-1.0.10 have no Bun.semver.
+export function unsupportedBunError(version: string, ffiTypes: object): string 
| undefined {
+       if ("buffer_length" in ffiTypes) return undefined;
+       return `bun-pty needs Bun ${MIN_BUN_VERSION} or newer, but this is Bun 
${version}. Run \`bun upgrade\`.`;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/src/terminal.integration.test.ts 
new/bun-pty-0.6.0/src/terminal.integration.test.ts
--- old/bun-pty-0.5.2/src/terminal.integration.test.ts  2026-10-26 
05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/src/terminal.integration.test.ts  2026-10-30 
07:43:50.000000000 +0100
@@ -49,6 +49,15 @@
     expect(terminal.pid).toBeGreaterThan(0);
   });
 
+  // Up to 0.5.2, ptr() on the empty buffer threw on Bun 1.4
+  test("Terminal write of an empty string is a no-op", () => {
+    const { cmd, args } = sleepCommand(1);
+    const terminal = new Terminal(cmd, args);
+    terminals.push(terminal);
+
+    expect(() => terminal.write("")).not.toThrow();
+  });
+
   test("Terminal can receive data from a real process", async () => {
     const { cmd, args } = echoCommand("Hello from Bun PTY");
     const terminal = new Terminal(cmd, args);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/src/terminal.test.ts 
new/bun-pty-0.6.0/src/terminal.test.ts
--- old/bun-pty-0.5.2/src/terminal.test.ts      2026-10-26 05:52:44.000000000 
+0100
+++ new/bun-pty-0.6.0/src/terminal.test.ts      2026-10-30 07:43:50.000000000 
+0100
@@ -1,10 +1,11 @@
 import { expect, test, describe } from "bun:test";
+import { FFIType } from "bun:ffi";
 import { mkdtempSync, writeFileSync } from "node:fs";
 import { tmpdir } from "node:os";
 import { join } from "node:path";
 import { DEFAULT_COLS, DEFAULT_ROWS, DEFAULT_FILE, DEFAULT_NAME } from 
"./terminal";
 import type { IPtyForkOptions, IExitEvent } from "./interfaces";
-import { libraryFilenames } from "./library";
+import { libraryFilenames, MIN_BUN_VERSION, unsupportedBunError } from 
"./library";
 
 describe("native library resolution", () => {
        test("prefers the ARM64 DLL on Windows ARM64", () => {
@@ -19,6 +20,31 @@
        });
 });
 
+describe("Bun version check", () => {
+       // FFIType as Bun 1.3 and Bun 1.4 define it, cut down to the keys that 
matter
+       const ffiTypes13 = { pointer: 12, cstring: 14, buffer: 20 };
+       const ffiTypes14 = { ...ffiTypes13, buffer_length: 21 };
+
+       test("accepts a Bun whose FFI has buffer_length", () => {
+               expect(unsupportedBunError("1.4.0", 
ffiTypes14)).toBeUndefined();
+               expect(unsupportedBunError("1.4.5-canary.20261030.1", 
ffiTypes14)).toBeUndefined();
+       });
+
+       test("rejects a Bun without buffer_length, naming both versions", () => 
{
+               const message = unsupportedBunError("1.3.14", ffiTypes13);
+               expect(message).toContain(MIN_BUN_VERSION);
+               expect(message).toContain("1.3.14");
+       });
+
+       test("rejects an early 1.4.0 canary that lacks buffer_length", () => {
+               expect(unsupportedBunError("1.4.0", 
ffiTypes13)).toContain(MIN_BUN_VERSION);
+       });
+
+       test("the running Bun is supported", () => {
+               expect(unsupportedBunError(Bun.version, 
FFIType)).toBeUndefined();
+       });
+});
+
 describe("native library load failure", () => {
        test("importing still works and spawn() reports the dlopen cause", 
async () => {
                const notALibrary = join(mkdtempSync(join(tmpdir(), 
"bun-pty-")), "not-a-library.txt");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/src/terminal.ts 
new/bun-pty-0.6.0/src/terminal.ts
--- old/bun-pty-0.5.2/src/terminal.ts   2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/src/terminal.ts   2026-10-30 07:43:50.000000000 +0100
@@ -1,10 +1,10 @@
 // terminal.ts  —  JS/TS front-end (final fixed version)
 
-import { dlopen, FFIType, ptr } from "bun:ffi";
+import { dlopen, FFIType } from "bun:ffi";
 import { Buffer } from "node:buffer";
 import { EventEmitter } from "./interfaces";
 import type { IPty, IPtyForkOptions, IExitEvent } from "./interfaces";
-import { libraryFilenames } from "./library";
+import { libraryFilenames, unsupportedBunError } from "./library";
 import { DEFAULT_NAME, childEnv, formatEnv } from "./env";
 import { join, dirname, basename } from "node:path";
 import { existsSync, readFileSync } from "node:fs";
@@ -124,18 +124,26 @@
 // surfaces as a clear error from spawn() instead of
 // "undefined is not an object (evaluating 'lib.symbols')" deep in a spawn.
 try {
+       const versionError = unsupportedBunError(Bun.version, FFIType);
+       if (versionError) throw new Error(versionError);
        libPath = resolveLibPath();
        lib = dlopen(libPath, {
+               // cstring args take JS strings directly (Bun 1.4+); the env 
block holds
+               // NUL separators, so it stays a Buffer.
                bun_pty_spawn: {
                        args: [FFIType.cstring, FFIType.cstring, 
FFIType.cstring, FFIType.i32, FFIType.i32],
                        returns: FFIType.i32,
                },
+               // "buffer" + "buffer_length" (Bun 1.4+) pass a view's pointer 
and byte
+               // length read from the same object, so the two can't disagree. 
Bun 1.4.4
+               // rejects the numeric FFIType.buffer/buffer_length values, so 
these use
+               // the string names.
                bun_pty_write: {
-                       args: [FFIType.i32, FFIType.pointer, FFIType.i32],
+                       args: [FFIType.i32, "buffer", "buffer_length"],
                        returns: FFIType.i32,
                },
                bun_pty_read: {
-                       args: [FFIType.i32, FFIType.pointer, FFIType.i32],
+                       args: [FFIType.i32, "buffer", "buffer_length"],
                        returns: FFIType.i32,
                },
                bun_pty_resize: {
@@ -191,8 +199,8 @@
                const envStr = formatEnv(childEnv(opts, cwd));
 
                this.handle = lib.symbols.bun_pty_spawn(
-                       Buffer.from(`${cmdline}\0`, "utf8"),
-                       Buffer.from(`${cwd}\0`, "utf8"),
+                       cmdline,
+                       cwd,
                        Buffer.from(`${envStr}\0`, "utf8"),
                        this._cols,
                        this._rows,
@@ -231,7 +239,7 @@
        write(data: string) {
                if (this._closing) return;
                const buf = Buffer.from(data, "utf8");
-               lib.symbols.bun_pty_write(this.handle, ptr(buf), buf.length);
+               lib.symbols.bun_pty_write(this.handle, buf, buf);
        }
 
        resize(cols: number, rows: number) {
@@ -258,7 +266,7 @@
                const buf = Buffer.allocUnsafe(4096);
 
                while (this._readLoop && !this._closing) {
-                       const n = lib.symbols.bun_pty_read(this.handle, 
ptr(buf), buf.length);
+                       const n = lib.symbols.bun_pty_read(this.handle, buf, 
buf);
                        if (n > 0) {
                                // Use streaming mode to buffer incomplete 
UTF-8 sequences across chunks
                                // This prevents corruption when multi-byte 
chars span chunk boundaries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bun-pty-0.5.2/tsconfig.json 
new/bun-pty-0.6.0/tsconfig.json
--- old/bun-pty-0.5.2/tsconfig.json     2026-10-26 05:52:44.000000000 +0100
+++ new/bun-pty-0.6.0/tsconfig.json     2026-10-30 07:43:50.000000000 +0100
@@ -2,7 +2,9 @@
   "compilerOptions": {
     "target": "esnext",
     "module": "esnext",
-    "moduleResolution": "node",
+    "moduleResolution": "bundler",
+    "types": ["bun"],
+    "rootDir": "./src",
     "declaration": true,
     "declarationMap": true,
     "sourceMap": true,
@@ -14,4 +16,4 @@
   },
   "include": ["src/**/*.ts"],
   "exclude": ["**/*.test.ts", "**/*.spec.ts", "node_modules"]
-} 
\ No newline at end of file
+}

++++++ vendor.tar.zst ++++++
/work/SRC/openSUSE:Factory/bun-pty/vendor.tar.zst 
/work/SRC/openSUSE:Factory/.bun-pty.new.3759290/vendor.tar.zst differ: char 6, 
line 1

Reply via email to