Skip to content

feat: expose artifact version to static publishers - #4033

Merged
erickzhao merged 2 commits into
nextfrom
sam/publisher-static-next
Oct 22, 2025
Merged

feat: expose artifact version to static publishers#4033
erickzhao merged 2 commits into
nextfrom
sam/publisher-static-next

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Oct 20, 2025

Copy link
Copy Markdown
Member

BREAKING CHANGE: refactors uploadOptions in the GCS publisher to be more type-safe and a specific property instead of an unsafe rest param.

@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner October 20, 2025 07:03
arch: makeResult.arch,
isReleaseFile:
path.basename(artifact, path.extname(artifact)) === 'RELEASES',
version: makeResult.packageJSON.version,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: it's technically valid for a package.json to have no version field and IIRC we don't check for its presence in any previous steps. Should this field be optional or is the assumption that anyone using a publisher is supposed to have a valid version good enough here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe:

Suggested change
version: makeResult.packageJSON.version,
version: makeResult.packageJSON.version ?? '',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely rely on the version field here for a lot of logic.

Ex: https://github.com/electron/forge/blob/main/packages/api/core/src/api/package.ts#L508-L515
Ex:

`${appName}-${packageJSON.version}-${targetArch}.dmg`,

Maybe we should have better version propagation support but rn we just assume it's there everywhere and error in some cases if it's missing

Comment thread packages/publisher/gcs/src/Config.ts
@erickzhao
erickzhao merged commit 18fb151 into next Oct 22, 2025
12 checks passed
@erickzhao
erickzhao deleted the sam/publisher-static-next branch October 22, 2025 22:35
@erickzhao erickzhao added the next label Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants