Skip to content

Commit 4f747e9

Browse files
jcubicisomorphic-git-bot
authored andcommitted
fix: Missing Buffer Error (#1912)
* ignore mininified files by git diff * (chore) update async-lock dependency * fix: fix error message when missing Buffer #1855 * fix typo
1 parent 65fdd5a commit 4f747e9

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

js/isomorphic-git/index.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,6 +2431,10 @@ function getIterator(iterable) {
24312431
// inspired by 'gartal' but lighter-weight and more battle-tested.
24322432
class StreamReader {
24332433
constructor(stream) {
2434+
// TODO: fix usage in bundlers before Buffer dependency is removed #1855
2435+
if (typeof Buffer === 'undefined') {
2436+
throw new Error('Missing Buffer dependency')
2437+
}
24342438
this.stream = getIterator(stream);
24352439
this.buffer = null;
24362440
this.cursor = 0;

js/isomorphic-git/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,6 +2425,10 @@ function getIterator(iterable) {
24252425
// inspired by 'gartal' but lighter-weight and more battle-tested.
24262426
class StreamReader {
24272427
constructor(stream) {
2428+
// TODO: fix usage in bundlers before Buffer dependency is removed #1855
2429+
if (typeof Buffer === 'undefined') {
2430+
throw new Error('Missing Buffer dependency')
2431+
}
24282432
this.stream = getIterator(stream);
24292433
this.buffer = null;
24302434
this.cursor = 0;

js/isomorphic-git/index.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/isomorphic-git/index.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/isomorphic-git/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"size_report.html"
5252
],
5353
"dependencies": {
54-
"async-lock": "^1.1.0",
54+
"async-lock": "^1.4.1",
5555
"clean-git-ref": "^2.0.1",
5656
"crc-32": "^1.2.0",
5757
"diff3": "0.0.3",

js/isomorphic-git/size_report.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)