expo-modules-core 1.2.4 → 1.2.5

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.
Files changed (261) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/kotlin/exception/CodedException.kt +1 -1
  4. package/android/src/main/java/expo/modules/kotlin/functions/AnyFunction.kt +2 -2
  5. package/android/src/main/java/expo/modules/kotlin/functions/AsyncFunctionBuilder.kt +7 -7
  6. package/ios/Swift/Arguments/Convertibles.swift +25 -3
  7. package/ios/Swift/Utilities.swift +24 -24
  8. package/ios/Tests/ConvertiblesSpec.swift +15 -9
  9. package/package.json +2 -2
  10. package/android-annotation/build/.transforms/089e97b72acecf254a7d247d0baa2b7e/results.bin +0 -1
  11. package/android-annotation/build/.transforms/2616ff895b4ff961ab12e41d084d4957/results.bin +0 -1
  12. package/android-annotation/build/.transforms/2616ff895b4ff961ab12e41d084d4957/transformed/jetified-expo-modules-core$android-annotation-1.1.1.jar +0 -0
  13. package/android-annotation/build/.transforms/2a6ad9f4fa618fee007ec2bbdffb4bb2/results.bin +0 -1
  14. package/android-annotation/build/.transforms/2a6ad9f4fa618fee007ec2bbdffb4bb2/transformed/desugar_graph.bin +0 -0
  15. package/android-annotation/build/.transforms/2ef7beada3b4b7308a24a9e1468f9b93/results.bin +0 -1
  16. package/android-annotation/build/.transforms/2ef7beada3b4b7308a24a9e1468f9b93/transformed/jetified-expo-modules-core$android-annotation-1.1.1.jar +0 -0
  17. package/android-annotation/build/.transforms/4febee1e6f39c232f4eb35a7b524c975/results.bin +0 -0
  18. package/android-annotation/build/.transforms/5b89b7b449c6508d789f5cf475894cbb/results.bin +0 -1
  19. package/android-annotation/build/.transforms/688d8dd558fefc981eb974d4c54f16ef/results.bin +0 -1
  20. package/android-annotation/build/.transforms/6fd68776f9bd438bfc86a2abb41c3c2b/results.bin +0 -0
  21. package/android-annotation/build/.transforms/715648c2d059959be6cd3af7d99c4c7e/results.bin +0 -1
  22. package/android-annotation/build/.transforms/85278cc8594ac806f87680e864bdd2f4/results.bin +0 -1
  23. package/android-annotation/build/.transforms/91ca6d3ca3ca6e8a582ef457e7f86cdd/results.bin +0 -1
  24. package/android-annotation/build/.transforms/91ca6d3ca3ca6e8a582ef457e7f86cdd/transformed/jetified-expo-modules-core$android-annotation-1.1.1.jar +0 -0
  25. package/android-annotation/build/.transforms/9aa6b8e553bae310602aa72eb3a3dd8e/results.bin +0 -1
  26. package/android-annotation/build/.transforms/9aa6b8e553bae310602aa72eb3a3dd8e/transformed/desugar_graph.bin +0 -0
  27. package/android-annotation/build/.transforms/9aa6b8e553bae310602aa72eb3a3dd8e/transformed/main/expo/modules/annotation/Config.dex +0 -0
  28. package/android-annotation/build/.transforms/9aa6b8e553bae310602aa72eb3a3dd8e/transformed/main/expo/modules/annotation/ConverterBinder.dex +0 -0
  29. package/android-annotation/build/.transforms/9d493609b976568ca90064bb46b7d265/results.bin +0 -0
  30. package/android-annotation/build/.transforms/a344fee0bc9be96b2223502b5fd955e6/results.bin +0 -1
  31. package/android-annotation/build/.transforms/a344fee0bc9be96b2223502b5fd955e6/transformed/desugar_graph.bin +0 -0
  32. package/android-annotation/build/.transforms/c7decdc04d88f99e80e39d6ad72ed175/results.bin +0 -1
  33. package/android-annotation/build/.transforms/c7decdc04d88f99e80e39d6ad72ed175/transformed/desugar_graph.bin +0 -0
  34. package/android-annotation/build/.transforms/c7decdc04d88f99e80e39d6ad72ed175/transformed/main/expo/modules/annotation/Config.dex +0 -0
  35. package/android-annotation/build/.transforms/c7decdc04d88f99e80e39d6ad72ed175/transformed/main/expo/modules/annotation/ConverterBinder.dex +0 -0
  36. package/android-annotation/build/.transforms/d6e0b4a3dab569f6af5c234097084769/results.bin +0 -1
  37. package/android-annotation/build/.transforms/d6e0b4a3dab569f6af5c234097084769/transformed/jetified-expo-modules-core$android-annotation-1.1.1.jar +0 -0
  38. package/android-annotation/build/.transforms/d854c8cab253539def8cccd6e9fe3b36/results.bin +0 -1
  39. package/android-annotation/build/.transforms/e1981ac65fce5e257af7fb7592145b0b/results.bin +0 -0
  40. package/android-annotation/build/.transforms/ec098f74c10da5b275a6ccb8876f666f/results.bin +0 -1
  41. package/android-annotation/build/.transforms/eda7b3de83481e8164e6ae402044d5da/results.bin +0 -1
  42. package/android-annotation/build/.transforms/eda7b3de83481e8164e6ae402044d5da/transformed/jetified-expo-modules-core$android-annotation-1.1.1/classes.dex +0 -0
  43. package/android-annotation/build/classes/kotlin/main/META-INF/expo-modules-core$android-annotation.kotlin_module +0 -0
  44. package/android-annotation/build/classes/kotlin/main/expo/modules/annotation/Config.class +0 -0
  45. package/android-annotation/build/classes/kotlin/main/expo/modules/annotation/ConverterBinder.class +0 -0
  46. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  47. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  48. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  49. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  50. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  51. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  52. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  53. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  54. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  55. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  56. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  57. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  58. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  59. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  60. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  61. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  62. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  63. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  64. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  65. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  66. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  67. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  68. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  69. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  70. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  71. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  72. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  73. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  74. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  75. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  76. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  77. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  78. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  79. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  80. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  81. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  82. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  83. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  84. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  85. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  86. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  87. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  88. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  89. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  90. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  91. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  92. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  93. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  94. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  95. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  96. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  97. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  98. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  99. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  100. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  101. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  102. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  103. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  104. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  105. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  106. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  107. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  108. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  109. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  110. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  111. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  112. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  113. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  114. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  115. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  116. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  117. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  118. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  119. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  120. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  121. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  122. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  123. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  124. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  125. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  126. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  127. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  128. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  129. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  130. package/android-annotation/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  131. package/android-annotation/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  132. package/android-annotation/build/kotlin/compileKotlin/local-state/build-history.bin +0 -0
  133. package/android-annotation/build/kotlin/expomodulescoreandroidannotation111jar-classes.txt +0 -1
  134. package/android-annotation/build/libs/expo-modules-core$android-annotation-1.1.1.jar +0 -0
  135. package/android-annotation/build/tmp/jar/MANIFEST.MF +0 -2
  136. package/android-annotation-processor/build/.transforms/1b4f80744863bac334a4a960e0a85a24/results.bin +0 -1
  137. package/android-annotation-processor/build/.transforms/1b4f80744863bac334a4a960e0a85a24/transformed/jetified-expo-modules-core$android-annotation-processor-1.1.1.jar +0 -0
  138. package/android-annotation-processor/build/.transforms/3b7fe130fd61e1433e438a58f10229fe/results.bin +0 -1
  139. package/android-annotation-processor/build/.transforms/3b7fe130fd61e1433e438a58f10229fe/transformed/desugar_graph.bin +0 -0
  140. package/android-annotation-processor/build/.transforms/482840e2e54f8a118d889b76a724dfe8/results.bin +0 -0
  141. package/android-annotation-processor/build/.transforms/49ac6896419ba7d51b0c89a8249f4a2c/results.bin +0 -1
  142. package/android-annotation-processor/build/.transforms/4a2be78f7ca47909d4b1d845fe558b05/results.bin +0 -1
  143. package/android-annotation-processor/build/.transforms/4a2be78f7ca47909d4b1d845fe558b05/transformed/desugar_graph.bin +0 -0
  144. package/android-annotation-processor/build/.transforms/4a2be78f7ca47909d4b1d845fe558b05/transformed/main/expo/modules/annotationprocessor/ConverterBinderVisitor.dex +0 -0
  145. package/android-annotation-processor/build/.transforms/4a2be78f7ca47909d4b1d845fe558b05/transformed/main/expo/modules/annotationprocessor/ExpoSymbolProcessor$process$$inlined$filterIsInstance$1.dex +0 -0
  146. package/android-annotation-processor/build/.transforms/4a2be78f7ca47909d4b1d845fe558b05/transformed/main/expo/modules/annotationprocessor/ExpoSymbolProcessor.dex +0 -0
  147. package/android-annotation-processor/build/.transforms/4a2be78f7ca47909d4b1d845fe558b05/transformed/main/expo/modules/annotationprocessor/ExpoSymbolProcessorProvider.dex +0 -0
  148. package/android-annotation-processor/build/.transforms/4dca1fee1be74cc69d0f3a9cb1165461/results.bin +0 -1
  149. package/android-annotation-processor/build/.transforms/4dca1fee1be74cc69d0f3a9cb1165461/transformed/jetified-expo-modules-core$android-annotation-processor-1.1.1.jar +0 -0
  150. package/android-annotation-processor/build/.transforms/54754d6af08ca1eee919262f641053ce/results.bin +0 -1
  151. package/android-annotation-processor/build/.transforms/54754d6af08ca1eee919262f641053ce/transformed/desugar_graph.bin +0 -0
  152. package/android-annotation-processor/build/.transforms/54754d6af08ca1eee919262f641053ce/transformed/main/expo/modules/annotationprocessor/ConverterBinderVisitor.dex +0 -0
  153. package/android-annotation-processor/build/.transforms/54754d6af08ca1eee919262f641053ce/transformed/main/expo/modules/annotationprocessor/ExpoSymbolProcessor$process$$inlined$filterIsInstance$1.dex +0 -0
  154. package/android-annotation-processor/build/.transforms/54754d6af08ca1eee919262f641053ce/transformed/main/expo/modules/annotationprocessor/ExpoSymbolProcessor.dex +0 -0
  155. package/android-annotation-processor/build/.transforms/54754d6af08ca1eee919262f641053ce/transformed/main/expo/modules/annotationprocessor/ExpoSymbolProcessorProvider.dex +0 -0
  156. package/android-annotation-processor/build/.transforms/54abe01f96b2adff2850d0e1f51465a2/results.bin +0 -1
  157. package/android-annotation-processor/build/.transforms/5888c9c32bb4989a6d2c7ac350dbc04d/results.bin +0 -1
  158. package/android-annotation-processor/build/.transforms/5888c9c32bb4989a6d2c7ac350dbc04d/transformed/jetified-expo-modules-core$android-annotation-processor-1.1.1.jar +0 -0
  159. package/android-annotation-processor/build/.transforms/60a8c07e3671a4864cac6089baa7ca8a/results.bin +0 -0
  160. package/android-annotation-processor/build/.transforms/6623abf7e147f24c411bbb3c265745f8/results.bin +0 -1
  161. package/android-annotation-processor/build/.transforms/6623abf7e147f24c411bbb3c265745f8/transformed/jetified-expo-modules-core$android-annotation-processor-1.1.1.jar +0 -0
  162. package/android-annotation-processor/build/.transforms/6a36ea16e4afe440089822b74f25c29d/results.bin +0 -0
  163. package/android-annotation-processor/build/.transforms/77f1d8e3d1d073e6cb93773bbd99b1e9/results.bin +0 -1
  164. package/android-annotation-processor/build/.transforms/87e76ef6b00352c25fc6e55b5060413a/results.bin +0 -0
  165. package/android-annotation-processor/build/.transforms/8cd33067ed57eb54fc42b517b4797c5b/results.bin +0 -1
  166. package/android-annotation-processor/build/.transforms/a4b6a97be880e7b6896b5e9fe98515e2/results.bin +0 -1
  167. package/android-annotation-processor/build/.transforms/caa2db5efe5e5dbffc1010b501f0eeb7/results.bin +0 -1
  168. package/android-annotation-processor/build/.transforms/daf2a8929c0fd9fb4c967ccc8c559b76/results.bin +0 -1
  169. package/android-annotation-processor/build/.transforms/daf2a8929c0fd9fb4c967ccc8c559b76/transformed/jetified-expo-modules-core$android-annotation-processor-1.1.1/classes.dex +0 -0
  170. package/android-annotation-processor/build/.transforms/ed58a0a2a93f92c8291f3ef755744f1b/results.bin +0 -1
  171. package/android-annotation-processor/build/.transforms/fb09fabff5e8a7dfb537add22d09b18c/results.bin +0 -1
  172. package/android-annotation-processor/build/.transforms/fb09fabff5e8a7dfb537add22d09b18c/transformed/desugar_graph.bin +0 -0
  173. package/android-annotation-processor/build/classes/kotlin/main/META-INF/expo-modules-core$android-annotation-processor.kotlin_module +0 -0
  174. package/android-annotation-processor/build/classes/kotlin/main/expo/modules/annotationprocessor/ConverterBinderVisitor.class +0 -0
  175. package/android-annotation-processor/build/classes/kotlin/main/expo/modules/annotationprocessor/ExpoSymbolProcessor$process$$inlined$filterIsInstance$1.class +0 -0
  176. package/android-annotation-processor/build/classes/kotlin/main/expo/modules/annotationprocessor/ExpoSymbolProcessor.class +0 -0
  177. package/android-annotation-processor/build/classes/kotlin/main/expo/modules/annotationprocessor/ExpoSymbolProcessorProvider.class +0 -0
  178. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  179. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  180. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  181. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  182. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  183. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  184. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  185. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  186. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  187. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  188. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  189. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  190. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  191. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  192. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  193. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  194. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  195. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  196. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  197. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  198. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  199. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  200. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  201. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  202. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  203. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  204. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  205. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  206. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  207. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  208. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  209. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  210. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  211. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  212. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  213. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  214. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  215. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  216. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  217. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  218. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  219. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  220. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  221. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  222. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  223. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  224. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  225. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  226. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  227. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  228. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  229. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  230. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  231. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  232. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  233. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  234. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  235. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  236. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  237. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  238. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  239. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  240. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  241. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  242. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  243. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  244. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  245. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  246. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  247. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  248. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  249. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  250. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  251. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  252. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  253. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  254. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  255. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  256. package/android-annotation-processor/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  257. package/android-annotation-processor/build/kotlin/compileKotlin/local-state/build-history.bin +0 -0
  258. package/android-annotation-processor/build/kotlin/expomodulescoreandroidannotationprocessor111jar-classes.txt +0 -1
  259. package/android-annotation-processor/build/libs/expo-modules-core$android-annotation-processor-1.1.1.jar +0 -0
  260. package/android-annotation-processor/build/resources/main/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider +0 -1
  261. package/android-annotation-processor/build/tmp/jar/MANIFEST.MF +0 -2
package/CHANGELOG.md CHANGED
@@ -10,6 +10,13 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 1.2.5 — 2023-03-14
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [Android] Fixed coroutine functions crashing when invoked with more than 1 argument. ([#21635](https://github.com/expo/expo/pull/21635) by [@lukmccall](https://github.com/lukmccall))
18
+ - [iOS] Fix automatic percent-encoding when converting to the `URL` object. ([#21569](https://github.com/expo/expo/pull/21569) by [@tsapeta](https://github.com/tsapeta))
19
+
13
20
  ## 1.2.4 — 2023-03-03
14
21
 
15
22
  ### 🐛 Bug fixes
@@ -6,7 +6,7 @@ apply plugin: 'maven-publish'
6
6
  apply plugin: "de.undercouch.download"
7
7
 
8
8
  group = 'host.exp.exponent'
9
- version = '1.2.4'
9
+ version = '1.2.5'
10
10
 
11
11
  buildscript {
12
12
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -173,7 +173,7 @@ android {
173
173
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
174
174
  consumerProguardFiles 'proguard-rules.pro'
175
175
  versionCode 1
176
- versionName "1.2.4"
176
+ versionName "1.2.5"
177
177
  buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
178
178
 
179
179
  testInstrumentationRunner "expo.modules.TestRunner"
@@ -148,7 +148,7 @@ internal class PropSetException(
148
148
  internal class ArgumentCastException(
149
149
  argDesiredType: KType,
150
150
  argIndex: Int,
151
- providedType: ReadableType,
151
+ providedType: String,
152
152
  cause: CodedException,
153
153
  ) : DecoratedException(
154
154
  message = "The ${formatOrdinalNumber(argIndex + 1)} argument cannot be cast to type $argDesiredType (received $providedType)",
@@ -54,7 +54,7 @@ abstract class AnyFunction(
54
54
  val desiredType = desiredArgsTypes[index]
55
55
  argIterator.next().recycle {
56
56
  exceptionDecorator({ cause ->
57
- ArgumentCastException(desiredType.kType, index, type, cause)
57
+ ArgumentCastException(desiredType.kType, index, type.toString(), cause)
58
58
  }) {
59
59
  finalArgs[index] = desiredType.convert(this)
60
60
  }
@@ -81,7 +81,7 @@ abstract class AnyFunction(
81
81
  val element = argIterator.next()
82
82
  val desiredType = desiredArgsTypes[index]
83
83
  exceptionDecorator({ cause ->
84
- ArgumentCastException(desiredType.kType, index, ReadableType.String, cause)
84
+ ArgumentCastException(desiredType.kType, index, element?.javaClass.toString(), cause)
85
85
  }) {
86
86
  finalArgs[index] = desiredType.convert(element)
87
87
  }
@@ -23,43 +23,43 @@ class AsyncFunctionBuilder(@PublishedApi internal val name: String) {
23
23
  }
24
24
 
25
25
  inline fun <reified R, reified P0, reified P1> SuspendBody(crossinline block: suspend (p0: P0, p1: P1) -> R): SuspendFunctionComponent {
26
- return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType())) { block(it[0] as P0, it[0] as P1) }.also {
26
+ return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType(), typeOf<P1>().toAnyType())) { block(it[0] as P0, it[1] as P1) }.also {
27
27
  suspendFunctionComponent = it
28
28
  }
29
29
  }
30
30
 
31
31
  inline fun <reified R, reified P0, reified P1, reified P2> SuspendBody(crossinline block: suspend (p0: P0, p1: P1, p2: P2) -> R): SuspendFunctionComponent {
32
- return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2) }.also {
32
+ return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType(), typeOf<P1>().toAnyType(), typeOf<P2>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2) }.also {
33
33
  suspendFunctionComponent = it
34
34
  }
35
35
  }
36
36
 
37
37
  inline fun <reified R, reified P0, reified P1, reified P2, reified P3> SuspendBody(crossinline block: suspend (p0: P0, p1: P1, p2: P2, p3: P3) -> R): SuspendFunctionComponent {
38
- return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3) }.also {
38
+ return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType(), typeOf<P1>().toAnyType(), typeOf<P2>().toAnyType(), typeOf<P3>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3) }.also {
39
39
  suspendFunctionComponent = it
40
40
  }
41
41
  }
42
42
 
43
43
  inline fun <reified R, reified P0, reified P1, reified P2, reified P3, reified P4> SuspendBody(crossinline block: suspend (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) -> R): SuspendFunctionComponent {
44
- return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4) }.also {
44
+ return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType(), typeOf<P1>().toAnyType(), typeOf<P2>().toAnyType(), typeOf<P3>().toAnyType(), typeOf<P4>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4) }.also {
45
45
  suspendFunctionComponent = it
46
46
  }
47
47
  }
48
48
 
49
49
  inline fun <reified R, reified P0, reified P1, reified P2, reified P3, reified P4, reified P5> SuspendBody(crossinline block: suspend (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) -> R): SuspendFunctionComponent {
50
- return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4, it[5] as P5) }.also {
50
+ return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType(), typeOf<P1>().toAnyType(), typeOf<P2>().toAnyType(), typeOf<P3>().toAnyType(), typeOf<P4>().toAnyType(), typeOf<P5>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4, it[5] as P5) }.also {
51
51
  suspendFunctionComponent = it
52
52
  }
53
53
  }
54
54
 
55
55
  inline fun <reified R, reified P0, reified P1, reified P2, reified P3, reified P4, reified P5, reified P6> SuspendBody(crossinline block: suspend (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6) -> R): SuspendFunctionComponent {
56
- return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4, it[5] as P5, it[6] as P6) }.also {
56
+ return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType(), typeOf<P1>().toAnyType(), typeOf<P2>().toAnyType(), typeOf<P3>().toAnyType(), typeOf<P4>().toAnyType(), typeOf<P5>().toAnyType(), typeOf<P6>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4, it[5] as P5, it[6] as P6) }.also {
57
57
  suspendFunctionComponent = it
58
58
  }
59
59
  }
60
60
 
61
61
  inline fun <reified R, reified P0, reified P1, reified P2, reified P3, reified P4, reified P5, reified P6, reified P7> SuspendBody(crossinline block: suspend (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7) -> R): SuspendFunctionComponent {
62
- return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4, it[5] as P5, it[6] as P6, it[7] as P7) }.also {
62
+ return SuspendFunctionComponent(name, arrayOf(typeOf<P0>().toAnyType(), typeOf<P1>().toAnyType(), typeOf<P2>().toAnyType(), typeOf<P3>().toAnyType(), typeOf<P4>().toAnyType(), typeOf<P5>().toAnyType(), typeOf<P6>().toAnyType(), typeOf<P7>().toAnyType())) { block(it[0] as P0, it[1] as P1, it[2] as P2, it[3] as P3, it[4] as P4, it[5] as P5, it[6] as P6, it[7] as P7) }.also {
63
63
  suspendFunctionComponent = it
64
64
  }
65
65
  }
@@ -13,12 +13,34 @@ import CoreGraphics
13
13
 
14
14
  extension URL: Convertible {
15
15
  public static func convert(from value: Any?) throws -> Self {
16
- if let value = value as? String, let encodedValue = percentEncodeUrlString(value), let url = URL(string: encodedValue) {
16
+ guard let value = value as? String else {
17
+ throw Conversions.ConvertingException<URL>(value)
18
+ }
19
+
20
+ // Try to construct the URL object from the string as it came in.
21
+ if let url = URL(string: value) {
17
22
  // If it has no scheme, we assume it was the file path which needs to be recreated to be recognized as the file url.
18
- // Notice that it uses the decoded value as the file path doesn't have to be percent-encoded.
19
23
  return url.scheme != nil ? url : URL(fileURLWithPath: value)
20
24
  }
21
- throw Conversions.ConvertingException<URL>(value)
25
+
26
+ // File path doesn't need to be percent-encoded.
27
+ if isFileUrlPath(value) {
28
+ return URL(fileURLWithPath: value)
29
+ }
30
+
31
+ // If we get here, the string is not the file url and may require percent-encoding characters that are not URL-safe according to RFC 3986.
32
+ if let encodedValue = percentEncodeUrlString(value), let url = URL(string: encodedValue) {
33
+ return url.scheme != nil ? url : URL(fileURLWithPath: value)
34
+ }
35
+
36
+ // If it still fails to create the URL object, the string possibly contains characters that must be explicitly percent-encoded beforehand.
37
+ throw UrlContainsInvalidCharactersException()
38
+ }
39
+ }
40
+
41
+ internal class UrlContainsInvalidCharactersException: Exception {
42
+ override var reason: String {
43
+ return "Unable to create a URL object from the given string, make sure to percent-encode these characters: \(urlAllowedCharacters)"
22
44
  }
23
45
  }
24
46
 
@@ -27,34 +27,34 @@ internal func toNSError(_ error: Error) -> NSError {
27
27
  return error as NSError
28
28
  }
29
29
 
30
+ // MARK: - URLs
31
+
30
32
  /**
31
- Makes sure the url string is percent encoded. If the given string is already encoded, it's decoded first.
32
- Note that it encodes only characters that are not allowed in the url query and '#' that indicates the fragment part.
33
+ A string with non-alphanumeric url-safe characters according to RFC 3986.
34
+ These characters might have to be explicitly percent-encoded when used in URL components other than intended.
33
35
  */
34
- internal func percentEncodeUrlString(_ url: String) -> String? {
35
- // URL contains '#' so it has a fragment part.
36
- // We know that because that is the only allowed use case of the undecoded '#' symbol inside of the URL.
37
- if url.contains("#") {
38
- let urlParts = url.split(separator: "#")
36
+ internal let urlAllowedCharacters = "-._~:/?#[]@!$&'()*+,;="
39
37
 
40
- // Encodes the url without the fragment part. It'll leave the fragment part untounched.
41
- guard let parsed = percentEncodeUrlStringWithoutFragment(String(urlParts[0])) else {
42
- return nil
43
- }
44
-
45
- // Concatenate encoded path with fragment.
46
- return parsed + "#" + urlParts[1]
47
- }
38
+ /**
39
+ A `CharacterSet` instance containing all alphanumerics and characters allowed in at least one part of a URL.
40
+ */
41
+ internal let urlAllowedCharactersSet = CharacterSet.alphanumerics.union(CharacterSet(charactersIn: urlAllowedCharacters))
48
42
 
49
- return percentEncodeUrlStringWithoutFragment(url)
43
+ /**
44
+ Returns the given string with percent-encoded characters that are not allowed in any of the URL components as defined by RFC 3986.
45
+ This is useful for auto-encoding unicode characters.
46
+ */
47
+ internal func percentEncodeUrlString(_ url: String) -> String? {
48
+ let encodedString = url.addingPercentEncoding(withAllowedCharacters: urlAllowedCharactersSet)
49
+ return encodedString?.replacingOccurrences(of: "%25", with: "%")
50
50
  }
51
51
 
52
- private func percentEncodeUrlStringWithoutFragment(_ url: String) -> String? {
53
- // The value may come unencoded or already encoded, so first we try to decode it.
54
- // `removingPercentEncoding` returns nil when the string contains an invalid percent-encoded sequence,
55
- // but that usually means the value came unencoded, so it falls back to the given string.
56
- let decodedString = url.removingPercentEncoding ?? url
57
-
58
- // Do the percent encoding, but note that it may still return nil when it's not possible to encode for some reason.
59
- return decodedString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)
52
+ /**
53
+ Checks whether the given string is a file URL path (URL string without the scheme).
54
+ */
55
+ internal func isFileUrlPath(_ path: String) -> Bool {
56
+ guard let encodedPath = path.addingPercentEncoding(withAllowedCharacters: urlAllowedCharactersSet) else {
57
+ return false
58
+ }
59
+ return URL(string: encodedPath)?.scheme == nil
60
60
  }
@@ -55,19 +55,25 @@ class ConvertiblesSpec: ExpoSpec {
55
55
  expect(url.fragment) == "anchor"
56
56
  }
57
57
 
58
- it("converts from url containing percent character") {
59
- // The percent character alone requires percent-encoding to `%25`.
60
- let query = "param=%"
61
- let urlString = "https://expo.dev/?\(query)"
58
+ it("converts from url with encoded path") {
59
+ let path = "/expo/%2F%25%3F%5E%26/test" // -> /expo//%?^&/test
60
+ let urlString = "https://expo.dev\(path)"
62
61
  let url = try URL.convert(from: urlString)
63
62
 
63
+ expect(url.absoluteString) == urlString
64
+ expect(url.path) == path.removingPercentEncoding
65
+
64
66
  if #available(iOS 16.0, *) {
65
- expect(url.query(percentEncoded: true)) == "param=%25"
66
- expect(url.query(percentEncoded: false)) == query
67
+ expect(url.path(percentEncoded: true)) == path
68
+ expect(url.path(percentEncoded: false)) == path.removingPercentEncoding
67
69
  }
68
- expect(url.query) == "param=%25"
69
- expect(url.absoluteString) == "https://expo.dev/?param=%25"
70
- expect(url.absoluteString.removingPercentEncoding) == urlString
70
+ }
71
+
72
+ it("throws when url contains percent alone") {
73
+ // The percent character alone must be percent-encoded to `%25` beforehand, otherwise it should throw an exception.
74
+ let urlString = "https://expo.dev/?param=%"
75
+
76
+ expect({ try URL.convert(from: urlString) }).to(throwError(errorType: UrlContainsInvalidCharactersException.self))
71
77
  }
72
78
 
73
79
  it("converts from url containing the anchor") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-modules-core",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "The core of Expo Modules architecture",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -42,5 +42,5 @@
42
42
  "@testing-library/react-hooks": "^7.0.1",
43
43
  "expo-module-scripts": "^3.0.0"
44
44
  },
45
- "gitHead": "129986cd78fd83642786df331e8ba9e1451c5ee0"
45
+ "gitHead": "0c634d78ce349fc74721c2d19b7b34592857e7f1"
46
46
  }
@@ -1 +0,0 @@
1
- o/jetified-expo-modules-core$android-annotation-1.1.1.jar
@@ -1 +0,0 @@
1
- o/jetified-expo-modules-core$android-annotation-1.1.1.jar
@@ -1 +0,0 @@
1
- o/jetified-expo-modules-core$android-annotation-1.1.1.jar
@@ -1 +0,0 @@
1
- o/jetified-expo-modules-core$android-annotation-1.1.1.jar
@@ -1 +0,0 @@
1
- o/jetified-expo-modules-core$android-annotation-1.1.1