chore: initialize from frontend template 4dc033c
This commit is contained in:
@@ -0,0 +1,225 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"cases": [
|
||||
{
|
||||
"id": "ordering-only",
|
||||
"expected": "none",
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": {
|
||||
"A": { "path": "/a", "tags": ["one", "two"] },
|
||||
"B": { "path": "/b", "tags": ["three"] }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"registries": [
|
||||
{
|
||||
"rows": {
|
||||
"B": { "tags": ["three"], "path": "/b" },
|
||||
"A": { "tags": ["two", "one"], "path": "/a" }
|
||||
},
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"registryId": "FE-REG-TEST"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "row-addition",
|
||||
"expected": "additive",
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/a" } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": {
|
||||
"A": { "path": "/a" },
|
||||
"B": { "path": "/b" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "behavior-change",
|
||||
"expected": "behavior-change",
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/a", "owner": "one" } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/a", "owner": "two" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "row-removal",
|
||||
"expected": "breaking",
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": {
|
||||
"A": { "path": "/a" },
|
||||
"B": { "path": "/b" }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/a" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "field-type-narrowing",
|
||||
"expected": "breaking",
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "limit": 10 } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "limit": "10" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "route-path-change",
|
||||
"expected": "breaking",
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/before" } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/after" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "registry-contract-narrowing",
|
||||
"expected": "breaking",
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": {
|
||||
"breakingFields": ["path"],
|
||||
"allowedValues": { "kind": ["one", "two"] }
|
||||
},
|
||||
"rows": { "A": { "path": "/a", "kind": "one" } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": {
|
||||
"breakingFields": ["path"],
|
||||
"allowedValues": { "kind": ["one"] }
|
||||
},
|
||||
"rows": { "A": { "path": "/a", "kind": "one" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"breakingEvidence": {
|
||||
"before": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/before" } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"after": {
|
||||
"schemaVersion": 2,
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FE-REG-TEST",
|
||||
"contract": { "breakingFields": ["path"] },
|
||||
"rows": { "A": { "path": "/after" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tamperedApproval": {
|
||||
"snapshot": {
|
||||
"schemaVersion": 2,
|
||||
"registries": []
|
||||
},
|
||||
"approval": {
|
||||
"schemaVersion": 1,
|
||||
"snapshotDigest": "tampered",
|
||||
"owner": "fixture-owner",
|
||||
"approvedAt": "2026-07-26T00:00:00.000Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"snapshotDigest": "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"owner": "negative-fixture",
|
||||
"approvedAt": "2026-07-26T00:00:00.000Z"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"sourceDirectories": [],
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FIXTURE-SOURCE",
|
||||
"path": "tests/fixtures/registry/forbidden/invalid-registry.ts",
|
||||
"exportName": "INVALID_REGISTRY",
|
||||
"owner": "fixture",
|
||||
"requiredFields": ["id", "target"],
|
||||
"uniqueFields": ["id"],
|
||||
"references": [
|
||||
{
|
||||
"field": "target",
|
||||
"registryId": "FIXTURE-TARGET",
|
||||
"targetField": "id"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"registryId": "FIXTURE-TARGET",
|
||||
"path": "tests/fixtures/registry/forbidden/invalid-registry.ts",
|
||||
"exportName": "TARGET_REGISTRY",
|
||||
"owner": "fixture",
|
||||
"requiredFields": ["id"],
|
||||
"uniqueFields": ["id"]
|
||||
}
|
||||
],
|
||||
"compatibilityImpact": {
|
||||
"allowed": ["none", "additive", "behavior-change", "breaking"],
|
||||
"current": "breaking"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
type InvalidRow = Readonly<{
|
||||
id: string;
|
||||
target?: string;
|
||||
}>;
|
||||
|
||||
export const INVALID_REGISTRY: Record<string, InvalidRow> = {
|
||||
FIRST: { id: "duplicate", target: "missing" },
|
||||
SECOND: { id: "duplicate" },
|
||||
};
|
||||
|
||||
export const TARGET_REGISTRY = {
|
||||
KNOWN: { id: "known" },
|
||||
} as const;
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"sourceDirectories": [],
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FIXTURE-DUPLICATE-INVALIDATION-EDGES",
|
||||
"path": "tests/fixtures/registry/invalidation/registries.ts",
|
||||
"exportName": "DUPLICATE_INVALIDATION_REGISTRY",
|
||||
"rowsPath": "edges",
|
||||
"rowKeyFields": [
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
],
|
||||
"owner": "fixture",
|
||||
"requiredFields": [
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
],
|
||||
"fieldTypes": {
|
||||
"topicId": "string",
|
||||
"namespace.namespaceId": "string",
|
||||
"namespace.namespaceVersion": "integer"
|
||||
},
|
||||
"uniqueFieldSets": [
|
||||
[
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
]
|
||||
],
|
||||
"breakingFields": [
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"sourceDirectories": [],
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "FIXTURE-INVALIDATION-EDGES",
|
||||
"path": "tests/fixtures/registry/invalidation/registries.ts",
|
||||
"exportName": "INVALIDATION_REGISTRY",
|
||||
"rowsPath": "edges",
|
||||
"rowKeyFields": [
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
],
|
||||
"owner": "fixture",
|
||||
"requiredFields": [
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
],
|
||||
"fieldTypes": {
|
||||
"topicId": "string",
|
||||
"namespace.namespaceId": "string",
|
||||
"namespace.namespaceVersion": "integer"
|
||||
},
|
||||
"uniqueFieldSets": [
|
||||
[
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
]
|
||||
],
|
||||
"snapshotProjection": {
|
||||
"singletonRowKey": "invalidation-graph",
|
||||
"canonicalArrayKeyFields": {
|
||||
"topics": ["$value"],
|
||||
"namespaces": ["namespaceId", "namespaceVersion"],
|
||||
"edges": [
|
||||
"topicId",
|
||||
"namespace.namespaceId",
|
||||
"namespace.namespaceVersion"
|
||||
]
|
||||
}
|
||||
},
|
||||
"breakingFields": ["topics", "namespaces", "edges"]
|
||||
},
|
||||
{
|
||||
"registryId": "FIXTURE-INVALIDATION-VERSIONS",
|
||||
"path": "tests/fixtures/registry/invalidation/registries.ts",
|
||||
"exportName": "INVALIDATION_TOPIC_VERSIONS",
|
||||
"rowKeyFields": ["topicId"],
|
||||
"owner": "fixture",
|
||||
"requiredFields": ["topicId", "topicVersion"],
|
||||
"fieldTypes": {
|
||||
"topicId": "string",
|
||||
"topicVersion": "integer"
|
||||
},
|
||||
"uniqueFields": ["topicId"],
|
||||
"breakingFields": ["topicId", "topicVersion"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
const namespace = Object.freeze({
|
||||
namespaceId: "orders",
|
||||
namespaceVersion: 1,
|
||||
});
|
||||
const reverseNamespace = Object.freeze({
|
||||
namespaceId: "qinv.fixture.changed",
|
||||
namespaceVersion: 1,
|
||||
});
|
||||
|
||||
export const INVALIDATION_REGISTRY = Object.freeze({
|
||||
topics: Object.freeze(["qinv.fixture.changed", "orders"]),
|
||||
namespaces: Object.freeze([namespace, reverseNamespace]),
|
||||
edges: Object.freeze([
|
||||
Object.freeze({
|
||||
topicId: "qinv.fixture.changed",
|
||||
namespace,
|
||||
}),
|
||||
Object.freeze({
|
||||
topicId: "orders",
|
||||
namespace: reverseNamespace,
|
||||
}),
|
||||
]),
|
||||
});
|
||||
|
||||
export const INVALIDATION_TOPIC_VERSIONS = Object.freeze([
|
||||
Object.freeze({
|
||||
topicId: "qinv.fixture.changed",
|
||||
topicVersion: 1,
|
||||
}),
|
||||
Object.freeze({
|
||||
topicId: "orders",
|
||||
topicVersion: 1,
|
||||
}),
|
||||
]);
|
||||
|
||||
export const DUPLICATE_INVALIDATION_REGISTRY = Object.freeze({
|
||||
topics: INVALIDATION_REGISTRY.topics,
|
||||
namespaces: INVALIDATION_REGISTRY.namespaces,
|
||||
edges: Object.freeze([
|
||||
INVALIDATION_REGISTRY.edges[0],
|
||||
Object.freeze({
|
||||
topicId: "qinv.fixture.changed",
|
||||
namespace: Object.freeze({
|
||||
namespaceId: "orders",
|
||||
namespaceVersion: 1,
|
||||
}),
|
||||
}),
|
||||
]),
|
||||
});
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"sourceDirectories": [],
|
||||
"registries": [
|
||||
{
|
||||
"registryId": "ROUTES",
|
||||
"path": "tests/fixtures/registry/routes/invalid-routes.ts",
|
||||
"exportName": "INVALID_ROUTES",
|
||||
"owner": "fixture",
|
||||
"requiredFields": [
|
||||
"routeId",
|
||||
"path",
|
||||
"paramsSchema",
|
||||
"searchSchema",
|
||||
"loadingSurface",
|
||||
"errorSurface",
|
||||
"chunkId"
|
||||
],
|
||||
"uniqueFields": ["routeId", "path", "chunkId"],
|
||||
"allowedValues": {
|
||||
"paramsSchema": [null],
|
||||
"searchSchema": [null],
|
||||
"loadingSurface": ["app-shell"],
|
||||
"errorSurface": ["route-boundary"],
|
||||
"chunkId": ["route-home"]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"field": "routeId",
|
||||
"registryId": "RUNTIME",
|
||||
"targetField": "routeId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"registryId": "RUNTIME",
|
||||
"path": "tests/fixtures/registry/routes/invalid-routes.ts",
|
||||
"exportName": "INVALID_RUNTIME",
|
||||
"owner": "fixture",
|
||||
"requiredFields": ["routeId", "moduleId", "paramsCodec", "searchCodec"],
|
||||
"allowedValues": {
|
||||
"moduleId": ["home-page"],
|
||||
"paramsCodec": ["none"],
|
||||
"searchCodec": ["none"]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"field": "routeId",
|
||||
"registryId": "ROUTES",
|
||||
"targetField": "routeId"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"compatibilityImpact": {
|
||||
"allowed": ["none", "additive", "behavior-change", "breaking"],
|
||||
"current": "breaking"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
export const INVALID_ROUTES = {
|
||||
FIRST: {
|
||||
routeId: "DUPLICATE",
|
||||
path: "/duplicate",
|
||||
paramsSchema: "UnknownParams",
|
||||
searchSchema: "UnknownSearch",
|
||||
loadingSurface: "unknown-loading",
|
||||
errorSurface: "unknown-error",
|
||||
chunkId: "unknown-chunk",
|
||||
},
|
||||
SECOND: {
|
||||
routeId: "DUPLICATE",
|
||||
path: "/duplicate",
|
||||
paramsSchema: null,
|
||||
searchSchema: null,
|
||||
loadingSurface: "app-shell",
|
||||
errorSurface: "route-boundary",
|
||||
chunkId: "route-home",
|
||||
},
|
||||
};
|
||||
|
||||
export const INVALID_RUNTIME = {
|
||||
ORPHAN: {
|
||||
routeId: "ORPHAN",
|
||||
moduleId: "unknown-module",
|
||||
paramsCodec: "none",
|
||||
searchCodec: "none",
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user