expo-cellular 5.0.0 → 5.1.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,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 5.1.0 — 2023-02-03
14
+
15
+ ### 💡 Others
16
+
17
+ - On Android bump `compileSdkVersion` and `targetSdkVersion` to `33`. ([#20721](https://github.com/expo/expo/pull/20721) by [@lukmccall](https://github.com/lukmccall))
18
+
19
+ ## 5.0.1 — 2022-10-28
20
+
21
+ _This version does not introduce any user-facing changes._
22
+
13
23
  ## 5.0.0 — 2022-10-25
14
24
 
15
25
  ### 🛠 Breaking changes
package/README.md CHANGED
@@ -4,7 +4,7 @@ Information about the user’s cellular service provider, such as its unique ide
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/cellular.md)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/cellular.mdx)
8
8
  - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/cellular/)
9
9
 
10
10
  # Installation in managed Expo projects
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '5.0.0'
6
+ version = '5.1.0'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -59,7 +59,7 @@ afterEvaluate {
59
59
  }
60
60
 
61
61
  android {
62
- compileSdkVersion safeExtGet("compileSdkVersion", 31)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 33)
63
63
 
64
64
  compileOptions {
65
65
  sourceCompatibility JavaVersion.VERSION_11
@@ -72,9 +72,9 @@ android {
72
72
 
73
73
  defaultConfig {
74
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
75
- targetSdkVersion safeExtGet("targetSdkVersion", 31)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 33)
76
76
  versionCode 11
77
- versionName '5.0.0'
77
+ versionName '5.1.0'
78
78
  }
79
79
  lintOptions {
80
80
  abortOnError false
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoCellular.web.d.ts","sourceRoot":"","sources":["../src/ExpoCellular.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;;;;;;;kCAkBhB,QAAQ,kBAAkB,CAAC;uBAoBtC,QAAQ,OAAO,GAAG,IAAI,CAAC;8BAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;2BAGzB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGtB,QAAQ,MAAM,GAAG,IAAI,CAAC;;AAhD3D,wBAmDE"}
1
+ {"version":3,"file":"ExpoCellular.web.d.ts","sourceRoot":"","sources":["../src/ExpoCellular.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;;;;;;;kCAkBhB,QAAQ,kBAAkB,CAAC;uBAqBtC,QAAQ,OAAO,GAAG,IAAI,CAAC;8BAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;2BAGzB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGhB,QAAQ,MAAM,GAAG,IAAI,CAAC;iCAGtB,QAAQ,MAAM,GAAG,IAAI,CAAC;;AAjD3D,wBAoDE"}
@@ -16,7 +16,9 @@ export default {
16
16
  return null;
17
17
  },
18
18
  async getCellularGenerationAsync() {
19
- const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;
19
+ const connection =
20
+ // @ts-expect-error
21
+ navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;
20
22
  if (connection !== null) {
21
23
  switch (connection.effectiveType) {
22
24
  case 'slow-2g':
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AAC;IACd,CAAC;CACF,CAAC","sourcesContent":["import { CellularGeneration } from './Cellular.types';\n\nexport default {\n get allowsVoip(): null {\n return null;\n },\n get carrier(): null {\n return null;\n },\n get isoCountryCode(): null {\n return null;\n },\n get mobileCountryCode(): null {\n return null;\n },\n get mobileNetworkCode(): null {\n return null;\n },\n async getCellularGenerationAsync(): Promise<CellularGeneration> {\n const connection =\n navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;\n if (connection !== null) {\n switch (connection.effectiveType) {\n case 'slow-2g':\n case '2g':\n return CellularGeneration.CELLULAR_2G;\n case '3g':\n return CellularGeneration.CELLULAR_3G;\n case '4g':\n return CellularGeneration.CELLULAR_4G;\n default:\n return CellularGeneration.UNKNOWN;\n }\n } else {\n return CellularGeneration.UNKNOWN;\n }\n },\n\n async allowsVoipAsync(): Promise<boolean | null> {\n return null;\n },\n async getIsoCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getCarrierNameAsync(): Promise<string | null> {\n return null;\n },\n async getMobileCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getMobileNetworkCodeAsync(): Promise<string | null> {\n return null;\n },\n};\n"]}
1
+ {"version":3,"file":"ExpoCellular.web.js","sourceRoot":"","sources":["../src/ExpoCellular.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAe;IACb,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,0BAA0B;QAC9B,MAAM,UAAU;QACd,mBAAmB;QACnB,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,gBAAgB,IAAI,IAAI,CAAC;QACxF,IAAI,UAAU,KAAK,IAAI,EAAE;YACvB,QAAQ,UAAU,CAAC,aAAa,EAAE;gBAChC,KAAK,SAAS,CAAC;gBACf,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC,KAAK,IAAI;oBACP,OAAO,kBAAkB,CAAC,WAAW,CAAC;gBACxC;oBACE,OAAO,kBAAkB,CAAC,OAAO,CAAC;aACrC;SACF;aAAM;YACL,OAAO,kBAAkB,CAAC,OAAO,CAAC;SACnC;IACH,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,sBAAsB;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,mBAAmB;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,yBAAyB;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,yBAAyB;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC","sourcesContent":["import { CellularGeneration } from './Cellular.types';\n\nexport default {\n get allowsVoip(): null {\n return null;\n },\n get carrier(): null {\n return null;\n },\n get isoCountryCode(): null {\n return null;\n },\n get mobileCountryCode(): null {\n return null;\n },\n get mobileNetworkCode(): null {\n return null;\n },\n async getCellularGenerationAsync(): Promise<CellularGeneration> {\n const connection =\n // @ts-expect-error\n navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;\n if (connection !== null) {\n switch (connection.effectiveType) {\n case 'slow-2g':\n case '2g':\n return CellularGeneration.CELLULAR_2G;\n case '3g':\n return CellularGeneration.CELLULAR_3G;\n case '4g':\n return CellularGeneration.CELLULAR_4G;\n default:\n return CellularGeneration.UNKNOWN;\n }\n } else {\n return CellularGeneration.UNKNOWN;\n }\n },\n\n async allowsVoipAsync(): Promise<boolean | null> {\n return null;\n },\n async getIsoCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getCarrierNameAsync(): Promise<string | null> {\n return null;\n },\n async getMobileCountryCodeAsync(): Promise<string | null> {\n return null;\n },\n async getMobileNetworkCodeAsync(): Promise<string | null> {\n return null;\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-cellular",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Provides information about the user’s cellular service provider",
5
5
  "main": "build/Cellular.js",
6
6
  "types": "build/Cellular.d.ts",
@@ -36,5 +36,5 @@
36
36
  "peerDependencies": {
37
37
  "expo": "*"
38
38
  },
39
- "gitHead": "eab2b09c735fb0fc2bf734a3f29a6593adba3838"
39
+ "gitHead": "1815e2eaad8c753588c7b1eb74420174a28e01f4"
40
40
  }
@@ -18,6 +18,7 @@ export default {
18
18
  },
19
19
  async getCellularGenerationAsync(): Promise<CellularGeneration> {
20
20
  const connection =
21
+ // @ts-expect-error
21
22
  navigator.connection || navigator.mozConnection || navigator.webkitConnection || null;
22
23
  if (connection !== null) {
23
24
  switch (connection.effectiveType) {