Skip to content

chore(install): include desktop deps in root postinstall#1584

Merged
esengine merged 1 commit into
mainfrom
chore/postinstall-desktop-deps
May 23, 2026
Merged

chore(install): include desktop deps in root postinstall#1584
esengine merged 1 commit into
mainfrom
chore/postinstall-desktop-deps

Conversation

@esengine

Copy link
Copy Markdown
Owner

Summary

The root postinstall only runs npm --prefix dashboard ci, leaving desktop/node_modules empty after a clean npm ci. Vitest scans desktop/src/** for tests, so the first desktop test that imports a transitive dep (react-markdown via Markdown.tsx) fails Vite resolution in CI — even though it passes locally for anyone who's ever run npm install inside desktop/.

Add desktop to the same --ignore-scripts chain dashboard already uses.

Unblocks #1562.

Test plan

  • npm --prefix desktop ci --ignore-scripts works against the existing lockfile
  • desktop/node_modules/react-markdown resolves after install
  • Local npm run verify green

CI's `npm ci` at the root only triggers `npm --prefix dashboard ci`,
leaving `desktop/node_modules` empty. Vitest scans `desktop/src/**`
for tests, so the first desktop test that imports a transitive dep
(e.g. `react-markdown` via `Markdown.tsx`) fails to resolve in CI
even though it passes locally for anyone who's ever run
`npm install` inside `desktop/`.

Unblocks #1562.
@esengine esengine merged commit 6e8cad7 into main May 23, 2026
4 checks passed
@esengine esengine deleted the chore/postinstall-desktop-deps branch May 23, 2026 02:46
esengine pushed a commit that referenced this pull request May 24, 2026
#1584 wired `npm --prefix dashboard ci && npm --prefix desktop ci` into
root `postinstall` to fix CI's missing workspace deps. But the
published tarball ships only build artifacts under `dashboard/`
(index.html, app.css, dist/) and no `desktop/` at all, so end-user
`npx reasonix@0.50.0 code` failed during the dashboard `npm ci` and
the bin never ran — the only visible output was npm's cleanup
warnings on the half-extracted tree.

Move the workspace install into `scripts/postinstall.mjs`, which
exits 0 when `dashboard/package.json` is absent (i.e. when running
from the tarball, not the repo). Ship the script via `files:`.

Deprecate 0.50.0 on npm so existing installers see the warning.
esengine pushed a commit that referenced this pull request May 24, 2026
Node 18+ refuses to execFile `npm.cmd` directly on Windows
(CVE-2024-27980 mitigation), throwing `spawnSync npm.cmd EINVAL`.
Failed every Windows CI matrix entry on main after 0.50.1.

`execSync` routes through cmd.exe / sh, matching what the original
inline `&&`-chained postinstall did before #1584's regression.

End-user installs of reasonix@0.50.1 are unaffected: postinstall
short-circuits via the `dashboard/package.json` existence check before
reaching the broken execFile call. Only repo checkouts at tag v0.50.1
hit the bug, which is dev-side only.
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