From a14354ae39c36cc0e22f22574edd130416310fcc Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Oct 2026 08:04:31 +0200 Subject: [PATCH 1/2] fix(app): build Electron funzionante nel monorepo - npmRebuild: false: electron-builder lanciava npm install --production alla radice dei workspaces, cancellando le devDependencies (incluso app-builder-bin) e causando lo spawn ENOENT - mappit-core incluso nel bundle del main dai sorgenti: l'app pacchettizzata non contiene node_modules, quindi il require esterno sarebbe fallito Closes #26 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CecUKcJiSVnehcZEiXLgtk --- packages/app/electron.vite.config.ts | 11 ++++++++++- packages/app/package.json | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/app/electron.vite.config.ts b/packages/app/electron.vite.config.ts index 9a053b1..71f0767 100644 --- a/packages/app/electron.vite.config.ts +++ b/packages/app/electron.vite.config.ts @@ -3,7 +3,16 @@ import { defineConfig, externalizeDepsPlugin } from 'electron-vite'; export default defineConfig({ main: { - plugins: [externalizeDepsPlugin()], + // mappit-core is bundled into the main process, because the packaged + // app ships without node_modules (see "files" in package.json). It is + // bundled from source: Rollup can't see the re-exports of the + // CommonJS build in packages/core/dist. + plugins: [externalizeDepsPlugin({ exclude: ['mappit-core'] })], + resolve: { + alias: { + 'mappit-core': resolve(__dirname, '../core/src/index.ts'), + }, + }, build: { outDir: 'dist/main', rollupOptions: { diff --git a/packages/app/package.json b/packages/app/package.json index 84d33d2..39f9866 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -28,6 +28,7 @@ "extraMetadata": { "main": "dist/main/index.js" }, + "npmRebuild": false, "win": { "target": [ { From 0a5d57ff7bd06e819e96a3c7010a60a539fdaba4 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Oct 2026 08:45:04 +0200 Subject: [PATCH 2/2] ci(app): build Electron senza publish e metadati per il pacchetto deb - --publish never nel job di CI: in CI electron-builder tenta il publish e fallisce senza repository; le release sono materia di #28 - homepage, repository ed email dell'autore in packages/app: richiesti dal target deb Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CecUKcJiSVnehcZEiXLgtk --- .github/workflows/ci.yml | 2 +- packages/app/package.json | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d7a2e1..458c99f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: - run: npm run build --workspace=packages/core - run: npm run build --workspace=packages/app - name: Package with electron-builder - run: npm run dist --workspace=packages/app + run: npm run dist --workspace=packages/app -- --publish never env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload artifacts diff --git a/packages/app/package.json b/packages/app/package.json index 39f9866..79c04e0 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -2,7 +2,13 @@ "name": "mappit-app", "version": "0.1.0", "description": "Electron app for visualizing Google Location History", - "author": "ronzim", + "author": "ronzim <45311591+ronzim@users.noreply.github.com>", + "homepage": "https://github.com/ronzim/mappit#readme", + "repository": { + "type": "git", + "url": "https://github.com/ronzim/mappit.git", + "directory": "packages/app" + }, "private": true, "main": "dist/main/index.js", "scripts": {