Skip to content

Commit ab89c37

Browse files
committed
refactor: more hashableUri conversion
1 parent 3c7c442 commit ab89c37

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/salesforcedx-vscode-metadata/src/conflict/resultStorage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export const buildTimestampIndexFromDir = Effect.fn('resultStorage.buildTimestam
145145

146146
const byKey = yield* Stream.fromIterable(allJsonUris).pipe(
147147
Stream.mapEffect(uri =>
148-
fs.readFile(uri).pipe(
148+
fs.readFile(uri.toUri()).pipe(
149149
Effect.tapError(e => Effect.logWarning('skipping unreadable result file', e)),
150150
Effect.option,
151151
// Attach sourceUri so each row remembers which file it came from.
@@ -178,7 +178,7 @@ export const buildTimestampIndexFromDir = Effect.fn('resultStorage.buildTimestam
178178
// Group by component key; first entry wins because rows are sorted newest-first.
179179
Effect.map(sortedArray => Object.groupBy(sortedArray, (x: TimestampRow) => x.key)),
180180
// Delete stale files in the background — best-effort, must not block the caller.
181-
Effect.tap(bk => Effect.forkDaemon(Effect.forEach(getStaleUris(bk, allJsonUris), uri => fs.safeDelete(uri))))
181+
Effect.tap(bk => Effect.forkDaemon(Effect.forEach(getStaleUris(bk, allJsonUris), uri => fs.safeDelete(uri.toUri()))))
182182
);
183183

184184
return new Map(Object.entries(byKey).map(([key, rows]) => [key, rows![0].lastModifiedDate]));

packages/salesforcedx-vscode-metadata/src/shared/diff/diffHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const matchUrisToComponents = Effect.fn('matchUrisToComponents')(function
109109
export const filesAreNotIdentical = Effect.fn('filesAreNotIdentical')(function* (pair: DiffFilePair) {
110110
const api = yield* (yield* ExtensionProviderService).getServicesApi;
111111
const [buffer1, buffer2] = (yield* Effect.all(
112-
[api.services.FsService.readFile(pair.remoteUri), api.services.FsService.readFile(pair.localUri)],
112+
[api.services.FsService.readFile(pair.remoteUri.toUri()), api.services.FsService.readFile(pair.localUri.toUri())],
113113
{ concurrency: 'unbounded' }
114114
).pipe(
115115
Effect.tapError(e => Effect.logWarning('filesAreNotIdentical: readFile failed, skipping pair', e)),

0 commit comments

Comments
 (0)