Repository navigation
fix: build the snap on core24 with Node 22, npm ci and the package.json version - #54
Merged
Merged
Conversation
…on version Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JDCcDD9po1tXPPSsKy3xDv
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01JDCcDD9po1tXPPSsKy3xDv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Snapcraft workflow has failed on every tag since v1.2.0 (January). The core22 build environment installs Ubuntu's
nodejspackage, which is Node 12.22, and electron-builder dies onrequire('fs/promises')before anything is packed. On top of that the yaml hard-codedversion: '1.5.0'while package.json is at 1.5.1, usednpm installinstead of the lockfile, pointeddesktop:at a file electron-builder never produces, and copied fromdist/linux-*-unpacked, a glob that does not match the x64 output directorylinux-unpacked.What
snap/snapcraft.yamlbase: core24withplatforms: amd64.build-snaps: [node/22/stable]), the same LTS the app'senginesfield and the other workflows use.npm ci, thenbundle:editor, thenelectron-builder --linux dir --publish never.adopt-info+craftctl set version=$(node -p "require('./package.json').version"), so a release bumps the version in one place.--no-sandboxand thebrowser-supportplug, as the Electron snapcraft guide does: the Chromium setuid sandbox cannot start under strict confinement. GTK comes from the gnome extension, solibgtk-3-0is gone from stage-packages;libnspr4andlibasound2t64(Electron needs both) are added.desktop:key is dropped; snapcraft picks upsnap/gui/markdown-viewer.desktopby app name..github/workflows/snap.ymlsnap/**or the workflow, so a broken snap is caught before a release tag. This PR is the first such run.SNAPCRAFT_TOKENis not set, so the build stays green and the.snapis kept as a workflow artifact.Docs: CHANGELOG entry, a sentence in the README build section.
Verified
markdown-viewer_1.5.1_amd64.snap(151 MB, version taken from package.json) in about 4 minutes;meta/snap.yamlcarries the gnome extension's plugs andmeta/gui/the desktop file and icon.--no-sandboxon a sample file, shows the document with its heading, bold text and a rendered mermaid diagram (Playwright_electron, screenshot in the session). Installing the snap itself needssudo snap install --dangerous, which I did not run here.npm run lintclean; both YAML files parse.Not in this PR
The Snap Store name
markdown-vieweris registered to another publisher (namdev, version 1.1.0 published 2026-10-03), and the repository has noSNAPCRAFT_TOKENsecret. Publishing to the store therefore needs a different snap name registered to this account plus the token; until then the snap is only a build artifact.🤖 Generated with Claude Code
https://claude.ai/code/session_01JDCcDD9po1tXPPSsKy3xDv