electron-packager
Advanced tools
Comparing version 17.1.0 to 17.1.1
{ | ||
"name": "electron-packager", | ||
"version": "17.1.0", | ||
"version": "17.1.1", | ||
"description": "Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -36,3 +36,4 @@ 'use strict' | ||
async testSymlink (comboOpts, zipPath) { | ||
const testPath = path.join(this.tempBase, `symlink-test-${comboOpts.platform}-${comboOpts.arch}`) | ||
await fs.mkdirp(this.tempBase) | ||
const testPath = await fs.mkdtemp(path.join(this.tempBase, `symlink-test-${comboOpts.platform}-${comboOpts.arch}-`)) | ||
const testFile = path.join(testPath, 'test') | ||
@@ -78,3 +79,3 @@ const testLink = path.join(testPath, 'testlink') | ||
buildDir (platform, arch) { | ||
async buildDir (platform, arch) { | ||
let buildParentDir | ||
@@ -86,7 +87,8 @@ if (this.useTempDir) { | ||
} | ||
return path.resolve(buildParentDir, `${platform}-${arch}-template`) | ||
await fs.mkdirp(buildParentDir) | ||
return await fs.mkdtemp(path.resolve(buildParentDir, `${platform}-${arch}-template-`)) | ||
} | ||
async createApp (comboOpts, zipPath) { | ||
const buildDir = this.buildDir(comboOpts.platform, comboOpts.arch) | ||
const buildDir = await this.buildDir(comboOpts.platform, comboOpts.arch) | ||
common.info(`Packaging app for platform ${comboOpts.platform} ${comboOpts.arch} using electron v${comboOpts.electronVersion}`, this.opts.quiet) | ||
@@ -165,3 +167,3 @@ | ||
if (common.isPlatformMac(comboOpts.platform) && comboOpts.arch === 'universal') { | ||
return packageUniversalMac(this.packageForPlatformAndArchWithOpts.bind(this), this.buildDir(comboOpts.platform, comboOpts.arch), comboOpts, downloadOpts, this.tempBase) | ||
return packageUniversalMac(this.packageForPlatformAndArchWithOpts.bind(this), await this.buildDir(comboOpts.platform, comboOpts.arch), comboOpts, downloadOpts, this.tempBase) | ||
} | ||
@@ -168,0 +170,0 @@ |
@@ -64,7 +64,11 @@ 'use strict' | ||
} else { | ||
return path.join( | ||
common.baseTempDir(this.opts), | ||
`${this.opts.platform}-${this.opts.arch}`, | ||
common.generateFinalBasename(this.opts) | ||
) | ||
if (!this.cachedStagingPath) { | ||
const parentDir = path.join( | ||
common.baseTempDir(this.opts), | ||
`${this.opts.platform}-${this.opts.arch}` | ||
) | ||
fs.mkdirpSync(parentDir) | ||
this.cachedStagingPath = fs.mkdtempSync(path.join(parentDir, `${common.generateFinalBasename(this.opts)}-`)) | ||
} | ||
return this.cachedStagingPath | ||
} | ||
@@ -71,0 +75,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
142686
2269
0