Commit Graph

2 Commits

Author SHA1 Message Date
Maciej Lisiewski
7062229090 chore(js): switch the workspaces from npm to pnpm
pnpm 12.15.0 (native executable) installs every JS workspace from one
pnpm-lock.yaml, imported from package-lock.json with the same resolved
versions. website/, the WhatsApp bridge and the photon sidecar stay separate
npm projects.

Configuration moves from .npmrc and the root manifest into
pnpm-workspace.yaml: the 14-day minimumReleaseAge and its excludes,
overrides, allowBuilds (the old allowScripts set, with strictDepBuilds
failing any unlisted build script), engineStrict, sideEffectsCache: false
(in-place rebuilds must not write into the store) and
verifyDepsBeforeRun: false (a `pnpm run` never installs).

The pnpm version is pinned in pm/lock.json and in root devEngines.
pmOnFail: ignore keeps that pin out of pnpm-lock.yaml: a leading pin
document makes osv-scanner read zero packages. scripts/build/node-deps.mjs
enforces the exact version instead, and every lock reader refuses a
multi-document lock. A root preinstall refuses `npm install`; devEngines
onFail is warn so npx (MCP servers, the tsc linter) keeps working inside
the checkout.

User-machine installs run --frozen-lockfile --trust-lockfile (release age is
checked when locking, in CI, not per user). node-deps removes npm-era
node_modules trees before the first pnpm install. Nix builds the store with
fetchPnpmDeps and a hash file that CI checks.
2026-11-06 04:08:24 +01:00
Maciej Lisiewski
c5a7e48c12 test(desktop): vitest resolves HERMES_PYTHON from the checkout's test env
The electron contracts that drive real hermes_cli/pm code read
HERMES_PYTHON, which CI exports from setup-pm's test environment. A plain
`npx vitest run` outside that environment left it unset: mac-sign threw
"need HERMES_PYTHON" (2 tests), and source-backend / checkout-source fell
back to the PATH python3, which has no ruamel (2 tests). The electron
project's global setup now resolves __HERMES_TEST_PYTHON through
scripts/run-in-hermes-env, the same path scripts/run_tests.sh takes,
unless HERMES_PYTHON is already set. It is scoped to that project so a
UI-only run never waits on a Python environment sync. POSIX only; Windows
keeps the CI-provided value.
2026-10-15 21:34:21 +02:00