Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update dependencies per audit/outdated #7306

Merged
merged 3 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/silly-camels-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"app-builder-lib": patch
"builder-util-runtime": patch
"builder-util": patch
"dmg-builder": patch
"electron-builder-squirrel-windows": patch
"electron-builder": patch
"electron-forge-maker-appimage": patch
"electron-forge-maker-nsis-web": patch
"electron-forge-maker-nsis": patch
"electron-forge-maker-snap": patch
"electron-publish": patch
"electron-updater": patch
---

chore: Update dependencies per audit/outdated
13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@
"catharsis": "0.9.0",
"conventional-changelog-cli": "2.2.2",
"dmd": "6.1.0",
"fs-extra": "10.1.0",
"eslint": "8.26.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
"fs-extra": "10.1.0",
"globby": "11.1.0",
"husky": "7.0.4",
"jest-cli": "27.5.1",
"jsdoc-to-markdown": "7.0.1",
"lint-staged": "11.1.2",
"markdown2html-pro": "1.0.6",
"path-sort": "0.1.0",
"prettier": "2.3.2",
"prettier": "2.8.0",
"replace-in-file": "6.2.0",
"source-map-support": "0.5.21",
"ts-jsdoc": "3.2.2",
Expand All @@ -80,15 +80,6 @@
"pnpm": {
"patchedDependencies": {
"@changesets/[email protected]": "patches/@[email protected]"
},
"overrides": {
"markdown-it@<12.3.2": ">=12.3.2",
"@braintree/sanitize-url@<6.0.0": ">=6.0.0",
"mermaid@>=8.0.0 <9.1.2": ">=9.1.2",
"d3-color@<3.1.0": ">=3.1.0",
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
"minimatch@<3.0.5": ">=3.0.5",
"@types/keyv": "3.1.4"
}
}
}
20 changes: 7 additions & 13 deletions packages/app-builder-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
"dependencies": {
"7zip-bin": "~5.1.1",
"@develar/schema-utils": "~2.6.5",
"@electron/osx-sign": "^1.0.4",
"@electron/rebuild": "^3.2.10",
"@electron/universal": "1.3.3",
"@malept/flatpak-bundler": "^0.4.0",
"async-exit-hook": "^2.0.1",
Expand All @@ -58,21 +60,19 @@
"chromium-pickle-js": "^0.2.0",
"debug": "^4.3.4",
"ejs": "^3.1.8",
"electron-osx-sign": "^0.6.0",
"electron-publish": "workspace:*",
"electron-rebuild": "^3.2.9",
"form-data": "^4.0.0",
"fs-extra": "^10.1.0",
"hosted-git-info": "^4.1.0",
"is-ci": "^3.0.0",
"isbinaryfile": "^5.0.0",
"js-yaml": "^4.1.0",
"lazy-val": "^1.0.5",
"minimatch": "^3.1.2",
"minimatch": "^5.1.1",
"read-config-file": "6.3.2",
"sanitize-filename": "^1.6.3",
"semver": "^7.3.7",
"tar": "^6.1.11",
"semver": "^7.3.8",
"tar": "^6.1.12",
"temp-file": "^3.4.0"
},
"///": "babel in devDependencies for proton tests",
Expand Down Expand Up @@ -103,16 +103,10 @@
"@types/is-ci": "3.0.0",
"@types/js-yaml": "4.0.3",
"@types/semver": "7.3.8",
"@types/tar": "^6.1.1",
"@types/tar": "^6.1.3",
"dmg-builder": "workspace:*",
"electron-builder-squirrel-windows": "workspace:*"
},
"//": "electron-builder-squirrel-windows and dmg-builder added as dev dep for tests (as otherwise `require` doesn't work using Yarn 2)",
"typings": "./out/index.d.ts",
"pnpm": {
"overrides": {
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
"minimatch@<3.0.5": ">=3.0.5"
}
}
"typings": "./out/index.d.ts"
}
24 changes: 12 additions & 12 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
"type": "string"
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down Expand Up @@ -487,7 +487,7 @@
"description": "Any custom request headers"
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down Expand Up @@ -1375,7 +1375,7 @@
"description": "Any custom request headers"
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down Expand Up @@ -1507,7 +1507,7 @@
"description": "Any custom request headers"
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down Expand Up @@ -1606,7 +1606,7 @@
"description": "Any custom request headers"
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down Expand Up @@ -2549,7 +2549,7 @@
},
"gatekeeperAssess": {
"default": false,
"description": "Whether to let electron-osx-sign validate the signing or not.",
"description": "Whether to let @electron/osx-sign validate the signing or not.",
"type": "boolean"
},
"generateUpdatesFilesForAllChannels": {
Expand Down Expand Up @@ -2774,7 +2774,7 @@
}
],
"default": true,
"description": "Whether to let electron-osx-sign verify the contents or not."
"description": "Whether to let @electron/osx-sign verify the contents or not."
},
"target": {
"anyOf": [
Expand Down Expand Up @@ -3167,7 +3167,7 @@
},
"gatekeeperAssess": {
"default": false,
"description": "Whether to let electron-osx-sign validate the signing or not.",
"description": "Whether to let @electron/osx-sign validate the signing or not.",
"type": "boolean"
},
"generateUpdatesFilesForAllChannels": {
Expand Down Expand Up @@ -3392,7 +3392,7 @@
}
],
"default": true,
"description": "Whether to let electron-osx-sign verify the contents or not."
"description": "Whether to let @electron/osx-sign verify the contents or not."
},
"target": {
"anyOf": [
Expand Down Expand Up @@ -4927,7 +4927,7 @@
"description": "The type of storage to use for the object."
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down Expand Up @@ -5383,7 +5383,7 @@
"description": "Any custom request headers"
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down Expand Up @@ -5476,7 +5476,7 @@
"description": "Any custom request headers"
},
"timeout": {
"default": 60000,
"default": 120000,
"description": "Request timeout in milliseconds. (Default is 2 minutes; O is ignored)",
"type": [
"null",
Expand Down
7 changes: 3 additions & 4 deletions packages/app-builder-lib/src/codeSign/macCodeSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import * as path from "path"
import { getTempName } from "temp-file"
import { isAutoDiscoveryCodeSignIdentity } from "../util/flags"
import { importCertificate } from "./codesign"
import { Identity as _Identity } from "@electron/osx-sign/dist/cjs/util-identities"

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

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

export declare class Identity {
readonly name: string
readonly hash: string
readonly hash?: string

constructor(name: string, hash: string)
constructor(name: string, hash?: string)
}

const _Identity = require("electron-osx-sign/util-identities").Identity

function parseIdentity(line: string): Identity {
const firstQuoteIndex = line.indexOf('"')
const name = line.substring(firstQuoteIndex + 1, line.lastIndexOf('"'))
Expand Down
3 changes: 2 additions & 1 deletion packages/app-builder-lib/src/macPackager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BluebirdPromise from "bluebird-lst"
import { deepAssign, Arch, AsyncTaskManager, exec, InvalidConfigurationError, log, use, getArchSuffix } from "builder-util"
import { signAsync, SignOptions } from "electron-osx-sign"
import { signAsync } from "@electron/osx-sign"
import { SignOptions } from "@electron/osx-sign/dist/cjs/types"
import { mkdir, readdir } from "fs/promises"
import { Lazy } from "lazy-val"
import * as path from "path"
Expand Down
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/options/macOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
readonly hardenedRuntime?: boolean

/**
* Whether to let electron-osx-sign validate the signing or not.
* Whether to let @electron/osx-sign validate the signing or not.
* @default false
*/
readonly gatekeeperAssess?: boolean

/**
* Whether to let electron-osx-sign verify the contents or not.
* Whether to let @electron/osx-sign verify the contents or not.
* @default true
*/
readonly strictVerify?: Array<string> | string | boolean
Expand Down
4 changes: 2 additions & 2 deletions packages/app-builder-lib/src/targets/pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const certType = "Developer ID Installer"
// http://www.shanekirk.com/2013/10/creating-flat-packages-in-osx/
// to use --scripts, we must build .app bundle separately using pkgbuild
// productbuild --scripts doesn't work (because scripts in this case not added to our package)
// https://github.com/electron-userland/electron-osx-sign/issues/96#issuecomment-274986942
// https://github.com/electron-userland/@electron/osx-sign/issues/96#issuecomment-274986942
export class PkgTarget extends Target {
readonly options: PkgOptions = {
allowAnywhere: true,
Expand Down Expand Up @@ -197,7 +197,7 @@ export class PkgTarget extends Target {
export function prepareProductBuildArgs(identity: Identity | null, keychain: string | null | undefined): Array<string> {
const args: Array<string> = []
if (identity != null) {
args.push("--sign", identity.hash)
args.push("--sign", identity.hash!)
if (keychain != null) {
args.push("--keychain", keychain)
}
Expand Down
6 changes: 3 additions & 3 deletions packages/app-builder-lib/src/util/packageMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export function checkMetadata(metadata: Metadata, devMetadata: any | null, appPa
}

const devDependencies = (metadata as any).devDependencies
if (devDependencies != null && "electron-rebuild" in devDependencies) {
if (devDependencies != null && "@electron/rebuild" in devDependencies) {
log.info(
'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`'
'@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`'
)
}

Expand Down Expand Up @@ -110,7 +110,7 @@ function checkDependencies(dependencies: { [key: string]: string } | null | unde
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"`)
}

const deps = ["electron", "electron-prebuilt", "electron-rebuild"]
const deps = ["electron", "electron-prebuilt", "@electron/rebuild"]
if (process.env.ALLOW_ELECTRON_BUILDER_AS_PRODUCTION_DEPENDENCY !== "true") {
deps.push("electron-builder")
}
Expand Down
6 changes: 3 additions & 3 deletions packages/app-builder-lib/src/util/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import * as path from "path"
import { Configuration } from "../configuration"
import { NodeModuleDirInfo } from "./packageDependencies"
import { getElectronVersion } from "../electron/electronVersion"
import * as electronRebuild from "electron-rebuild"
import * as searchModule from "electron-rebuild/lib/src/search-module"
import * as electronRebuild from "@electron/rebuild"
import * as searchModule from "@electron/rebuild/lib/src/search-module"

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

/** @internal */
export async function rebuild(appDir: string, buildFromSource: boolean, arch = process.arch) {
log.info({ appDir, arch }, "executing electron-rebuild")
log.info({ appDir, arch }, "executing @electron/rebuild")
const options: electronRebuild.RebuildOptions = {
buildPath: appDir,
electronVersion: await getElectronVersion(appDir),
Expand Down
8 changes: 1 addition & 7 deletions packages/builder-util-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,5 @@
"@types/debug": "4.1.7",
"@types/sax": "1.2.3"
},
"types": "./out/index.d.ts",
"pnpm": {
"overrides": {
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
"minimatch@<3.0.5": ">=3.0.5"
}
}
"types": "./out/index.d.ts"
}
10 changes: 2 additions & 8 deletions packages/builder-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"app-builder-bin": "4.0.0",
"bluebird-lst": "^1.0.9",
"builder-util-runtime": "workspace:*",
"chalk": "^4.1.1",
"chalk": "^4.1.2",
"cross-spawn": "^7.0.3",
"debug": "^4.3.4",
"fs-extra": "^10.1.0",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"is-ci": "^3.0.0",
"js-yaml": "^4.1.0",
"source-map-support": "^0.5.19",
Expand All @@ -39,11 +39,5 @@
"@types/is-ci": "3.0.0",
"@types/js-yaml": "4.0.3",
"@types/source-map-support": "0.5.4"
},
"pnpm": {
"overrides": {
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
"minimatch@<3.0.5": ">=3.0.5"
}
}
}
8 changes: 1 addition & 7 deletions packages/dmg-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,5 @@
"@types/js-yaml": "4.0.3",
"temp-file": "3.4.0"
},
"typings": "./out/dmg.d.ts",
"pnpm": {
"overrides": {
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
"minimatch@<3.0.5": ">=3.0.5"
}
}
"typings": "./out/dmg.d.ts"
}
2 changes: 1 addition & 1 deletion packages/dmg-builder/src/dmg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class DmgTarget extends Target {
}
}

const args = ["--sign", identity.hash]
const args = ["--sign", identity.hash!]
if (keychainFile != null) {
args.push("--keychain", keychainFile)
}
Expand Down
8 changes: 1 addition & 7 deletions packages/electron-builder-squirrel-windows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,5 @@
"optionalDependencies": {
"7zip-bin": "~5.1.1"
},
"types": "./out/SquirrelWindowsTarget.d.ts",
"pnpm": {
"overrides": {
"ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1",
"minimatch@<3.0.5": ">=3.0.5"
}
}
"types": "./out/SquirrelWindowsTarget.d.ts"
}
Loading