Commit Graph

496 Commits

Author SHA1 Message Date
can1357 f933f02fcf chore: bump version to 16.4.7 2026-07-12 13:06:27 +02:00
can1357 12466ecf40 chore: bump version to 16.4.6 2026-07-12 02:50:43 +02:00
can1357 3d1f9a4a3c chore: bump version to 16.4.5 2026-07-11 19:50:41 +02:00
roboomp b87cfc7e1d fix(native): read grep files into stable snapshots
Replace mmap-backed native grep reads with bounded owned reads so concurrently rewritten files cannot fault the process or mutate captured search bytes.

Add a regression for oversized prefix snapshots and remove the direct memmap2 dependency. Fix existing pi-natives doc-markdown warnings so the native clippy gate passes.

Fixes #5205
2026-07-11 16:30:08 +00:00
can1357 cf1b3fc3fb chore: bump version to 16.4.4 2026-07-11 12:30:26 +02:00
can1357 f7930048d5 chore: bump version to 16.4.3 2026-07-11 07:55:17 +02:00
can1357 ce10e5fff6 feat: introduced advanced grep functionality with pcre2 and file traversal
- Integrated PCRE2 regex engine with automatic fallback for patterns unsupported by the standard Rust engine.
- Implemented structured JSON output, byte offset reporting, and match replacement functionality.
- Added support for advanced file traversal including Gitignore integration, decompression of archives, and path filtering.
- Updated crate dependencies to include support for expanded grep CLI options and printer utilities.
2026-07-11 07:33:21 +02:00
can1357 fd2d4616a6 chore: bump version to 16.4.2 2026-07-11 00:17:35 +02:00
can1357 395e4a5fcf chore: bump version to 16.4.1 2026-07-10 20:50:59 +02:00
can1357 a0f7266fbc chore: bump version to 16.4.0 2026-07-10 14:11:05 +02:00
can1357 e8d0a93db6 chore: bump version to 16.3.15 2026-07-09 22:44:35 +02:00
can1357 5ddb0719ad chore: bump version to 16.3.14 2026-07-09 20:37:29 +02:00
can1357 dd67447a03 chore: bump version to 16.3.13 2026-07-09 19:39:55 +02:00
can1357 606c51a7b7 fix(natives): decoded CF_DIB directly when arboard rejects an image
arboard's Windows reader feeds Qt-style CF_DIBV5 payloads (BI_RGB plus
alpha mask, rewritten to BI_BITFIELDS by its header tweak) to a
header-less BMP decode that mis-places the pixel offset for V4/V5
bitfield headers, so PixPin/Snipaste screenshots failed with
ConversionFailure. read_image_from_clipboard now falls back to reading
the raw CF_DIB clipboard bytes and decoding them through the BMP file
path with an explicit bfOffBits, keeping native Windows image paste off
the PowerShell bridge.

Fixes #3426
2026-07-09 18:33:44 +02:00
can1357 f25ab54c59 chore: bump version to 16.3.12 2026-07-08 19:40:13 +02:00
can1357 b086c5d669 chore: bump version to 16.3.11 2026-07-06 17:48:50 +02:00
can1357 48c53f8c56 chore: since perl crate decided to yank valid dists breaking my ci, im yanking it in return
who even uses perl?
2026-07-06 17:48:28 +02:00
can1357 d8e568fad1 chore: bump version to 16.3.10 2026-07-06 08:13:30 +02:00
can1357 674cf01762 chore: bump version to 16.3.9 2026-07-06 04:19:29 +02:00
can1357 d806ac5e4c chore: bump version to 16.3.8 2026-07-05 19:43:28 +02:00
can1357 0ca345185c chore: bump version to 16.3.7 2026-07-05 16:58:53 +02:00
can1357 98f6e9f004 chore: bump version to 16.3.6 2026-07-04 14:00:53 +02:00
can1357 cb30c981a0 feat(walker): implemented parallel filesystem traversal with streaming grep
- Introduced parallel streaming grep with windowed result processing to enhance search performance and memory management.
- Implemented stateful parallel file walking with buffer pooling and directory entry record caching to minimize memory allocations.
- Optimized ignore state derivation by using directory entry names instead of stat probes.
- Added comprehensive unit and performance tests covering parallel traversal correctness, early termination, and streaming behavior.
2026-07-04 11:22:04 +02:00
can1357 fef9b62334 chore: bump version to 16.3.5 2026-07-04 05:19:15 +02:00
can1357 d0c1890a6c chore: bump version to 16.3.4 2026-07-03 06:37:14 +02:00
can1357 afc79e4cda chore: bump version to 16.3.3 2026-07-03 00:57:22 +02:00
can1357 9e0b6cddf2 chore: bump version to 16.3.2 2026-07-02 17:50:38 +02:00
can1357 0ea6ea630b chore: bump version to 16.3.1 2026-07-02 09:00:04 +02:00
can1357 36cfb54e92 chore: bump version to 16.3.0 2026-07-02 04:12:21 +02:00
can1357 3c22d25200 Merge PR #4110: fix(natives): catch task::blocking panics before FFI to reject JS Promise (@roboomp) 2026-07-01 21:53:15 +02:00
can1357 5356713eae chore: bump version to 16.2.13 2026-07-01 20:03:42 +02:00
roboomp bbd4c66768 fix(natives): catch task::blocking panics before FFI to reject Promise
napi-rs 3.9.4 registers async-work `execute` at src/async_work.rs:109 as
a plain `unsafe extern "C" fn` — not `extern "C-unwind"`. Any panic
inside a `Blocking::compute` closure unwound past that boundary and
force-aborted the host process under Rust's stabilized C-unwind rules
(RFC 2945, stable since 1.81), losing the JS Promise and session state.

Wrap the user closure in `std::panic::catch_unwind` inside
`Blocking::compute` and map the panic payload to
`Error::new(Status::GenericFailure, ...)` so it flows through napi-rs's
existing rejection path (`inner_task.reject` in `complete_impl`) and
surfaces as a rejected JS Promise instead of a host abort. Every
`task::blocking` caller (grep, ast, glob, listWorkspace, html-to-markdown,
snapcompact, fuzzy find, clipboard image read) inherits the guard.

Correct the root Cargo.toml `panic = "unwind"` comment — napi-rs's
per-call `catch_unwind` only covers the tokio-future path, not the
`Task`/`AsyncTask` async-work path we use here.

Regression test in `crates/pi-natives/src/task.rs` synchronously invokes
`Blocking::compute` with panicking closures (str literal, formatted,
`panic_any`, plus Ok/Err/double-invoke controls) and asserts the returned
`napi::Error` carries the tag and payload — proving the invariant: a
panicking closure MUST NOT unwind past this method.

Fixes #4071
2026-07-01 07:03:23 +00:00
can1357 fccc0ed3ce chore: bump version to 16.2.12 2026-07-01 05:29:19 +02:00
can1357 b2a859a7c5 chore: bump version to 16.2.11 2026-07-01 03:06:34 +02:00
can1357 ebdc7280cb chore: bump version to 16.2.10 2026-07-01 00:54:29 +02:00
can1357 13b1b5b134 refactor: migrated concurrency primitives to flume and parking_lot
- Replaced standard and tokio mpsc channels with flume channels across workspace crates to simplify thread synchronization.
- Swapped standard Mutex guards for parking_lot Mutexes to avoid manual lock poisoning handling and improve performance.
- Declared workspace-wide dependencies for flume and parking_lot in root and member Cargo manifests.
2026-06-30 23:45:42 +02:00
can1357 31d9fb1145 refactor: consolidated filesystem traversal into a dedicated library
- Replaced custom fast-walk and fs-cache implementations in pi-natives with a new dedicated pi-walker library.
- Integrated the thread-safe, parallel pi-walker library across pi-natives, pi-shell, pi-uu-grep, and uu-find.
- Rewrote file search, fuzzy finding, and glob-matching logic to leverage pi-walker configurations and visitor traits.
- Optimized shell process tracking in pi-shell by replacing global descendant-diff logic with an isolated, per-run SpawnRegistry.
- Added parallel rayon-based walking and optimized fast paths for directory scanning and entry classification.
2026-06-30 23:25:50 +02:00
can1357 b6c9747d45 chore: bump version to 16.2.9 2026-06-30 18:01:59 +02:00
can1357 5bc68f57cd chore: bump version to 16.2.8 2026-06-30 11:58:55 +02:00
can1357 38250ce88b chore: bump version to 16.2.7 2026-06-30 07:20:23 +02:00
can1357 242705c06c feat: enabled dynamic font rendering with CJK and unicode support
- Added Silver.ttf TrueType font support to `pi-natives` with automated fallback logic for bitmap font rendering.
- Implemented wide code point detection and cell-width calculation to improve CJK character handling and layout.
- Introduced dynamic font-aware preflight probing via `resolveShapeForText` and `renderabilityProbeText` for better font selection.
- Enabled semantic emoji folding and improved text normalization to handle non-Latin characters and emoji filtering.
2026-06-30 02:49:31 +02:00
can1357 0ba736f5bc chore: bump version to 16.2.6 2026-06-29 20:14:08 +02:00
can1357 695b46aa48 chore: bump version to 16.2.5 2026-06-28 23:28:47 +02:00
can1357 7bbaebda24 chore: bump version to 16.2.4 2026-06-28 20:43:59 +02:00
can1357 82a5ba5d47 fix(cross-cutting): caught and recover from utility panics
- Switch build profile to `panic = "unwind"` to allow catching panics in vendored uutils code.
- Add `run_caught` to wrap utility execution in `catch_unwind`, converting panics into non-zero exit codes.
- Update `pi-natives` to distinguish between recoverable utility panics and fatal process crashes, preventing recovered panics from appearing in user-facing crash reports.
2026-06-28 20:42:04 +02:00
can1357 96be45c3bf chore: bump version to 16.2.3 2026-06-28 17:29:35 +02:00
can1357 24341e4abf chore: bump version to 16.2.2 2026-06-27 13:24:46 +02:00
can1357 d738329485 chore: bump version to 16.2.1 2026-06-27 06:35:42 +02:00
can1357 7463818a32 chore: bump version to 16.2.0 2026-06-27 04:39:59 +02:00
can1357 011f036ef5 chore: bump version to 16.1.23 2026-06-26 18:29:01 +02:00