Skip to content

fix(release): override scoped package name in build via extraMetadata#49

Merged
JohnMcLear merged 1 commit into
mainfrom
fix/release-artifact-paths
May 12, 2026
Merged

fix(release): override scoped package name in build via extraMetadata#49
JohnMcLear merged 1 commit into
mainfrom
fix/release-artifact-paths

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

Follow-up to #47. That PR fixed:

  • ✅ Snap's `--executable` flag (via `linux.executableName`)
  • ✅ Windows `pnpm ENOENT` in fetch-etherpad.mjs

But the v0.4.1 rebuild surfaced three remaining failures that all share the same root cause: `package.json#name` is `@etherpad/desktop` (scoped after the monorepo move), and electron-builder's `${name}` token appears in artifact templates we don't control directly:

  1. Linux `.deb` — fpm: `Parent directory does not exist: release/@etherpad - cannot write to release/@etherpad/desktop_0.4.1_amd64.deb`. The default `deb.artifactName` is `${name}${version}${arch}.${ext}`; the `/` from the scope makes `@etherpad/` a literal directory.
  2. Snap — mksquashfs: `Could not create destination file: No such file or directory` on `release/@etherpad/desktop_0.4.1_amd64.snap`. Same shape.
  3. Windows NSIS — 7za: `Could not create destination file: No such file or directory` on `release\@etherpaddesktop-0.4.1-x64.nsis.7z`. The `@` prefix triggers 7za's `@list-file` convention (read filenames from a file with this name), and the leading `@` was kept after the slash was stripped.

Fix

`extraMetadata.name: etherpad-desktop` in the electron-builder config. This overrides `package.json#name` at build time only — the workspace package keeps its scoped name so `pnpm --filter @etherpad/desktop` and workspace deps continue to work.

This is the single, narrowest place to fix all three at once. Each artifact template that interpolates `${name}` now sees the slash-free `etherpad-desktop`.

Test plan

  • CI lint/typecheck/test/e2e on this PR
  • After merge: re-run Release + Snap workflows on v0.4.1 (or push v0.4.2). Expect the missing artifacts to appear: `etherpad-desktop_0.4.1_amd64.deb`, `Etherpad-Desktop-Setup-0.4.1.exe`, `Etherpad-Desktop-0.4.1-portable.exe`, `latest-linux.yml`, `latest.yml`, and the snap to push to edge.

Notes

🤖 Generated with Claude Code

…ates

PR #47 added linux.executableName to fix snap's `--executable` flag
and the deb binary name — but the deb / snap output PATHS still come
from electron-builder's default artifactName templates which use the
${name} token (= package.json#name). That's now `@etherpad/desktop`
(scoped after the monorepo move), so:

- deb / snap write to `release/@etherpad/desktop_*` and crash with
  "Parent directory does not exist: release/@etherpad"
- Windows NSIS intermediate `release/@etherpaddesktop-*.nsis.7z`
  trips 7za's `@listfile` convention and fails with "Could not
  create destination file: No such file or directory"

Setting `extraMetadata.name: etherpad-desktop` in the
electron-builder config overrides package.json#name at build time
without touching the actual package.json (which we need to keep as
`@etherpad/desktop` for `pnpm --filter` and workspace deps). Every
artifact template that interpolates ${name} now sees the slash-free
name and the path issue goes away in one move.

Verified by inspecting the v0.4.1 build logs for both remaining
failures:
  - linux deb: fpm `--p ... cannot write to release/@etherpad/desktop_0.4.1_amd64.deb`
  - snap:      mksquashfs `Could not create destination file` on the
               same path shape (release/@etherpad/desktop_0.4.1_amd64.snap)
  - win nsis:  7za `Could not create destination file` on
               release\@etherpaddesktop-0.4.1-x64.nsis.7z (@-prefix
               triggers 7za's @ListFile mode)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@JohnMcLear JohnMcLear merged commit 6216aed into main May 12, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request May 12, 2026
This was referenced May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant