Skip to content

Commit 01c6791

Browse files
authored
chore: Update dependencies per audit/outdated (#7306)
1 parent 0f65fe1 commit 01c6791

File tree

26 files changed

+659
-1105
lines changed

26 files changed

+659
-1105
lines changed

.changeset/silly-camels-fry.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"app-builder-lib": patch
3+
"builder-util-runtime": patch
4+
"builder-util": patch
5+
"dmg-builder": patch
6+
"electron-builder-squirrel-windows": patch
7+
"electron-builder": patch
8+
"electron-forge-maker-appimage": patch
9+
"electron-forge-maker-nsis-web": patch
10+
"electron-forge-maker-nsis": patch
11+
"electron-forge-maker-snap": patch
12+
"electron-publish": patch
13+
"electron-updater": patch
14+
---
15+
16+
chore: Update dependencies per audit/outdated

package.json

+2-11
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@
5454
"catharsis": "0.9.0",
5555
"conventional-changelog-cli": "2.2.2",
5656
"dmd": "6.1.0",
57-
"fs-extra": "10.1.0",
5857
"eslint": "8.26.0",
5958
"eslint-config-prettier": "8.5.0",
6059
"eslint-plugin-prettier": "4.2.1",
60+
"fs-extra": "10.1.0",
6161
"globby": "11.1.0",
6262
"husky": "7.0.4",
6363
"jest-cli": "27.5.1",
6464
"jsdoc-to-markdown": "7.0.1",
6565
"lint-staged": "11.1.2",
6666
"markdown2html-pro": "1.0.6",
6767
"path-sort": "0.1.0",
68-
"prettier": "2.3.2",
68+
"prettier": "2.8.0",
6969
"replace-in-file": "6.2.0",
7070
"source-map-support": "0.5.21",
7171
"ts-jsdoc": "3.2.2",
@@ -80,15 +80,6 @@
8080
"pnpm": {
8181
"patchedDependencies": {
8282
"@changesets/[email protected]": "patches/@[email protected]"
83-
},
84-
"overrides": {
85-
"markdown-it@<12.3.2": ">=12.3.2",
86-
"@braintree/sanitize-url@<6.0.0": ">=6.0.0",
87-
"mermaid@>=8.0.0 <9.1.2": ">=9.1.2",
88-
"d3-color@<3.1.0": ">=3.1.0",
89-
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
90-
"minimatch@<3.0.5": ">=3.0.5",
91-
"@types/keyv": "3.1.4"
9283
}
9384
}
9485
}

packages/app-builder-lib/package.json

+7-13
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
"dependencies": {
5050
"7zip-bin": "~5.1.1",
5151
"@develar/schema-utils": "~2.6.5",
52+
"@electron/osx-sign": "^1.0.4",
53+
"@electron/rebuild": "^3.2.10",
5254
"@electron/universal": "1.3.3",
5355
"@malept/flatpak-bundler": "^0.4.0",
5456
"async-exit-hook": "^2.0.1",
@@ -58,21 +60,19 @@
5860
"chromium-pickle-js": "^0.2.0",
5961
"debug": "^4.3.4",
6062
"ejs": "^3.1.8",
61-
"electron-osx-sign": "^0.6.0",
6263
"electron-publish": "workspace:*",
63-
"electron-rebuild": "^3.2.9",
6464
"form-data": "^4.0.0",
6565
"fs-extra": "^10.1.0",
6666
"hosted-git-info": "^4.1.0",
6767
"is-ci": "^3.0.0",
6868
"isbinaryfile": "^5.0.0",
6969
"js-yaml": "^4.1.0",
7070
"lazy-val": "^1.0.5",
71-
"minimatch": "^3.1.2",
71+
"minimatch": "^5.1.1",
7272
"read-config-file": "6.3.2",
7373
"sanitize-filename": "^1.6.3",
74-
"semver": "^7.3.7",
75-
"tar": "^6.1.11",
74+
"semver": "^7.3.8",
75+
"tar": "^6.1.12",
7676
"temp-file": "^3.4.0"
7777
},
7878
"///": "babel in devDependencies for proton tests",
@@ -103,16 +103,10 @@
103103
"@types/is-ci": "3.0.0",
104104
"@types/js-yaml": "4.0.3",
105105
"@types/semver": "7.3.8",
106-
"@types/tar": "^6.1.1",
106+
"@types/tar": "^6.1.3",
107107
"dmg-builder": "workspace:*",
108108
"electron-builder-squirrel-windows": "workspace:*"
109109
},
110110
"//": "electron-builder-squirrel-windows and dmg-builder added as dev dep for tests (as otherwise `require` doesn't work using Yarn 2)",
111-
"typings": "./out/index.d.ts",
112-
"pnpm": {
113-
"overrides": {
114-
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
115-
"minimatch@<3.0.5": ">=3.0.5"
116-
}
117-
}
111+
"typings": "./out/index.d.ts"
118112
}

packages/app-builder-lib/scheme.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
"type": "string"
383383
},
384384
"timeout": {
385-
"default": 60000,
385+
"default": 120000,
386386
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
387387
"type": [
388388
"null",
@@ -487,7 +487,7 @@
487487
"description": "Any custom request headers"
488488
},
489489
"timeout": {
490-
"default": 60000,
490+
"default": 120000,
491491
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
492492
"type": [
493493
"null",
@@ -1375,7 +1375,7 @@
13751375
"description": "Any custom request headers"
13761376
},
13771377
"timeout": {
1378-
"default": 60000,
1378+
"default": 120000,
13791379
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
13801380
"type": [
13811381
"null",
@@ -1507,7 +1507,7 @@
15071507
"description": "Any custom request headers"
15081508
},
15091509
"timeout": {
1510-
"default": 60000,
1510+
"default": 120000,
15111511
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
15121512
"type": [
15131513
"null",
@@ -1606,7 +1606,7 @@
16061606
"description": "Any custom request headers"
16071607
},
16081608
"timeout": {
1609-
"default": 60000,
1609+
"default": 120000,
16101610
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
16111611
"type": [
16121612
"null",
@@ -2549,7 +2549,7 @@
25492549
},
25502550
"gatekeeperAssess": {
25512551
"default": false,
2552-
"description": "Whether to let electron-osx-sign validate the signing or not.",
2552+
"description": "Whether to let @electron/osx-sign validate the signing or not.",
25532553
"type": "boolean"
25542554
},
25552555
"generateUpdatesFilesForAllChannels": {
@@ -2774,7 +2774,7 @@
27742774
}
27752775
],
27762776
"default": true,
2777-
"description": "Whether to let electron-osx-sign verify the contents or not."
2777+
"description": "Whether to let @electron/osx-sign verify the contents or not."
27782778
},
27792779
"target": {
27802780
"anyOf": [
@@ -3167,7 +3167,7 @@
31673167
},
31683168
"gatekeeperAssess": {
31693169
"default": false,
3170-
"description": "Whether to let electron-osx-sign validate the signing or not.",
3170+
"description": "Whether to let @electron/osx-sign validate the signing or not.",
31713171
"type": "boolean"
31723172
},
31733173
"generateUpdatesFilesForAllChannels": {
@@ -3392,7 +3392,7 @@
33923392
}
33933393
],
33943394
"default": true,
3395-
"description": "Whether to let electron-osx-sign verify the contents or not."
3395+
"description": "Whether to let @electron/osx-sign verify the contents or not."
33963396
},
33973397
"target": {
33983398
"anyOf": [
@@ -4927,7 +4927,7 @@
49274927
"description": "The type of storage to use for the object."
49284928
},
49294929
"timeout": {
4930-
"default": 60000,
4930+
"default": 120000,
49314931
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
49324932
"type": [
49334933
"null",
@@ -5383,7 +5383,7 @@
53835383
"description": "Any custom request headers"
53845384
},
53855385
"timeout": {
5386-
"default": 60000,
5386+
"default": 120000,
53875387
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
53885388
"type": [
53895389
"null",
@@ -5476,7 +5476,7 @@
54765476
"description": "Any custom request headers"
54775477
},
54785478
"timeout": {
5479-
"default": 60000,
5479+
"default": 120000,
54805480
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
54815481
"type": [
54825482
"null",

packages/app-builder-lib/src/codeSign/macCodeSign.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import * as path from "path"
1010
import { getTempName } from "temp-file"
1111
import { isAutoDiscoveryCodeSignIdentity } from "../util/flags"
1212
import { importCertificate } from "./codesign"
13+
import { Identity as _Identity } from "@electron/osx-sign/dist/cjs/util-identities"
1314

1415
export const appleCertificatePrefixes = ["Developer ID Application:", "Developer ID Installer:", "3rd Party Mac Developer Application:", "3rd Party Mac Developer Installer:"]
1516

@@ -309,13 +310,11 @@ async function _findIdentity(type: CertType, qualifier?: string | null, keychain
309310

310311
export declare class Identity {
311312
readonly name: string
312-
readonly hash: string
313+
readonly hash?: string
313314

314-
constructor(name: string, hash: string)
315+
constructor(name: string, hash?: string)
315316
}
316317

317-
const _Identity = require("electron-osx-sign/util-identities").Identity
318-
319318
function parseIdentity(line: string): Identity {
320319
const firstQuoteIndex = line.indexOf('"')
321320
const name = line.substring(firstQuoteIndex + 1, line.lastIndexOf('"'))

packages/app-builder-lib/src/macPackager.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import BluebirdPromise from "bluebird-lst"
22
import { deepAssign, Arch, AsyncTaskManager, exec, InvalidConfigurationError, log, use, getArchSuffix } from "builder-util"
3-
import { signAsync, SignOptions } from "electron-osx-sign"
3+
import { signAsync } from "@electron/osx-sign"
4+
import { SignOptions } from "@electron/osx-sign/dist/cjs/types"
45
import { mkdir, readdir } from "fs/promises"
56
import { Lazy } from "lazy-val"
67
import * as path from "path"

packages/app-builder-lib/src/options/macOptions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
158158
readonly hardenedRuntime?: boolean
159159

160160
/**
161-
* Whether to let electron-osx-sign validate the signing or not.
161+
* Whether to let @electron/osx-sign validate the signing or not.
162162
* @default false
163163
*/
164164
readonly gatekeeperAssess?: boolean
165165

166166
/**
167-
* Whether to let electron-osx-sign verify the contents or not.
167+
* Whether to let @electron/osx-sign verify the contents or not.
168168
* @default true
169169
*/
170170
readonly strictVerify?: Array<string> | string | boolean

packages/app-builder-lib/src/targets/pkg.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const certType = "Developer ID Installer"
1515
// http://www.shanekirk.com/2013/10/creating-flat-packages-in-osx/
1616
// to use --scripts, we must build .app bundle separately using pkgbuild
1717
// productbuild --scripts doesn't work (because scripts in this case not added to our package)
18-
// https://github.com/electron-userland/electron-osx-sign/issues/96#issuecomment-274986942
18+
// https://github.com/electron-userland/@electron/osx-sign/issues/96#issuecomment-274986942
1919
export class PkgTarget extends Target {
2020
readonly options: PkgOptions = {
2121
allowAnywhere: true,
@@ -197,7 +197,7 @@ export class PkgTarget extends Target {
197197
export function prepareProductBuildArgs(identity: Identity | null, keychain: string | null | undefined): Array<string> {
198198
const args: Array<string> = []
199199
if (identity != null) {
200-
args.push("--sign", identity.hash)
200+
args.push("--sign", identity.hash!)
201201
if (keychain != null) {
202202
args.push("--keychain", keychain)
203203
}

packages/app-builder-lib/src/util/packageMetadata.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ export function checkMetadata(metadata: Metadata, devMetadata: any | null, appPa
6868
}
6969

7070
const devDependencies = (metadata as any).devDependencies
71-
if (devDependencies != null && "electron-rebuild" in devDependencies) {
71+
if (devDependencies != null && "@electron/rebuild" in devDependencies) {
7272
log.info(
73-
'electron-rebuild is already incorporated into electron-builder, please consider to remove excess dependency from devDependencies\n\nTo ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`'
73+
'@electron/rebuild is already incorporated into electron-builder, please consider to remove excess dependency from devDependencies\n\nTo ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`'
7474
)
7575
}
7676

@@ -110,7 +110,7 @@ function checkDependencies(dependencies: { [key: string]: string } | null | unde
110110
errors.push(`At least electron-builder-squirrel-windows 20.32.0 is required by current electron-builder version. Please set electron-builder-squirrel-windows to "^20.32.0"`)
111111
}
112112

113-
const deps = ["electron", "electron-prebuilt", "electron-rebuild"]
113+
const deps = ["electron", "electron-prebuilt", "@electron/rebuild"]
114114
if (process.env.ALLOW_ELECTRON_BUILDER_AS_PRODUCTION_DEPENDENCY !== "true") {
115115
deps.push("electron-builder")
116116
}

packages/app-builder-lib/src/util/yarn.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import * as path from "path"
66
import { Configuration } from "../configuration"
77
import { NodeModuleDirInfo } from "./packageDependencies"
88
import { getElectronVersion } from "../electron/electronVersion"
9-
import * as electronRebuild from "electron-rebuild"
10-
import * as searchModule from "electron-rebuild/lib/src/search-module"
9+
import * as electronRebuild from "@electron/rebuild"
10+
import * as searchModule from "@electron/rebuild/lib/src/search-module"
1111

1212
export async function installOrRebuild(config: Configuration, appDir: string, options: RebuildOptions, forceInstall = false) {
1313
let isDependenciesInstalled = false
@@ -150,7 +150,7 @@ export interface RebuildOptions {
150150

151151
/** @internal */
152152
export async function rebuild(appDir: string, buildFromSource: boolean, arch = process.arch) {
153-
log.info({ appDir, arch }, "executing electron-rebuild")
153+
log.info({ appDir, arch }, "executing @electron/rebuild")
154154
const options: electronRebuild.RebuildOptions = {
155155
buildPath: appDir,
156156
electronVersion: await getElectronVersion(appDir),

packages/builder-util-runtime/package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,5 @@
2525
"@types/debug": "4.1.7",
2626
"@types/sax": "1.2.3"
2727
},
28-
"types": "./out/index.d.ts",
29-
"pnpm": {
30-
"overrides": {
31-
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
32-
"minimatch@<3.0.5": ">=3.0.5"
33-
}
34-
}
28+
"types": "./out/index.d.ts"
3529
}

packages/builder-util/package.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"app-builder-bin": "4.0.0",
2222
"bluebird-lst": "^1.0.9",
2323
"builder-util-runtime": "workspace:*",
24-
"chalk": "^4.1.1",
24+
"chalk": "^4.1.2",
2525
"cross-spawn": "^7.0.3",
2626
"debug": "^4.3.4",
2727
"fs-extra": "^10.1.0",
2828
"http-proxy-agent": "^5.0.0",
29-
"https-proxy-agent": "^5.0.0",
29+
"https-proxy-agent": "^5.0.1",
3030
"is-ci": "^3.0.0",
3131
"js-yaml": "^4.1.0",
3232
"source-map-support": "^0.5.19",
@@ -39,11 +39,5 @@
3939
"@types/is-ci": "3.0.0",
4040
"@types/js-yaml": "4.0.3",
4141
"@types/source-map-support": "0.5.4"
42-
},
43-
"pnpm": {
44-
"overrides": {
45-
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
46-
"minimatch@<3.0.5": ">=3.0.5"
47-
}
4842
}
4943
}

packages/dmg-builder/package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,5 @@
3232
"@types/js-yaml": "4.0.3",
3333
"temp-file": "3.4.0"
3434
},
35-
"typings": "./out/dmg.d.ts",
36-
"pnpm": {
37-
"overrides": {
38-
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
39-
"minimatch@<3.0.5": ">=3.0.5"
40-
}
41-
}
35+
"typings": "./out/dmg.d.ts"
4236
}

packages/dmg-builder/src/dmg.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class DmgTarget extends Target {
115115
}
116116
}
117117

118-
const args = ["--sign", identity.hash]
118+
const args = ["--sign", identity.hash!]
119119
if (keychainFile != null) {
120120
args.push("--keychain", keychainFile)
121121
}

packages/electron-builder-squirrel-windows/package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,5 @@
2727
"optionalDependencies": {
2828
"7zip-bin": "~5.1.1"
2929
},
30-
"types": "./out/SquirrelWindowsTarget.d.ts",
31-
"pnpm": {
32-
"overrides": {
33-
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
34-
"minimatch@<3.0.5": ">=3.0.5"
35-
}
36-
}
30+
"types": "./out/SquirrelWindowsTarget.d.ts"
3731
}

0 commit comments

Comments
 (0)