Metakit / @doeixd/metakit/tooling

semanticDiff

function · packages/metakit/src/toolingManifest.ts:314

function semanticDiff(before: Manifest, after: Manifest): ManifestDiff

Compare two manifests. Definitions are matched by contract hash first: one hash under a name that is gone and a name that is new is renamed. The names left are matched by name: another hash is affected where the definition's own form (its canonical texts with the hashes of what it refers to set aside) is unchanged, so only something it calls or holds changed, and changed otherwise; a name on one side only is added or removed.