Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ This plugin contains support for Amazon Vega as a platform for React Native apps

Install the dependencies for this package:

`npm install react-native-uuid @amazon-devices/react-native-device-info @segment/analytics-react-native@beta`
```
npm install react-native-uuid \
@amazon-devices/react-native-device-info@2.1.9000000000-rn-83 \
@amazon-devices/react-native-localize@2.1.9000000000-rn-83 \
"@react-native-async-storage/async-storage@npm:@amazon-devices/react-native-async-storage__async-storage@2.1.9000000000-rn-83" \
@segment/analytics-react-native
```

Then install this package from npm registry
Then install this package from npm registry:

`npm install @segment/analytics-react-native-plugin-kepler`

> **React Native 0.83 / Vega SDK 0.24:** Use plugin version `^2.0.0`. If your app is still on RN 0.72 / Vega SDK ≤0.19, pin to plugin version `^1.0.0`.

Now create you client as follows:

```ts
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
2 changes: 1 addition & 1 deletion example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO LICENSE TERMS.
*/
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
55 changes: 30 additions & 25 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,42 @@
"release": "npm-run-all lint test compile"
},
"dependencies": {
"@amazon-devices/react-native-device-info": "^2.0.0",
"@amazon-devices/react-native-kepler": "~2.0.0",
"@amazon-devices/react-native-device-info": "2.1.9000000000-rn-83",
"@amazon-devices/react-native-kepler": "4.0.0",
"@amazon-devices/react-native-localize": "2.1.9000000000-rn-83",
"@react-native-async-storage/async-storage": "npm:@amazon-devices/react-native-async-storage__async-storage@2.1.9000000000-rn-83",
"@segment/analytics-react-native": "2.20.0-beta.2",
"@segment/analytics-react-native-plugin-kepler": "^0",
"react": "18.2.0",
"react-native": "0.72.0",
"@segment/analytics-react-native-plugin-kepler": "^2.0.0",
"react": "18.3.1",
"react-native": "0.83.0",
"react-native-uuid": "^2.0.2"
},
"overrides": {
"@react-native-async-storage/async-storage": "npm:@amazon-devices/react-native-async-storage__async-storage@2.1.9000000000-rn-83"
},
"devDependencies": {
"@amazon-devices/kepler-cli-platform": "^0",
"@babel/core": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@babel/traverse": "7.22.8",
"@react-native-community/cli": "11.3.2",
"@react-native/eslint-config": "0.72.2",
"@react-native/metro-config": "^0.72.6",
"@testing-library/react-native": "^7.2.0",
"@types/jest": "^28.0.0",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"babel-jest": "^28.0.0",
"eslint": "^8.12.0",
"jest": "^28.0.0",
"metro-react-native-babel-preset": "^0.76.5",
"@amazon-devices/kepler-cli-platform": "^0.24.0",
"@babel/core": "^7.23.0",
"@babel/runtime": "^7.23.0",
"@babel/traverse": "^7.23.0",
"@react-native-community/cli": "^14.0.0",
"@react-native/babel-preset": "^0.83.0",
"@react-native/eslint-config": "^0.83.0",
"@react-native/metro-config": "^0.83.0",
"@testing-library/react-native": "^12.0.0",
"@types/jest": "^29.5.0",
"@types/react": "^18.3.0",
"@types/react-test-renderer": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"babel-jest": "^29.7.0",
"eslint": "^8.56.0",
"jest": "^29.7.0",
"mustache": "^4.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.6.2",
"react-test-renderer": "18.2.0",
"ts-jest": "^28.0.0",
"typescript": "4.8.4"
"prettier": "^2.8.8",
"react-test-renderer": "18.3.1",
"ts-jest": "^29.1.0",
"typescript": "5.0.4"
},
"kepler": {
"projectType": "application",
Expand Down
10 changes: 7 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
const baseConfig = require('@segment/analytics-rn-shared/jest.config.base');

module.exports = {
...baseConfig,
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
};
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@segment/analytics-react-native-plugin-kepler",
"private": false,
"version": "1.0.0",
"version": "2.0.0",
"description": "The hassle-free way to add Segment analytics to your React-Native app for Amazon Kepler",
"main": "lib/commonjs/index",
"scripts": {
"build": "bob build",
"test": "jest",
"test": "jest --passWithNoTests",
"typescript": "tsc --noEmit",
"clean": "rimraf lib node_modules"
},
Expand Down Expand Up @@ -45,17 +45,17 @@
},
"homepage": "https://github.com/segmentio/analytics-react-native/tree/master/packages/plugins/plugin-amplitudeSession#readme",
"peerDependencies": {
"@amazon-devices/react-native-device-info": "^2.0.0",
"@amazon-devices/react-native-kepler": "~2.0.0",
"@amazon-devices/react-native-device-info": "2.1.9000000000-rn-83",
"@amazon-devices/react-native-kepler": "4.0.0",
"@segment/analytics-react-native": "2.20.0-beta.2",
"@amazon-devices/react-native-localize": "~2.0.0",
"@amazon-devices/react-native-localize": "2.1.9000000000-rn-83",
"react-native-uuid": "^2.0.2",
"react-native": "*",
"@react-native-async-storage/async-storage": "npm:@amazon-devices/react-native-async-storage__async-storage@~2.0.0"
"@react-native-async-storage/async-storage": "npm:@amazon-devices/react-native-async-storage__async-storage@2.1.9000000000-rn-83"
},
"overrides": {
"@react-native-async-storage/async-storage": "npm:@amazon-devices/react-native-async-storage__async-storage@~2.0.0"
},
"@react-native-async-storage/async-storage": "npm:@amazon-devices/react-native-async-storage__async-storage@2.1.9000000000-rn-83"
},
"devDependencies": {
"@segment/analytics-react-native": "2.20.0-beta.2",
"@types/jest": "^29.5.8",
Expand All @@ -64,22 +64,21 @@
"typescript": "^5.2.2",
"@babel/core": "^7.23.3",
"@babel/runtime": "^7.23.2",
"@react-native/eslint-config": "^0.73.2",
"@react-native/babel-preset": "^0.83.0",
"@react-native/eslint-config": "^0.83.0",
"@types/node": "^20.9.1",
"@types/react": "^18.2.37",
"@types/react-native": "0.72.6",
"@types/react": "^18.3.0",
"@types/uuid": "^9.0.7",
"babel-jest": "^29.7.0",
"commitlint": "^18.4.2",
"conventional-changelog-conventionalcommits": "^7.0.2",
"eslint": "^8.56.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"metro-react-native-babel-preset": "^0.77.0",
"prettier": "^2.8.8",
"react": "18.2.0",
"react-native": "^0.72.0",
"react-native-builder-bob": "^0.23.1",
"react": "18.3.1",
"react-native": "^0.83.0",
"react-native-builder-bob": "^0.30.0",
"react-native-uuid": "^2.0.2"
},
"react-native-builder-bob": {
Expand Down