Skip to content

Function: serializeLockfile()

ts
function serializeLockfile(lockfile): string;

Defined in: packages/core/src/introspection/CapabilityLockfile.ts:324

Serialize a lockfile to a deterministic JSON string.

Uses sorted keys and 2-space indentation for git-friendly diffs. The output is canonical — identical lockfiles produce identical strings.

Parameters

ParameterTypeDescription
lockfileCapabilityLockfileThe lockfile to serialize

Returns

string

Deterministic JSON string with trailing newline