react-native-update-cli 2.15.4 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/diff.js +1 -1
- package/package.json +1 -1
- package/src/diff.ts +5 -2
package/lib/diff.js
CHANGED
|
@@ -111,7 +111,7 @@ function createOutputZip(output) {
|
|
|
111
111
|
}
|
|
112
112
|
async function addBundlePatch(zipfile, entry, nextZipfile, diffFn, originSource) {
|
|
113
113
|
const newSource = await (0, _zipentries.readEntry)(entry, nextZipfile);
|
|
114
|
-
zipfile.addBuffer(diffFn(originSource, newSource), `${entry.fileName}.patch`, (0, _zipoptions.zipOptionsForPatchEntry)());
|
|
114
|
+
zipfile.addBuffer(await diffFn(originSource, newSource), `${entry.fileName}.patch`, (0, _zipoptions.zipOptionsForPatchEntry)());
|
|
115
115
|
}
|
|
116
116
|
async function addFileFromZipEntry(zipfile, entry, nextZipfile) {
|
|
117
117
|
const entryPrefix = await (0, _zipentries.readEntryPrefix)(entry, nextZipfile, _zipoptions.ZIP_ENTRY_SNIFF_BYTES);
|
package/package.json
CHANGED
package/src/diff.ts
CHANGED
|
@@ -19,7 +19,10 @@ import {
|
|
|
19
19
|
zipOptionsForPayloadEntry,
|
|
20
20
|
} from './utils/zip-options';
|
|
21
21
|
|
|
22
|
-
type Diff = (
|
|
22
|
+
type Diff = (
|
|
23
|
+
oldSource?: Buffer,
|
|
24
|
+
newSource?: Buffer,
|
|
25
|
+
) => Buffer | Promise<Buffer>;
|
|
23
26
|
type HdiffModule = {
|
|
24
27
|
diff?: Diff;
|
|
25
28
|
};
|
|
@@ -83,7 +86,7 @@ async function addBundlePatch(
|
|
|
83
86
|
) {
|
|
84
87
|
const newSource = await readEntry(entry, nextZipfile);
|
|
85
88
|
zipfile.addBuffer(
|
|
86
|
-
diffFn(originSource, newSource),
|
|
89
|
+
await diffFn(originSource, newSource),
|
|
87
90
|
`${entry.fileName}.patch`,
|
|
88
91
|
zipOptionsForPatchEntry(),
|
|
89
92
|
);
|