Skip to content

Commit f2e9d44

Browse files
Fix CI
1 parent aa42c0d commit f2e9d44

7 files changed

Lines changed: 64 additions & 41 deletions

File tree

.trunk/trunk.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ runtimes:
88
enabled:
99
- go@1.19.5
1010
- java@13.0.11
11-
- node@18.12.1
11+
# markdownlint 0.48+ / string-width need Node 20+ (regex v flag)
12+
- node@20.18.0
1213
- python@3.10.8
1314
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
1415
lint:
@@ -40,10 +41,12 @@ lint:
4041
- actionlint@1.6.9
4142
- checkov@3.2.507
4243
- dotenv-linter@3.3.0
43-
- eslint@10.0.2
44+
# ESLint 9+ defaults to flat config only; this repo uses .eslintrc.js (ESLint 8 style).
45+
- eslint@8.57.1
4446
- git-diff-check
4547
- ktlint@0.43.2
46-
- markdownlint@0.48.0
48+
# 0.48+ pulls string-width that requires Node 20+ for regex /v; Trunk's runner uses Node 18.
49+
- markdownlint@0.39.0
4750
- mparticle-api-key-check
4851
- osv-scanner@1.3.6
4952
- oxipng@7.0.0

ExpoTestApp/App.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -221,25 +221,25 @@ export default function App() {
221221

222222
const handleRoktShoppableAds = () => {
223223
const attributes = {
224-
country: "US",
225-
shippingstate: "NY",
226-
shippingzipcode: "10001",
227-
firstname: "Jenny",
228-
stripeApplePayAvailable: "true",
229-
last4digits: "4444",
230-
shippingaddress1: "123 Main St",
231-
colormode: "LIGHT",
232-
billingzipcode: "07762",
233-
paymenttype: "ApplePay",
234-
shippingcountry: "US",
235-
sandbox: "true",
236-
shippingaddress2: "Apt 4B",
237-
confirmationref: "ORD-12345",
238-
shippingcity: "New York",
239-
newToApplePay: "false",
240-
applePayCapabilities: "true",
241-
lastname: "Smith",
242-
email: "jenny.smith@example.com"
224+
country: 'US',
225+
shippingstate: 'NY',
226+
shippingzipcode: '10001',
227+
firstname: 'Jenny',
228+
stripeApplePayAvailable: 'true',
229+
last4digits: '4444',
230+
shippingaddress1: '123 Main St',
231+
colormode: 'LIGHT',
232+
billingzipcode: '07762',
233+
paymenttype: 'ApplePay',
234+
shippingcountry: 'US',
235+
sandbox: 'true',
236+
shippingaddress2: 'Apt 4B',
237+
confirmationref: 'ORD-12345',
238+
shippingcity: 'New York',
239+
newToApplePay: 'false',
240+
applePayCapabilities: 'true',
241+
lastname: 'Smith',
242+
email: 'jenny.smith@example.com',
243243
};
244244

245245
const config = MParticle.Rokt.createRoktConfig('system');

ExpoTestApp/README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,12 @@ Example (same pattern as `ExpoTestApp/App.tsx`):
106106
const config = MParticle.Rokt.createRoktConfig('system');
107107

108108
MParticle.Rokt.selectShoppableAds('YOUR_PLACEMENT_ID', attributes, config)
109-
.then(() => { /* success */ })
110-
.catch((error) => { /* handle */ });
109+
.then(() => {
110+
/* success */
111+
})
112+
.catch(error => {
113+
/* handle */
114+
});
111115
```
112116

113117
Listen for `RoktCallback` and `RoktEvents` on `RoktEventManager` to observe load/unload and Shoppable Ads–related events emitted by the native bridge.
@@ -277,16 +281,16 @@ dependencies {
277281

278282
## Plugin Configuration Options
279283

280-
| Option | Type | Description |
281-
|--------|------|-------------|
282-
| `iosApiKey` | string | mParticle iOS API key |
283-
| `iosApiSecret` | string | mParticle iOS API secret |
284-
| `androidApiKey` | string | mParticle Android API key |
285-
| `androidApiSecret` | string | mParticle Android API secret |
286-
| `logLevel` | string | Log level: `none`, `error`, `warning`, `debug`, `verbose` |
287-
| `environment` | string | Environment: `development`, `production`, `autoDetect` |
288-
| `useEmptyIdentifyRequest` | boolean | Initialize with empty identify request (default: true) |
289-
| `dataPlanId` | string | Data plan ID for validation |
290-
| `dataPlanVersion` | number | Data plan version |
291-
| `iosKits` | string[] | iOS kit pod names (e.g., `["mParticle-Rokt"]`) |
292-
| `androidKits` | string[] | Android kit dependencies (e.g., `["android-rokt-kit"]`) |
284+
| Option | Type | Description |
285+
| ------------------------- | -------- | --------------------------------------------------------- |
286+
| `iosApiKey` | string | mParticle iOS API key |
287+
| `iosApiSecret` | string | mParticle iOS API secret |
288+
| `androidApiKey` | string | mParticle Android API key |
289+
| `androidApiSecret` | string | mParticle Android API secret |
290+
| `logLevel` | string | Log level: `none`, `error`, `warning`, `debug`, `verbose` |
291+
| `environment` | string | Environment: `development`, `production`, `autoDetect` |
292+
| `useEmptyIdentifyRequest` | boolean | Initialize with empty identify request (default: true) |
293+
| `dataPlanId` | string | Data plan ID for validation |
294+
| `dataPlanVersion` | number | Data plan version |
295+
| `iosKits` | string[] | iOS kit pod names (e.g., `["mParticle-Rokt"]`) |
296+
| `androidKits` | string[] | Android kit dependencies (e.g., `["android-rokt-kit"]`) |

android/src/oldarch/java/com/mparticle/react/NativeMPRoktSpec.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ abstract class NativeMPRoktSpec(
2121
fontFilesMap: ReadableMap?,
2222
)
2323

24+
abstract fun selectShoppableAds(
25+
identifier: String,
26+
attributes: ReadableMap?,
27+
roktConfig: ReadableMap?,
28+
)
29+
2430
abstract fun purchaseFinalized(
2531
placementId: String,
2632
catalogItemId: String,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"dependencies": {},
3838
"peerDependencies": {
3939
"react": ">= 16.0.0-alpha.12",
40-
"react-native": ">= 0.45.0",
40+
"react-native": ">= 0.76.0",
4141
"@expo/config-plugins": ">=7.0.0"
4242
},
4343
"peerDependenciesMeta": {

plugin/src/withMParticleIOS.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,12 @@ function addMParticleToObjcAppDelegate(
338338
* These are dependencies of mParticle kits that must also be dynamic frameworks
339339
*/
340340
const KIT_TRANSITIVE_DEPENDENCIES: Record<string, string[]> = {
341-
'mParticle-Rokt': ['Rokt-Widget', 'RoktContracts', 'RoktUXHelper', 'DcuiSchema'],
341+
'mParticle-Rokt': [
342+
'Rokt-Widget',
343+
'RoktContracts',
344+
'RoktUXHelper',
345+
'DcuiSchema',
346+
],
342347
// Add other kit dependencies here as needed
343348
// "mParticle-Amplitude": [],
344349
// "mParticle-Braze": [],
@@ -348,7 +353,11 @@ const KIT_TRANSITIVE_DEPENDENCIES: Record<string, string[]> = {
348353
* Get all pods that need dynamic framework linking
349354
*/
350355
function getDynamicFrameworkPods(iosKits?: string[]): string[] {
351-
const pods = ['mParticle-Apple-SDK', 'mParticle-Apple-SDK-ObjC', 'mParticle-Apple-SDK-Swift'];
356+
const pods = [
357+
'mParticle-Apple-SDK',
358+
'mParticle-Apple-SDK-ObjC',
359+
'mParticle-Apple-SDK-Swift',
360+
];
352361

353362
if (iosKits) {
354363
for (const kit of iosKits) {

sample/ios/Podfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ require Pod::Executable.execute_command('node', ['-p',
55
{paths: [process.argv[1]]},
66
)', __dir__]).strip
77

8-
platform :ios, min_ios_version_supported
8+
# react-native-mparticle.podspec requires iOS 15.6+; RN's min_ios_version_supported is still 15.1.
9+
platform :ios, '15.6'
910
prepare_react_native_project!
1011

1112
pre_install do |installer|

0 commit comments

Comments
 (0)