feat: allow opting into a different runtime via env vars#56
Open
klodr wants to merge 1 commit into
Open
Conversation
cba9402 to
f934838
Compare
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>
f934838 to
7d63601
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
installscript 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:Defaults are preserved, so existing
npm installinvocations build identically.Test plan
pnpm installwith no env vars → builds for Electron 40 (unchanged)LIBSESSION_RUNTIME=node LIBSESSION_RUNTIME_VERSION=22.22.2 pnpm install→ builds for Node 22