MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeChange

Function makeChange

packages/tools/api-diff/src/Diff.ts:164–182  ·  view source on GitHub ↗
(
  classification: ChangeClassification,
  match: Partial<Match>,
  delta?: unknown,
  suffix = ""
)

Source from the content-addressed store, hash-verified

162): string => `change-${fingerprint([classification, base?.id ?? null, head?.id ?? null, suffix]).slice(0, 16)}`
163
164const makeChange = (
165 classification: ChangeClassification,
166 match: Partial<Match>,
167 delta?: unknown,
168 suffix = ""
169): ApiChange => ({
170 id: changeId(classification, match.base, match.head, suffix),
171 classification,
172 confidence: match.confidence ?? 1,
173 baseApiId: match.base?.id,
174 headApiId: match.head?.id,
175 before: match.base?.displaySignature,
176 after: match.head?.displaySignature,
177 delta,
178 baseSource: match.base?.source,
179 headSource: match.head?.source,
180 reviewNotes: match.note,
181 authoritative: match.authoritative ?? true
182})
183
184const declarationHash = (value: unknown): string => fingerprint(value)
185

Callers 3

classifyStructureFunction · 0.85
movementChangeFunction · 0.85
diffSnapshotsFunction · 0.85

Calls 1

changeIdFunction · 0.85

Tested by

no test coverage detected