From 7d5d487f7215186fce0158c0bb74ee64d17e87b1 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 23 May 2022 16:53:09 -0400 Subject: [PATCH 1/5] Update LICENSE, gitignore --- .gitignore | 4 ---- LICENSE | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9101ea19..3b2cf12c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ - # See https://help.github.com/ignore-files/ for more about ignoring files. # dependencies @@ -20,6 +19,3 @@ dist npm-debug.log* yarn-debug.log* yarn-error.log* - -# NPM README file -package/README.md diff --git a/LICENSE b/LICENSE index c05c7d33..48fd45d9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Modified MIT License -Copyright 2021 OneSignal +Copyright 2022 OneSignal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From ab01f918dcc78dd720916c715345509467383eac Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 23 May 2022 16:56:06 -0400 Subject: [PATCH 2/5] README, tsconfig nits tsconfig should have been building to the `dist` directory --- README.md | 2 +- tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dde9823c..84b7d1d0 100644 --- a/README.md +++ b/README.md @@ -201,4 +201,4 @@ Special thanks to [pedro-lb](https://github.com/pedro-lb) and others for work on -Enjoy! \ No newline at end of file +Enjoy! diff --git a/tsconfig.json b/tsconfig.json index 54357654..683d4e95 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "outDir": "build", + "outDir": "dist", "module": "esnext", "target": "es6", "lib": ["es6", "dom", "es2016", "es2017"], From 42b0a01e71959273ecb14233d1e3e09da29a6c0a Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 23 May 2022 16:57:48 -0400 Subject: [PATCH 3/5] Update index.ts Motivation: resolves #70 - typescript compiler error if argument is passed into the callback --- index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.ts b/index.ts index c51031d6..2d0be009 100644 --- a/index.ts +++ b/index.ts @@ -121,9 +121,9 @@ interface IInitObject { interface IOneSignal { init(options: IInitObject): Promise - on(event: string, listener: () => void): void - off(event: string, listener: () => void): void - once(event: string, listener: () => void): void + on(event: string, listener: (eventData?: any) => void): void + off(event: string, listener: (eventData?: any) => void): void + once(event: string, listener: (eventData?: any) => void): void isPushNotificationsEnabled(callback?: Action): Promise showHttpPrompt(options?: AutoPromptOptions): Promise registerForPushNotifications(options?: RegisterOptions): Promise @@ -162,7 +162,7 @@ interface IOneSignal { - function on(event: string, listener: () => void): void { + function on(event: string, listener: (eventData?: any) => void): void { if (!doesOneSignalExist()) { reactOneSignalFunctionQueue.push({ name: 'on', @@ -176,7 +176,7 @@ interface IOneSignal { }); } - function off(event: string, listener: () => void): void { + function off(event: string, listener: (eventData?: any) => void): void { if (!doesOneSignalExist()) { reactOneSignalFunctionQueue.push({ name: 'off', @@ -190,7 +190,7 @@ interface IOneSignal { }); } - function once(event: string, listener: () => void): void { + function once(event: string, listener: (eventData?: any) => void): void { if (!doesOneSignalExist()) { reactOneSignalFunctionQueue.push({ name: 'once', From b2a93a5837723c2c80e53a153ae426ac5634f941 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Tue, 24 May 2022 11:28:08 -0400 Subject: [PATCH 4/5] Update example app --- example/src/onesignal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/src/onesignal.js b/example/src/onesignal.js index 0dcd2e59..6b01ce65 100644 --- a/example/src/onesignal.js +++ b/example/src/onesignal.js @@ -1,6 +1,6 @@ import OneSignal from 'react-onesignal'; export default async function runOneSignal() { - await OneSignal.init({ appId: 'bb8fb3ed-6c11-4dc4-b026-83d3d29e45ee'}); + await OneSignal.init({ appId: 'bb8fb3ed-6c11-4dc4-b026-83d3d29e45ee', allowLocalhostAsSecureOrigin: true}); OneSignal.showSlidedownPrompt(); } \ No newline at end of file From 0075739182fa07184e019b0dac2c5fe7c3c30771 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 23 May 2022 16:58:02 -0400 Subject: [PATCH 5/5] 2.0.4 Release Commit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 60f28b90..b23e190e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-onesignal", - "version": "2.0.3", + "version": "2.0.4", "description": "React OneSignal Module: Make it easy to integrate OneSignal with your React App!", "author": "rgomezp", "contributors": [{ "name": "Rodrigo Gomez-Palacio" }, { "name": "Pedro Bini" }, { "name": "Graham Marlow" }],