You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: harden file outputs, patch limits, and async input ownership
- All file-based diff/patch APIs now write to an exclusively-created temp
file in the output directory and atomically rename after verification;
failures remove the temp file and preserve any existing destination.
This makes in-place operation (output path == input path, including
hard-link/symlink aliases) safe.
- patch()/patchStream()/patchSingleStream() accept maxOutputBytes /
maxWorkingMemoryBytes with finite defaults (2 GiB mem / 16 GiB file /
256 MiB step memory); oversized header declarations are rejected before
any allocation or output creation, and allocation failures no longer
unwind through HDiffPatch's C frames.
- Async buffer APIs copy their inputs before queueing, so mutating or
transferring the source buffers cannot corrupt results.
- Accept DataView inputs (checked before napi_is_buffer, which matches
any ArrayBufferView); reject windowSize values above 2^53-1 that
previously hit undefined float-to-integer conversion.
- Preserve the original prebuild dlopen error as err.cause when the
node-gyp-build fallback also fails; refresh CLI help text.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments