diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 55cbd5d..c118597 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,10 +18,6 @@ These instructions run the App in Fast Refresh mode so you can make changes and > Note: If you have trouble running `kepler build` try sourcing the environment first! > `source ~/.kepler/kntools/environment-setup-sdk.sh` -> Note: Right now the system is set to load the plugin from the tarball file in the root. If you make changes in the library itself you will have to `npm pack` to make sure it reloads everything! - -Future Work: package redirects just like in the core monorepo - ## Working on the Library The library itself is plain TS code. As such you can use any normal NPM commands. @@ -30,4 +26,4 @@ The library itself is plain TS code. As such you can use any normal NPM commands `npm pack # pack for sharing a release` -Note: Due to how Amazon Kepler gets injected currently this only supports Node v18 + NPM. Do not try to use Yarn/PNPM with this! +Note: Due to how Amazon Vega gets injected currently this only supports Node v18 + NPM. Do not try to use Yarn/PNPM with this! diff --git a/README.md b/README.md index c9b163d..55bbad3 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ # @segment/analytics-react-native-plugin-kepler -This plugin contains support for Amazon Kepler as a platform for React Native apps. +This plugin contains support for Amazon Vega as a platform for React Native apps. ## Install Install the dependencies for this package: -`npm install react-native-uuid @amzn/react-native-device-info @segment/analytics-react-native@beta` +`npm install react-native-uuid @amazon-devices/react-native-device-info @segment/analytics-react-native@beta` -Then install this package from tarball (Pending Public Release): +Then install this package from npm registry -`npm install segment-analytics-react-native-plugin-kepler-0.1.0.tgz` +`npm install @segment/analytics-react-native-plugin-kepler` Now create you client as follows: ```ts // Import the createClient method from the plugin instead of the core package! -// This automatically sets up all the storage and providers specifically for Amazon Kepler platform +// This automatically sets up all the storage and providers specifically for Amazon Vega platform import { createClient } from "@segment/analytics-react-native-plugin-kepler"; const segmentClient = createClient({ @@ -30,7 +30,7 @@ See the [main readme](https://github.com/segmentio/analytics-react-native/blob/c ## Limitations -- `@amzn/react-native-device-info` does not currently support accessing all the device information such as app name and version, screen dimensions, OS versions, locale, etc. Some information inside the context will be set to `unknown` or empty values. These will come online as Amazon starts adding this information in future package releases. +- `@amazon-devices/react-native-device-info` does not currently support accessing all the device information such as app name and version, screen dimensions, OS versions, locale, etc. Some information inside the context will be set to `unknown` or empty values. These will come online as Amazon starts adding this information in future package releases. - `trackDeepLinks` option is not supported. - `Native AnonymousId` is not supported diff --git a/RELEASE.md b/RELEASE.md index 0b94ab7..7ecd260 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -6,5 +6,5 @@ To create a manual relase: 1. Update the version number of the package by running `npm version --patch` or manually in `package.json` 2. `npm run build` -3. Run `npm pack` -4. Share the tarball file +3. Run `npm publish --dry-run` to make sure everything is cool +4. and then `npm publish` diff --git a/analytics-react-native-plugin-kepler.code-workspace b/analytics-react-native-plugin-kepler.code-workspace deleted file mode 100644 index 645e5c8..0000000 --- a/analytics-react-native-plugin-kepler.code-workspace +++ /dev/null @@ -1,11 +0,0 @@ -{ - "folders": [ - { - "path": "." - }, - { - "path": "example" - } - ], - "settings": {} -} \ No newline at end of file diff --git a/example/package.json b/example/package.json index b44f797..7ce6fea 100644 --- a/example/package.json +++ b/example/package.json @@ -16,16 +16,16 @@ "release": "npm-run-all lint test compile" }, "dependencies": { - "@amzn/react-native-device-info": "^2.0.0", - "@amzn/react-native-kepler": "~2.0.0", + "@amazon-devices/react-native-device-info": "^2.0.0", + "@amazon-devices/react-native-kepler": "~2.0.0", "@segment/analytics-react-native": "2.20.0-beta.2", - "@segment/analytics-react-native-plugin-kepler": "file:../segment-analytics-react-native-plugin-kepler-0.3.0.tgz", + "@segment/analytics-react-native-plugin-kepler": "^0", "react": "18.2.0", "react-native": "0.72.0", "react-native-uuid": "^2.0.2" }, "devDependencies": { - "@amzn/kepler-cli-platform": "^0", + "@amazon-devices/kepler-cli-platform": "^0", "@babel/core": "^7.20.0", "@babel/runtime": "^7.20.0", "@babel/traverse": "7.22.8", diff --git a/package.json b/package.json index fbbaac6..6197852 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@segment/analytics-react-native-plugin-kepler", - "private": true, - "version": "0.4.0", + "private": false, + "version": "1.0.0", "description": "The hassle-free way to add Segment analytics to your React-Native app for Amazon Kepler", "main": "lib/commonjs/index", "scripts": { @@ -45,16 +45,16 @@ }, "homepage": "https://github.com/segmentio/analytics-react-native/tree/master/packages/plugins/plugin-amplitudeSession#readme", "peerDependencies": { - "@amzn/react-native-device-info": "^2.0.0", - "@amzn/react-native-kepler": "~2.0.0", + "@amazon-devices/react-native-device-info": "^2.0.0", + "@amazon-devices/react-native-kepler": "~2.0.0", "@segment/analytics-react-native": "2.20.0-beta.2", - "@amzn/react-native-localize": "~2.0.0", + "@amazon-devices/react-native-localize": "~2.0.0", "react-native-uuid": "^2.0.2", "react-native": "*", - "@react-native-async-storage/async-storage": "npm:@amzn/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.0.0" }, "overrides": { - "@react-native-async-storage/async-storage": "npm:@amzn/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.0.0" }, "devDependencies": { "@segment/analytics-react-native": "2.20.0-beta.2", diff --git a/segment-analytics-react-native-plugin-kepler-0.1.0.tgz b/segment-analytics-react-native-plugin-kepler-0.1.0.tgz deleted file mode 100644 index cae9072..0000000 Binary files a/segment-analytics-react-native-plugin-kepler-0.1.0.tgz and /dev/null differ diff --git a/segment-analytics-react-native-plugin-kepler-0.2.0.tgz b/segment-analytics-react-native-plugin-kepler-0.2.0.tgz deleted file mode 100644 index 23ce2e3..0000000 Binary files a/segment-analytics-react-native-plugin-kepler-0.2.0.tgz and /dev/null differ diff --git a/segment-analytics-react-native-plugin-kepler-0.3.0.tgz b/segment-analytics-react-native-plugin-kepler-0.3.0.tgz deleted file mode 100644 index 822548e..0000000 Binary files a/segment-analytics-react-native-plugin-kepler-0.3.0.tgz and /dev/null differ diff --git a/segment-analytics-react-native-plugin-kepler-0.4.0.tgz b/segment-analytics-react-native-plugin-kepler-0.4.0.tgz deleted file mode 100644 index 08a4f5e..0000000 Binary files a/segment-analytics-react-native-plugin-kepler-0.4.0.tgz and /dev/null differ diff --git a/src/device-info.ts b/src/device-info.ts index 0fc5a44..483615c 100644 --- a/src/device-info.ts +++ b/src/device-info.ts @@ -1,4 +1,4 @@ -import DeviceInfo from '@amzn/react-native-device-info'; +import DeviceInfo from '@amazon-devices/react-native-device-info'; import { getApplicationName, getVersion, @@ -6,8 +6,8 @@ import { getBundleId, getSystemVersion, getModel -} from "@amzn/react-native-device-info"; -import { getCountry, getTimeZone } from '@amzn/react-native-localize'; +} from "@amazon-devices/react-native-device-info"; +import { getCountry, getTimeZone } from '@amazon-devices/react-native-localize'; import { DeviceInfoProvider } from '@segment/analytics-react-native'; export const deviceInfoProvider: DeviceInfoProvider = async (config) => {