9347f8f4a4
Normalized persisted plugin runtime config before manager and loader callers use it, so older lockfiles without a settings object can still accept plugin config writes. Added a regression test covering setting a plugin option against a legacy lockfile. Fixes #2236
10 lines
324 B
TypeScript
10 lines
324 B
TypeScript
import type { PluginRuntimeConfig } from "./types";
|
|
|
|
/** Normalizes persisted plugin runtime config across legacy lockfile shapes. */
|
|
export function normalizePluginRuntimeConfig(config: Partial<PluginRuntimeConfig>): PluginRuntimeConfig {
|
|
return {
|
|
plugins: config.plugins ?? {},
|
|
settings: config.settings ?? {},
|
|
};
|
|
}
|