diff --git a/packages/electron-builder-lib/src/fileTransformer.ts b/packages/electron-builder-lib/src/fileTransformer.ts index b8675399ac0..ab576085b6d 100644 --- a/packages/electron-builder-lib/src/fileTransformer.ts +++ b/packages/electron-builder-lib/src/fileTransformer.ts @@ -56,7 +56,7 @@ export function createElectronCompilerHost(projectDir: string, cacheDir: string) return require(path.join(electronCompilePath, "config-parser")).createCompilerHostFromProjectRoot(projectDir, cacheDir) } -const ignoredPackageMetadataProperties = new Set(["dist", "gitHead", "keywords", "build", "jspm", "ava", "xo", "nyc", "eslintConfig", "contributors", "bundleDependencies", "bugs", "tags"]) +const ignoredPackageMetadataProperties = new Set(["dist", "gitHead", "keywords", "build", "jspm", "ava", "xo", "nyc", "eslintConfig", "contributors", "bundleDependencies", "tags"]) interface CleanupPackageFileOptions { readonly isRemovePackageScripts: boolean @@ -74,7 +74,9 @@ function cleanupPackageJson(data: any, options: CleanupPackageFileOptions): any if (prop[0] === "_" || ignoredPackageMetadataProperties.has(prop) || (options.isRemovePackageScripts && prop === "scripts") || - (options.isMain && prop === "devDependencies") || (isRemoveBabel && prop === "babel")) { + (options.isMain && prop === "devDependencies") || + (!options.isMain && prop === "bugs") || + (isRemoveBabel && prop === "babel")) { delete data[prop] changed = true } diff --git a/test/out/windows/__snapshots__/webInstallerTest.js.snap b/test/out/windows/__snapshots__/webInstallerTest.js.snap index d4601fe9e84..8945c1ee4e1 100644 --- a/test/out/windows/__snapshots__/webInstallerTest.js.snap +++ b/test/out/windows/__snapshots__/webInstallerTest.js.snap @@ -15,12 +15,14 @@ Object { "packages": Object { "ia32": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-ia32.nsis.7z", "path": "TestApp-1.1.0-ia32.nsis.7z", "sha512": "@sha512", "size": "@size", }, "x64": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-x64.nsis.7z", "path": "TestApp-1.1.0-x64.nsis.7z", "sha512": "@sha512", "size": "@size", @@ -40,12 +42,14 @@ Object { "packages": Object { "ia32": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-ia32.nsis.7z", "path": "TestApp-1.1.0-ia32.nsis.7z", "sha512": "@sha512", "size": "@size", }, "x64": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-x64.nsis.7z", "path": "TestApp-1.1.0-x64.nsis.7z", "sha512": "@sha512", "size": "@size", @@ -80,6 +84,7 @@ Object { "packages": Object { "x64": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-x64.nsis.7z", "path": "TestApp-1.1.0-x64.nsis.7z", "sha512": "@sha512", "size": "@size", @@ -100,6 +105,7 @@ Object { "packages": Object { "x64": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-x64.nsis.7z", "path": "TestApp-1.1.0-x64.nsis.7z", "sha512": "@sha512", "size": "@size", @@ -130,6 +136,7 @@ Object { "packages": Object { "x64": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-x64.nsis.7z", "path": "TestApp-1.1.0-x64.nsis.7z", "sha512": "@sha512", "size": "@size", @@ -154,6 +161,7 @@ Object { "packages": Object { "x64": Object { "blockMapSize": "@blockMapSize", + "file": "TestApp-1.1.0-x64.nsis.7z", "path": "TestApp-1.1.0-x64.nsis.7z", "sha512": "@sha512", "size": "@size",