Skip to content

Commit

Permalink
Bump to version 2.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-saia-datadog committed Jul 29, 2024
1 parent 1656ad3 commit 0a92fe0
Show file tree
Hide file tree
Showing 16 changed files with 136 additions and 27 deletions.
109 changes: 109 additions & 0 deletions _copy_to_example.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#!/bin/sh
# --------------------------------------------------------------------------------------------------------------------
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2016-Present Datadog, Inc.
# --------------------------------------------------------------------------------------------------------------------

# ==================================================================================
# This script prepares local packages, and installs them to the given destination
# ==================================================================================
set -e # Exit immediately if a command exits with a non-zero status.

# If true, opens VS Code on the destination after installing the local packages.
OPEN_VS_CODE=false

ROOT=$(pwd) # Store the current directory as ROOT.

# List of packages to prepare and install
PACKAGES=(
"core"
"react-navigation"
"react-native-session-replay"
"internal-testing-tools"
)

# Function to print an error message and exit
error_exit() {
echo "$1" >&2
exit 1
}

# Check if the destination argument is provided
if [ -z "$1" ]; then
error_exit "Usage: $0 <destination>"
fi

# Resolve the absolute path of the destination
DESTINATION=$(realpath "$1")

# Check if the directory exists
if [ ! -d "$DESTINATION" ]; then
error_exit "Error: Directory '$DESTINATION' does not exist."
fi

# Check if package.json exists in the directory
if [ ! -f "$DESTINATION/package.json" ]; then
error_exit "Error: No package.json found in '$DESTINATION'."
fi

# Randomly generated version
VERSION=$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c 64)

# Function to prepare and copy the package to the destination
prepare_and_copy() {
local package_name="$1"

cd $ROOT/packages/$package_name

rm -f *.tgz # Remove any existing .tgz files
yarn # Install dependencies
yarn prepare # Prepare the package
yarn pack # Pack the package

rm -f $DESTINATION/$package_name-*.tgz # Remove old package in the destination
cp package.tgz $DESTINATION/$package_name-$VERSION.tgz # Copy new package to destination

cd $ROOT # Return to root directory
}

# Function to install local packages
install_local_packages() {
local packages=("$@")

# Prepare and copy packages
for package in "${packages[@]}";
do
prepare_and_copy $package
done

# Jump into project directory
cd $DESTINATION

# Clean previous packages
for package in "${packages[@]}";
do
yarn remove $package || true # Remove old package, ignore errors
done

# Install new local packages
for package in "${packages[@]}";
do
yarn add file:$package-$VERSION.tgz # Add the new package
done

yarn # Install remaining dependencies

# Open editor if OPEN_VS_CODE is true
if [ "$OPEN_VS_CODE" = true ]; then
code .
fi

# Go back to root
cd $ROOT
}

# Pass the array to the function
install_local_packages "${PACKAGES[@]}"

echo "Done."
4 changes: 2 additions & 2 deletions example-new-architecture/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PODS:
- DatadogInternal (= 2.14.1)
- DatadogRUM (2.14.1):
- DatadogInternal (= 2.14.1)
- DatadogSDKReactNative (2.4.2):
- DatadogSDKReactNative (2.4.3):
- DatadogCore (~> 2.14.1)
- DatadogCrashReporting (~> 2.14.1)
- DatadogLogs (~> 2.14.1)
Expand Down Expand Up @@ -1416,7 +1416,7 @@ SPEC CHECKSUMS:
DatadogInternal: 9d326664fe7aaef4c159aaf19a32cd2675b4c5fe
DatadogLogs: d97eff8fba4541fad3bfaa8e8bcf8a272d246537
DatadogRUM: 2c4d698619557aad6bf031178a046a70799b561d
DatadogSDKReactNative: f96a93e58991d0afb50aea458ba1f18fe087faef
DatadogSDKReactNative: be9efb51d5d32717b0c3d0926303e45da73a4e82
DatadogTrace: 18adb831078595a21210fdb7aad1db379e90dac1
DatadogWebViewTracking: 5306fb6a663df6c1579c2eacf95c95d05735bb18
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
Expand Down
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ PODS:
- DatadogInternal (= 2.14.1)
- DatadogRUM (2.14.1):
- DatadogInternal (= 2.14.1)
- DatadogSDKReactNative (2.4.2):
- DatadogSDKReactNative (2.4.3):
- DatadogCore (~> 2.14.1)
- DatadogCrashReporting (~> 2.14.1)
- DatadogLogs (~> 2.14.1)
- DatadogRUM (~> 2.14.1)
- DatadogTrace (~> 2.14.1)
- DatadogWebViewTracking (~> 2.14.1)
- React-Core
- DatadogSDKReactNative/Tests (2.4.2):
- DatadogSDKReactNative/Tests (2.4.3):
- DatadogCore (~> 2.14.1)
- DatadogCrashReporting (~> 2.14.1)
- DatadogLogs (~> 2.14.1)
- DatadogRUM (~> 2.14.1)
- DatadogTrace (~> 2.14.1)
- DatadogWebViewTracking (~> 2.14.1)
- React-Core
- DatadogSDKReactNativeSessionReplay (2.4.2-alpha.0):
- DatadogSDKReactNativeSessionReplay (2.4.3-alpha.0):
- DatadogSDKReactNative
- DatadogSessionReplay (~> 2.14.1)
- React-Core
- DatadogSDKReactNativeSessionReplay/Tests (2.4.2-alpha.0):
- DatadogSDKReactNativeSessionReplay/Tests (2.4.3-alpha.0):
- DatadogSDKReactNative
- DatadogSessionReplay (~> 2.14.1)
- React-Core
Expand Down Expand Up @@ -1331,8 +1331,8 @@ SPEC CHECKSUMS:
DatadogInternal: 9d326664fe7aaef4c159aaf19a32cd2675b4c5fe
DatadogLogs: d97eff8fba4541fad3bfaa8e8bcf8a272d246537
DatadogRUM: 2c4d698619557aad6bf031178a046a70799b561d
DatadogSDKReactNative: f403f190a392abd1ed7cdfe90c424c46f7aae250
DatadogSDKReactNativeSessionReplay: 7251012dd10d7a65fcf88a752b0da9ed28be1890
DatadogSDKReactNative: f418f95923dc78ad7b4dcd1710804f1672d8abfa
DatadogSDKReactNativeSessionReplay: 5120a9df176bc6cf49d33237e078d99c8b1c3b24
DatadogSessionReplay: 1a9597ff672b32a2b7cb1bed24fa29a584386807
DatadogTrace: 18adb831078595a21210fdb7aad1db379e90dac1
DatadogWebViewTracking: 5306fb6a663df6c1579c2eacf95c95d05735bb18
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"npmClient": "yarn",
"version": "2.4.2",
"version": "2.4.3",
"packages": [
"packages/*"
],
Expand Down
4 changes: 2 additions & 2 deletions packages/codepush/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/mobile-react-native-code-push",
"version": "2.4.2",
"version": "2.4.3",
"description": "A client-side React Native module to interact with Appcenter Codepush and Datadog",
"keywords": [
"datadog",
Expand Down Expand Up @@ -38,7 +38,7 @@
"prepare": "rm -rf lib && yarn bob build"
},
"devDependencies": {
"@datadog/mobile-react-native": "^2.4.2",
"@datadog/mobile-react-native": "^2.4.3",
"@testing-library/react-native": "7.0.2",
"react-native-builder-bob": "0.26.0",
"react-native-code-push": "7.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
package com.datadog.reactnative

// This is automatically updated by the update-version.sh script
internal const val SDK_VERSION = "2.4.2"
internal const val SDK_VERSION = "2.4.3"
2 changes: 1 addition & 1 deletion packages/core/ios/Sources/SdkVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
import Foundation

// This is automatically updated by the update-version.sh script
let SdkVersion = "2.4.2"
let SdkVersion = "2.4.3"
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/mobile-react-native",
"version": "2.4.2",
"version": "2.4.3",
"description": "A client-side React Native module to interact with Datadog",
"keywords": [
"datadog",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// generated by genversion
export const version = '2.4.2';
export const version = '2.4.3';
2 changes: 1 addition & 1 deletion packages/internal-testing-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/react-native-internal-testing-tools",
"version": "2.4.2",
"version": "2.4.3",
"description": "Internal tools for testing the Datadog React Native SDK.",
"keywords": [
"datadog",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-apollo-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/mobile-react-native-apollo-client",
"version": "2.4.2",
"version": "2.4.3",
"description": "A client-side React Native module to interact with Apollo Client and Datadog",
"keywords": [
"datadog",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-navigation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/mobile-react-native-navigation",
"version": "2.4.2",
"version": "2.4.3",
"description": "A client-side React Native module to interact with Datadog",
"keywords": [
"datadog",
Expand Down Expand Up @@ -36,7 +36,7 @@
"prepare": "rm -rf lib && yarn bob build"
},
"devDependencies": {
"@datadog/mobile-react-native": "^2.4.2",
"@datadog/mobile-react-native": "^2.4.3",
"@testing-library/react-native": "7.0.2",
"react-native-builder-bob": "0.26.0",
"react-native-gesture-handler": "1.10.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-session-replay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/mobile-react-native-session-replay",
"version": "2.4.2-alpha.0",
"version": "2.4.3-alpha.0",
"description": "A client-side React Native module to enable session replay with Datadog",
"keywords": [
"datadog",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-webview/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/mobile-react-native-webview",
"version": "2.4.2",
"version": "2.4.3",
"description": "A client-side React Native module to interact with react-native-webview and Datadog",
"keywords": [
"datadog",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-navigation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datadog/mobile-react-navigation",
"version": "2.4.2",
"version": "2.4.3",
"description": "A client-side React Native module to interact with Datadog",
"keywords": [
"datadog",
Expand Down Expand Up @@ -36,7 +36,7 @@
"prepare": "rm -rf lib && yarn bob build"
},
"devDependencies": {
"@datadog/mobile-react-native": "^2.4.2",
"@datadog/mobile-react-native": "^2.4.3",
"@react-navigation/native-v5": "npm:@react-navigation/native@5.9.8",
"@react-navigation/native-v6": "npm:@react-navigation/native@6.1.2",
"@react-navigation/stack-v5": "npm:@react-navigation/stack@5.14.2",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@datadog/mobile-react-native-code-push@workspace:packages/codepush"
dependencies:
"@datadog/mobile-react-native": ^2.4.2
"@datadog/mobile-react-native": ^2.4.3
"@testing-library/react-native": 7.0.2
react-native-builder-bob: 0.26.0
react-native-code-push: 7.1.0
Expand All @@ -2588,7 +2588,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@datadog/mobile-react-native-navigation@workspace:packages/react-native-navigation"
dependencies:
"@datadog/mobile-react-native": ^2.4.2
"@datadog/mobile-react-native": ^2.4.3
"@testing-library/react-native": 7.0.2
react-native-builder-bob: 0.26.0
react-native-gesture-handler: 1.10.3
Expand Down Expand Up @@ -2628,7 +2628,7 @@ __metadata:
languageName: unknown
linkType: soft

"@datadog/mobile-react-native@^2.4.2, @datadog/mobile-react-native@workspace:packages/core":
"@datadog/mobile-react-native@^2.4.3, @datadog/mobile-react-native@workspace:packages/core":
version: 0.0.0-use.local
resolution: "@datadog/mobile-react-native@workspace:packages/core"
dependencies:
Expand All @@ -2644,7 +2644,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@datadog/mobile-react-navigation@workspace:packages/react-navigation"
dependencies:
"@datadog/mobile-react-native": ^2.4.2
"@datadog/mobile-react-native": ^2.4.3
"@react-navigation/native-v5": "npm:@react-navigation/native@5.9.8"
"@react-navigation/native-v6": "npm:@react-navigation/native@6.1.2"
"@react-navigation/stack-v5": "npm:@react-navigation/stack@5.14.2"
Expand Down

0 comments on commit 0a92fe0

Please sign in to comment.