fix(runtime): synchronize lockfile after builtin plugin migration

This commit is contained in:
2026-10-18 11:44:15 +08:00
parent 2e31e74972
commit b2d97dfda2
7 changed files with 64 additions and 10 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
import { mkdirSync, existsSync, writeFileSync, readFileSync, readdirSync } from 'node:fs';
import { join, resolve } from 'node:path';
import { pathToFileURL } from 'node:url';
import { BUILTIN_DEPENDENCIES, BUILTIN_OVERRIDES, assertSafeProfile, reconcileProfile } from './reconcile-profile.mjs';
import { BUILTIN_DEPENDENCIES, BUILTIN_OVERRIDES, assertSafeProfile, reconcileProfile, markLockfilePending } from './reconcile-profile.mjs';
export function initProfile(home, options) {
if (!home) throw new Error('DSH_HOME required');
const profile = join(home, 'profiles/web');
@@ -27,6 +27,7 @@ export function initProfile(home, options) {
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
if (['dependencies', 'devDependencies', 'optionalDependencies'].some(section =>
['dsh-chat-manager', 'dsh-web-mobile', 'dsh-free-search'].some(name => manifest[section]?.[name] === BUILTIN_DEPENDENCIES[name]))) {
markLockfilePending(profile);
writeFileSync(workspacePath, 'packages:\n - .\n\nnodeLinker: hoisted\nautoInstallPeers: false\n', { flag: 'wx', mode: 0o600 });
}
}