Skip to content

Commit

Permalink
web streams polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
ctlai95 committed Apr 22, 2024
1 parent 278427d commit 65ec6e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"dependencies": {
"@zip.js/zip.js": "^2.7.41",
"vscode-nls": "^5.2.0",
"vscode-nls-dev": "^4.0.4"
"vscode-nls-dev": "^4.0.4",
"web-streams-polyfill": "^4.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/core/src/shared/utilities/zipStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import { WritableStreamBuffer } from 'stream-buffers'
import crypto from 'crypto'
import { readFileAsString } from '../filesystemUtilities'
global.TransformStream = require('web-streams-polyfill').TransformStream
global.ReadableStream = require('web-streams-polyfill').ReadableStream
global.WritableStream = require('web-streams-polyfill').WritableStream
// Use require instead of import since this package doesn't support commonjs
const { ZipWriter, TextReader } = require('@zip.js/zip.js')

Expand Down

0 comments on commit 65ec6e8

Please sign in to comment.