react-native-zip-archive 7.0.0 → 7.0.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.
package/README.md CHANGED
@@ -6,6 +6,10 @@ Zip archive utility for react-native
6
6
 
7
7
  In order to comply with the new privacy policy of the App Store on iOS, you need to upgrade react-native-zip-archive to version 7.0.0, which requires the deployment target to be iOS 15.5 or later.
8
8
 
9
+ ## For Expo Users
10
+
11
+ The only way to make this work with Expo is to create a [dev build](https://docs.expo.dev/workflow/overview/#development-builds), the expo go is not supported.
12
+
9
13
  ## Compatibility
10
14
 
11
15
  | react-native version | react-native-zip-archive version |
@@ -15,7 +15,6 @@ Pod::Spec.new do |s|
15
15
 
16
16
  s.dependency 'React-Core'
17
17
  s.dependency 'SSZipArchive', '~>2.5.5'
18
- s.compiler_flags = '-GCC_PREPROCESSOR_DEFINITIONS="HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB MZ_ZIP_NO_SIGNING $(inherited)"'
19
18
 
20
19
  s.subspec 'Core' do |ss|
21
20
  ss.source_files = 'ios/*.{h,m}'
@@ -421,7 +421,7 @@ public class RNZipArchiveModule extends ReactContextBaseJavaModule {
421
421
  long totalSize = getUncompressedSize(zipFilePath, charset);
422
422
  promise.resolve((double) totalSize);
423
423
  }
424
-
424
+
425
425
  /**
426
426
  * Return the uncompressed size of the ZipFile (only works for files on disk, not in assets)
427
427
  *
package/index.js CHANGED
@@ -10,7 +10,11 @@ const normalizeFilePath = (path) =>
10
10
  path.startsWith("file://") ? path.slice(7) : path;
11
11
 
12
12
  export const unzip = (source, target, charset = "UTF-8") => {
13
- return RNZipArchive.unzip(normalizeFilePath(source), normalizeFilePath(target), charset);
13
+ return RNZipArchive.unzip(
14
+ normalizeFilePath(source),
15
+ normalizeFilePath(target),
16
+ charset
17
+ );
14
18
  };
15
19
  export const isPasswordProtected = (source) => {
16
20
  return RNZipArchive.isPasswordProtected(normalizeFilePath(source)).then(
@@ -49,8 +53,14 @@ export const zipWithPassword = (
49
53
 
50
54
  export const zip = (source, target) => {
51
55
  return Array.isArray(source)
52
- ? RNZipArchive.zipFiles(source.map(normalizeFilePath), normalizeFilePath(target))
53
- : RNZipArchive.zipFolder(normalizeFilePath(source), normalizeFilePath(target));
56
+ ? RNZipArchive.zipFiles(
57
+ source.map(normalizeFilePath),
58
+ normalizeFilePath(target)
59
+ )
60
+ : RNZipArchive.zipFolder(
61
+ normalizeFilePath(source),
62
+ normalizeFilePath(target)
63
+ );
54
64
  };
55
65
 
56
66
  export const unzipAssets = (source, target) => {
@@ -58,7 +68,10 @@ export const unzipAssets = (source, target) => {
58
68
  throw new Error("unzipAssets not supported on this platform");
59
69
  }
60
70
 
61
- return RNZipArchive.unzipAssets(normalizeFilePath(source), normalizeFilePath(target));
71
+ return RNZipArchive.unzipAssets(
72
+ normalizeFilePath(source),
73
+ normalizeFilePath(target)
74
+ );
62
75
  };
63
76
 
64
77
  export const subscribe = (callback) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-zip-archive",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "A little wrapper on ZipArchive for react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {