Skip to content

Commit

Permalink
Replace extract-zip with cross-zip (#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Jun 20, 2019
1 parent 481937a commit c3a499a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -29,7 +29,6 @@ feature. Known modules include:
* `electron-download`
* `electron-osx-sign`
* `electron-packager` (always use this one before filing an issue)
* `extract-zip`
* `get-package-info`

We use the [`debug`](https://www.npmjs.com/package/debug#usage) module for this functionality. It
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -18,11 +18,11 @@
"homepage": "https://github.com/electron-userland/electron-packager",
"dependencies": {
"asar": "^2.0.1",
"cross-zip": "^2.1.5",
"debug": "^4.0.1",
"electron-download": "^4.1.1",
"electron-notarize": "^0.1.0",
"electron-osx-sign": "^0.4.11",
"extract-zip": "^1.0.3",
"fs-extra": "^7.0.0",
"galactus": "^0.2.1",
"get-package-info": "^1.0.0",
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Expand Up @@ -3,14 +3,16 @@
const common = require('./common')
const debug = require('debug')('electron-packager')
const download = require('./download')
const extract = require('extract-zip')
const fs = require('fs-extra')
const getMetadataFromPackageJSON = require('./infer')
const hooks = require('./hooks')
const ignore = require('./ignore')
const path = require('path')
const { promisify } = require('util')
const targets = require('./targets')
const zip = require('cross-zip')

const unzip = promisify(zip.unzip)

function debugHostInfo () {
debug(common.hostInfo())
Expand Down Expand Up @@ -68,7 +70,7 @@ class Packager {

async extractElectronZip (comboOpts, zipPath, buildDir) {
debug(`Extracting ${zipPath} to ${buildDir}`)
await promisify(extract)(zipPath, { dir: buildDir })
await unzip(zipPath, buildDir)
await hooks.promisifyHooks(this.opts.afterExtract, [buildDir, comboOpts.electronVersion, comboOpts.platform, comboOpts.arch])
}

Expand Down

0 comments on commit c3a499a

Please sign in to comment.