Skip to content

Commit cf67971

Browse files
committed
Remove unused copiesv2 variable from diffFromPPK and diffFromPackage functions in bundle.ts to streamline JSON output.
1 parent ebd6d36 commit cf67971

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-update-cli",
3-
"version": "2.4.1",
3+
"version": "2.4.2",
44
"description": "command line tool for react-native-update (remote updates for react native)",
55
"main": "index.js",
66
"bin": {

src/bundle.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ async function diffFromPPK(origin: string, next: string, output: string) {
578578
}
579579

580580
const copies = {};
581-
const copiesv2 = {};
582581

583582
const zipfile = new YazlZipFile();
584583

@@ -640,7 +639,6 @@ async function diffFromPPK(origin: string, next: string, output: string) {
640639
addEntry(base);
641640
}
642641
copies[entry.fileName] = originMap[entry.crc32];
643-
copiesv2[entry.crc32] = entry.fileName;
644642
return;
645643
}
646644

@@ -673,7 +671,7 @@ async function diffFromPPK(origin: string, next: string, output: string) {
673671

674672
//console.log({copies, deletes});
675673
zipfile.addBuffer(
676-
Buffer.from(JSON.stringify({ copies, copiesv2, deletes })),
674+
Buffer.from(JSON.stringify({ copies, deletes })),
677675
'__diff.json',
678676
);
679677
zipfile.end();
@@ -718,7 +716,6 @@ async function diffFromPackage(
718716
}
719717

720718
const copies = {};
721-
const copiesv2 = {};
722719

723720
const zipfile = new YazlZipFile();
724721

@@ -754,7 +751,6 @@ async function diffFromPackage(
754751
// If moved from other place
755752
if (originMap[entry.crc32]) {
756753
copies[entry.fileName] = originMap[entry.crc32];
757-
copiesv2[entry.crc32] = entry.fileName;
758754
return;
759755
}
760756

@@ -773,10 +769,7 @@ async function diffFromPackage(
773769
}
774770
});
775771

776-
zipfile.addBuffer(
777-
Buffer.from(JSON.stringify({ copies, copiesv2 })),
778-
'__diff.json',
779-
);
772+
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies })), '__diff.json');
780773
zipfile.end();
781774
await writePromise;
782775
}

0 commit comments

Comments
 (0)