posthog-react-native 4.79.0 → 4.79.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/posthog-rn.d.ts +4 -1
- package/dist/posthog-rn.js +1 -1
- package/dist/posthog-rn.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +5 -5
- package/tooling/posthog-xcode.sh +6 -2
package/dist/types.d.ts
CHANGED
|
@@ -150,7 +150,7 @@ export interface PostHogCustomAppProperties {
|
|
|
150
150
|
/** Whether the app is running on an emulator/simulator */
|
|
151
151
|
$is_emulator?: boolean | null;
|
|
152
152
|
/** React Native version like "0.79.6" */
|
|
153
|
-
$react_native_version?: string | null;
|
|
153
|
+
$react_native_version?: string | null | undefined;
|
|
154
154
|
}
|
|
155
155
|
export type PostHogSessionReplayConfig = {
|
|
156
156
|
/**
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["export type PostHogAutocaptureNavigationTrackerOptions = {\n routeToName?: (name: string, params: any) => string\n routeToProperties?: (name: string, params: any) => Record<string, any>\n}\n\n/**\n * @deprecated\n */\nexport type PostHogNavigationRef = {\n getCurrentRoute(): any | undefined\n isReady: () => boolean\n current?: PostHogNavigationRef | any | undefined\n}\n\nexport type PostHogRageClickConfig = {\n /**\n * Enable or disable rage click (rage tap) detection.\n *\n * When enabled the native SDK emits a `$rageclick` event whenever a user\n * taps the same area repeatedly in quick succession.\n *\n * @default true\n */\n enabled?: boolean\n /**\n * Number of consecutive taps required to trigger a rage click.\n *\n * @default 3\n */\n minimumTapCount?: number\n /**\n * Maximum pixel distance between consecutive taps for them to still\n * count toward a rage click.\n *\n * @default 30\n */\n thresholdPoints?: number\n /**\n * Maximum time in seconds allowed between consecutive taps.\n *\n * @default 1.0\n */\n timeoutInterval?: number\n}\n\nexport type PostHogAutocaptureOptions = {\n /**\n * Enable autocapture of touch events.\n *\n * On React Native Web this also captures `click` events — mouse, trackpad, keyboard\n * activation and programmatic clicks — emitted with `$event_type: 'click'`, since\n * browsers fire `touchend` only for touch input.\n *\n * @default false\n */\n captureTouches?: boolean\n /**\n * Custom prop name used to label elements for autocapture\n *\n * @default 'ph-label'\n */\n customLabelProp?: string\n /**\n * Prop name used to prevent autocapture on an element and its children\n *\n * @default 'ph-no-capture'\n */\n noCaptureProp?: string\n /**\n * Maximum number of elements to capture in the component tree hierarchy\n *\n * @default 20\n */\n maxElementsCaptured?: number\n /**\n * List of element labels to ignore during autocapture\n *\n * @default []\n */\n ignoreLabels?: string[]\n /**\n * List of prop names to capture from elements\n *\n * @default ['style', 'testID', 'accessibilityLabel', 'ph-label', 'children']\n */\n propsToCapture?: string[]\n\n /**\n * Capture the screen name (or route name) and properties\n *\n * Only used for expo-router, @react-navigation/native and react-native-navigation\n *\n * For react-native-navigation, you need to call initReactNativeNavigation before using this option\n * See example: https://posthog.com/docs/libraries/react-native#with-react-native-navigation-and-autocapture\n *\n * For @react-navigation/native v6 and below, you need to wrap the PostHogProvider within the NavigationContainer\n * See example: https://posthog.com/docs/libraries/react-native#with-react-navigationnative-and-autocapture\n *\n * For @react-navigation/native v7 and above, because of a library change, you'll need to capture the screens manually and disable this option\n * You can use the onStateChange callback from the NavigationContainer to capture the screens automatically using the screen capture method\n * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens\n * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored\n * See example: https://reactnavigation.org/docs/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events\n *\n * For expo-router, expo-router uses @react-navigation/native, but does not expose the NavigationContainer, you'll need to capture the screens manually and disable this option\n * expo-router always has access to a URL, you can use the URL to capture the screens automatically using the screen capture method\n * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens\n * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored\n * See example: https://docs.expo.dev/router/reference/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events\n *\n * @default true\n */\n captureScreens?: boolean\n /**\n * Used for mutating the screen name and properties\n * Only used if captureScreens is true\n *\n * @default Default to the route name and params\n */\n navigation?: PostHogAutocaptureNavigationTrackerOptions\n /**\n * If you create a navigation ref with createNavigationContainerRef, you need to pass the navigation ref\n * Only used for expo-router and @react-navigation/native if captureScreens is true\n *\n * @deprecated this is deprecated since it didn't work as expected, check out the `captureScreens` comments for capturing screen views semi-automatically\n */\n navigationRef?: PostHogNavigationRef\n}\n\nexport interface PostHogCustomAppProperties {\n /** Build number like \"1.2.2\" or \"122\" */\n $app_build?: string | null\n /** Name of the app as displayed below the icon like \"PostHog\" */\n $app_name?: string | null\n /** Namespace of the app usually like \"com.posthog.app\" */\n $app_namespace?: string | null\n /** Human friendly app version like what a user would see in the app store like \"1.2.2\" */\n $app_version?: string | null\n /** Manufacturer like \"Apple\", \"Samsung\" or \"Android\" */\n $device_manufacturer?: string | null\n /** Readable model name like \"iPhone 12\" or \"Samsung Galaxy S24\" */\n $device_name?: string | null\n /** Model identifier like \"iPhone13,2\" or \"SM-S921B\" */\n $device_model?: string | null\n /** Device type (\"Mobile\" | \"Desktop\") */\n $device_type?: string | null\n /** Operating system name like iOS or Android */\n $os_name?: string | null\n /** Operating system version \"14.0\" */\n $os_version?: string | null\n /** Locale (language) of the device like \"en-US\" */\n $locale?: string | null\n /** Timezone of the device like \"Europe/Berlin\" */\n $timezone?: string | null\n /** Whether the app is running on an emulator/simulator */\n $is_emulator?: boolean | null\n /** React Native version like \"0.79.6\" */\n $react_native_version?: string | null\n}\n\nexport type PostHogSessionReplayConfig = {\n /**\n * Capture touch coordinates in session replay. Set to false to keep screenshots\n * without recording taps that could reveal sensitive input on a known keypad layout.\n * Does not change masking or `PostHogProvider` touch autocapture.\n * Android and iOS only. Requires `@posthog/react-native-plugin` 2.9.0 or later;\n * older plugins and `posthog-react-native-session-replay` ignore this option.\n * Set before constructing PostHog. Changes after initialization do not update native state.\n *\n * @default true\n */\n captureTouches?: boolean\n /**\n * Enable masking of all text and text input fields\n *\n * @default true\n */\n maskAllTextInputs?: boolean\n /**\n * Enable masking of all images to a placeholder\n *\n * @default true\n */\n maskAllImages?: boolean\n /**\n * Enable masking of all sandboxed system views\n * These may include UIImagePickerController, PHPickerViewController and CNContactPickerViewController\n * iOS only\n *\n * @default true\n */\n maskAllSandboxedViews?: boolean\n /**\n * Enable capturing of logs as console events\n *\n * @default true\n */\n captureLog?: boolean\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n iOSdebouncerDelayMs?: number\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n * Ps: it was 500ms (0.5s) by default until version 3.3.7\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n androidDebouncerDelayMs?: number\n /**\n * Throttling delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a wireframe or screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * This value has precedence over iOSdebouncerDelayMs and androidDebouncerDelayMs\n * If this is not set, we will take the max number between iOSdebouncerDelayMs and androidDebouncerDelayMs for back compatibility\n *\n * @default 1000\n */\n throttleDelayMs?: number\n /**\n * Enable capturing network telemetry\n * iOS only\n *\n * @default true\n */\n captureNetworkTelemetry?: boolean\n /**\n * Verify that masks remain aligned while capturing session replay screenshots.\n * Android only. Requires `@posthog/react-native-plugin`.\n *\n * Enabling this can preserve screenshots during pixel-only redraws, including\n * continuously animated content, but performs additional view hierarchy walks\n * while a screenshot is captured.\n *\n * @default false\n */\n verifyScreenshotMaskAlignment?: boolean\n /**\n * Experimental. Multiplier for the physical width and height of screenshots, clamped to 0.1–1.0.\n * For example, 0.5 captures half the width and height, or one quarter of the pixels.\n * The logical replay viewport is unchanged. Non-finite values use the native default.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n * Does not enable session replay or change compression quality or color mode.\n *\n * @experimental\n * @default 1.0\n */\n screenshotScale?: number\n /**\n * Experimental. WebP compression quality, clamped to 0–100. Fractional values are truncated.\n * Higher values generally retain more detail and produce larger payloads.\n * Compression is lossy, except at quality 100 on Android 10, which uses lossless WebP.\n * Non-finite values use the native default. Does not change screenshot resolution.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 30\n */\n screenshotCompressionQuality?: number\n /**\n * Experimental. Screenshot bitmap pixel format. ARGB_8888 preserves transparency and color precision.\n * RGB_565 uses half the bitmap memory but reduces color precision and removes alpha,\n * making transparent window regions appear black. Unsupported devices fall back to ARGB_8888.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 'ARGB_8888'\n */\n screenshotColorMode?: 'ARGB_8888' | 'RGB_565'\n /**\n * Schedule screenshot image capture on a background queue.\n * iOS only\n * Experimental support\n *\n * Warning: Enabling this option will trigger Main Thread Checker warnings and may\n * briefly freeze the app the first time a screenshot is captured. Consider disabling\n * Main Thread Checker in your scheme's run diagnostics when enabling this.\n *\n * @default false\n */\n screenshotModeBackgroundCapture?: boolean\n /**\n * Session replay sample rate between 0 and 1\n * Local config has precedence over remote config when both are set.\n * If undefined, sampling is controlled by remote config (when available).\n */\n sampleRate?: number\n}\n\nexport interface PostHogCustomStorage {\n getItem: (key: string) => string | null | Promise<string | null>\n setItem: (key: string, value: string) => void | Promise<void>\n}\n\n/**\n * Mints a signed identity-verification token for a push subscription request.\n *\n * Called by the native SDK with the current `distinctId` and `appId`. Return\n * `null` to send the request without an identity token.\n */\nexport type PostHogPushIdentityProvider = (distinctId: string, appId: string) => Promise<string | null>\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["export type PostHogAutocaptureNavigationTrackerOptions = {\n routeToName?: (name: string, params: any) => string\n routeToProperties?: (name: string, params: any) => Record<string, any>\n}\n\n/**\n * @deprecated\n */\nexport type PostHogNavigationRef = {\n getCurrentRoute(): any | undefined\n isReady: () => boolean\n current?: PostHogNavigationRef | any | undefined\n}\n\nexport type PostHogRageClickConfig = {\n /**\n * Enable or disable rage click (rage tap) detection.\n *\n * When enabled the native SDK emits a `$rageclick` event whenever a user\n * taps the same area repeatedly in quick succession.\n *\n * @default true\n */\n enabled?: boolean\n /**\n * Number of consecutive taps required to trigger a rage click.\n *\n * @default 3\n */\n minimumTapCount?: number\n /**\n * Maximum pixel distance between consecutive taps for them to still\n * count toward a rage click.\n *\n * @default 30\n */\n thresholdPoints?: number\n /**\n * Maximum time in seconds allowed between consecutive taps.\n *\n * @default 1.0\n */\n timeoutInterval?: number\n}\n\nexport type PostHogAutocaptureOptions = {\n /**\n * Enable autocapture of touch events.\n *\n * On React Native Web this also captures `click` events — mouse, trackpad, keyboard\n * activation and programmatic clicks — emitted with `$event_type: 'click'`, since\n * browsers fire `touchend` only for touch input.\n *\n * @default false\n */\n captureTouches?: boolean\n /**\n * Custom prop name used to label elements for autocapture\n *\n * @default 'ph-label'\n */\n customLabelProp?: string\n /**\n * Prop name used to prevent autocapture on an element and its children\n *\n * @default 'ph-no-capture'\n */\n noCaptureProp?: string\n /**\n * Maximum number of elements to capture in the component tree hierarchy\n *\n * @default 20\n */\n maxElementsCaptured?: number\n /**\n * List of element labels to ignore during autocapture\n *\n * @default []\n */\n ignoreLabels?: string[]\n /**\n * List of prop names to capture from elements\n *\n * @default ['style', 'testID', 'accessibilityLabel', 'ph-label', 'children']\n */\n propsToCapture?: string[]\n\n /**\n * Capture the screen name (or route name) and properties\n *\n * Only used for expo-router, @react-navigation/native and react-native-navigation\n *\n * For react-native-navigation, you need to call initReactNativeNavigation before using this option\n * See example: https://posthog.com/docs/libraries/react-native#with-react-native-navigation-and-autocapture\n *\n * For @react-navigation/native v6 and below, you need to wrap the PostHogProvider within the NavigationContainer\n * See example: https://posthog.com/docs/libraries/react-native#with-react-navigationnative-and-autocapture\n *\n * For @react-navigation/native v7 and above, because of a library change, you'll need to capture the screens manually and disable this option\n * You can use the onStateChange callback from the NavigationContainer to capture the screens automatically using the screen capture method\n * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens\n * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored\n * See example: https://reactnavigation.org/docs/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events\n *\n * For expo-router, expo-router uses @react-navigation/native, but does not expose the NavigationContainer, you'll need to capture the screens manually and disable this option\n * expo-router always has access to a URL, you can use the URL to capture the screens automatically using the screen capture method\n * You can use the 'usePostHog()' hook or your own posthog instance to capture the screens\n * Since captureScreens is disabled, you don't need to pass the navigationRef, the navigation mutation object is also ignored\n * See example: https://docs.expo.dev/router/reference/screen-tracking/ and https://posthog.com/docs/libraries/react-native#manually-capturing-screen-capture-events\n *\n * @default true\n */\n captureScreens?: boolean\n /**\n * Used for mutating the screen name and properties\n * Only used if captureScreens is true\n *\n * @default Default to the route name and params\n */\n navigation?: PostHogAutocaptureNavigationTrackerOptions\n /**\n * If you create a navigation ref with createNavigationContainerRef, you need to pass the navigation ref\n * Only used for expo-router and @react-navigation/native if captureScreens is true\n *\n * @deprecated this is deprecated since it didn't work as expected, check out the `captureScreens` comments for capturing screen views semi-automatically\n */\n navigationRef?: PostHogNavigationRef\n}\n\nexport interface PostHogCustomAppProperties {\n /** Build number like \"1.2.2\" or \"122\" */\n $app_build?: string | null\n /** Name of the app as displayed below the icon like \"PostHog\" */\n $app_name?: string | null\n /** Namespace of the app usually like \"com.posthog.app\" */\n $app_namespace?: string | null\n /** Human friendly app version like what a user would see in the app store like \"1.2.2\" */\n $app_version?: string | null\n /** Manufacturer like \"Apple\", \"Samsung\" or \"Android\" */\n $device_manufacturer?: string | null\n /** Readable model name like \"iPhone 12\" or \"Samsung Galaxy S24\" */\n $device_name?: string | null\n /** Model identifier like \"iPhone13,2\" or \"SM-S921B\" */\n $device_model?: string | null\n /** Device type (\"Mobile\" | \"Desktop\") */\n $device_type?: string | null\n /** Operating system name like iOS or Android */\n $os_name?: string | null\n /** Operating system version \"14.0\" */\n $os_version?: string | null\n /** Locale (language) of the device like \"en-US\" */\n $locale?: string | null\n /** Timezone of the device like \"Europe/Berlin\" */\n $timezone?: string | null\n /** Whether the app is running on an emulator/simulator */\n $is_emulator?: boolean | null\n /** React Native version like \"0.79.6\" */\n $react_native_version?: string | null | undefined\n}\n\nexport type PostHogSessionReplayConfig = {\n /**\n * Capture touch coordinates in session replay. Set to false to keep screenshots\n * without recording taps that could reveal sensitive input on a known keypad layout.\n * Does not change masking or `PostHogProvider` touch autocapture.\n * Android and iOS only. Requires `@posthog/react-native-plugin` 2.9.0 or later;\n * older plugins and `posthog-react-native-session-replay` ignore this option.\n * Set before constructing PostHog. Changes after initialization do not update native state.\n *\n * @default true\n */\n captureTouches?: boolean\n /**\n * Enable masking of all text and text input fields\n *\n * @default true\n */\n maskAllTextInputs?: boolean\n /**\n * Enable masking of all images to a placeholder\n *\n * @default true\n */\n maskAllImages?: boolean\n /**\n * Enable masking of all sandboxed system views\n * These may include UIImagePickerController, PHPickerViewController and CNContactPickerViewController\n * iOS only\n *\n * @default true\n */\n maskAllSandboxedViews?: boolean\n /**\n * Enable capturing of logs as console events\n *\n * @default true\n */\n captureLog?: boolean\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n iOSdebouncerDelayMs?: number\n /**\n * Deboucer delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n * Ps: it was 500ms (0.5s) by default until version 3.3.7\n *\n * @default 1000\n * @deprecated please use throttleDelayMs instead\n */\n androidDebouncerDelayMs?: number\n /**\n * Throttling delay used to reduce the number of snapshots captured and reduce performance impact\n * This is used for capturing the view as a wireframe or screenshot\n * The lower the number more snapshots will be captured but higher the performance impact\n *\n * This value has precedence over iOSdebouncerDelayMs and androidDebouncerDelayMs\n * If this is not set, we will take the max number between iOSdebouncerDelayMs and androidDebouncerDelayMs for back compatibility\n *\n * @default 1000\n */\n throttleDelayMs?: number\n /**\n * Enable capturing network telemetry\n * iOS only\n *\n * @default true\n */\n captureNetworkTelemetry?: boolean\n /**\n * Verify that masks remain aligned while capturing session replay screenshots.\n * Android only. Requires `@posthog/react-native-plugin`.\n *\n * Enabling this can preserve screenshots during pixel-only redraws, including\n * continuously animated content, but performs additional view hierarchy walks\n * while a screenshot is captured.\n *\n * @default false\n */\n verifyScreenshotMaskAlignment?: boolean\n /**\n * Experimental. Multiplier for the physical width and height of screenshots, clamped to 0.1–1.0.\n * For example, 0.5 captures half the width and height, or one quarter of the pixels.\n * The logical replay viewport is unchanged. Non-finite values use the native default.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n * Does not enable session replay or change compression quality or color mode.\n *\n * @experimental\n * @default 1.0\n */\n screenshotScale?: number\n /**\n * Experimental. WebP compression quality, clamped to 0–100. Fractional values are truncated.\n * Higher values generally retain more detail and produce larger payloads.\n * Compression is lossy, except at quality 100 on Android 10, which uses lossless WebP.\n * Non-finite values use the native default. Does not change screenshot resolution.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 30\n */\n screenshotCompressionQuality?: number\n /**\n * Experimental. Screenshot bitmap pixel format. ARGB_8888 preserves transparency and color precision.\n * RGB_565 uses half the bitmap memory but reduces color precision and removes alpha,\n * making transparent window regions appear black. Unsupported devices fall back to ARGB_8888.\n * Android only. Requires `@posthog/react-native-plugin` 2.8.0 or later.\n *\n * @experimental\n * @default 'ARGB_8888'\n */\n screenshotColorMode?: 'ARGB_8888' | 'RGB_565'\n /**\n * Schedule screenshot image capture on a background queue.\n * iOS only\n * Experimental support\n *\n * Warning: Enabling this option will trigger Main Thread Checker warnings and may\n * briefly freeze the app the first time a screenshot is captured. Consider disabling\n * Main Thread Checker in your scheme's run diagnostics when enabling this.\n *\n * @default false\n */\n screenshotModeBackgroundCapture?: boolean\n /**\n * Session replay sample rate between 0 and 1\n * Local config has precedence over remote config when both are set.\n * If undefined, sampling is controlled by remote config (when available).\n */\n sampleRate?: number\n}\n\nexport interface PostHogCustomStorage {\n getItem: (key: string) => string | null | Promise<string | null>\n setItem: (key: string, value: string) => void | Promise<void>\n}\n\n/**\n * Mints a signed identity-verification token for a push subscription request.\n *\n * Called by the native SDK with the current `distinctId` and `appId`. Return\n * `null` to send the request without an identity token.\n */\nexport type PostHogPushIdentityProvider = (distinctId: string, appId: string) => Promise<string | null>\n"],"mappings":"","ignoreList":[]}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.79.
|
|
1
|
+
export declare const version = "4.79.1";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.79.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.79.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":["version","exports"],"sources":["../src/version.ts"],"sourcesContent":["export const version = \"4.79.
|
|
1
|
+
{"version":3,"file":"version.js","names":["version","exports"],"sources":["../src/version.ts"],"sourcesContent":["export const version = \"4.79.1\"\n"],"mappings":"6FAAO,GAAM,CAAAA,OAAO,CAAAC,OAAA,CAAAD,OAAA,CAAG,QAAQ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-react-native",
|
|
3
|
-
"version": "4.79.
|
|
3
|
+
"version": "4.79.1",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/PostHog/posthog-js/issues"
|
|
6
6
|
},
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"directory": "packages/react-native"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@posthog/core": "^1.
|
|
38
|
-
"@posthog/types": "^1.
|
|
37
|
+
"@posthog/core": "^1.57.1",
|
|
38
|
+
"@posthog/types": "^1.415.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/cli": "^7.19.3",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"@vitest/coverage-v8": "^1.6.1",
|
|
75
75
|
"vitest": "^1.6.1",
|
|
76
76
|
"@posthog-tooling/rollup-utils": "1.1.1",
|
|
77
|
-
"@posthog/
|
|
78
|
-
"@posthog
|
|
77
|
+
"@posthog-tooling/tsconfig-base": "1.1.1",
|
|
78
|
+
"@posthog/react-native-plugin": "2.12.5"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@react-native-async-storage/async-storage": ">=1.0.0",
|
package/tooling/posthog-xcode.sh
CHANGED
|
@@ -375,6 +375,7 @@ set -x -e
|
|
|
375
375
|
# natively (GitHub Actions, Vercel). Those runners inject the real variables
|
|
376
376
|
# themselves, and we don't want to overwrite them with locally-derived ones.
|
|
377
377
|
#
|
|
378
|
+
set +e # best-effort git metadata; failures must not abort the build
|
|
378
379
|
if [ -z "$GITHUB_SHA" ] && [ -z "$VERCEL" ]; then
|
|
379
380
|
GIT_TOPLEVEL=$(git -C "${SRCROOT:-$(pwd)}" rev-parse --show-toplevel 2>/dev/null)
|
|
380
381
|
if [ -n "$GIT_TOPLEVEL" ]; then
|
|
@@ -389,7 +390,9 @@ if [ -z "$GITHUB_SHA" ] && [ -z "$VERCEL" ]; then
|
|
|
389
390
|
GIT_HOST=$(echo "$GIT_REMOTE_URL" | sed -E 's#^[a-z]+://##; s#^[^@]*@##; s#[:/].*$##')
|
|
390
391
|
# Strip scheme + user@host + separator, optional port, and .git suffix
|
|
391
392
|
GIT_REPO_PATH=$(echo "$GIT_REMOTE_URL" | sed -E 's#^([a-z]+://)?[^:/]*[:/]##; s#^[0-9]+/##; s#\.git$##')
|
|
392
|
-
|
|
393
|
+
# --verify --quiet prints nothing on an unborn branch, where plain `rev-parse HEAD` prints "HEAD"
|
|
394
|
+
GIT_SHA=$(git -C "$GIT_TOPLEVEL" rev-parse --verify --quiet HEAD 2>/dev/null)
|
|
395
|
+
if [ -n "$GIT_HOST" ] && [ -n "$GIT_REPO_PATH" ] && [ -n "$GIT_SHA" ]; then
|
|
393
396
|
GIT_BRANCH_NAME=$(git -C "$GIT_TOPLEVEL" rev-parse --abbrev-ref HEAD 2>/dev/null)
|
|
394
397
|
# --abbrev-ref returns the literal string "HEAD" when the working copy
|
|
395
398
|
# is in a detached-HEAD state (bisect, checking out a tag, CI checkouts
|
|
@@ -399,7 +402,7 @@ if [ -z "$GITHUB_SHA" ] && [ -z "$VERCEL" ]; then
|
|
|
399
402
|
GIT_BRANCH_NAME=$(git -C "$GIT_TOPLEVEL" rev-parse --short HEAD 2>/dev/null)
|
|
400
403
|
fi
|
|
401
404
|
export GITHUB_ACTIONS="true"
|
|
402
|
-
export GITHUB_SHA
|
|
405
|
+
export GITHUB_SHA="$GIT_SHA"
|
|
403
406
|
export GITHUB_REF_NAME="$GIT_BRANCH_NAME"
|
|
404
407
|
export GITHUB_REPOSITORY="$GIT_REPO_PATH"
|
|
405
408
|
export GITHUB_SERVER_URL="https://${GIT_HOST}"
|
|
@@ -407,6 +410,7 @@ if [ -z "$GITHUB_SHA" ] && [ -z "$VERCEL" ]; then
|
|
|
407
410
|
fi
|
|
408
411
|
fi
|
|
409
412
|
fi
|
|
413
|
+
set -e
|
|
410
414
|
|
|
411
415
|
# Execute posthog cli clone
|
|
412
416
|
set +x +e
|