posthog-react-native 4.63.6 → 4.63.8
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/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -6
- package/tooling/posthog-xcode.sh +67 -11
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.63.
|
|
1
|
+
export declare const version = "4.63.8";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.63.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.63.8";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-react-native",
|
|
3
|
-
"version": "4.63.
|
|
3
|
+
"version": "4.63.8",
|
|
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/
|
|
38
|
-
"@posthog/
|
|
37
|
+
"@posthog/types": "^1.405.2",
|
|
38
|
+
"@posthog/core": "^1.48.9"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/cli": "^7.19.3",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"react-native-svg": "^15.0.0",
|
|
75
75
|
"ts-jest": "29.4.11",
|
|
76
76
|
"typescript": "5.8.2",
|
|
77
|
-
"@posthog-tooling/rollup-utils": "1.1.1",
|
|
78
77
|
"@posthog-tooling/tsconfig-base": "1.1.1",
|
|
79
|
-
"@posthog/
|
|
78
|
+
"@posthog-tooling/rollup-utils": "1.1.1",
|
|
79
|
+
"@posthog/react-native-plugin": "2.4.3"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@react-native-async-storage/async-storage": ">=1.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"expo-device": ">= 4.0.0",
|
|
86
86
|
"expo-file-system": ">= 13.0.0",
|
|
87
87
|
"expo-localization": ">= 11.0.0",
|
|
88
|
-
"@posthog/react-native-plugin": ">= 2.3
|
|
88
|
+
"@posthog/react-native-plugin": ">= 2.4.3",
|
|
89
89
|
"posthog-react-native-session-replay": ">= 1.6.0",
|
|
90
90
|
"react-native-device-info": ">= 10.0.0",
|
|
91
91
|
"react-native-localize": ">= 3.0.0",
|
package/tooling/posthog-xcode.sh
CHANGED
|
@@ -49,9 +49,9 @@ while [ "$#" -gt 0 ]; do
|
|
|
49
49
|
esac
|
|
50
50
|
done
|
|
51
51
|
|
|
52
|
-
POSTHOG_UPLOAD_ARGS=
|
|
52
|
+
POSTHOG_UPLOAD_ARGS=()
|
|
53
53
|
if [ "$POSTHOG_SKIP_ON_CONFLICT_ENABLED" = "1" ] || [ "$POSTHOG_SKIP_ON_CONFLICT_ENABLED" = "true" ]; then
|
|
54
|
-
POSTHOG_UPLOAD_ARGS
|
|
54
|
+
POSTHOG_UPLOAD_ARGS+=(--skip-on-conflict)
|
|
55
55
|
fi
|
|
56
56
|
|
|
57
57
|
REACT_NATIVE_XCODE_DEFAULT="../node_modules/react-native/scripts/react-native-xcode.sh"
|
|
@@ -127,16 +127,72 @@ fi
|
|
|
127
127
|
# mimics how the file is defined in node_modules/react-native/scripts/react-native-xcode.sh (PACKAGER_SOURCEMAP_FILE)
|
|
128
128
|
SOURCEMAP_PACKAGER_FILE="$CONFIGURATION_BUILD_DIR/$SOURCEMAP_NAME"
|
|
129
129
|
|
|
130
|
-
#
|
|
131
|
-
|
|
130
|
+
# The native runtime reports these values from the built Info.plist. Prefer the source Info.plist so
|
|
131
|
+
# source maps use the same release when Expo EAS remote versioning does not update Xcode's defaults.
|
|
132
|
+
resolve_posthog_ios_release_info() {
|
|
133
|
+
resolve_posthog_build_setting_references() {
|
|
134
|
+
local value="$1"
|
|
135
|
+
local token
|
|
136
|
+
local name
|
|
137
|
+
local replacement
|
|
138
|
+
local prefix
|
|
139
|
+
local suffix
|
|
140
|
+
|
|
141
|
+
while [[ "$value" =~ (\$\(([A-Za-z_][A-Za-z0-9_]*)\)|\$\{([A-Za-z_][A-Za-z0-9_]*)\}) ]]; do
|
|
142
|
+
token=${BASH_REMATCH[1]}
|
|
143
|
+
name=${BASH_REMATCH[2]:-${BASH_REMATCH[3]}}
|
|
144
|
+
replacement=$(printenv "$name" 2>/dev/null) || return
|
|
145
|
+
prefix=${value%%"$token"*}
|
|
146
|
+
suffix=${value#*"$token"}
|
|
147
|
+
value="${prefix}${replacement}${suffix}"
|
|
148
|
+
done
|
|
149
|
+
printf '%s' "$value"
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
POSTHOG_RELEASE_VERSION="${MARKETING_VERSION:-}"
|
|
153
|
+
POSTHOG_BUILD_VERSION="${CURRENT_PROJECT_VERSION:-}"
|
|
154
|
+
POSTHOG_PLIST_BUDDY="${POSTHOG_PLIST_BUDDY:-/usr/libexec/PlistBuddy}"
|
|
155
|
+
POSTHOG_INFO_PLIST="${INFOPLIST_FILE:-}"
|
|
156
|
+
|
|
157
|
+
# Bare C preprocessor macros cannot be expanded safely here, and the product plist may belong to
|
|
158
|
+
# a previous build. Preserve the existing Xcode-setting fallback for preprocessed plists.
|
|
159
|
+
if [ "${INFOPLIST_PREPROCESS:-}" = "YES" ] || [ -z "$POSTHOG_INFO_PLIST" ] || [ ! -x "$POSTHOG_PLIST_BUDDY" ]; then
|
|
160
|
+
return 0
|
|
161
|
+
fi
|
|
162
|
+
case "$POSTHOG_INFO_PLIST" in
|
|
163
|
+
/*) ;;
|
|
164
|
+
*) POSTHOG_INFO_PLIST="${SRCROOT}/${POSTHOG_INFO_PLIST}" ;;
|
|
165
|
+
esac
|
|
166
|
+
if [ ! -f "$POSTHOG_INFO_PLIST" ]; then
|
|
167
|
+
return 0
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
POSTHOG_PLIST_RELEASE_VERSION=$("$POSTHOG_PLIST_BUDDY" -c "Print :CFBundleShortVersionString" "$POSTHOG_INFO_PLIST" 2>/dev/null || true)
|
|
171
|
+
POSTHOG_PLIST_BUILD_VERSION=$("$POSTHOG_PLIST_BUDDY" -c "Print :CFBundleVersion" "$POSTHOG_INFO_PLIST" 2>/dev/null || true)
|
|
172
|
+
POSTHOG_PLIST_RELEASE_VERSION=$(resolve_posthog_build_setting_references "$POSTHOG_PLIST_RELEASE_VERSION" || true)
|
|
173
|
+
POSTHOG_PLIST_BUILD_VERSION=$(resolve_posthog_build_setting_references "$POSTHOG_PLIST_BUILD_VERSION" || true)
|
|
174
|
+
|
|
175
|
+
case "$POSTHOG_PLIST_RELEASE_VERSION" in
|
|
176
|
+
""|*"\$("*|*"\${"*) ;;
|
|
177
|
+
*) POSTHOG_RELEASE_VERSION="$POSTHOG_PLIST_RELEASE_VERSION" ;;
|
|
178
|
+
esac
|
|
179
|
+
case "$POSTHOG_PLIST_BUILD_VERSION" in
|
|
180
|
+
""|*"\$("*|*"\${"*) ;;
|
|
181
|
+
*) POSTHOG_BUILD_VERSION="$POSTHOG_PLIST_BUILD_VERSION" ;;
|
|
182
|
+
esac
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
resolve_posthog_ios_release_info
|
|
186
|
+
|
|
187
|
+
CLI_RELEASE_ARGS=()
|
|
132
188
|
if [ -n "${PRODUCT_BUNDLE_IDENTIFIER}" ]; then
|
|
133
|
-
CLI_RELEASE_ARGS
|
|
189
|
+
CLI_RELEASE_ARGS+=(--release-name "$PRODUCT_BUNDLE_IDENTIFIER")
|
|
134
190
|
fi
|
|
135
|
-
if [ -n "${
|
|
136
|
-
CLI_RELEASE_ARGS
|
|
191
|
+
if [ -n "${POSTHOG_RELEASE_VERSION}" ]; then
|
|
192
|
+
CLI_RELEASE_ARGS+=(--release-version "$POSTHOG_RELEASE_VERSION")
|
|
137
193
|
fi
|
|
138
|
-
if [ -n "${
|
|
139
|
-
CLI_RELEASE_ARGS
|
|
194
|
+
if [ -n "${POSTHOG_BUILD_VERSION}" ]; then
|
|
195
|
+
CLI_RELEASE_ARGS+=(--build "$POSTHOG_BUILD_VERSION")
|
|
140
196
|
fi
|
|
141
197
|
|
|
142
198
|
# RN deletes the PACKAGER_SOURCEMAP_FILE file after execution but we need it
|
|
@@ -226,7 +282,7 @@ fi
|
|
|
226
282
|
|
|
227
283
|
# Execute posthog cli clone
|
|
228
284
|
set +x +e
|
|
229
|
-
CLI_CLONE_OUTPUT=$(
|
|
285
|
+
CLI_CLONE_OUTPUT=$("$PH_CLI_PATH" hermes clone --minified-map-path "$SOURCEMAP_PACKAGER_FILE" --composed-map-path "$SOURCEMAP_FILE" "${CLI_RELEASE_ARGS[@]}" 2>&1)
|
|
230
286
|
CLONE_EXIT_CODE=$?
|
|
231
287
|
if [ $CLONE_EXIT_CODE -eq 0 ]; then
|
|
232
288
|
echo "$CLI_CLONE_OUTPUT" | awk '{print "output: posthog-cli - " $0}'
|
|
@@ -238,7 +294,7 @@ set -x -e
|
|
|
238
294
|
|
|
239
295
|
# Execute posthog cli upload
|
|
240
296
|
set +x +e
|
|
241
|
-
CLI_UPLOAD_OUTPUT=$(
|
|
297
|
+
CLI_UPLOAD_OUTPUT=$("$PH_CLI_PATH" hermes upload --directory "$DERIVED_FILE_DIR" "${CLI_RELEASE_ARGS[@]}" "${POSTHOG_UPLOAD_ARGS[@]}" 2>&1)
|
|
242
298
|
UPLOAD_EXIT_CODE=$?
|
|
243
299
|
if [ $UPLOAD_EXIT_CODE -eq 0 ]; then
|
|
244
300
|
echo "$CLI_UPLOAD_OUTPUT" | awk '{print "output: posthog-cli - " $0}'
|