Skip to content

Commit

Permalink
running prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta committed Jul 11, 2021
1 parent 3db3afe commit aa879a0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
16 changes: 9 additions & 7 deletions packages/app-builder-lib/src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,17 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
let binaries = options.binaries || undefined
if (binaries) {
// Accept absolute paths for external binaries, else resolve relative paths from the artifact's app Contents path.
const userDefinedBinaries = await Promise.all(binaries.map(async (destination) => {
if (await statOrNull(destination)) {
return destination
}
return path.resolve(appPath, destination)
}))
const userDefinedBinaries = await Promise.all(
binaries.map(async destination => {
if (await statOrNull(destination)) {
return destination
}
return path.resolve(appPath, destination)
})
)
// Insert at front to prioritize signing. We still sort by depth next
binaries = userDefinedBinaries.concat(binaries)
log.info('Signing addtional user-defined binaries: ' + JSON.stringify(userDefinedBinaries, null, 1))
log.info("Signing addtional user-defined binaries: " + JSON.stringify(userDefinedBinaries, null, 1))
}

const signOptions: any = {
Expand Down
6 changes: 3 additions & 3 deletions packages/app-builder-lib/src/targets/nsis/NsisTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ export class NsisTarget extends Target {

this.configureDefinesForAllTypeOfInstaller(defines)
if (isPortable) {
const { unpackDirName, requestExecutionLevel, splashImage} = options as PortableOptions
const { unpackDirName, requestExecutionLevel, splashImage } = options as PortableOptions
defines.REQUEST_EXECUTION_LEVEL = requestExecutionLevel || "user"

// https://github.com/electron-userland/electron-builder/issues/5764
if (typeof unpackDirName === 'string') {
if (typeof unpackDirName === "string") {
defines.UNPACK_DIR_NAME = unpackDirName || (await executeAppBuilder(["ksuid"]))
} else if (unpackDirName !== false) {
defines.UNPACK_DIR_NAME = await executeAppBuilder(["ksuid"])
Expand Down
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/targets/nsis/nsisOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export interface PortableOptions extends TargetSpecificOptions, CommonNsisOption
*
* If set to a string, it will be the name in [TEMP](https://www.askvg.com/where-does-windows-store-temporary-files-and-how-to-change-temp-folder-location/) directory
* If set explicitly to `false`, it will use the Windows temp directory ($PLUGINSDIR) that is unique to each launch of the portable application.
*
*
* Defaults to [uuid](https://github.com/segmentio/ksuid) of build (changed on each build of portable executable).
*/
readonly unpackDirName?: string | boolean
Expand Down
7 changes: 2 additions & 5 deletions test/src/BuildTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,8 @@ test.ifDevOrLinuxCi(
files: [
// test ignore pattern for node_modules defined as file set filter
{
filter: [
"!node_modules/napi-build-utils/napi-build-utils-1.0.0.tgz",
"!node_modules/node-abi/*"
]
}
filter: ["!node_modules/napi-build-utils/napi-build-utils-1.0.0.tgz", "!node_modules/node-abi/*"],
},
],
},
},
Expand Down
13 changes: 6 additions & 7 deletions test/src/ignoreTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ test.ifDevOrLinuxCi(
targets: Platform.LINUX.createTarget(DIR_TARGET),
config: {
asar: false,
includeSubNodeModules: false // defaults to false too
includeSubNodeModules: false, // defaults to false too
},
},
{
Expand Down Expand Up @@ -148,7 +148,7 @@ test.ifDevOrLinuxCi(
targets: Platform.LINUX.createTarget(DIR_TARGET),
config: {
asar: false,
includeSubNodeModules: true
includeSubNodeModules: true,
},
},
{
Expand Down Expand Up @@ -182,10 +182,7 @@ test.ifDevOrLinuxCi(
targets: Platform.LINUX.createTarget(DIR_TARGET),
config: {
asar: false,
files: [
"**/*",
"*/submodule-1-test/node_modules/**",
],
files: ["**/*", "*/submodule-1-test/node_modules/**"],
},
},
{
Expand All @@ -205,7 +202,9 @@ test.ifDevOrLinuxCi(
packed: context => {
return Promise.all([
assertThat(path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "node_modules", "submodule-1-test", "node_modules")).isDirectory(),
assertThat(path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "node_modules", "submodule-1-test", "node_modules", "package.json")).isFile(),
assertThat(
path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "node_modules", "submodule-1-test", "node_modules", "package.json")
).isFile(),
assertThat(path.join(context.getResources(Platform.LINUX, archFromString(process.arch)), "app", "node_modules", "submodule-2-test", "node_modules")).doesNotExist(),
])
},
Expand Down

0 comments on commit aa879a0

Please sign in to comment.