Skip to content

Commit

Permalink
fix: 19.20.0 does not read electron-builder.yml
Browse files Browse the repository at this point in the history
Close #1927
  • Loading branch information
develar committed Aug 10, 2017
1 parent 175c200 commit c4aacfc
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 132 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"normalize-package-data": "^2.4.0",
"parse-color": "^1.0.0",
"plist": "^2.1.0",
"read-config-file": "^1.0.4",
"read-config-file": "^1.0.5",
"sanitize-filename": "^1.6.1",
"semver": "^5.4.1",
"source-map-support": "^0.4.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"is-ci": "^1.0.10",
"isbinaryfile": "^3.0.2",
"js-yaml": "^3.9.1",
"read-config-file": "^1.0.4",
"read-config-file": "^1.0.5",
"minimatch": "^3.0.4",
"normalize-package-data": "^2.4.0",
"parse-color": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/electron-builder/src/util/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { statOrNull } from "electron-builder-util/out/fs"
import { readJson } from "fs-extra-p"
import { Lazy } from "lazy-val"
import * as path from "path"
import { getConfig as _getConfig, loadParentConfig, orNullIfFileNotExist } from "read-config-file"
import { getConfig as _getConfig, loadParentConfig, orNullIfFileNotExist, ReadConfigRequest } from "read-config-file"
import { deepAssign } from "read-config-file/out/deepAssign"
import { Config } from "../metadata"
import { reactCra } from "../presets/rectCra"
Expand All @@ -14,7 +14,7 @@ import TypeParams = ajv.TypeParams

/** @internal */
export async function getConfig(projectDir: string, configPath: string | null, configFromOptions: Config | null | undefined, packageMetadata: Lazy<{ [key: string]: any } | null> = new Lazy(() => orNullIfFileNotExist(readJson(path.join(projectDir, "package.json"))))): Promise<Config> {
const configRequest = {key: "build", projectDir, packageMetadata, log}
const configRequest: ReadConfigRequest = {packageKey: "build", configFilename: "electron-builder", projectDir, packageMetadata, log}
const config = await _getConfig<Config>(configRequest, configPath, configFromOptions)

let extendsSpec = config.extends
Expand Down
14 changes: 0 additions & 14 deletions test/fixtures/app-executable-deps/app/index.html

This file was deleted.

58 changes: 0 additions & 58 deletions test/fixtures/app-executable-deps/app/main.js

This file was deleted.

12 changes: 0 additions & 12 deletions test/fixtures/app-executable-deps/app/notify.js

This file was deleted.

11 changes: 0 additions & 11 deletions test/fixtures/app-executable-deps/app/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions test/fixtures/app-executable-deps/app/start-electron.js

This file was deleted.

6 changes: 0 additions & 6 deletions test/fixtures/app-executable-deps/package.json

This file was deleted.

12 changes: 12 additions & 0 deletions test/fixtures/test-app-build-sub/electron-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
electronVersion: 1.7.6
appId: org.electron-builder.testApp
compression: store
npmRebuild: false
mac:
category: your.app.category.type
directories:
output: build/dist
files:
- build/app/**/*.js
- build/app/**/*.html
asar: false
19 changes: 1 addition & 18 deletions test/fixtures/test-app-build-sub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,5 @@
"version": "1.0.0",
"main": "./build/app/main.js",
"author": "true",
"name": "Foo",
"build": {
"electronVersion": "1.7.6",
"appId": "org.electron-builder.testApp",
"compression": "store",
"npmRebuild": false,
"mac": {
"category": "your.app.category.type"
},
"directories": {
"output": "build/dist"
},
"files": [
"build/app/**/*.js",
"build/app/**/*.html"
],
"asar": false
}
"name": "Foo"
}
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,7 @@ lazy-cache@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"

lazy-val@^1.0.1, lazy-val@^1.0.2:
lazy-val@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.2.tgz#d9b07fb1fce54cbc99b3c611de431b83249369b6"

Expand Down Expand Up @@ -2785,15 +2785,15 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.1:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

read-config-file@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-1.0.4.tgz#e9f00bb02551581019a2c2a54da9a1d58f33c697"
read-config-file@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-1.0.5.tgz#9992d2a4d24a993518e7eb6f3c30c0562264c367"
dependencies:
bluebird-lst "^1.0.2"
bluebird-lst "^1.0.3"
fs-extra-p "^4.4.0"
js-yaml "^3.9.1"
json5 "^0.5.1"
lazy-val "^1.0.1"
lazy-val "^1.0.2"

read-pkg-up@^1.0.1:
version "1.0.1"
Expand Down

0 comments on commit c4aacfc

Please sign in to comment.