Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Nov 27, 2019
1 parent eb32b22 commit c80e5e6
Show file tree
Hide file tree
Showing 27 changed files with 1,093 additions and 932 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:12.13.0
- image: circleci/node:12.13.1
steps:
- checkout
- restore_cache:
keys:
- deps-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- v-7.0.0-electron
- v-7.1.2-electron
- run:
command: yarn --frozen-lockfile
- run:
Expand All @@ -23,7 +23,7 @@ jobs:
- run:
command: node ./test/out/helpers/downloadElectron.js
- save_cache:
key: v-7.0.0-electron
key: v-7.1.2-electron
paths:
- ~/.cache/electron

Expand All @@ -41,7 +41,7 @@ jobs:
- deps-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- v-7.0.0-electron
- v-7.1.2-electron
# because in the build job we use circleci docker image and circleci restores cache to original user home
- run:
command: |
Expand Down
2 changes: 1 addition & 1 deletion docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder:base

ENV NODE_VERSION 12.13.0
ENV NODE_VERSION 12.13.1

# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
RUN curl -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xz -C /usr/local --strip-components=1 && \
Expand Down
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"@develar/schema-utils": "~2.1.0",
"@types/debug": "^4.1.5",
"@types/is-ci": "^2.0.0",
"@types/semver": "^6.0.2",
"app-builder-bin": "3.4.5",
"@types/semver": "^6.2.0",
"app-builder-bin": "3.5.1",
"archiver": "^3.1.1",
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.9",
"chalk": "^2.4.2",
"chalk": "^3.0.0",
"chromium-pickle-js": "^0.2.0",
"debug": "^4.1.1",
"ejs": "^2.7.1",
"ejs": "^3.0.1",
"fs-extra": "^8.1.0",
"hosted-git-info": "^3.0.2",
"iconv-lite": "^0.5.0",
Expand All @@ -60,38 +60,38 @@
"sanitize-filename": "^1.6.3",
"sax": "^1.2.4",
"semver": "^6.3.0",
"source-map-support": "^0.5.13",
"stat-mode": "^0.3.0",
"sumchecker": "^3.0.0",
"source-map-support": "^0.5.16",
"stat-mode": "^1.0.0",
"sumchecker": "^3.0.1",
"temp-file": "^3.3.4",
"tunnel-agent": "^0.6.0",
"update-notifier": "^3.0.1",
"yargs": "^14.2.0"
"yargs": "^15.0.2"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/plugin-proposal-do-expressions": "^7.6.0",
"@babel/plugin-proposal-export-default-from": "^7.5.2",
"@babel/plugin-proposal-export-namespace-from": "^7.5.2",
"@babel/plugin-proposal-function-bind": "^7.2.0",
"@babel/plugin-proposal-function-sent": "^7.5.0",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/plugin-proposal-pipeline-operator": "^7.5.0",
"@babel/plugin-proposal-throw-expressions": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/preset-env": "^7.6.3",
"@babel/preset-react": "^7.6.3",
"@types/ejs": "^2.6.3",
"@babel/core": "^7.7.4",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/plugin-proposal-do-expressions": "^7.7.4",
"@babel/plugin-proposal-export-default-from": "^7.7.4",
"@babel/plugin-proposal-export-namespace-from": "^7.7.4",
"@babel/plugin-proposal-function-bind": "^7.7.4",
"@babel/plugin-proposal-function-sent": "^7.7.4",
"@babel/plugin-proposal-json-strings": "^7.7.4",
"@babel/plugin-proposal-logical-assignment-operators": "^7.7.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-numeric-separator": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.4",
"@babel/plugin-proposal-pipeline-operator": "^7.7.4",
"@babel/plugin-proposal-throw-expressions": "^7.7.4",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-syntax-import-meta": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/preset-react": "^7.7.4",
"@types/ejs": "^2.7.0",
"@types/fs-extra": "^8.0.1",
"@types/ini": "^1.3.30",
"@types/jest": "^24.0.19",
"@types/jest": "^24.0.23",
"@types/js-yaml": "^3.12.1",
"@types/lodash.isequal": "^4.5.5",
"@types/node-emoji": "^1.8.1",
Expand All @@ -102,20 +102,20 @@
"babel-core": "^7.0.0-bridge.0",
"babel-preset-jest": "^24.9.0",
"babel-preset-ts-node8": "~4.0.0",
"convert-source-map": "^1.6.0",
"convert-source-map": "^1.7.0",
"decompress-zip": "^0.3.1",
"depcheck": "^0.8.3",
"depcheck": "^0.9.1",
"electron-builder-tslint-config": "^1.1.0",
"globby": "^10.0.1",
"jest-cli": "^24.9.0",
"jest-junit": "^8.0.0",
"jsdoc-to-markdown": "^5.0.2",
"jest-junit": "^9.0.0",
"jsdoc-to-markdown": "^5.0.3",
"path-sort": "^0.1.0",
"sumchecker": "^3.0.0",
"sumchecker": "^3.0.1",
"ts-babel": "6.1.7",
"ts-jsdoc": "^3.1.1",
"tslint": "^5.20.0",
"typescript": "~3.6.4",
"tslint": "^5.20.1",
"typescript": "~3.7.2",
"whitespace": "^2.1.0",
"worker-farm": "^1.7.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/app-builder-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"builder-util": "0.0.0-semantic-release",
"electron-publish": "0.0.0-semantic-release",
"fs-extra": "^8.1.0",
"hosted-git-info": "^3.0.0",
"hosted-git-info": "^3.0.2",
"is-ci": "^2.0.0",
"isbinaryfile": "^4.0.2",
"js-yaml": "^3.13.1",
Expand All @@ -64,7 +64,7 @@
"debug": "^4.1.1",
"lazy-val": "^1.0.4",
"temp-file": "^3.3.4",
"ejs": "^2.7.1"
"ejs": "^3.0.1"
},
"typings": "./out/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/targets/AppImageTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class AppImageTarget extends Target {
createStageDir(this, packager, arch),
])
const license = c[3]
const stageDir = c[4]
const stageDir = c[4]!!

const publishConfig = c[2]
if (publishConfig != null) {
Expand Down
5 changes: 2 additions & 3 deletions packages/app-builder-lib/src/targets/nsis/NsisTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,10 @@ export class NsisTarget extends Target {
UninstallerReader.exec(installerPath, uninstallerPath)
}
catch (error) {
log.warn(error.message)
log.warn("packager.vm is used")
log.warn("packager.vm is used: " + error.message)

const vm = await packager.vm.value
vm.exec(installerPath, [])
await vm.exec(installerPath, [])
// Parallels VM can exit after command execution, but NSIS continue to be running
let i = 0
while (!(await exists(uninstallerPath)) && i++ < 100) {
Expand Down
11 changes: 6 additions & 5 deletions packages/app-builder-lib/src/targets/nsis/nsisUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const NSIS_PATH = new Lazy(() => {
return Promise.resolve(custom.trim())
}
// noinspection SpellCheckingInspection
return getBinFromUrl("nsis", "3.0.4", "MNETIF8tex6+oiA0mgBi3/XKNH+jog4IBUp/F+Or7zUEhIP+c7cRjb9qGuBIofAXQ51z3RpyCfII4aPadsZB5Q==")
return getBinFromUrl("nsis", "3.0.4.1", "VKMiizYdmNdJOWpRGz4trl4lD++BvYP2irAXpMilheUP0pc93iKlWAoP843Vlraj8YG19CVn0j+dCo/hURz9+Q==")
})

export class AppPackageHelper {
Expand Down Expand Up @@ -105,8 +105,7 @@ export class CopyElevateHelper {
}

class BinaryReader {

private _buffer: Buffer
private readonly _buffer: Buffer
private _position: number

constructor(buffer: Buffer) {
Expand Down Expand Up @@ -165,7 +164,7 @@ class BinaryReader {
}

export class UninstallerReader {

// noinspection SpellCheckingInspection
static exec(installerPath: string, uninstallerPath: string) {
const buffer = fs.readFileSync(installerPath)
const reader = new BinaryReader(buffer)
Expand All @@ -174,7 +173,8 @@ export class UninstallerReader {
throw new Error("Invalid 'MZ' signature.")
}
reader.skip(58)
reader.skip(reader.uint32() - reader.position) // e_lfanew
// e_lfanew
reader.skip(reader.uint32() - reader.position)
// IMAGE_FILE_HEADER
if (!reader.match([ 0x50, 0x45, 0x00, 0x00 ])) {
throw new Error("Invalid 'PE' signature.")
Expand Down Expand Up @@ -221,6 +221,7 @@ export class UninstallerReader {
if (nsisSize !== nsisReader.uint32()) {
throw new Error("Size mismatch.")
}

let innerBuffer = null
while (true) {
let size = nsisReader.uint32()
Expand Down
8 changes: 4 additions & 4 deletions packages/builder-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
"out"
],
"dependencies": {
"app-builder-bin": "3.4.4",
"app-builder-bin": "3.5.1",
"temp-file": "^3.3.4",
"fs-extra": "^8.1.0",
"is-ci": "^2.0.0",
"stat-mode": "^0.3.0",
"stat-mode": "^1.0.0",
"bluebird-lst": "^1.0.9",
"chalk": "^2.4.2",
"chalk": "^3.0.0",
"debug": "^4.1.1",
"builder-util-runtime": "0.0.0-semantic-release",
"source-map-support": "^0.5.13",
"source-map-support": "^0.5.16",
"7zip-bin": "~5.0.3",
"js-yaml": "^3.13.1",
"@types/debug": "^4.1.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/builder-util/src/fs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BluebirdPromise from "bluebird-lst"
import { access, chmod, copyFile as _nodeCopyFile, ensureDir, link, lstat, readdir, readlink, stat, Stats, symlink, unlink, writeFile } from "fs-extra"
import * as path from "path"
import Mode from "stat-mode"
import { Mode } from "stat-mode"
import { log } from "./log"
import { orIfFileNotExist, orNullIfFileNotExist } from "./promise"

Expand Down
2 changes: 1 addition & 1 deletion packages/builder-util/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export function executeAppBuilder(args: Array<string>, childProcessConsumer?: (c
const env: any = {
...process.env,
SZA_PATH: path7za,
FORCE_COLOR: chalk.enabled ? "1" : "0",
FORCE_COLOR: chalk.level === 0 ? "0" : "1",
}
const cacheEnv = process.env.ELECTRON_BUILDER_CACHE
if (cacheEnv != null && cacheEnv.length > 0) {
Expand Down
18 changes: 17 additions & 1 deletion packages/dmg-builder/src/dmg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import { copyDir, copyFile, exists, statOrNull } from "builder-util/out/fs"
import { stat } from "fs-extra"
import * as path from "path"
import sanitizeFileName from "sanitize-filename"
import { TmpDir } from "temp-file"
import { addLicenseToDmg } from "./dmgLicense"
import { attachAndExecute, computeBackground, detach, getDmgVendorPath, transformBackgroundFileIfNeed } from "./dmgUtil"
import { attachAndExecute, computeBackground, detach, getDmgVendorPath } from "./dmgUtil"

export class DmgTarget extends Target {
readonly options: DmgOptions = this.packager.config.dmg || Object.create(null)
Expand Down Expand Up @@ -318,3 +319,18 @@ async function computeDmgEntries(specification: DmgOptions, volumePath: string,
}
return result
}

async function transformBackgroundFileIfNeed(file: string, tmpDir: TmpDir): Promise<string> {
if (file.endsWith(".tiff") || file.endsWith(".TIFF")) {
return file
}

const retinaFile = file.replace(/\.([a-z]+)$/, "@2x.$1")
if (await exists(retinaFile)) {
const tiffFile = await tmpDir.getTempFile({suffix: ".tiff"})
await exec("tiffutil", ["-cathidpicheck", file, retinaFile, "-out", tiffFile])
return tiffFile
}

return file
}
17 changes: 0 additions & 17 deletions packages/dmg-builder/src/dmgUtil.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { exec } from "builder-util"
import { PlatformPackager } from "app-builder-lib"
import { exists } from "builder-util/out/fs"
import { executeFinally } from "builder-util/out/promise"
import * as path from "path"
import { TmpDir } from "temp-file"

export { DmgTarget } from "./dmg"

Expand Down Expand Up @@ -63,21 +61,6 @@ export async function computeBackground(packager: PlatformPackager<any>): Promis
}
}

export async function transformBackgroundFileIfNeed(file: string, tmpDir: TmpDir): Promise<string> {
if (file.endsWith(".tiff") || file.endsWith(".TIFF")) {
return file
}

const retinaFile = file.replace(/\.([a-z]+)$/, "@2x.$1")
if (await exists(retinaFile)) {
const tiffFile = await tmpDir.getTempFile({suffix: ".tiff"})
await exec("tiffutil", ["-cathidpicheck", file, retinaFile, "-out", tiffFile])
return tiffFile
}

return file
}

/** @internal */
export function serializeString(data: string) {
return ' $"' + data.match(/.{1,32}/g)!!.map(it => it.match(/.{1,4}/g)!!.join(" ")).join('"\n $"') + '"'
Expand Down
4 changes: 2 additions & 2 deletions packages/electron-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
"homepage": "https://github.com/electron-userland/electron-builder",
"dependencies": {
"bluebird-lst": "^1.0.9",
"chalk": "^2.4.2",
"chalk": "^3.0.0",
"builder-util-runtime": "0.0.0-semantic-release",
"builder-util": "0.0.0-semantic-release",
"fs-extra": "^8.1.0",
"is-ci": "^2.0.0",
"read-config-file": "5.0.0",
"sanitize-filename": "^1.6.3",
"update-notifier": "^3.0.1",
"yargs": "^14.0.0",
"yargs": "^15.0.2",
"lazy-val": "^1.0.4",
"app-builder-lib": "0.0.0-semantic-release",
"dmg-builder": "0.0.0-semantic-release"
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder/src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function normalizeOptions(args: CliOptions): BuildOptions {
processTargets(Platform.current(), [])
}

const result = {...args}
const result: any = {...args}
result.targets = targets

delete result.dir
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"bluebird-lst": "^1.0.9",
"builder-util-runtime": "0.0.0-semantic-release",
"builder-util": "~0.0.0-semantic-release",
"chalk": "^2.4.2"
"chalk": "^3.0.0"
},
"typings": "./out/publisher.d.ts"
}
2 changes: 1 addition & 1 deletion packages/electron-updater/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"out"
],
"dependencies": {
"@types/semver": "^6.0.2",
"@types/semver": "^6.2.0",
"lazy-val": "^1.0.4",
"fs-extra": "^8.1.0",
"js-yaml": "^3.13.1",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/test-app-build-sub/electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
electronVersion: 7.0.0
electronVersion: 7.1.2
appId: org.electron-builder.testApp
compression: store
npmRebuild: false
Expand Down
Loading

0 comments on commit c80e5e6

Please sign in to comment.