expo-constants 17.0.1 → 17.0.3

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,14 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 17.0.3 — 2024-11-14
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 17.0.2 — 2024-10-28
18
+
19
+ _This version does not introduce any user-facing changes._
20
+
13
21
  ## 17.0.1 — 2024-10-22
14
22
 
15
23
  ### 💡 Others
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '17.0.1'
4
+ version = '17.0.3'
5
5
 
6
6
  apply from: "../scripts/get-app-config-android.gradle"
7
7
 
@@ -16,7 +16,7 @@ android {
16
16
  namespace "expo.modules.constants"
17
17
  defaultConfig {
18
18
  versionCode 33
19
- versionName "17.0.1"
19
+ versionName "17.0.3"
20
20
  }
21
21
  }
22
22
 
@@ -2,7 +2,7 @@ import type { ExpoConfig } from 'expo/config';
2
2
  import type { EASConfig as ManifestsEASConfig, ExpoGoConfig as ManifestsExpoGoConfig, ExpoUpdatesManifest, EmbeddedManifest, ManifestAsset as ManifestAssetForReExport, ManifestExtra as ManifestExtraForReExport, ClientScopingConfig as ClientScopingConfigForReExport, ExpoGoPackagerOpts as ExpoGoPackagerOptsForReExport } from 'expo-manifests';
3
3
  export declare enum AppOwnership {
4
4
  /**
5
- * The experience is running inside of the Expo Go app.
5
+ * The experience is running inside the Expo Go app.
6
6
  * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
7
7
  */
8
8
  Expo = "expo"
@@ -23,7 +23,10 @@ export declare enum UserInterfaceIdiom {
23
23
  TV = "tv",
24
24
  Unsupported = "unsupported"
25
25
  }
26
- export interface IOSManifest {
26
+ /**
27
+ * @platform ios
28
+ */
29
+ export type IOSManifest = {
27
30
  /**
28
31
  * The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.
29
32
  * In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This
@@ -33,7 +36,9 @@ export interface IOSManifest {
33
36
  */
34
37
  buildNumber: string | null;
35
38
  /**
36
- * The Apple internal model identifier for this device. For example, `iPhone1,1`.
39
+ * The Apple internal model identifier for this device.
40
+ * @example
41
+ * `iPhone1,1`
37
42
  * @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).
38
43
  */
39
44
  platform: string;
@@ -49,24 +54,28 @@ export interface IOSManifest {
49
54
  */
50
55
  userInterfaceIdiom: UserInterfaceIdiom;
51
56
  /**
52
- * The version of iOS running on this device. For example, `10.3`.
57
+ * The version of iOS running on this device.
58
+ * @example
59
+ * `10.3`
53
60
  * @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).
54
61
  */
55
62
  systemVersion: string;
56
- [key: string]: any;
57
- }
58
- export interface AndroidManifest {
63
+ } & Record<string, any>;
64
+ /**
65
+ * @platform android
66
+ */
67
+ export type AndroidManifest = {
59
68
  /**
60
69
  * The version code set by `android.versionCode` in app.json.
61
70
  * The value is set to `null` in case you run your app in Expo Go.
62
71
  * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).
63
72
  */
64
73
  versionCode: number;
65
- [key: string]: any;
66
- }
67
- export interface WebManifest {
68
- [key: string]: any;
69
- }
74
+ } & Record<string, any>;
75
+ /**
76
+ * @platform web
77
+ */
78
+ export type WebManifest = Record<string, any>;
70
79
  export type ManifestAsset = ManifestAssetForReExport;
71
80
  export type Manifest = ExpoUpdatesManifest;
72
81
  export type ManifestExtra = ManifestExtraForReExport;
@@ -74,7 +83,7 @@ export type EASConfig = ManifestsEASConfig;
74
83
  export type ClientScopingConfig = ClientScopingConfigForReExport;
75
84
  export type ExpoGoConfig = ManifestsExpoGoConfig;
76
85
  export type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;
77
- export interface PlatformManifest {
86
+ export type PlatformManifest = {
78
87
  ios?: IOSManifest;
79
88
  android?: AndroidManifest;
80
89
  web?: WebManifest;
@@ -85,9 +94,8 @@ export interface PlatformManifest {
85
94
  scheme?: string;
86
95
  hostUri?: string;
87
96
  developer?: string;
88
- [key: string]: any;
89
- }
90
- export interface NativeConstants {
97
+ } & Record<string, any>;
98
+ export type NativeConstants = {
91
99
  /**
92
100
  * @hidden
93
101
  */
@@ -115,6 +123,9 @@ export interface NativeConstants {
115
123
  */
116
124
  executionEnvironment: ExecutionEnvironment;
117
125
  experienceUrl: string;
126
+ /**
127
+ * Nullable only on the web.
128
+ */
118
129
  expoRuntimeVersion: string | null;
119
130
  /**
120
131
  * The version string of the Expo Go app currently running.
@@ -189,11 +200,12 @@ export interface NativeConstants {
189
200
  * requests.
190
201
  */
191
202
  getWebViewUserAgentAsync: () => Promise<string | null>;
192
- [key: string]: any;
193
- }
194
- export interface Constants extends NativeConstants {
203
+ } & Record<string, any>;
204
+ /**
205
+ * @hidden
206
+ */
207
+ export type Constants = NativeConstants & {
195
208
  /**
196
- * @hidden
197
209
  * > **Warning**: Do not use this property. Use `manifest` by default.
198
210
  *
199
211
  * In certain cases accessing manifest via this property
@@ -201,12 +213,11 @@ export interface Constants extends NativeConstants {
201
213
  */
202
214
  __unsafeNoWarnManifest?: EmbeddedManifest;
203
215
  /**
204
- * @hidden
205
216
  * > **Warning**: Do not use this property. Use `manifest2` by default.
206
217
  *
207
218
  * In certain cases accessing manifest via this property
208
219
  * suppresses important warning about missing manifest.
209
220
  */
210
221
  __unsafeNoWarnManifest2?: ExpoUpdatesManifest;
211
- }
222
+ };
212
223
  //# sourceMappingURL=Constants.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.types.d.ts","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EACV,SAAS,IAAI,kBAAkB,EAC/B,YA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IAC3C;;OAEG;IACH,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;;OAIG;IACH,wBAAwB,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACxD,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG;IACxC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;IAC1C;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,mBAAmB,CAAC;CAC/C,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export var AppOwnership;
2
2
  (function (AppOwnership) {
3
3
  /**
4
- * The experience is running inside of the Expo Go app.
4
+ * The experience is running inside the Expo Go app.
5
5
  * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
6
6
  */
7
7
  AppOwnership["Expo"] = "expo";
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.types.js","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB;;;OAGG;IACH,6BAAa,CAAA;AACf,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAED,eAAe;AACf,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,iDAAyB,CAAA;IACzB,mDAA2B,CAAA;AAC7B,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,cAAc;AACd;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IACnB,+BAAS,CAAA;IACT,iDAA2B,CAAA;AAC7B,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B","sourcesContent":["import type { ExpoConfig } from 'expo/config';\nimport type {\n EASConfig as ManifestsEASConfig,\n ExpoGoConfig as ManifestsExpoGoConfig,\n ExpoUpdatesManifest,\n EmbeddedManifest,\n ManifestAsset as ManifestAssetForReExport,\n ManifestExtra as ManifestExtraForReExport,\n ClientScopingConfig as ClientScopingConfigForReExport,\n ExpoGoPackagerOpts as ExpoGoPackagerOptsForReExport,\n // @ts-ignore -- optional interface, will gracefully degrade to `any` not installed\n} from 'expo-manifests';\n\nexport enum AppOwnership {\n /**\n * The experience is running inside of the Expo Go app.\n * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.\n */\n Expo = 'expo',\n}\n\n// @docsMissing\nexport enum ExecutionEnvironment {\n Bare = 'bare',\n Standalone = 'standalone',\n StoreClient = 'storeClient',\n}\n\n// @needsAudit\n/**\n * Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up\n * as `unsupported`.\n */\nexport enum UserInterfaceIdiom {\n Handset = 'handset',\n Tablet = 'tablet',\n Desktop = 'desktop',\n TV = 'tv',\n Unsupported = 'unsupported',\n}\n\n// @needsAudit\nexport interface IOSManifest {\n /**\n * The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.\n * In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This\n * may differ from the value in `Constants.expoConfig.ios.buildNumber` because the manifest\n * can be updated, whereas this value will never change for a given native binary.\n * The value is set to `null` in case you run your app in Expo Go.\n */\n buildNumber: string | null;\n /**\n * The Apple internal model identifier for this device. For example, `iPhone1,1`.\n * @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).\n */\n platform: string;\n /**\n * The human-readable model name of this device. For example, `\"iPhone 7 Plus\"` if it can be determined,\n * otherwise will be `null`.\n * @deprecated Moved to `expo-device` as [`Device.modelName`](./device/#devicemodelname).\n */\n model: string | null;\n /**\n * The user interface idiom of the current device, such as whether the app is running on an iPhone, iPad, Mac or Apple TV.\n * @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).\n */\n userInterfaceIdiom: UserInterfaceIdiom;\n /**\n * The version of iOS running on this device. For example, `10.3`.\n * @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).\n */\n systemVersion: string;\n [key: string]: any;\n}\n\n// @needsAudit\nexport interface AndroidManifest {\n /**\n * The version code set by `android.versionCode` in app.json.\n * The value is set to `null` in case you run your app in Expo Go.\n * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).\n */\n versionCode: number;\n [key: string]: any;\n}\n\nexport interface WebManifest {\n [key: string]: any;\n}\n\n// type re-exports to prevent breaking change\n\nexport type ManifestAsset = ManifestAssetForReExport;\nexport type Manifest = ExpoUpdatesManifest;\nexport type ManifestExtra = ManifestExtraForReExport;\nexport type EASConfig = ManifestsEASConfig;\nexport type ClientScopingConfig = ClientScopingConfigForReExport;\nexport type ExpoGoConfig = ManifestsExpoGoConfig;\nexport type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;\n\n// @needsAudit @docsMissing\nexport interface PlatformManifest {\n ios?: IOSManifest;\n android?: AndroidManifest;\n web?: WebManifest;\n detach?: {\n scheme?: string;\n [key: string]: any;\n };\n scheme?: string;\n hostUri?: string;\n developer?: string;\n [key: string]: any;\n}\n\n// @needsAudit @docsMissing\nexport interface NativeConstants {\n /**\n * @hidden\n */\n name: 'ExponentConstants';\n /**\n * Returns `expo` when running in Expo Go, otherwise `null`.\n * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.\n */\n appOwnership: AppOwnership | null;\n /**\n * Returns `true` when the app is running in debug mode (`__DEV__`). Otherwise, returns `false`.\n */\n debugMode: boolean;\n /**\n * A human-readable name for the device type.\n */\n deviceName?: string;\n /**\n * The [device year class](https://github.com/facebook/device-year-class) of this device.\n * @deprecated Moved to `expo-device` as [`Device.deviceYearClass`](./device/#deviceyearclass).\n */\n deviceYearClass: number | null;\n /**\n * Returns the current execution environment.\n */\n executionEnvironment: ExecutionEnvironment;\n experienceUrl: string;\n // only nullable on web\n expoRuntimeVersion: string | null;\n /**\n * The version string of the Expo Go app currently running.\n * Returns `null` in bare workflow and web.\n */\n expoVersion: string | null;\n isDetached?: boolean;\n intentUri?: string;\n /**\n * Returns `true` if the app is running in headless mode. Otherwise, returns `false`.\n */\n isHeadless: boolean;\n linkingUri: string;\n\n /**\n * @hidden\n * Manifest embedded in the build. Returns `null` when `manifest2` is non-null.\n * @deprecated Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build\n * and EAS Update.\n */\n manifest: EmbeddedManifest | null;\n /**\n * Manifest for Expo apps using modern Expo Updates from a remote source, such as apps that\n * use EAS Update. `Constants.expoConfig` should be used for accessing the Expo config object.\n */\n manifest2: ExpoUpdatesManifest | null;\n /**\n * The standard Expo config object defined in **app.json** and **app.config.js** files. For both\n * classic and modern manifests, whether they are embedded or remote.\n */\n expoConfig:\n | (ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n })\n | null;\n /**\n * The standard Expo Go config object populated when running in Expo Go.\n */\n expoGoConfig: ManifestsExpoGoConfig | null;\n /**\n * The standard EAS config object populated when using EAS.\n */\n easConfig: ManifestsEASConfig | null;\n /**\n * A string that is unique to the current session of your app. It is different across apps and\n * across multiple launches of the same app.\n */\n sessionId: string;\n /**\n * The default status bar height for the device. Does not factor in changes when location tracking\n * is in use or a phone call is active.\n */\n statusBarHeight: number;\n /**\n * A list of the system font names available on the current device.\n */\n systemFonts: string[];\n systemVersion?: number;\n /**\n * @hidden\n */\n supportedExpoSdks?: string[];\n /**\n * Returns the specific platform manifest object.\n *\n * > **Note**: This is distinct from the `manifest` and `manifest2`.\n */\n platform?: PlatformManifest;\n /**\n * Gets the user agent string which would be included in requests sent by a web view running on\n * this device. This is probably not the same user agent you might be providing in your JS `fetch`\n * requests.\n */\n getWebViewUserAgentAsync: () => Promise<string | null>;\n [key: string]: any;\n}\n\nexport interface Constants extends NativeConstants {\n /**\n * @hidden\n * > **Warning**: Do not use this property. Use `manifest` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest?: EmbeddedManifest;\n /**\n * @hidden\n * > **Warning**: Do not use this property. Use `manifest2` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest2?: ExpoUpdatesManifest;\n}\n"]}
1
+ {"version":3,"file":"Constants.types.js","sourceRoot":"","sources":["../src/Constants.types.ts"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB;;;OAGG;IACH,6BAAa,CAAA;AACf,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAED,eAAe;AACf,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,iDAAyB,CAAA;IACzB,mDAA2B,CAAA;AAC7B,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,cAAc;AACd;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IACnB,+BAAS,CAAA;IACT,iDAA2B,CAAA;AAC7B,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B","sourcesContent":["import type { ExpoConfig } from 'expo/config';\nimport type {\n EASConfig as ManifestsEASConfig,\n ExpoGoConfig as ManifestsExpoGoConfig,\n ExpoUpdatesManifest,\n EmbeddedManifest,\n ManifestAsset as ManifestAssetForReExport,\n ManifestExtra as ManifestExtraForReExport,\n ClientScopingConfig as ClientScopingConfigForReExport,\n ExpoGoPackagerOpts as ExpoGoPackagerOptsForReExport,\n // @ts-ignore -- optional interface, will gracefully degrade to `any` not installed\n} from 'expo-manifests';\n\nexport enum AppOwnership {\n /**\n * The experience is running inside the Expo Go app.\n * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.\n */\n Expo = 'expo',\n}\n\n// @docsMissing\nexport enum ExecutionEnvironment {\n Bare = 'bare',\n Standalone = 'standalone',\n StoreClient = 'storeClient',\n}\n\n// @needsAudit\n/**\n * Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up\n * as `unsupported`.\n */\nexport enum UserInterfaceIdiom {\n Handset = 'handset',\n Tablet = 'tablet',\n Desktop = 'desktop',\n TV = 'tv',\n Unsupported = 'unsupported',\n}\n\n// @needsAudit\n/**\n * @platform ios\n */\nexport type IOSManifest = {\n /**\n * The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.\n * In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This\n * may differ from the value in `Constants.expoConfig.ios.buildNumber` because the manifest\n * can be updated, whereas this value will never change for a given native binary.\n * The value is set to `null` in case you run your app in Expo Go.\n */\n buildNumber: string | null;\n /**\n * The Apple internal model identifier for this device.\n * @example\n * `iPhone1,1`\n * @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).\n */\n platform: string;\n /**\n * The human-readable model name of this device. For example, `\"iPhone 7 Plus\"` if it can be determined,\n * otherwise will be `null`.\n * @deprecated Moved to `expo-device` as [`Device.modelName`](./device/#devicemodelname).\n */\n model: string | null;\n /**\n * The user interface idiom of the current device, such as whether the app is running on an iPhone, iPad, Mac or Apple TV.\n * @deprecated Use `expo-device`'s [`Device.getDeviceTypeAsync()`](./device/#devicegetdevicetypeasync).\n */\n userInterfaceIdiom: UserInterfaceIdiom;\n /**\n * The version of iOS running on this device.\n * @example\n * `10.3`\n * @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).\n */\n systemVersion: string;\n} & Record<string, any>;\n\n// @needsAudit\n/**\n * @platform android\n */\nexport type AndroidManifest = {\n /**\n * The version code set by `android.versionCode` in app.json.\n * The value is set to `null` in case you run your app in Expo Go.\n * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).\n */\n versionCode: number;\n} & Record<string, any>;\n\n/**\n * @platform web\n */\nexport type WebManifest = Record<string, any>;\n\n// type re-exports to prevent breaking change\n\nexport type ManifestAsset = ManifestAssetForReExport;\nexport type Manifest = ExpoUpdatesManifest;\nexport type ManifestExtra = ManifestExtraForReExport;\nexport type EASConfig = ManifestsEASConfig;\nexport type ClientScopingConfig = ClientScopingConfigForReExport;\nexport type ExpoGoConfig = ManifestsExpoGoConfig;\nexport type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;\n\n// @needsAudit @docsMissing\nexport type PlatformManifest = {\n ios?: IOSManifest;\n android?: AndroidManifest;\n web?: WebManifest;\n detach?: {\n scheme?: string;\n [key: string]: any;\n };\n scheme?: string;\n hostUri?: string;\n developer?: string;\n} & Record<string, any>;\n\n// @needsAudit @docsMissing\nexport type NativeConstants = {\n /**\n * @hidden\n */\n name: 'ExponentConstants';\n /**\n * Returns `expo` when running in Expo Go, otherwise `null`.\n * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.\n */\n appOwnership: AppOwnership | null;\n /**\n * Returns `true` when the app is running in debug mode (`__DEV__`). Otherwise, returns `false`.\n */\n debugMode: boolean;\n /**\n * A human-readable name for the device type.\n */\n deviceName?: string;\n /**\n * The [device year class](https://github.com/facebook/device-year-class) of this device.\n * @deprecated Moved to `expo-device` as [`Device.deviceYearClass`](./device/#deviceyearclass).\n */\n deviceYearClass: number | null;\n /**\n * Returns the current execution environment.\n */\n executionEnvironment: ExecutionEnvironment;\n experienceUrl: string;\n /**\n * Nullable only on the web.\n */\n expoRuntimeVersion: string | null;\n /**\n * The version string of the Expo Go app currently running.\n * Returns `null` in bare workflow and web.\n */\n expoVersion: string | null;\n isDetached?: boolean;\n intentUri?: string;\n /**\n * Returns `true` if the app is running in headless mode. Otherwise, returns `false`.\n */\n isHeadless: boolean;\n linkingUri: string;\n\n /**\n * @hidden\n * Manifest embedded in the build. Returns `null` when `manifest2` is non-null.\n * @deprecated Use `Constants.expoConfig` instead, which behaves more consistently across EAS Build\n * and EAS Update.\n */\n manifest: EmbeddedManifest | null;\n /**\n * Manifest for Expo apps using modern Expo Updates from a remote source, such as apps that\n * use EAS Update. `Constants.expoConfig` should be used for accessing the Expo config object.\n */\n manifest2: ExpoUpdatesManifest | null;\n /**\n * The standard Expo config object defined in **app.json** and **app.config.js** files. For both\n * classic and modern manifests, whether they are embedded or remote.\n */\n expoConfig:\n | (ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n })\n | null;\n /**\n * The standard Expo Go config object populated when running in Expo Go.\n */\n expoGoConfig: ManifestsExpoGoConfig | null;\n /**\n * The standard EAS config object populated when using EAS.\n */\n easConfig: ManifestsEASConfig | null;\n /**\n * A string that is unique to the current session of your app. It is different across apps and\n * across multiple launches of the same app.\n */\n sessionId: string;\n /**\n * The default status bar height for the device. Does not factor in changes when location tracking\n * is in use or a phone call is active.\n */\n statusBarHeight: number;\n /**\n * A list of the system font names available on the current device.\n */\n systemFonts: string[];\n systemVersion?: number;\n /**\n * @hidden\n */\n supportedExpoSdks?: string[];\n /**\n * Returns the specific platform manifest object.\n *\n * > **Note**: This is distinct from the `manifest` and `manifest2`.\n */\n platform?: PlatformManifest;\n /**\n * Gets the user agent string which would be included in requests sent by a web view running on\n * this device. This is probably not the same user agent you might be providing in your JS `fetch`\n * requests.\n */\n getWebViewUserAgentAsync: () => Promise<string | null>;\n} & Record<string, any>;\n\n/**\n * @hidden\n */\nexport type Constants = NativeConstants & {\n /**\n * > **Warning**: Do not use this property. Use `manifest` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest?: EmbeddedManifest;\n /**\n * > **Warning**: Do not use this property. Use `manifest2` by default.\n *\n * In certain cases accessing manifest via this property\n * suppresses important warning about missing manifest.\n */\n __unsafeNoWarnManifest2?: ExpoUpdatesManifest;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-constants",
3
- "version": "17.0.1",
3
+ "version": "17.0.3",
4
4
  "description": "Provides system information that remains constant throughout the lifetime of your app.",
5
5
  "main": "build/Constants.js",
6
6
  "types": "build/Constants.d.ts",
@@ -42,7 +42,7 @@
42
42
  "preset": "expo-module-scripts"
43
43
  },
44
44
  "dependencies": {
45
- "@expo/config": "~10.0.0",
45
+ "@expo/config": "~10.0.4",
46
46
  "@expo/env": "~0.4.0"
47
47
  },
48
48
  "devDependencies": {
@@ -52,5 +52,5 @@
52
52
  "expo": "*",
53
53
  "react-native": "*"
54
54
  },
55
- "gitHead": "f7adac0a6b82ab484a8254a68c3808ba6f2afde5"
55
+ "gitHead": "563c85837bc5055672846887f70f3daf5763b16d"
56
56
  }
@@ -13,7 +13,7 @@ import type {
13
13
 
14
14
  export enum AppOwnership {
15
15
  /**
16
- * The experience is running inside of the Expo Go app.
16
+ * The experience is running inside the Expo Go app.
17
17
  * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.
18
18
  */
19
19
  Expo = 'expo',
@@ -40,7 +40,10 @@ export enum UserInterfaceIdiom {
40
40
  }
41
41
 
42
42
  // @needsAudit
43
- export interface IOSManifest {
43
+ /**
44
+ * @platform ios
45
+ */
46
+ export type IOSManifest = {
44
47
  /**
45
48
  * The build number specified in the embedded **Info.plist** value for `CFBundleVersion` in this app.
46
49
  * In a standalone app, you can set this with the `ios.buildNumber` value in **app.json**. This
@@ -50,7 +53,9 @@ export interface IOSManifest {
50
53
  */
51
54
  buildNumber: string | null;
52
55
  /**
53
- * The Apple internal model identifier for this device. For example, `iPhone1,1`.
56
+ * The Apple internal model identifier for this device.
57
+ * @example
58
+ * `iPhone1,1`
54
59
  * @deprecated Use `expo-device`'s [`Device.modelId`](./device/#devicemodelid).
55
60
  */
56
61
  platform: string;
@@ -66,27 +71,31 @@ export interface IOSManifest {
66
71
  */
67
72
  userInterfaceIdiom: UserInterfaceIdiom;
68
73
  /**
69
- * The version of iOS running on this device. For example, `10.3`.
74
+ * The version of iOS running on this device.
75
+ * @example
76
+ * `10.3`
70
77
  * @deprecated Use `expo-device`'s [`Device.osVersion`](./device/#deviceosversion).
71
78
  */
72
79
  systemVersion: string;
73
- [key: string]: any;
74
- }
80
+ } & Record<string, any>;
75
81
 
76
82
  // @needsAudit
77
- export interface AndroidManifest {
83
+ /**
84
+ * @platform android
85
+ */
86
+ export type AndroidManifest = {
78
87
  /**
79
88
  * The version code set by `android.versionCode` in app.json.
80
89
  * The value is set to `null` in case you run your app in Expo Go.
81
90
  * @deprecated Use `expo-application`'s [`Application.nativeBuildVersion`](./application/#applicationnativebuildversion).
82
91
  */
83
92
  versionCode: number;
84
- [key: string]: any;
85
- }
93
+ } & Record<string, any>;
86
94
 
87
- export interface WebManifest {
88
- [key: string]: any;
89
- }
95
+ /**
96
+ * @platform web
97
+ */
98
+ export type WebManifest = Record<string, any>;
90
99
 
91
100
  // type re-exports to prevent breaking change
92
101
 
@@ -99,7 +108,7 @@ export type ExpoGoConfig = ManifestsExpoGoConfig;
99
108
  export type ExpoGoPackagerOpts = ExpoGoPackagerOptsForReExport;
100
109
 
101
110
  // @needsAudit @docsMissing
102
- export interface PlatformManifest {
111
+ export type PlatformManifest = {
103
112
  ios?: IOSManifest;
104
113
  android?: AndroidManifest;
105
114
  web?: WebManifest;
@@ -110,11 +119,10 @@ export interface PlatformManifest {
110
119
  scheme?: string;
111
120
  hostUri?: string;
112
121
  developer?: string;
113
- [key: string]: any;
114
- }
122
+ } & Record<string, any>;
115
123
 
116
124
  // @needsAudit @docsMissing
117
- export interface NativeConstants {
125
+ export type NativeConstants = {
118
126
  /**
119
127
  * @hidden
120
128
  */
@@ -142,7 +150,9 @@ export interface NativeConstants {
142
150
  */
143
151
  executionEnvironment: ExecutionEnvironment;
144
152
  experienceUrl: string;
145
- // only nullable on web
153
+ /**
154
+ * Nullable only on the web.
155
+ */
146
156
  expoRuntimeVersion: string | null;
147
157
  /**
148
158
  * The version string of the Expo Go app currently running.
@@ -220,12 +230,13 @@ export interface NativeConstants {
220
230
  * requests.
221
231
  */
222
232
  getWebViewUserAgentAsync: () => Promise<string | null>;
223
- [key: string]: any;
224
- }
233
+ } & Record<string, any>;
225
234
 
226
- export interface Constants extends NativeConstants {
235
+ /**
236
+ * @hidden
237
+ */
238
+ export type Constants = NativeConstants & {
227
239
  /**
228
- * @hidden
229
240
  * > **Warning**: Do not use this property. Use `manifest` by default.
230
241
  *
231
242
  * In certain cases accessing manifest via this property
@@ -233,11 +244,10 @@ export interface Constants extends NativeConstants {
233
244
  */
234
245
  __unsafeNoWarnManifest?: EmbeddedManifest;
235
246
  /**
236
- * @hidden
237
247
  * > **Warning**: Do not use this property. Use `manifest2` by default.
238
248
  *
239
249
  * In certain cases accessing manifest via this property
240
250
  * suppresses important warning about missing manifest.
241
251
  */
242
252
  __unsafeNoWarnManifest2?: ExpoUpdatesManifest;
243
- }
253
+ };