Skip to content

Commit c081df8

Browse files
authored
chore: update test snapshot and improve file path logging (#8463)
1 parent a5b2f48 commit c081df8

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

.changeset/shy-cobras-smell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
chore: improving file path logging to be relative paths when within process.cwd()

packages/app-builder-lib/src/electron/electronWin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ export async function addWinAsarIntegrity(executablePath: string, asarIntegrity:
3737
resource.outputResource(executable)
3838

3939
await writeFile(executablePath, Buffer.from(executable.generate()))
40-
log.info({ executablePath }, "updating asar integrity executable resource")
40+
log.info({ executablePath: log.filePath(executablePath) }, "updating asar integrity executable resource")
4141
}

packages/app-builder-lib/src/electron/injectFFMPEG.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const copyFFMPEG = (targetPath: string, platform: ElectronPlatformName) => (sour
2525

2626
const libPath = path.resolve(sourcePath, fileName)
2727
const libTargetPath = path.resolve(targetPath, fileName)
28-
log.info({ lib: libPath, target: libTargetPath }, "copying non-proprietary FFMPEG")
28+
log.info({ lib: log.filePath(libPath), target: log.filePath(libTargetPath) }, "copying non-proprietary FFMPEG")
2929

3030
// If the source doesn't exist we have a problem
3131
if (!fs.existsSync(libPath)) {

packages/app-builder-lib/src/publish/PublishManager.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export class PublishManager implements PublishContext {
152152
if (publisher == null) {
153153
log.debug(
154154
{
155-
file: event.file,
155+
file: log.filePath(event.file),
156156
reason: "publisher is null",
157157
publishConfig: safeStringifyJson(publishConfig),
158158
},
@@ -163,7 +163,7 @@ export class PublishManager implements PublishContext {
163163

164164
const providerName = publisher.providerName
165165
if (this.publishOptions.publish === "onTagOrDraft" && getCiTag() == null && providerName !== "bitbucket" && providerName !== "github") {
166-
log.info({ file: event.file, reason: "current build is not for a git tag", publishPolicy: "onTagOrDraft" }, `not published to ${providerName}`)
166+
log.info({ file: log.filePath(event.file), reason: "current build is not for a git tag", publishPolicy: "onTagOrDraft" }, `not published to ${providerName}`)
167167
return
168168
}
169169

packages/app-builder-lib/src/targets/FpmTarget.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default class FpmTarget extends Target {
137137
if (publishConfig != null) {
138138
const linuxDistType = this.packager.packagerOptions.prepackaged || path.join(this.outDir, `linux${getArchSuffix(arch)}-unpacked`)
139139
const resourceDir = packager.getResourcesDir(linuxDistType)
140-
log.info({ resourceDir }, `adding autoupdate files for: ${target}. (Beta feature)`)
140+
log.info({ resourceDir: log.filePath(resourceDir) }, `adding autoupdate files for: ${target}. (Beta feature)`)
141141
await outputFile(path.join(resourceDir, "app-update.yml"), serializeToYaml(publishConfig))
142142
// Extra file needed for auto-updater to detect installation method
143143
await outputFile(path.join(resourceDir, "package-type"), target)

test/snapshots/BuildTest.js.snap

+3
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,9 @@ Object {
11281128
"LICENSE": Object {
11291129
"size": "<size>",
11301130
},
1131+
"SECURITY.md": Object {
1132+
"size": "<size>",
1133+
},
11311134
"index.js": Object {
11321135
"size": "<size>",
11331136
},

0 commit comments

Comments
 (0)