Skip to content

Commit

Permalink
fix: Missing Buffer Error (#1912)
Browse files Browse the repository at this point in the history
* ignore mininified files by git diff

* (chore) update async-lock dependency

* fix: fix error message when missing Buffer #1855

* fix typo
  • Loading branch information
jcubic committed May 10, 2024
1 parent 79e29d0 commit 54ec7d2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Expand Up @@ -5,3 +5,5 @@ __tests__/__snapshots__/test-exports.js.snap text eol=lf
**/*.png binary -eol
**/*.webp binary -eol
**/*.zip binary -eol
*.min.js binary
sidecar.v1.js binary
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -51,7 +51,7 @@
"size_report.html"
],
"dependencies": {
"async-lock": "^1.1.0",
"async-lock": "^1.4.1",
"clean-git-ref": "^2.0.1",
"crc-32": "^1.2.0",
"diff3": "0.0.3",
Expand Down
4 changes: 4 additions & 0 deletions src/utils/StreamReader.js
Expand Up @@ -3,6 +3,10 @@ import { getIterator } from './getIterator.js'
// inspired by 'gartal' but lighter-weight and more battle-tested.
export class StreamReader {
constructor(stream) {
// TODO: fix usage in bundlers before Buffer dependency is removed #1855
if (typeof Buffer === 'undefined') {
throw new Error('Missing Buffer dependency')
}
this.stream = getIterator(stream)
this.buffer = null
this.cursor = 0
Expand Down

0 comments on commit 54ec7d2

Please sign in to comment.