Files
openclaw/scripts/preinstall-package-manager-warning.d.mts
T
Peter SteinbergerandGitHub 23c0a7b612 fix: preserve working installs on unsupported Node (#106994)
* fix(update): preserve installs on unsupported Node

* fix(update): verify skipped install scripts

* refactor(update): share global install preflight

* fix(update): validate Bun-installed Node runtime

* fix(update): classify install preflight failures

* refactor(update): normalize install failure reasons

* style(update): format updater policy test

* fix(update): preserve pnpm script policy safety

* fix(update): classify hosted git sources

* chore: leave release notes to release flow

* fix(release): defer package inventory helper loading

* style(release): keep inventory loader LOC-neutral

* fix(update): validate staged package lifecycle

* fix(update): match packed lifecycle contract

* fix(update): harden Bun package activation

* test(update): model packed Bun lifecycle

* style(update): avoid lifecycle name shadowing

* fix(update): remove unsafe Bun staging experiment

* fix(update): satisfy updater type checks

* fix(update): preserve packed npm package name

* fix(update): preserve checkout failure status

* fix(update): disable scripts while packing candidates

* fix(update): preflight source package engines safely

* fix(update): preserve legacy npm downgrades

* fix(update): pin npm packing to selected Node

* fix(update): stage npm activation before replacing live package

* fix(update): guard non-npm source activation

* refactor(update): isolate npm staging helpers

* fix(update): harden staged package lifecycle

* test(update): satisfy merged type gates

* fix(update): privatize runtime npm helper

* fix(ci): satisfy merged lint and type gates

* docs(changelog): defer updater note to release

* fix(update): guard package activation runtime

* fix(update): preserve installs on unsupported Node

* test(update): reject prerelease Node runtimes

* test(update): use shared temp cleanup

* fix(update): fail closed when install scripts are skipped

* fix(update): pack install guard in docker artifacts

* fix(ci): keep install guard export tooling-local
2026-07-14 23:19:48 -07:00

42 lines
1.5 KiB
TypeScript

export const PACKAGE_INSTALL_GUARD_RELATIVE_PATH: string;
/** Checks a Node version against the standalone package engine-range subset. */
export function nodeVersionSatisfiesPackageEngine(
version: string | null,
engine: string | null,
): boolean;
/** Reads the Node runtime contract from the package being installed. */
export function readPackageNodeEngine(packageJsonUrl?: URL): string | null;
/** Rejects installation before an unsupported runtime can replace a working release. */
export function enforceSupportedNodeRuntime(
options?: {
version?: string | null;
bunVersion?: string | null;
engine?: string | null;
execPath?: string | null;
},
reportError?: (...data: unknown[]) => void,
): boolean;
/** Removes the packed sentinel only after the runtime check succeeds. */
export function completePackageInstallGuard(
options?: {
markerUrl?: URL;
remove?: (path: URL, options: { force: boolean }) => void;
},
reportError?: (...data: unknown[]) => void,
): boolean;
/**
* Detects the package manager running the current lifecycle script.
*/
export function detectLifecyclePackageManager(env?: NodeJS.ProcessEnv): string | null;
/**
* Builds the warning shown for non-pnpm lifecycle installs.
*/
export function createPackageManagerWarningMessage(packageManager: unknown): string | null;
/**
* Emits the non-pnpm lifecycle warning when needed.
*/
export function warnIfNonPnpmLifecycle(
env?: NodeJS.ProcessEnv,
warn?: (...data: unknown[]) => void,
): boolean;