@cj-tech-master/excelts 9.5.3 → 9.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -572,11 +572,11 @@ export class Readable extends EventEmitter {
572
572
  // Binary mode
573
573
  let result;
574
574
  if (n == null) {
575
- // read() with no size: return one chunk from the buffer.
576
- // Node.js 26+ returns a single chunk rather than concatenating all
577
- // buffered data. This matches native behavior and avoids unnecessary
578
- // allocations when consumers iterate with while(chunk = read()).
579
- result = this._applyEncoding(this._buf.shift());
575
+ // read() with no size: return all buffered data as one chunk.
576
+ // Note: Node.js 26+ changed to return a single chunk, but our browser
577
+ // implementation preserves the pre-26 behavior (consumeAll) for backward
578
+ // compatibility and because it matches what most consumers expect.
579
+ result = this._applyEncoding(this._buf.consumeAll());
580
580
  }
581
581
  else {
582
582
  // read(n): return exactly n bytes, or null if not enough
@@ -577,11 +577,11 @@ class Readable extends event_emitter_1.EventEmitter {
577
577
  // Binary mode
578
578
  let result;
579
579
  if (n == null) {
580
- // read() with no size: return one chunk from the buffer.
581
- // Node.js 26+ returns a single chunk rather than concatenating all
582
- // buffered data. This matches native behavior and avoids unnecessary
583
- // allocations when consumers iterate with while(chunk = read()).
584
- result = this._applyEncoding(this._buf.shift());
580
+ // read() with no size: return all buffered data as one chunk.
581
+ // Note: Node.js 26+ changed to return a single chunk, but our browser
582
+ // implementation preserves the pre-26 behavior (consumeAll) for backward
583
+ // compatibility and because it matches what most consumers expect.
584
+ result = this._applyEncoding(this._buf.consumeAll());
585
585
  }
586
586
  else {
587
587
  // read(n): return exactly n bytes, or null if not enough
@@ -572,11 +572,11 @@ export class Readable extends EventEmitter {
572
572
  // Binary mode
573
573
  let result;
574
574
  if (n == null) {
575
- // read() with no size: return one chunk from the buffer.
576
- // Node.js 26+ returns a single chunk rather than concatenating all
577
- // buffered data. This matches native behavior and avoids unnecessary
578
- // allocations when consumers iterate with while(chunk = read()).
579
- result = this._applyEncoding(this._buf.shift());
575
+ // read() with no size: return all buffered data as one chunk.
576
+ // Note: Node.js 26+ changed to return a single chunk, but our browser
577
+ // implementation preserves the pre-26 behavior (consumeAll) for backward
578
+ // compatibility and because it matches what most consumers expect.
579
+ result = this._applyEncoding(this._buf.consumeAll());
580
580
  }
581
581
  else {
582
582
  // read(n): return exactly n bytes, or null if not enough
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @cj-tech-master/excelts v9.5.3
2
+ * @cj-tech-master/excelts v9.5.4
3
3
  * Zero-dependency TypeScript toolkit — Excel (XLSX), PDF, CSV, Markdown, XML, ZIP/TAR, and streaming.
4
4
  * (c) 2026 cjnoname
5
5
  * Released under the MIT License
@@ -4365,7 +4365,7 @@ var ExcelTS = (function(exports) {
4365
4365
  return chunk;
4366
4366
  }
4367
4367
  let result;
4368
- if (n == null) result = this._applyEncoding(this._buf.shift());
4368
+ if (n == null) result = this._applyEncoding(this._buf.consumeAll());
4369
4369
  else if (this._buf.byteSize < n) if (this._ended) result = this._applyEncoding(this._buf.consumeAll());
4370
4370
  else {
4371
4371
  if (this._hasReadImpl && this._constructed) this._callRead(Math.max(n, this._highWaterMark));