Skip to content

Commit

Permalink
Merge pull request #3 from rn-bridge/test_cases
Browse files Browse the repository at this point in the history
added test cases
  • Loading branch information
sriharshamadamanchi authored Aug 18, 2024
2 parents 075649f + 3e415e9 commit b3c366b
Show file tree
Hide file tree
Showing 8 changed files with 2,547 additions and 368 deletions.
7 changes: 5 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset']
};
presets: [
['module:react-native-builder-bob/babel-preset', { modules: 'commonjs' }],
],
};

15 changes: 12 additions & 3 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset']
};
const path = require('path');
const { getConfig } = require('react-native-builder-bob/babel-config');
const pkg = require('../package.json');

const root = path.resolve(__dirname, '..');

module.exports = getConfig(
{
presets: ['module:@react-native/babel-preset']
},
{ root, pkg }
);
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-geofencing (0.1.0):
- react-native-geofencing (0.6.0):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -1757,7 +1757,7 @@ SPEC CHECKSUMS:
React-logger: 0a81d1a40650bbdafb255fe4616edb83feed0ee9
React-Mapbuffer: b758bec0d9994c10a2841dfd5ec70673665fd3e2
React-microtasksnativemodule: f25dba9c8c3f8be0b3368d52b99abd6e381dee1d
react-native-geofencing: c0c458b20c341c78435f659f075b6347ceec5f5a
react-native-geofencing: 8ae5d2d171423a4f6f6d91735440d6b42465debd
React-nativeconfig: 7af2ccce165f86b233a9f9d63295f6207e62640e
React-NativeModulesApple: db1c1ee9dda26c9e58d824b4100fed83add82ae9
React-perflogger: 7c4e97b47d8bc58c03fad1a6b97d96181b59aa41
Expand Down
14 changes: 7 additions & 7 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"react-native": "0.75.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.75.1",
"@react-native/metro-config": "0.75.1",
"@react-native/typescript-config": "0.75.1",
"react-native-builder-bob": "^0.29.1"
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "^0.75.1",
"@react-native/metro-config": "^0.75.1",
"@react-native/typescript-config": "^0.75.1",
"react-native-builder-bob": "^0.30.0"
},
"engines": {
"node": ">=18"
Expand Down
60 changes: 30 additions & 30 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/preset-env@npm:^7.20.0, @babel/preset-env@npm:^7.25.2":
"@babel/preset-env@npm:^7.25.2, @babel/preset-env@npm:^7.25.3":
version: 7.25.3
resolution: "@babel/preset-env@npm:7.25.3"
dependencies:
Expand Down Expand Up @@ -1551,7 +1551,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.8.4":
"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.25.0, @babel/runtime@npm:^7.8.4":
version: 7.25.0
resolution: "@babel/runtime@npm:7.25.0"
dependencies:
Expand Down Expand Up @@ -2039,7 +2039,7 @@ __metadata:
languageName: node
linkType: hard

"@react-native/babel-preset@npm:0.75.1":
"@react-native/babel-preset@npm:0.75.1, @react-native/babel-preset@npm:^0.75.1":
version: 0.75.1
resolution: "@react-native/babel-preset@npm:0.75.1"
dependencies:
Expand Down Expand Up @@ -2186,7 +2186,7 @@ __metadata:
languageName: node
linkType: hard

"@react-native/metro-config@npm:0.75.1":
"@react-native/metro-config@npm:^0.75.1":
version: 0.75.1
resolution: "@react-native/metro-config@npm:0.75.1"
dependencies:
Expand All @@ -2205,7 +2205,7 @@ __metadata:
languageName: node
linkType: hard

"@react-native/typescript-config@npm:0.75.1":
"@react-native/typescript-config@npm:^0.75.1":
version: 0.75.1
resolution: "@react-native/typescript-config@npm:0.75.1"
checksum: 831025b476fece79a91e6f6ada4bfbc8c7de3f32149c1c9d64b1bc2ad43bb5ebe1eaf738fb53761cd648d1a546a52fa552b0836e20868ed12c41ace8c10daa4c
Expand Down Expand Up @@ -2233,15 +2233,15 @@ __metadata:
version: 0.0.0-use.local
resolution: "@rn-bridge/react-native-geofencing-example@workspace:."
dependencies:
"@babel/core": ^7.20.0
"@babel/preset-env": ^7.20.0
"@babel/runtime": ^7.20.0
"@react-native/babel-preset": 0.75.1
"@react-native/metro-config": 0.75.1
"@react-native/typescript-config": 0.75.1
"@babel/core": ^7.25.2
"@babel/preset-env": ^7.25.3
"@babel/runtime": ^7.25.0
"@react-native/babel-preset": ^0.75.1
"@react-native/metro-config": ^0.75.1
"@react-native/typescript-config": ^0.75.1
react: 18.3.1
react-native: 0.75.1
react-native-builder-bob: ^0.29.1
react-native-builder-bob: ^0.30.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2328,11 +2328,11 @@ __metadata:
linkType: hard

"@types/node@npm:*":
version: 22.3.0
resolution: "@types/node@npm:22.3.0"
version: 22.4.0
resolution: "@types/node@npm:22.4.0"
dependencies:
undici-types: ~6.18.2
checksum: a86a552e9d3e135da4c975aa73bb1a655ae94f4d8de1547f6f95ad6b244ae2156347548fd35b6a5dd2c65688694198ae8b0923d9c32264dbc3dbfb2f688bd147
undici-types: ~6.19.2
checksum: 680303e9b2801f3e19453957df93f59e7ad95e2277a363ba3719e9a3e0c8949ed9bed2265a2a3444254c5e550170177c088bc2b2303eb79740fb8ee96b097ad3
languageName: node
linkType: hard

Expand Down Expand Up @@ -3228,9 +3228,9 @@ __metadata:
linkType: hard

"electron-to-chromium@npm:^1.5.4":
version: 1.5.8
resolution: "electron-to-chromium@npm:1.5.8"
checksum: b9200c76fdeb4fc47deb3ea08e2eee65fa86dcc69ce4c78b0ff944b78ecca5635e39e68a2c0bbea40c2fac2893dd73e06ff9fb8df07fd33ea16432cd2dc5d05b
version: 1.5.11
resolution: "electron-to-chromium@npm:1.5.11"
checksum: 9dbf480ff39005b3c9657e6b8df534a4597d0747472f2982315cc169024ebfb45f99b16dd57d8be4a51a063f14590f9f585f179e55f68591f870f38b9a5e491a
languageName: node
linkType: hard

Expand Down Expand Up @@ -3555,9 +3555,9 @@ __metadata:
linkType: hard

"flow-parser@npm:0.*":
version: 0.243.0
resolution: "flow-parser@npm:0.243.0"
checksum: e95c931196e502aed946b95e03d6561940db6c200d94b02623e47ac4bd92643f3b3d166c53db4b2133de00b6f750c51fae6874ef34528e35f81f3e11a2a1d0da
version: 0.244.0
resolution: "flow-parser@npm:0.244.0"
checksum: 0d714d18c82d6cbefc556c306970af4710e77a17de78848e5a03a55207116719d9947f4ccba4666c13409e23bd9cbba2bcf45eb92cb55dd0e0b08747576c1b02
languageName: node
linkType: hard

Expand Down Expand Up @@ -5693,9 +5693,9 @@ __metadata:
languageName: node
linkType: hard

"react-native-builder-bob@npm:^0.29.1":
version: 0.29.1
resolution: "react-native-builder-bob@npm:0.29.1"
"react-native-builder-bob@npm:^0.30.0":
version: 0.30.0
resolution: "react-native-builder-bob@npm:0.30.0"
dependencies:
"@babel/core": ^7.25.2
"@babel/plugin-transform-strict-mode": ^7.24.7
Expand All @@ -5721,7 +5721,7 @@ __metadata:
yargs: ^17.5.1
bin:
bob: bin/bob
checksum: 9325ee6b9a41e59e8a0add825318d6c7830b9b2fec1f98c485f722ef60128240146eced878e494c17699cef8ae0cdc92788384f718bcf38078d865969cff6c14
checksum: fe4092547308d946756f0c41b1cde970781d00e22d8f3ae235a3d0e3ab8e7c8dfcb2e3b313af593986d07c672058b071f9f7397284b548139d4b9dc81f1b7a7e
languageName: node
linkType: hard

Expand Down Expand Up @@ -6567,10 +6567,10 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.18.2":
version: 6.18.2
resolution: "undici-types@npm:6.18.2"
checksum: 5cd9b1c0fc612603c7ba0f0c6a19d04f00d21b98c5a9da06dc3bf92f1f9d3ec3946322e9806ec0f2fbfbad3f248cde1988410fc30ffacee39693ac24078992ca
"undici-types@npm:~6.19.2":
version: 6.19.6
resolution: "undici-types@npm:6.19.6"
checksum: e66df2447b6d93a48b0605a54269d8c3f228edcd1e9563229f6de37e48ed53b3e49b4bc965733643ed9717e0e0fa1ee664c929db91d787c9f488fb3f9e17c533
languageName: node
linkType: hard

Expand Down
52 changes: 40 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name": "@rn-bridge/react-native-geofencing",
"version": "0.5.0",
"version": "0.6.0",
"description": "Native modules to determine if a location is within defined geographical boundaries",
"main": "./src/index.tsx",
"source": "./src/index.tsx",
"main": "./lib/commonjs/index.js",
"module": "./lib/module/index.js",
"types": "./src/types/index.d.ts",
"files": [
"src",
Expand All @@ -22,8 +24,10 @@
"!**/.*"
],
"scripts": {
"test": "jest",
"typecheck": "tsc",
"lint": "eslint \"**/*.{js,ts,tsx}\""
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"prepare": "bob build"
},
"keywords": [
"react-native",
Expand All @@ -49,24 +53,30 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@react-native/eslint-config": "^0.73.1",
"@types/react": "^18.2.44",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"prettier": "^3.0.3",
"@react-native/eslint-config": "^0.75.1",
"@types/jest": "^29.5.12",
"@types/react": "^18.3.3",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"prettier": "^3.3.3",
"react": "18.3.1",
"react-native": "0.75.1",
"turbo": "^1.10.7",
"typescript": "^5.2.2"
"react-native-builder-bob": "^0.30.0",
"turbo": "^2.0.14",
"typescript": "^5.5.4"
},
"resolutions": {
"@types/react": "^18.2.44"
"@types/react": "^18.3.3"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"jest": {
"preset": "react-native"
},
"packageManager": "yarn@3.6.1",
"eslintConfig": {
"root": true,
Expand All @@ -88,5 +98,23 @@
}
]
}
},
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
[
"commonjs",
{
"esm": true
}
],
[
"module",
{
"esm": true
}
]
]
}
}
Loading

0 comments on commit b3c366b

Please sign in to comment.