Skip to content

Commit

Permalink
fix(dmg): multi-language license encoding
Browse files Browse the repository at this point in the history
Close #1982
  • Loading branch information
develar committed Aug 25, 2017
1 parent 5f64ef7 commit 56e5786
Show file tree
Hide file tree
Showing 22 changed files with 438 additions and 531 deletions.
2 changes: 2 additions & 0 deletions .idea/dictionaries/develar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ To sync: `yarn update-wiki`

# Typings

All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).
All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).

# ^ or ~ for package depdencies?

For `electron-builder-http` `~` is used because if something fixed in this module, all clients should be updated as well (to ensure, that client will get update versions).

For `builder-util` `^` is used, because often new methods are added to this module, and if `~` will be used, we will be forced to release dependent packages very often and it can create unnecessary noise.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
"ajv-keywords": "^2.1.0",
"archiver": "^2.0.0",
"async-exit-hook": "^2.0.1",
"aws-sdk": "^2.102.0",
"aws-sdk": "^2.103.0",
"bluebird-lst": "^1.0.3",
"chalk": "^2.1.0",
"chromium-pickle-js": "^0.2.0",
"cuint": "^0.2.2",
"debug": "^3.0.0",
"debug": "^3.0.1",
"dotenv": "^4.0.0",
"dotenv-expand": "^4.0.1",
"ejs": "^2.5.7",
Expand All @@ -48,7 +48,6 @@
"fcopy-pre-bundled": "0.3.4",
"fs-extra-p": "^4.4.0",
"hosted-git-info": "^2.5.0",
"iconv-lite": "^0.4.18",
"ini": "^1.3.4",
"is-ci": "^1.0.10",
"isbinaryfile": "^3.0.2",
Expand Down
5 changes: 3 additions & 2 deletions packages/builder-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@
"stat-mode": "^0.2.2",
"bluebird-lst": "^1.0.3",
"chalk": "^2.1.0",
"debug": "^3.0.0",
"debug": "^3.0.1",
"node-emoji": "^1.8.1",
"electron-builder-http": "~0.0.0-semantic-release",
"source-map-support": "^0.4.16",
"7zip-bin": "^2.2.3",
"ini": "^1.3.4",
"tunnel-agent": "^0.6.0",
"semver": "^5.4.1",
"lazy-val": "^1.0.2"
"lazy-val": "^1.0.2",
"js-yaml": "^3.9.1"
},
"typings": "./out/util.d.ts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export class DebugLogger {
}

add(key: string, value: any) {
if (!this.enabled) {
return
}

const dataPath = key.split(".")
let o = this.data
let lastName: string | null = null
Expand Down Expand Up @@ -37,7 +41,8 @@ export class DebugLogger {
}

save(file: string) {
if (Object.keys(this.data).length > 0) {
// toml and json doesn't correctly output multiline string as multiline
if (this.enabled && Object.keys(this.data).length > 0) {
return outputFile(file, safeDump(this.data))
}
else {
Expand Down
4 changes: 4 additions & 0 deletions packages/builder-util/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { DebugLogger } from "./DebugLogger"

export interface PackageBuilder {
readonly buildResourcesDir: string

readonly debugLogger: DebugLogger

readonly resourceList: Promise<Array<string>>

getTempFile(suffix: string): Promise<string>
Expand Down
1 change: 1 addition & 0 deletions packages/builder-util/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export { isMacOsSierra } from "./macosVersion"
export { execWine, prepareWindowsExecutableArgs } from "./wine"
export { Arch, toLinuxArchString, getArchSuffix, ArchType, archFromString } from "./arch"
export { AsyncTaskManager } from "./asyncTaskManager"
export { DebugLogger } from "./DebugLogger"

export const debug = _debug("electron-builder")
export const debug7z = _debug("electron-builder:7z")
Expand Down
1 change: 0 additions & 1 deletion packages/dmg-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"dependencies": {
"fs-extra-p": "^4.4.0",
"bluebird-lst": "^1.0.3",
"iconv-lite": "^0.4.18",
"parse-color": "^1.0.0",
"builder-util": "^0.0.0-semantic-release"
},
Expand Down
Loading

0 comments on commit 56e5786

Please sign in to comment.