Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/roam/src/components/canvas/Clipboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export const ClipboardProvider = ({
if (!isInitialized || !clipboardBlockUid) return;

try {
setBlockProps(clipboardBlockUid, {
void setBlockProps(clipboardBlockUid, {
[CLIPBOARD_PROP_KEY]: pages,
[CLIPBOARD_SHOW_NODES_ON_CANVAS_PROP_KEY]: showNodesOnCanvas,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/roam/src/components/canvas/canvasSyncMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const setRoamJsQueryBuilderProps = ({
pageUid: string;
nextRjsqb: Record<string, json>;
}): void => {
setBlockProps(pageUid, {
void setBlockProps(pageUid, {
[QUERY_BUILDER_PROP_KEY]: nextRjsqb,
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const DiscourseNodeConfigPanel: React.FC<DiscourseNodeConfigPanelProps> = ({
},
],
}).then((valueUid) => {
setBlockProps(
void setBlockProps(
valueUid,
DiscourseNodeSchema.parse({
text: label,
Expand Down
4 changes: 2 additions & 2 deletions apps/roam/src/components/settings/utils/accessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ const setBlockPropAtPath = (
return currentContext[currentKey];
}, updatedProps);

setBlockProps(blockUid, updatedProps, false);
void setBlockProps(blockUid, updatedProps, false);
};

const setBlockPropBasedSettings = ({
Expand Down Expand Up @@ -1193,7 +1193,7 @@ export const getAllDiscourseNodes = (): DiscourseNode[] => {
);
const retryResult = DiscourseNodeSchema.safeParse(migrated);
if (retryResult.success) {
setBlockProps(pageUid, retryResult.data, false);
void setBlockProps(pageUid, retryResult.data, false);
nodes.push(
toDiscourseNode({
...retryResult.data,
Expand Down
8 changes: 6 additions & 2 deletions apps/roam/src/components/settings/utils/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const initializeSettingsBlockProps = (
Object.keys(existingProps).length === 0 ||
!schema.safeParse(existingProps).success
) {
setBlockProps(uid, defaults, false);
void setBlockProps(uid, defaults, false);
}

// Reconcile placeholder relation keys with real block UIDs.
Expand Down Expand Up @@ -261,7 +261,11 @@ const reconcileRelationKeys = (
}

if (changed) {
setBlockProps(globalBlockUid, { Relations: reconciledRelations }, false);
void setBlockProps(
globalBlockUid,
{ Relations: reconciledRelations },
false,
);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const migrateSection = ({
return true;
}

setBlockProps(blockUid, parsedLegacy, false);
void setBlockProps(blockUid, parsedLegacy, false);
onWrite?.();
console.log(`${LOG_PREFIX} ${label}: migrated`);
return true;
Expand Down
5 changes: 3 additions & 2 deletions apps/roam/src/utils/__tests__/importedSourceIdentity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const setRoamAlphaApi = (): void => {
block: { props: Record<string, json>; uid: string };
}) => {
propsByUid.set(block.uid, block.props);
return Promise.resolve();
},
),
},
Expand Down Expand Up @@ -75,15 +76,15 @@ describe("imported source identity metadata", () => {
expect(readImportedSourceIdentity(PAGE_UID)).toBeUndefined();
});

it("writes the source RID and modified time while preserving sibling metadata", () => {
it("writes the source RID and modified time while preserving sibling metadata", async () => {
propsByUid.set(PAGE_UID, {
[DISCOURSE_GRAPH_PROP_NAME]: {
"relation-migration": { relationUid: 1718000000000 },
},
"other-extension": { enabled: true },
});

writeImportedSourceIdentity({
await writeImportedSourceIdentity({
pageUid: PAGE_UID,
sourceModifiedAt: SOURCE_MODIFIED_AT,
sourceNodeRid: SOURCE_NODE_RID,
Expand Down
Loading