Skip to content

Commit 6251e40

Browse files
authored
Merge branch 'main' into chore/add-secuirity-md
2 parents 283211d + 919c83c commit 6251e40

File tree

185 files changed

+13969
-10512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+13969
-10512
lines changed

.eslintrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* eslint-env node */
2+
module.exports = {
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended',
7+
],
8+
parser: '@typescript-eslint/parser',
9+
plugins: ['@typescript-eslint'],
10+
rules: {
11+
'@typescript-eslint/no-explicit-any': 'off', // Disable the no-explicit-any rule
12+
},
13+
ignorePatterns: [
14+
'lib/',
15+
'sample/',
16+
'android/',
17+
'ios/',
18+
'*.min.js',
19+
'node_modules/',
20+
],
21+
env: {
22+
node: true,
23+
es6: true,
24+
},
25+
parserOptions: {
26+
ecmaVersion: 2020,
27+
sourceType: 'module',
28+
},
29+
};

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @mParticle/sdk-team

.github/dependabot.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@ updates:
44
directory: "/android"
55
schedule:
66
interval: daily
7-
labels: ["dependabot"]
7+
labels:
8+
- dependabot
89
open-pull-requests-limit: 10
910
ignore:
1011
- dependency-name: "com.google.firebase:firebase-messaging"
1112
commit-message:
1213
prefix: "chore"
14+
- package-ecosystem: github-actions
15+
directory: /
16+
schedule:
17+
interval: weekly
18+
open-pull-requests-limit: 4
19+
labels:
20+
- dependabot
21+
commit-message:
22+
prefix: "chore"

.github/workflows/pull-request.yml

Lines changed: 109 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,28 @@ on:
66
workflow_call:
77
workflow_dispatch:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
pull-requests: read
16+
checks: write
17+
id-token: write
18+
919
jobs:
1020
js-tests:
1121
name: "JS Tests"
12-
runs-on: macOS-latest
22+
runs-on: ubuntu-latest
1323
steps:
1424
- name: "Checkout"
1525
uses: actions/checkout@v4
16-
- uses: actions/setup-node@master
17-
- uses: c-hive/gha-yarn-cache@v2
26+
- uses: actions/[email protected]
27+
with:
28+
node-version: 18
29+
cache: yarn
30+
cache-dependency-path: yarn.lock
1831

1932
- name: "Install node modules"
2033
run: |
@@ -35,25 +48,114 @@ jobs:
3548
run: ./gradlew test
3649

3750
android-lint:
38-
name: "Android Unit Tests"
51+
name: "Android Lint"
3952
runs-on: ubuntu-latest
4053
steps:
4154
- name: "Checkout"
4255
uses: actions/checkout@v4
43-
- name: "Run Android Unit Tests"
56+
- name: "Run Android lint"
4457
working-directory: android
4558
run: ./gradlew lint
4659

4760
android-kotlin-lint:
48-
name: "Android Unit Tests"
61+
name: "Android kotlin lint"
4962
runs-on: ubuntu-latest
5063
steps:
5164
- name: "Checkout"
5265
uses: actions/checkout@v4
53-
- name: "Run Android Unit Tests"
66+
- name: "Run Android kotlin lint"
5467
working-directory: android
5568
run: ./gradlew ktlintCheck
5669

70+
android-sample-app:
71+
name: Android Sample App
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v4
76+
- uses: actions/[email protected]
77+
with:
78+
node-version: 18
79+
cache: yarn
80+
cache-dependency-path: yarn.lock
81+
82+
- name: Install node modules
83+
run: yarn install
84+
85+
- name: Build package
86+
run: yarn dev:pack
87+
88+
- name: Install sample app dependencies
89+
working-directory: sample
90+
run: |
91+
rm -f yarn.lock
92+
yarn install
93+
94+
- name: Run Android sample app
95+
working-directory: sample/android
96+
run: ./gradlew assembleDebug
97+
98+
ios-sample-app:
99+
name: iOS Sample App
100+
runs-on: macos-15
101+
steps:
102+
- name: Checkout
103+
uses: actions/checkout@v4
104+
- uses: actions/[email protected]
105+
with:
106+
node-version: 18
107+
cache: yarn
108+
cache-dependency-path: yarn.lock
109+
110+
- name: Set up Xcode
111+
uses: maxim-lobanov/[email protected]
112+
with:
113+
xcode-version: 16.3
114+
115+
- name: Install node modules
116+
run: yarn install
117+
118+
- name: Build package
119+
run: yarn dev:pack
120+
121+
- name: Install sample app dependencies
122+
working-directory: sample
123+
run: |
124+
rm -f yarn.lock
125+
yarn install
126+
127+
- name: Install Ruby dependencies
128+
working-directory: sample
129+
run: bundle install
130+
131+
- name: Build iOS sample app
132+
working-directory: sample/ios
133+
run: |
134+
bundle exec pod install
135+
set -o pipefail && xcodebuild -workspace MParticleSample.xcworkspace \
136+
-configuration Debug \
137+
-scheme MParticleSample \
138+
-destination 'platform=iOS Simulator,name=iPhone 16' \
139+
-derivedDataPath ios/build \
140+
-UseModernBuildSystem=YES \
141+
build | bundle exec xcpretty -k
142+
143+
pr-notify:
144+
if: >
145+
github.event_name == 'pull_request' &&
146+
github.event.pull_request.draft == false
147+
needs:
148+
- android-unit-tests
149+
- android-lint
150+
- android-kotlin-lint
151+
- android-sample-app
152+
- ios-sample-app
153+
- js-tests
154+
name: Notify GChat
155+
uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main
156+
secrets:
157+
gchat_webhook: ${{ secrets.GCHAT_PRS_WEBHOOK }}
158+
57159
automerge-dependabot:
58160
name: "Save PR Number for Dependabot Automerge"
59161
needs: [ js-tests, android-unit-tests, android-lint, android-kotlin-lint ]

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
## Build generated
66
build/
77
DerivedData/
8+
.yarn/
89
*.DS_Store
910

1011
## Various settings
@@ -78,3 +79,9 @@ build
7879
.gradle
7980
local.properties
8081
package-lock.json
82+
83+
# TypeScript build output
84+
lib/
85+
86+
# Development package
87+
*.tgz

.npmignore

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,66 @@
1-
sample
1+
# Sample app
2+
sample/
3+
4+
# Android build artifacts and libs
5+
android/libs/
6+
android/build/
7+
android/src/test/
8+
android/.gradle/
9+
android/local.properties
10+
android/.idea/
11+
android/.kotlin/
12+
android/gradlew
13+
android/gradlew.bat
14+
android/gradle.properties
15+
android/gradle/
16+
17+
# iOS build artifacts
18+
ios/build/
19+
ios/RNMParticle.xcodeproj/xcuserdata/
20+
ios/RNMParticle.xcodeproj/xcshareddata/
21+
ios/RNMParticle.xcodeproj/project.xcworkspace/
22+
23+
# Dependencies
24+
node_modules/
25+
26+
# IDE files
27+
.idea/
28+
.vscode/
29+
.trunk/
30+
*.iml
31+
*.iws
32+
33+
# OS files
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Git
38+
.git/
39+
.github/
40+
.gitignore
41+
42+
# Logs
43+
*.log
44+
npm-debug.log*
45+
yarn-debug.log*
46+
yarn-error.log*
47+
48+
# Other
49+
.gradle/
50+
.trunk/
51+
*.tgz
52+
*.tar.gz
53+
54+
# Heavy binary files
55+
*.jar
56+
57+
# Development files
58+
package-lock.json
59+
yarn.lock
60+
tsconfig.json
61+
release.sh
62+
dev-link.sh
63+
.prettierrc.js
64+
.eslintrc.js
65+
metro.config.js
66+
ONBOARDING.md

.prettierrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
bracketSpacing: true,
3+
singleQuote: true,
4+
trailingComma: 'es5',
5+
tabWidth: 2,
6+
useTabs: false,
7+
semi: true,
8+
bracketSameLine: false,
9+
arrowParens: 'avoid',
10+
printWidth: 80
11+
};

0 commit comments

Comments
 (0)