mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-22 03:19:08 +08:00
replacing constructor for zipstream with default
This commit is contained in:
parent
6defe19df1
commit
fda9d58d06
@ -1,5 +1,5 @@
|
|||||||
import * as stream from 'stream'
|
import * as stream from 'stream'
|
||||||
import {ZipStream} from 'zip-stream'
|
import * as ZipStream from 'zip-stream'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {createReadStream} from 'fs'
|
import {createReadStream} from 'fs'
|
||||||
import {UploadZipSpecification} from './upload-zip-specification'
|
import {UploadZipSpecification} from './upload-zip-specification'
|
||||||
@ -32,7 +32,7 @@ export async function createZipUploadStream(
|
|||||||
const zlibOptions = {
|
const zlibOptions = {
|
||||||
zlib: {level: compressionLevel, bufferSize: getUploadChunkSize()}
|
zlib: {level: compressionLevel, bufferSize: getUploadChunkSize()}
|
||||||
}
|
}
|
||||||
const zip = new ZipStream(zlibOptions)
|
const zip = new ZipStream.default(zlibOptions)
|
||||||
// register callbacks for various events during the zip lifecycle
|
// register callbacks for various events during the zip lifecycle
|
||||||
zip.on('error', err => {
|
zip.on('error', err => {
|
||||||
core.error('An error has occurred while creating the zip file for upload')
|
core.error('An error has occurred while creating the zip file for upload')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user