From 9c43cc369a764d361d9d9a22d607febd1d451d92 Mon Sep 17 00:00:00 2001 From: develar Date: Thu, 2 Apr 2020 09:07:05 +0200 Subject: [PATCH] fix(nsis): revert to 3.0.4.1 Close #4793 --- .gitignore | 2 -- package.json | 2 +- packages/app-builder-lib/package.json | 2 +- .../app-builder-lib/src/targets/nsis/nsisUtil.ts | 2 +- packages/electron-builder/package.json | 2 +- packages/electron-publish/package.json | 2 +- packages/electron-updater/package.json | 2 +- test/src/helpers/runTests.ts | 5 +++-- test/src/linux/linuxPackagerTest.ts | 14 +++++++------- test/src/mac/dmgTest.ts | 3 +-- test/src/mac/macIconTest.ts | 3 +-- test/src/windows/winPackagerTest.ts | 3 +-- yarn.lock | 10 +++++----- 13 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 42291931ce..9c174e9b99 100644 --- a/.gitignore +++ b/.gitignore @@ -26,8 +26,6 @@ electron-builder-*.d.ts /site/ /docs/ -__publish.sh - /.yarn/cache /.yarn/unplugged /.yarn/build-state.yml diff --git a/package.json b/package.json index eb3a0a6bcc..b2cd787753 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "test-all": "yarn pretest && node ./test/out/helpers/runTests.js", "test-linux": "docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/Library/Caches/electron:/root/.cache/electron -v ~/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine /bin/bash -c \"yarn && TEST_FILES=HoistedNodeModuleTest node ./test/out/helpers/runTests.js\"", "docker-images": "docker/build.sh", - "release": "BABEL_ENV=production yarn compile && sh ./__publish.sh && conventional-changelog -p angular -i CHANGELOG.md -s", + "release": "BABEL_ENV=production yarn compile && ln -f README.md packages/electron-builder/README.md && yarn workspaces foreach -p npm publish && yarn dlx -p conventional-changelog-cli conventional-changelog -p angular -i CHANGELOG.md -s", "schema": "typescript-json-schema packages/app-builder-lib/tsconfig.json Configuration --out packages/app-builder-lib/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --required && node ./scripts/fix-schema.js", "jsdoc": "ts2jsdoc packages/builder-util-runtime packages/builder-util packages/app-builder-lib packages/electron-builder packages/electron-publish", "jsdoc2md": "node scripts/jsdoc2md.js", diff --git a/packages/app-builder-lib/package.json b/packages/app-builder-lib/package.json index 2331854eb5..83c67ffc5d 100644 --- a/packages/app-builder-lib/package.json +++ b/packages/app-builder-lib/package.json @@ -47,7 +47,7 @@ "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", "builder-util": "workspace:*", - "builder-util-runtime": "8.6.1", + "builder-util-runtime": "workspace:*", "chromium-pickle-js": "^0.2.0", "debug": "^4.1.1", "ejs": "^3.0.2", diff --git a/packages/app-builder-lib/src/targets/nsis/nsisUtil.ts b/packages/app-builder-lib/src/targets/nsis/nsisUtil.ts index 5535aa5a64..c485448a37 100644 --- a/packages/app-builder-lib/src/targets/nsis/nsisUtil.ts +++ b/packages/app-builder-lib/src/targets/nsis/nsisUtil.ts @@ -19,7 +19,7 @@ export const NSIS_PATH = new Lazy(() => { return Promise.resolve(custom.trim()) } // noinspection SpellCheckingInspection - return getBinFromUrl("nsis", "3.0.5.0", "cTeQgtymnETCMGZa89l5A790zw4otqFThfQbm52AbhUtPUD2yp2lmmu/T9Hd6fG/rDej0o6X6OTupxZB3n8HbA==") + return getBinFromUrl("nsis", "3.0.4.1", "VKMiizYdmNdJOWpRGz4trl4lD++BvYP2irAXpMilheUP0pc93iKlWAoP843Vlraj8YG19CVn0j+dCo/hURz9+Q==") }) export class AppPackageHelper { diff --git a/packages/electron-builder/package.json b/packages/electron-builder/package.json index 616be66beb..1906342fbc 100644 --- a/packages/electron-builder/package.json +++ b/packages/electron-builder/package.json @@ -49,7 +49,7 @@ "app-builder-lib": "workspace:*", "bluebird-lst": "^1.0.9", "builder-util": "workspace:*", - "builder-util-runtime": "8.6.1", + "builder-util-runtime": "workspace:*", "chalk": "^3.0.0", "dmg-builder": "workspace:*", "fs-extra": "^9.0.0", diff --git a/packages/electron-publish/package.json b/packages/electron-publish/package.json index 872425f78c..27de159e82 100644 --- a/packages/electron-publish/package.json +++ b/packages/electron-publish/package.json @@ -14,7 +14,7 @@ "@types/fs-extra": "^8.1.0", "bluebird-lst": "^1.0.9", "builder-util": "workspace:*", - "builder-util-runtime": "8.6.1", + "builder-util-runtime": "workspace:*", "chalk": "^3.0.0", "fs-extra": "^9.0.0", "lazy-val": "^1.0.4", diff --git a/packages/electron-updater/package.json b/packages/electron-updater/package.json index b94abd8cd4..147342e624 100644 --- a/packages/electron-updater/package.json +++ b/packages/electron-updater/package.json @@ -13,7 +13,7 @@ ], "dependencies": { "@types/semver": "^7.1.0", - "builder-util-runtime": "8.6.1", + "builder-util-runtime": "workspace:*", "fs-extra": "^9.0.0", "js-yaml": "^3.13.1", "lazy-val": "^1.0.4", diff --git a/test/src/helpers/runTests.ts b/test/src/helpers/runTests.ts index 9aace4ed61..6aaa0140a2 100644 --- a/test/src/helpers/runTests.ts +++ b/test/src/helpers/runTests.ts @@ -1,9 +1,10 @@ import { createHash } from "crypto" -import { emptyDir, readJson, realpathSync, remove } from "fs-extra" +import { emptyDir, readJson, realpathSync } from "fs-extra" import { isCI as isCi } from "ci-info" import { tmpdir } from "os" import * as path from "path" import { deleteOldElectronVersion, downloadAllRequiredElectronVersions } from "./downloadElectron" +import { promises as fs } from "fs" const baseDir = process.env.APP_BUILDER_TMP_DIR || realpathSync(tmpdir()) const APP_BUILDER_TMP_DIR = path.join(baseDir, `et-${createHash("md5").update(__dirname).digest("hex")}`) @@ -154,7 +155,7 @@ async function runTests() { process.exit(exitCode) } - await remove(APP_BUILDER_TMP_DIR) + await fs.rmdir(APP_BUILDER_TMP_DIR, {recursive: true}) process.exitCode = exitCode if (testResult.globalConfig.forceExit) { process.exit(exitCode) diff --git a/test/src/linux/linuxPackagerTest.ts b/test/src/linux/linuxPackagerTest.ts index dd905c932a..90c8525a36 100644 --- a/test/src/linux/linuxPackagerTest.ts +++ b/test/src/linux/linuxPackagerTest.ts @@ -1,5 +1,5 @@ import { Arch, build, Platform } from "electron-builder" -import { outputFile, remove } from "fs-extra" +import { outputFile } from "fs-extra" import * as path from "path" import { GenericServerOptions } from "builder-util-runtime" import { assertThat } from "../helpers/fileAssert" @@ -111,7 +111,7 @@ test.ifNotWindows.ifNotCiMac("AppImage - default icon, custom executable and cus return false }, }, { - projectDirCreated: it => remove(path.join(it, "build")), + projectDirCreated: it => fs.rmdir(path.join(it, "build"), {recursive: true}), packed: async context => { const projectDir = context.getContent(Platform.LINUX) await assertThat(path.join(projectDir, "Foo")).isFile() @@ -133,7 +133,7 @@ test.ifNotWindows("icons from ICNS (mac)", app({ }, { projectDirCreated: async projectDir => { await fs.mkdir(path.join(projectDir, "resources"), {recursive: true}).then(() => fs.rename(path.join(projectDir, "build", "icon.icns"), path.join(projectDir, "resources", "time.icns"))) - await remove(path.join(projectDir, "build")) + await fs.rmdir(path.join(projectDir, "build"), {recursive: true}) }, packed: async context => { const projectDir = context.getResources(Platform.LINUX) @@ -148,7 +148,7 @@ test.ifNotWindows("icons from ICNS if nothing specified", app({ }, }, { projectDirCreated: async projectDir => { - await remove(path.join(projectDir, "build", "icons")) + await fs.rmdir(path.join(projectDir, "build", "icons"), {recursive: true}) }, })) @@ -179,7 +179,7 @@ test.ifNotWindows("icons dir with images without size in the filename", app({ }, { projectDirCreated: async projectDir => { await fs.rename(path.join(projectDir, "build", "icons", "256x256.png"), path.join(projectDir, "build", "icon.png")) - await remove(path.join(projectDir, "build", "icons")) + await fs.rmdir(path.join(projectDir, "build", "icons"), {recursive: true}) await fs.rename(path.join(projectDir, "build"), path.join(projectDir, "icons")) }, packed: async context => { @@ -195,11 +195,11 @@ test.ifNotWindows("icons from ICNS", app({ publish: null, }, }, { - projectDirCreated: it => remove(path.join(it, "build", "icons")), + projectDirCreated: it => fs.rmdir(path.join(it, "build", "icons"), {recursive: true}), packed: async context => { const projectDir = context.getResources(Platform.LINUX) - await remove(path.join(projectDir, "inspector")) + await fs.rmdir(path.join(projectDir, "inspector"), {recursive: true}) await build({ targets: appImageTarget, diff --git a/test/src/mac/dmgTest.ts b/test/src/mac/dmgTest.ts index b22e13223a..e02a9fcba5 100644 --- a/test/src/mac/dmgTest.ts +++ b/test/src/mac/dmgTest.ts @@ -3,7 +3,6 @@ import { copyFile } from "builder-util/out/fs" import { attachAndExecute, getDmgTemplatePath } from "dmg-builder/out/dmgUtil" import { Platform } from "electron-builder" import { PlatformPackager } from "app-builder-lib" -import { remove } from "fs-extra" import * as path from "path" import { promises as fs } from "fs" import { assertThat } from "../helpers/fileAssert" @@ -38,7 +37,7 @@ test.ifMac("no build directory", app({ return false }, }, { - projectDirCreated: projectDir => remove(path.join(projectDir, "build")), + projectDirCreated: projectDir => fs.rmdir(path.join(projectDir, "build"), {recursive: true}), })) test.ifMac("background color", app({ diff --git a/test/src/mac/macIconTest.ts b/test/src/mac/macIconTest.ts index 972068b712..1c6ef9fdf9 100644 --- a/test/src/mac/macIconTest.ts +++ b/test/src/mac/macIconTest.ts @@ -1,6 +1,5 @@ import { DIR_TARGET, Platform } from "electron-builder" import { promises as fs } from "fs" -import { remove } from "fs-extra" import * as path from "path" import { CheckingMacPackager } from "../helpers/CheckingPackager" import { app } from "../helpers/packTester" @@ -100,7 +99,7 @@ test.ifMac.ifAll("default png icon", () => { fs.unlink(path.join(projectDir, "build", "icon.icns")), fs.unlink(path.join(projectDir, "build", "icon.ico")), fs.copyFile(path.join(projectDir, "build", "icons", "512x512.png"), path.join(projectDir, "build", "icon.png")) - .then(() => remove(path.join(projectDir, "build", "icons"))) + .then(() => fs.rmdir(path.join(projectDir, "build", "icons"), {recursive: true})) ]), packed: () => assertIcon(platformPackager!!), })() diff --git a/test/src/windows/winPackagerTest.ts b/test/src/windows/winPackagerTest.ts index f204b54776..c4e1231a0e 100644 --- a/test/src/windows/winPackagerTest.ts +++ b/test/src/windows/winPackagerTest.ts @@ -1,5 +1,4 @@ import { Platform, DIR_TARGET } from "electron-builder" -import { remove } from "fs-extra" import { promises as fs } from "fs" import * as path from "path" import { CheckingWinPackager } from "../helpers/CheckingPackager" @@ -71,7 +70,7 @@ test.ifAll("win icon from icns", () => { }, { projectDirCreated: projectDir => Promise.all([ fs.unlink(path.join(projectDir, "build", "icon.ico")), - remove(path.join(projectDir, "build", "icons")), + fs.rmdir(path.join(projectDir, "build", "icons"), {recursive: true}), ]), packed: async () => { const file = await platformPackager!!.getIconPath() diff --git a/yarn.lock b/yarn.lock index deef58297a..1ddc0c9038 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2374,7 +2374,7 @@ __metadata: async-exit-hook: ^2.0.1 bluebird-lst: ^1.0.9 builder-util: "workspace:*" - builder-util-runtime: 8.6.1 + builder-util-runtime: "workspace:*" chromium-pickle-js: ^0.2.0 debug: ^4.1.1 dmg-builder: "workspace:*" @@ -3020,7 +3020,7 @@ __metadata: languageName: node linkType: hard -"builder-util-runtime@8.6.1, builder-util-runtime@workspace:*, builder-util-runtime@workspace:packages/builder-util-runtime": +"builder-util-runtime@workspace:*, builder-util-runtime@workspace:packages/builder-util-runtime": version: 0.0.0-use.local resolution: "builder-util-runtime@workspace:packages/builder-util-runtime" dependencies: @@ -3993,7 +3993,7 @@ __metadata: app-builder-lib: "workspace:*" bluebird-lst: ^1.0.9 builder-util: "workspace:*" - builder-util-runtime: 8.6.1 + builder-util-runtime: "workspace:*" chalk: ^3.0.0 dmg-builder: "workspace:*" fs-extra: ^9.0.0 @@ -4048,7 +4048,7 @@ __metadata: "@types/fs-extra": ^8.1.0 bluebird-lst: ^1.0.9 builder-util: "workspace:*" - builder-util-runtime: 8.6.1 + builder-util-runtime: "workspace:*" chalk: ^3.0.0 fs-extra: ^9.0.0 lazy-val: ^1.0.4 @@ -4071,7 +4071,7 @@ __metadata: "@types/js-yaml": ^3.12.3 "@types/lodash.isequal": ^4.5.5 "@types/semver": ^7.1.0 - builder-util-runtime: 8.6.1 + builder-util-runtime: "workspace:*" fs-extra: ^9.0.0 js-yaml: ^3.13.1 lazy-val: ^1.0.4