Skip to content

Commit b082dc9

Browse files
authored
Merge branch 'master' into feature/MOB-12189-add-tests-to-iterableinappmanager
2 parents 605d28c + b37eb9f commit b082dc9

26 files changed

+1546
-179
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ module.exports = {
4848
},
4949
},
5050
],
51+
ignorePatterns: ['coverage/**/*', 'lib/**/*', 'docs/**/*'],
5152
};

.github/workflows/codeql.yml

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
branches: [ "master" ]
19+
20+
jobs:
21+
Analyze_Ruby_JSandTS:
22+
name: Analyze (${{ matrix.language }})
23+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
24+
permissions:
25+
# required for all workflows
26+
security-events: write
27+
28+
# required to fetch internal or private CodeQL packs
29+
packages: read
30+
31+
# only required for workflows in private repositories
32+
actions: read
33+
contents: read
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
include:
39+
- language: actions
40+
build-mode: none
41+
- language: javascript-typescript
42+
build-mode: none
43+
- language: ruby
44+
build-mode: none
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
48+
49+
# Add any setup steps before running the `github/codeql-action/init` action.
50+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
51+
# or others). This is typically only required for manual builds.
52+
# - name: Setup runtime (example)
53+
# uses: actions/setup-example@v1
54+
55+
# Initializes the CodeQL tools for scanning.
56+
- name: Initialize CodeQL
57+
uses: github/codeql-action/init@v3
58+
with:
59+
languages: ${{ matrix.language }}
60+
build-mode: ${{ matrix.build-mode }}
61+
# If you wish to specify custom queries, you can do so here or in a config file.
62+
# By default, queries listed here will override any specified in a config file.
63+
# Prefix the list here with "+" to use these queries and those in the config file.
64+
65+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
66+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
67+
68+
- if: matrix.build-mode == 'manual'
69+
shell: bash
70+
run: |
71+
echo 'If you are using a "manual" build mode for one or more of the' \
72+
'languages you are analyzing, replace this with the commands to build' \
73+
'your code, for example:'
74+
echo ' make bootstrap'
75+
echo ' make release'
76+
exit 1
77+
- name: Perform CodeQL Analysis
78+
uses: github/codeql-action/analyze@v3
79+
with:
80+
category: "/language:${{matrix.language}}"
81+
82+
Build_Analyze_Android_Example:
83+
name: Analyze (${{ matrix.language }})
84+
runs-on: ubuntu-latest
85+
env:
86+
TURBO_CACHE_DIR: .turbo/android
87+
permissions:
88+
# required for all workflows
89+
security-events: write
90+
91+
# required to fetch internal or private CodeQL packs
92+
packages: read
93+
94+
# only required for workflows in private repositories
95+
actions: read
96+
contents: read
97+
98+
strategy:
99+
fail-fast: false
100+
matrix:
101+
include:
102+
- language: java-kotlin
103+
build-mode: manual
104+
105+
steps:
106+
- name: Checkout repository
107+
uses: actions/checkout@v4
108+
109+
# Add any setup steps before running the `github/codeql-action/init` action.
110+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
111+
# or others). This is typically only required for manual builds.
112+
# - name: Setup runtime (example)
113+
# uses: actions/setup-example@v1
114+
115+
- name: Setup
116+
uses: ./.github/actions/setup
117+
118+
- name: Install JDK
119+
if: env.turbo_cache_hit != 1
120+
uses: actions/setup-java@v3
121+
with:
122+
distribution: 'zulu'
123+
java-version: '17'
124+
125+
- name: Finalize Android SDK
126+
if: env.turbo_cache_hit !=1
127+
run: |
128+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
129+
130+
# Initializes the CodeQL tools for scanning.
131+
- name: Initialize CodeQL
132+
uses: github/codeql-action/init@v3
133+
with:
134+
languages: ${{ matrix.language }}
135+
build-mode: ${{ matrix.build-mode }}
136+
# If you wish to specify custom queries, you can do so here or in a config file.
137+
# By default, queries listed here will override any specified in a config file.
138+
# Prefix the list here with "+" to use these queries and those in the config file.
139+
140+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
141+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
142+
143+
- if: matrix.build-mode == 'manual'
144+
shell: bash
145+
run: |
146+
cd example
147+
yarn install
148+
cd android
149+
./gradlew clean
150+
151+
- name: Perform CodeQL Analysis
152+
uses: github/codeql-action/analyze@v3
153+
with:
154+
category: "/language:${{matrix.language}}"
155+
156+
Build_Analyze_iOS_Example:
157+
name: Analyze (${{ matrix.language }})
158+
timeout-minutes: 120
159+
env:
160+
TURBO_CACHE_DIR: .turbo/ios
161+
TURBO_TOKEN: ${{ secrets. TURBO_TOKEN }}
162+
TURBO_TEAM: ${{ secrets. TURBO_TEAM }}
163+
164+
runs-on: ${{ (matrix.language == 'swift' && 'macos-15') || 'ubuntu-latest' }}
165+
permissions:
166+
# required for all workflows
167+
security-events: write
168+
# required to fetch internal or private CodeQL packs
169+
packages: read
170+
# only required for workflows in private repositories
171+
actions: read
172+
contents: read
173+
174+
strategy:
175+
fail-fast: false
176+
matrix:
177+
include:
178+
- language: swift
179+
build-mode: manual
180+
181+
steps:
182+
- name: Checkout react-native-sdk
183+
uses: actions/checkout@v4
184+
185+
- name: Setup
186+
uses: ./.github/actions/setup
187+
188+
# Initializes the CodeQL tools for scanning.
189+
- name: Initialize CodeQL
190+
uses: github/codeql-action/init@v3
191+
with:
192+
languages: ${{ matrix.language }}
193+
build-mode: ${{ matrix.build-mode }}
194+
# If you wish to specify custom queries, you can do so here or in a config file.
195+
# By default, queries listed here will override any specified in a config file.
196+
# Prefix the list here with "+" to use these queries and those in the config file.
197+
198+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
199+
queries: ${{ matrix.language && 'security-extended, security-and-quality' }}
200+
201+
- if: matrix.build-mode == 'manual'
202+
shell: bash
203+
run: |
204+
cd example
205+
yarn install
206+
cd ios
207+
bundle install
208+
bundle exec pod install
209+
xcodebuild -workspace ReactNativeSdkExample.xcworkspace -scheme ReactNativeSdkExample -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16' build
210+
211+
- name: Perform CodeQL Analysis
212+
uses: github/codeql-action/analyze@v3
213+
with:
214+
category: "/language:${{matrix.language}}"

.github/workflows/deploy-docs.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Deploy Documentation to Netlify
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
types: [opened, synchronize, labeled, unlabeled]
10+
workflow_dispatch: # Allow manual triggering
11+
12+
jobs:
13+
deploy-docs:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
issues: write
19+
# Only run on master/main pushes or PRs with "documentation" label
20+
if: |
21+
github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') ||
22+
github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'documentation') ||
23+
github.event_name == 'workflow_dispatch'
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0 # Fetch full history for proper git info
30+
31+
- name: Setup
32+
uses: ./.github/actions/setup
33+
34+
- name: Build documentation
35+
run: yarn docs
36+
37+
- name: Determine deployment type
38+
id: deployment-type
39+
run: |
40+
if [[ "${{ github.event_name }}" == "push" ]]; then
41+
echo "type=production" >> $GITHUB_OUTPUT
42+
echo "message=Deploying to production site" >> $GITHUB_OUTPUT
43+
else
44+
echo "type=preview" >> $GITHUB_OUTPUT
45+
echo "message=Deploying preview for PR #${{ github.event.number }}" >> $GITHUB_OUTPUT
46+
fi
47+
48+
- name: Show deployment info
49+
run: |
50+
echo "🚀 ${{ steps.deployment-type.outputs.message }}"
51+
echo "Branch: ${{ github.ref_name }}"
52+
echo "Commit: ${{ github.sha }}"
53+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
54+
echo "Deployment alias: ${{ github.head_ref }}"
55+
fi
56+
57+
- name: Deploy to Netlify (Production)
58+
if: github.event_name == 'push'
59+
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654
60+
with:
61+
publish-dir: "./docs"
62+
production-branch: master
63+
github-token: ${{ secrets.GITHUB_TOKEN }}
64+
deploy-message: "${{ steps.deployment-type.outputs.message }}"
65+
enable-commit-comment: true
66+
env:
67+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
68+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
69+
70+
- name: Deploy to Netlify (Preview)
71+
if: github.event_name == 'pull_request'
72+
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0
73+
with:
74+
publish-dir: "./docs"
75+
production-branch: master
76+
github-token: ${{ secrets.GITHUB_TOKEN }}
77+
deploy-message: "${{ steps.deployment-type.outputs.message }}"
78+
alias: ${{ github.head_ref }}
79+
enable-pull-request-comment: true
80+
overwrites-pull-request-comment: true
81+
env:
82+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
83+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,6 @@ android/generated
8989
.xcode.env.local
9090
coverage/
9191
docs/
92+
93+
# Local Netlify folder
94+
.netlify

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
## 2.0.4
2+
3+
## Updates
4+
- Added API documentation via Netlify([1087275](https://github.com/Iterable/react-native-sdk/commit/1087275))
5+
- Removed dependency on `react-native-vector-icons`, per issues
6+
[#513](https://github.com/Iterable/react-native-sdk/issues/513),
7+
[#683](https://github.com/Iterable/react-native-sdk/issues/683) and
8+
[#675](https://github.com/Iterable/react-native-sdk/issues/675)
9+
([6ece6e0](https://github.com/Iterable/react-native-sdk/commit/6ece6e0))
10+
- Updated dependencies
11+
12+
## 2.0.3
13+
14+
### Updates
15+
- Add in-app message manager with lazy initialization to avoid circular dependency ([6feec35](https://github.com/Iterable/react-native-sdk/commit/6feec35))
16+
17+
### Fixes
18+
- Update Iterable-iOS-SDK to 6.5.4.1 to fix issue #701 (performAndWait) ([0bb4a24](https://github.com/Iterable/react-native-sdk/commit/0bb4a24)), closes [#701](https://github.com/Iterable/react-native-sdk/issues/701)
19+
- Update Xcode project configuration to include CocoaPods build phases and settings ([23a9e79](https://github.com/Iterable/react-native-sdk/commit/23a9e79))
20+
- Enable CodeQl Advanced Config ([7346e56](https://github.com/Iterable/react-native-sdk/commit/7346e56))
21+
- Upload coverage report to Qlty ([6872621](https://github.com/Iterable/react-native-sdk/commit/6872621))
22+
- Simplify IterableInAppManager usage in tests by directly accessing Iterable.inAppManager ([6deeae3](https://github.com/Iterable/react-native-sdk/commit/6deeae3))
23+
- Correct markdown link syntax in IterableInAppManager documentation ([78e22b2](https://github.com/Iterable/react-native-sdk/commit/78e22b2))
24+
25+
126
## 2.0.2
227
### Fixes
328
- Migrate AppDelegate to Swift and remove Objective-C files

Iterable-React-Native-SDK.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ Pod::Spec.new do |s|
3939
end
4040
end
4141

42-
s.dependency "Iterable-iOS-SDK", "6.5.4"
43-
42+
s.dependency "Iterable-iOS-SDK", "6.5.4.1"
43+
4444
end

0 commit comments

Comments
 (0)