锁定原生壳依赖版本门禁
总验收反查移动壳依赖版本检查不可移除 总验收反查桌面壳 Tauri 与 Cargo 版本检查不可移除 同步宿主壳方案文档和项目决策记录
This commit is contained in:
@@ -14,6 +14,14 @@ const developmentWorkflowDocPath =
|
||||
'docs/project-memory/shared-memory/development-workflow.md';
|
||||
const decisionLogDocPath = 'docs/project-memory/shared-memory/decision-log.md';
|
||||
const rootPackageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
||||
const mobileShellConfigCheckSource = fs.readFileSync(
|
||||
'apps/mobile-shell/scripts/check-config.mjs',
|
||||
'utf8',
|
||||
);
|
||||
const desktopShellConfigCheckSource = fs.readFileSync(
|
||||
'apps/desktop-shell/scripts/check-config.mjs',
|
||||
'utf8',
|
||||
);
|
||||
|
||||
const productionShellScanRoots = [
|
||||
'apps/mobile-shell',
|
||||
@@ -74,6 +82,44 @@ function assertRootNativeShellCheckScripts() {
|
||||
}
|
||||
|
||||
assertRootNativeShellCheckScripts();
|
||||
function assertNativeShellDependencyVersionGuardrails() {
|
||||
for (const snippet of [
|
||||
"const rootPackageLockPath = new URL('../../../package-lock.json', import.meta.url)",
|
||||
'function assertPackageDependencyVersion(',
|
||||
'function assertPackageLockVersion(',
|
||||
"'@expo/metro-runtime': '^56.0.15'",
|
||||
"expo: '^56.0.12'",
|
||||
"'react-native': '^0.86.0'",
|
||||
"'react-native-webview': '^13.16.1'",
|
||||
"'eas-cli': '^20.3.0'",
|
||||
"assertPackageLockVersion('eas-cli', '20.3.0')",
|
||||
]) {
|
||||
if (!mobileShellConfigCheckSource.includes(snippet)) {
|
||||
throw new Error(`mobile shell dependency guardrail drifted: missing ${snippet}`);
|
||||
}
|
||||
}
|
||||
|
||||
for (const snippet of [
|
||||
"const rootPackageLockPath = new URL('../../../package-lock.json', import.meta.url)",
|
||||
"const cargoLockPath = new URL('../src-tauri/Cargo.lock', import.meta.url)",
|
||||
'function assertPackageDependencyVersion(',
|
||||
'function assertPackageLockVersion(',
|
||||
'function assertCargoDependencyLine(',
|
||||
'function assertCargoLockPackageVersion(',
|
||||
'function assertCargoLockDirectDependency(',
|
||||
"'@tauri-apps/cli': '^2.11.2'",
|
||||
"'@tauri-apps/cli': '2.11.2'",
|
||||
'tauri = { version = "2.11.2", features = ["tray-icon"] }',
|
||||
"['tauri', '2.11.2']",
|
||||
'tauri-plugin-single-instance = { version = "2.4.2", features = ["deep-link"] }',
|
||||
]) {
|
||||
if (!desktopShellConfigCheckSource.includes(snippet)) {
|
||||
throw new Error(`desktop shell dependency guardrail drifted: missing ${snippet}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assertNativeShellDependencyVersionGuardrails();
|
||||
const h5HostBridgeCallChainWrapperFiles = [
|
||||
'src/hooks/useHostLifecycleActive.ts',
|
||||
'src/hooks/useHostNavigationCanGoBack.ts',
|
||||
|
||||
Reference in New Issue
Block a user