expo-sharing 10.2.0 → 11.0.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/CHANGELOG.md CHANGED
@@ -10,6 +10,18 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 11.0.0 — 2022-10-25
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. ([#18873](https://github.com/expo/expo/pull/18873) by [@tsapeta](https://github.com/tsapeta))
18
+
19
+ ## 10.3.0 — 2022-07-07
20
+
21
+ ### 🛠 Breaking changes
22
+
23
+ - Changed the return type of the `shareAsync` function. The promise now resolves to `void` instead of an empty object. ([#18019](https://github.com/expo/expo/pull/18019) by [@barthap](https://github.com/barthap))
24
+
13
25
  ## 10.2.0 — 2022-04-18
14
26
 
15
27
  ### ⚠️ Notices
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '10.2.0'
6
+ version = '11.0.0'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -74,7 +74,7 @@ android {
74
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
75
75
  targetSdkVersion safeExtGet("targetSdkVersion", 31)
76
76
  versionCode 16
77
- versionName '10.2.0'
77
+ versionName '11.0.0'
78
78
  }
79
79
  lintOptions {
80
80
  abortOnError false
@@ -5,7 +5,6 @@ import android.content.Context
5
5
  import android.content.Intent
6
6
  import android.content.pm.PackageManager
7
7
  import android.net.Uri
8
- import android.os.Bundle
9
8
  import androidx.core.content.FileProvider
10
9
  import expo.modules.core.ExportedModule
11
10
  import expo.modules.core.ModuleRegistry
@@ -111,7 +110,7 @@ class SharingModule(
111
110
 
112
111
  override fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, data: Intent?) {
113
112
  if (requestCode == REQUEST_CODE && pendingPromise != null) {
114
- pendingPromise?.resolve(Bundle.EMPTY)
113
+ pendingPromise?.resolve(null)
115
114
  pendingPromise = null
116
115
  }
117
116
  }
@@ -27,5 +27,5 @@ export declare function isAvailableAsync(): Promise<boolean>;
27
27
  * @param url Local file URL to share.
28
28
  * @param options A map of share options.
29
29
  */
30
- export declare function shareAsync(url: string, options?: SharingOptions): Promise<object>;
30
+ export declare function shareAsync(url: string, options?: SharingOptions): Promise<void>;
31
31
  //# sourceMappingURL=Sharing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sharing.d.ts","sourceRoot":"","sources":["../src/Sharing.ts"],"names":[],"mappings":"AAKA,oBAAY,cAAc,GAAG;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAGF;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CASzD;AAGD;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAK3F"}
1
+ {"version":3,"file":"Sharing.d.ts","sourceRoot":"","sources":["../src/Sharing.ts"],"names":[],"mappings":"AAKA,oBAAY,cAAc,GAAG;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAGF;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CASzD;AAGD;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sharing.js","sourceRoot":"","sources":["../src/Sharing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,OAAO,MAAM,eAAe,CAAC;AAuBpC,cAAc;AACd;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAC5B,OAAO,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;SACzC;QACD,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAW,EAAE,UAA0B,EAAE;IACxE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;QACnC,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;KACxD;IACD,OAAO,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport Sharing from './ExpoSharing';\n\n// @needsAudit\nexport type SharingOptions = {\n /**\n * Sets `mimeType` for `Intent`.\n * @platform android\n */\n mimeType?: string;\n /**\n * [Uniform Type Identifier](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html)\n * - the type of the target file.\n * @platform ios\n */\n UTI?: string;\n /**\n * Sets share dialog title.\n * @platform android\n * @platform web\n */\n dialogTitle?: string;\n};\n\n// @needsAudit\n/**\n * Determine if the sharing API can be used in this app.\n * @return A promise that fulfills with `true` if the sharing API can be used, and `false` otherwise.\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n if (Sharing) {\n if (Sharing.isAvailableAsync) {\n return await Sharing.isAvailableAsync();\n }\n return true;\n }\n\n return false;\n}\n\n// @needsAudit\n/**\n * Opens action sheet to share file to different applications which can handle this type of file.\n * @param url Local file URL to share.\n * @param options A map of share options.\n */\nexport async function shareAsync(url: string, options: SharingOptions = {}): Promise<object> {\n if (!Sharing || !Sharing.shareAsync) {\n throw new UnavailabilityError('Sharing', 'shareAsync');\n }\n return await Sharing.shareAsync(url, options);\n}\n"]}
1
+ {"version":3,"file":"Sharing.js","sourceRoot":"","sources":["../src/Sharing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,OAAO,MAAM,eAAe,CAAC;AAuBpC,cAAc;AACd;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAC5B,OAAO,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;SACzC;QACD,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAW,EAAE,UAA0B,EAAE;IACxE,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;QACnC,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;KACxD;IACD,OAAO,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport Sharing from './ExpoSharing';\n\n// @needsAudit\nexport type SharingOptions = {\n /**\n * Sets `mimeType` for `Intent`.\n * @platform android\n */\n mimeType?: string;\n /**\n * [Uniform Type Identifier](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html)\n * - the type of the target file.\n * @platform ios\n */\n UTI?: string;\n /**\n * Sets share dialog title.\n * @platform android\n * @platform web\n */\n dialogTitle?: string;\n};\n\n// @needsAudit\n/**\n * Determine if the sharing API can be used in this app.\n * @return A promise that fulfills with `true` if the sharing API can be used, and `false` otherwise.\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n if (Sharing) {\n if (Sharing.isAvailableAsync) {\n return await Sharing.isAvailableAsync();\n }\n return true;\n }\n\n return false;\n}\n\n// @needsAudit\n/**\n * Opens action sheet to share file to different applications which can handle this type of file.\n * @param url Local file URL to share.\n * @param options A map of share options.\n */\nexport async function shareAsync(url: string, options: SharingOptions = {}): Promise<void> {\n if (!Sharing || !Sharing.shareAsync) {\n throw new UnavailabilityError('Sharing', 'shareAsync');\n }\n return await Sharing.shareAsync(url, options);\n}\n"]}
@@ -65,7 +65,7 @@ EX_EXPORT_METHOD_AS(shareAsync,
65
65
 
66
66
  - (void)documentInteractionControllerDidDismissOpenInMenu:(UIDocumentInteractionController *)controller
67
67
  {
68
- _pendingResolver(@{});
68
+ _pendingResolver(nil);
69
69
  _pendingResolver = nil;
70
70
 
71
71
  _documentInteractionController = nil;
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platform = :ios, '12.0'
13
+ s.platform = :ios, '13.0'
14
14
  s.source = { git: 'https://github.com/expo/expo.git' }
15
15
  s.static_framework = true
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-sharing",
3
- "version": "10.2.0",
3
+ "version": "11.0.0",
4
4
  "description": "ExpoSharing standalone module",
5
5
  "main": "build/Sharing.js",
6
6
  "types": "build/Sharing.d.ts",
@@ -32,10 +32,10 @@
32
32
  "homepage": "https://docs.expo.dev/versions/latest/sdk/sharing/",
33
33
  "dependencies": {},
34
34
  "devDependencies": {
35
- "expo-module-scripts": "^2.0.0"
35
+ "expo-module-scripts": "^3.0.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "expo": "*"
39
39
  },
40
- "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
40
+ "gitHead": "eab2b09c735fb0fc2bf734a3f29a6593adba3838"
41
41
  }
package/src/Sharing.ts CHANGED
@@ -45,7 +45,7 @@ export async function isAvailableAsync(): Promise<boolean> {
45
45
  * @param url Local file URL to share.
46
46
  * @param options A map of share options.
47
47
  */
48
- export async function shareAsync(url: string, options: SharingOptions = {}): Promise<object> {
48
+ export async function shareAsync(url: string, options: SharingOptions = {}): Promise<void> {
49
49
  if (!Sharing || !Sharing.shareAsync) {
50
50
  throw new UnavailabilityError('Sharing', 'shareAsync');
51
51
  }
package/tsconfig.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "outDir": "./build"
6
6
  },
7
7
  "include": ["./src"],
8
- "exclude": ["**/__mocks__/*", "**/__tests__/*"]
8
+ "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__stories__/*"]
9
9
  }