release: load Node.js-only dependencies lazily so Core runs in browsers (#89) #91

Merged
crapougnax merged 4 commits from release/89-core-browser-safe into main 2026-12-01 15:21:03 +00:00
Owner

Release

Promotes develop to main so the fix below is published with the latest dist-tag.

Content

Single change since the previous release: #90 (closes #89).

  • @quatrain/core (1.2.22-beta.1 → expected 1.2.23: 1.2.22 is already published, the version guard bumps the patch): node-persist, node:child_process and which are loaded on first use instead of at import time. Public API unchanged.

Why now

@quatrain/http@1.0.6 (latest) depends on @quatrain/core, so every browser app using @quatrain/api-client bundles Core and crashes on load with ReferenceError: process is not defined. A staging backoffice is currently down because of it.

Branch

release/89-core-browser-safe is develop with main merged in, to resolve the version conflicts left by #83 (no merge-back happened): @quatrain/http and @quatrain/types keep their stable main versions; @quatrain/core keeps 1.2.22-beta.1 and its hash so the pipeline finalizes it.

Validation

  • CI green on #90 (run 169) and on develop after merge (run 170), @quatrain/core@1.2.22-beta.1 published on beta
  • packages/core: 119/119 tests, tsc --noEmit clean

After merge

Merge main back into develop.

🤖 Generated with Claude Code

## Release Promotes `develop` to `main` so the fix below is published with the `latest` dist-tag. ## Content Single change since the previous release: #90 (closes #89). - **`@quatrain/core`** (1.2.22-beta.1 → expected **1.2.23**: `1.2.22` is already published, the version guard bumps the patch): `node-persist`, `node:child_process` and `which` are loaded on first use instead of at import time. Public API unchanged. ## Why now `@quatrain/http@1.0.6` (latest) depends on `@quatrain/core`, so every browser app using `@quatrain/api-client` bundles Core and crashes on load with `ReferenceError: process is not defined`. A staging backoffice is currently down because of it. ## Branch `release/89-core-browser-safe` is `develop` with `main` merged in, to resolve the version conflicts left by #83 (no merge-back happened): `@quatrain/http` and `@quatrain/types` keep their stable `main` versions; `@quatrain/core` keeps `1.2.22-beta.1` and its hash so the pipeline finalizes it. ## Validation - CI green on #90 (run 169) and on `develop` after merge (run 170), `@quatrain/core@1.2.22-beta.1` published on `beta` - `packages/core`: 119/119 tests, `tsc --noEmit` clean ## After merge Merge `main` back into `develop`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(core): load Node.js-only dependencies lazily so Core runs in browsers (#89)
All checks were successful
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (pull_request) Successful in 3m2s
Quatrain Core CI / Publish Changed Packages to npm (pull_request) Has been skipped
2800247358
Core imported node-persist, node:child_process and which at module load.
Since @quatrain/http 1.0.6 depends on @quatrain/core (MessagePack
normalizer), any browser app using @quatrain/api-client pulled them into
its bundle and crashed on load with "ReferenceError: process is not
defined" (isexe reads process.platform at evaluation time).

These modules are now required on first use (Core.storage getter,
execPromise, getSystemCommandPath). Public API is unchanged.

Adds a regression test asserting that importing Core evaluates none of
them.

Closes #89

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge pull request 'fix(core): load Node.js-only dependencies lazily so Core runs in browsers (#89)' (#90) from fix/89-core-browser-safe-node-imports into develop
All checks were successful
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (push) Successful in 2m55s
Quatrain Core CI / Publish Changed Packages to npm (push) Successful in 4m22s
1d65699632
chore(release): merge main into the release branch (#89)
All checks were successful
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (pull_request) Successful in 3m6s
Quatrain Core CI / Publish Changed Packages to npm (pull_request) Has been skipped
f1b1e1aec0
Resolves the version conflicts left by release #83: @quatrain/http and
@quatrain/types keep their stable main versions, @quatrain/core keeps
1.2.22-beta.1 from develop so that the main pipeline finalizes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crapougnax deleted branch release/89-core-browser-safe 2026-12-01 15:21:03 +00:00
Sign in to join this conversation.
No description provided.