阶段九:完成兼容入口最终审计

This commit is contained in:
Christ committed 2026-08-15 04:03:39 +08:00
1 parent 190dc80cc0
commit 0853a107a2
4 files changed
+55 -4

No files matched your search

+10
View File
@@ -55,6 +55,16 @@ describe('React feature dependency boundaries', () => {
expect(violations).toEqual([]);
});
test('production API adapters use versioned HTTP paths', () => {
// violations 保存 API 适配层中仍然指向未版本化前缀的生产源码路径。
const violations = productionSources()
.filter(file => file.relativePath === 'services/api.ts' || file.relativePath.endsWith('/api.ts'))
.filter(file => /['"`]\/api\/(?!v1(?:\/|['"`]))/.test(file.source))
.map(file => file.relativePath);
expect(violations).toEqual([]);
});
test('legacy component state compatibility entrypoints have been removed', () => {
// legacyEntrypoints 是不应重新引入页面层状态转发文件的旧路径。
const legacyEntrypoints = [