"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/migrations/cluster-store/5.0.0-beta.13.ts" between
lens-5.1.2.tar.gz and lens-5.1.3.tar.gz

About: Lens is a Kubernetes IDE.

5.0.0-beta.13.ts  (lens-5.1.2):5.0.0-beta.13.ts  (lens-5.1.3)
skipping to change at line 111 skipping to change at line 111
removeSync(oldPath); removeSync(oldPath);
} }
} }
} }
export default { export default {
version: "5.0.0-beta.13", version: "5.0.0-beta.13",
run(store) { run(store) {
const folder = path.resolve(app.getPath("userData"), "lens-local-storage"); const folder = path.resolve(app.getPath("userData"), "lens-local-storage");
const oldClusters: ClusterModel[] = store.get("clusters"); const oldClusters: ClusterModel[] = store.get("clusters") ?? [];
const clusters = new Map<string, ClusterModel>(); const clusters = new Map<string, ClusterModel>();
for (const { id: oldId, ...cluster } of oldClusters) { for (const { id: oldId, ...cluster } of oldClusters) {
const newId = generateNewIdFor(cluster); const newId = generateNewIdFor(cluster);
if (clusters.has(newId)) { if (clusters.has(newId)) {
migrationLog(`Duplicate entries for ${newId}`, { oldId }); migrationLog(`Duplicate entries for ${newId}`, { oldId });
clusters.set(newId, mergeClusterModel(clusters.get(newId), cluster)); clusters.set(newId, mergeClusterModel(clusters.get(newId), cluster));
} else { } else {
migrationLog(`First entry for ${newId}`, { oldId }); migrationLog(`First entry for ${newId}`, { oldId });
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)