Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
filip131311 committed Dec 12, 2024
1 parent 0a1d9bb commit 01ee387
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/vscode-extension/src/builders/BuildCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ export class BuildCache {
constructor(private readonly platform: DevicePlatform, private readonly appRoot: string) {}

get cacheKey() {
const platformKey = this.platform === DevicePlatform.Android ? ANDROID_BUILD_CACHE_KEY : IOS_BUILD_CACHE_KEY;
const platformKey =
this.platform === DevicePlatform.Android ? ANDROID_BUILD_CACHE_KEY : IOS_BUILD_CACHE_KEY;
const appRoot = this.appRoot;
const res =appRoot+platformKey
Logger.debug("Frytki", res);
return res
return appRoot + platformKey;
}

/**
Expand Down Expand Up @@ -96,8 +95,7 @@ export class BuildCache {

public async isCacheStale() {
const currentFingerprint = await this.calculateFingerprint();
const { fingerprint } =
extensionContext.globalState.get<BuildCacheInfo>(this.cacheKey) ?? {};
const { fingerprint } = extensionContext.globalState.get<BuildCacheInfo>(this.cacheKey) ?? {};

return currentFingerprint !== fingerprint;
}
Expand Down Expand Up @@ -162,9 +160,9 @@ export function migrateOldBuildCachesToNewStorage() {
return;
}

extensionContext.globalState.update(appRoot+platformKey, cache);
extensionContext.globalState.update(appRoot + platformKey, cache);

// remove the old cache afterwords
extensionContext.workspaceState.update(platformKey, undefined);
});
}
}

0 comments on commit 01ee387

Please sign in to comment.