Skip to content

feat: allow opting into a different runtime via env vars#56

Open
klodr wants to merge 1 commit into
session-foundation:mainfrom
klodr:feat/node-runtime-opt-in
Open

feat: allow opting into a different runtime via env vars#56
klodr wants to merge 1 commit into
session-foundation:mainfrom
klodr:feat/node-runtime-opt-in

Conversation

@klodr
Copy link
Copy Markdown

@klodr klodr commented May 17, 2026

Summary

The install script hardcoded --runtime=electron --runtime-version=40.0.0. Reading those two values from env vars (with the same defaults) lets a non-Electron consumer opt in via:

LIBSESSION_RUNTIME=node LIBSESSION_RUNTIME_VERSION=22.22.2 npm install

Defaults are preserved, so existing npm install invocations build identically.

Test plan

  • pnpm install with no env vars → builds for Electron 40 (unchanged)
  • LIBSESSION_RUNTIME=node LIBSESSION_RUNTIME_VERSION=22.22.2 pnpm install → builds for Node 22

@klodr klodr force-pushed the feat/node-runtime-opt-in branch from cba9402 to f934838 Compare May 17, 2026 16:26
The install script hardcoded --runtime=electron --runtime-version=40.0.0,
which makes the package unusable outside an Electron 40 host without
forking. Reading the runtime + version from env vars (defaulting to
electron 40 so existing consumers keep building unchanged) lets a
non-Electron consumer opt in:

  LIBSESSION_RUNTIME=node LIBSESSION_RUNTIME_VERSION=22.22.2 npm install

No behaviour change with the defaults.

Signed-off-by: Claude Perrin <klodr@users.noreply.github.com>
@klodr klodr force-pushed the feat/node-runtime-opt-in branch from f934838 to 7d63601 Compare May 19, 2026 07:36
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