Skip to content

Commit 0ea0a1a

Browse files
chore(SDK-122): upgrade react-native-builder-bob to 0.43
Align bob across workspaces and migrate Metro to react-native-monorepo-config with the iterable-react-native-sdk-source export condition. Also set CI=true for the circular lefthook command (same as SDK-121) until that fix lands on master. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 05c8e67 commit 0ea0a1a

6 files changed

Lines changed: 1563 additions & 931 deletions

File tree

example/metro.config.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
const path = require('path');
22
const { getDefaultConfig } = require('@react-native/metro-config');
3-
const { getConfig } = require('react-native-builder-bob/metro-config');
4-
const pkg = require('../package.json');
5-
6-
const root = path.resolve(__dirname, '..');
3+
const { withMetroConfig } = require('react-native-monorepo-config');
74

85
/**
96
* Metro configuration
107
* https://facebook.github.io/metro/docs/configuration
118
*
129
* @type {import('@react-native/metro-config').MetroConfig}
1310
*/
14-
module.exports = getConfig(getDefaultConfig(__dirname), {
15-
root,
16-
pkg,
17-
project: __dirname,
11+
module.exports = withMetroConfig(getDefaultConfig(__dirname), {
12+
root: path.resolve(__dirname, '..'),
13+
dirname: __dirname,
14+
conditions: ['iterable-react-native-sdk-source'],
1815
});

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
"@types/jest": "^29.5.13",
3737
"@types/react": "^19.2.0",
3838
"@types/react-test-renderer": "^19.1.0",
39-
"react-native-builder-bob": "^0.30.2",
39+
"react-native-builder-bob": "^0.43.0",
4040
"react-native-dotenv": "^3.4.11",
41+
"react-native-monorepo-config": "^0.4.0",
4142
"react-test-renderer": "19.2.3"
4243
},
4344
"engines": {

lefthook.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ pre-commit:
99
run: npx tsc
1010
circular:
1111
glob: "src/**/*.{ts,tsx}"
12+
env:
13+
CI: "true"
1214
run: yarn check:circular
1315
# version-check:
1416
# glob: "package.json"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "@iterable/react-native-sdk",
33
"version": "3.0.1",
44
"description": "Iterable SDK for React Native.",
5-
"source": "./src/index.tsx",
65
"main": "./lib/module/index.js",
76
"types": "./lib/typescript/src/index.d.ts",
87
"exports": {
98
".": {
9+
"iterable-react-native-sdk-source": "./src/index.tsx",
1010
"types": "./lib/typescript/src/index.d.ts",
1111
"default": "./lib/module/index.js"
1212
},
@@ -99,7 +99,7 @@
9999
"prettier-eslint": "^16.4.2",
100100
"react": "19.2.3",
101101
"react-native": "0.85.3",
102-
"react-native-builder-bob": "^0.40.4",
102+
"react-native-builder-bob": "^0.43.0",
103103
"react-native-gesture-handler": "^2.30.0",
104104
"react-native-safe-area-context": "^5.6.0",
105105
"react-native-screens": ">=4.19.0 <4.25.0",

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"paths": {
55
"@iterable/react-native-sdk": ["./src/index"]
66
},
7+
"customConditions": ["iterable-react-native-sdk-source"],
78
"allowUnreachableCode": false,
89
"allowUnusedLabels": false,
910
"esModuleInterop": true,

0 commit comments

Comments
 (0)