isomorphic-git 1.41.2 → 1.41.3

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.
package/index.cjs CHANGED
@@ -9700,8 +9700,8 @@ function filterCapabilities(server, client) {
9700
9700
 
9701
9701
  const pkg = {
9702
9702
  name: 'isomorphic-git',
9703
- version: '1.41.2',
9704
- agent: 'git/isomorphic-git@1.41.2',
9703
+ version: '1.41.3',
9704
+ agent: 'git/isomorphic-git@1.41.3',
9705
9705
  };
9706
9706
 
9707
9707
  class FIFO {
@@ -9778,6 +9778,11 @@ function splitLines(input) {
9778
9778
  while (true) {
9779
9779
  const i = findSplit(tmp);
9780
9780
  if (i === -1) break
9781
+ // A '\r' at the very end may be the first half of a '\r\n' whose '\n'
9782
+ // arrives in the next chunk. Hold it back until there is a character
9783
+ // after it to look at, otherwise the same bytes split into two lines
9784
+ // or one depending only on where the socket boundary fell.
9785
+ if (i === tmp.length && tmp[i - 1] === '\r') break
9781
9786
  output.write(tmp.slice(0, i));
9782
9787
  tmp = tmp.slice(i);
9783
9788
  }
package/index.js CHANGED
@@ -9687,8 +9687,8 @@ function filterCapabilities(server, client) {
9687
9687
 
9688
9688
  const pkg = {
9689
9689
  name: 'isomorphic-git',
9690
- version: '1.41.2',
9691
- agent: 'git/isomorphic-git@1.41.2',
9690
+ version: '1.41.3',
9691
+ agent: 'git/isomorphic-git@1.41.3',
9692
9692
  };
9693
9693
 
9694
9694
  class FIFO {
@@ -9765,6 +9765,11 @@ function splitLines(input) {
9765
9765
  while (true) {
9766
9766
  const i = findSplit(tmp);
9767
9767
  if (i === -1) break
9768
+ // A '\r' at the very end may be the first half of a '\r\n' whose '\n'
9769
+ // arrives in the next chunk. Hold it back until there is a character
9770
+ // after it to look at, otherwise the same bytes split into two lines
9771
+ // or one depending only on where the socket boundary fell.
9772
+ if (i === tmp.length && tmp[i - 1] === '\r') break
9768
9773
  output.write(tmp.slice(0, i));
9769
9774
  tmp = tmp.slice(i);
9770
9775
  }