Add lightweight correctness linting and resolve formatting conflicts

This commit is contained in:
Timothy J. Aveni
2026-09-15 15:31:50 -07:00
parent 0d3c013c07
commit 0854822923
13 changed files with 274 additions and 102 deletions
+4 -1
View File
@@ -7,7 +7,10 @@ const checked = async (port, revision) => {
/** Helpers never retry a failed CAS or silently overwrite concurrent edits. */
export const relationshipMap = (port) => ({
read: () => port.collection(),
async get(key) { const snapshot = await port.collection(); return { revision: snapshot.revision, value: snapshot.entries.find((entry) => entry.key === key)?.target }; },
async get(key) {
const snapshot = await port.collection();
return { revision: snapshot.revision, value: snapshot.entries.find((entry) => entry.key === key)?.target };
},
async set(key, target, expectedRevision) {
const snapshot = await checked(port, expectedRevision);
const entries = snapshot.entries.filter((entry) => entry.key !== key);