react-native-update 10.22.0 → 10.22.1

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.
@@ -72,16 +72,18 @@ napi_value HdiffPatch(napi_env env, napi_callback_info info) {
72
72
  // 创建结果buffer
73
73
  napi_value resultBuffer;
74
74
  uint8_t* outPtr;
75
- status = napi_create_buffer(env, newsize, (void**)&outPtr, &resultBuffer);
75
+ void* data;
76
+
77
+ status = napi_create_arraybuffer(env, newsize, &data, &resultBuffer);
76
78
  if (status != napi_ok) {
77
79
  napi_throw_error(env, NULL, "Failed to create result buffer");
78
80
  return NULL;
79
81
  }
82
+ outPtr = (uint8_t*)data;
80
83
 
81
84
  // 执行patch
82
85
  _check(kHPatch_ok==hpatch_by_mem(originPtr, originLength, outPtr, newsize,
83
86
  patchPtr, patchLength, &patInfo), "hpatch");
84
-
85
87
  return resultBuffer;
86
88
 
87
89
  _clear:
@@ -288,7 +288,9 @@ export class DownloadTask {
288
288
  }
289
289
  }
290
290
 
291
- await zip.decompressFile(entry.filename, params.unzipDirectory);
291
+ if(entry.filename !== '.DS_Store'){
292
+ await zip.decompressFile(entry.filename, params.unzipDirectory);
293
+ }
292
294
  }
293
295
 
294
296
  if (!foundDiff) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.22.0",
3
+ "version": "10.22.1",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {