pusher-js 8.0.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/node/pusher.js +2 -2
- package/dist/react-native/pusher.js +2 -13
- package/dist/react-native/pusher.js.map +1 -1
- package/dist/web/pusher-with-encryption.js +2 -2
- package/dist/web/pusher-with-encryption.min.js +2 -2
- package/dist/web/pusher.js +2 -2
- package/dist/web/pusher.min.js +2 -2
- package/dist/worker/pusher-with-encryption.worker.js +4 -4
- package/dist/worker/pusher-with-encryption.worker.js.map +1 -1
- package/dist/worker/pusher-with-encryption.worker.min.js +2 -2
- package/dist/worker/pusher-with-encryption.worker.min.js.map +1 -1
- package/dist/worker/pusher.worker.js +4 -4
- package/dist/worker/pusher.worker.js.map +1 -1
- package/dist/worker/pusher.worker.min.js +2 -2
- package/dist/worker/pusher.worker.min.js.map +1 -1
- package/package.json +1 -1
- package/src/runtimes/react-native/runtime.ts +1 -2
- package/src/runtimes/worker/auth/fetch_auth.ts +1 -1
- package/src/runtimes/worker/runtime.ts +1 -1
- package/webpack/config.react-native.js +1 -1
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import { Network } from './net_info';
|
|
|
4
4
|
import xhrAuth from 'isomorphic/auth/xhr_auth';
|
|
5
5
|
import { AuthTransports } from 'core/auth/auth_transports';
|
|
6
6
|
import xhrTimeline from 'isomorphic/timeline/xhr_timeline';
|
|
7
|
-
import { randomInt } from 'crypto';
|
|
8
7
|
|
|
9
8
|
// Very verbose but until unavoidable until
|
|
10
9
|
// TypeScript 2.1, when spread attributes will be
|
|
@@ -59,7 +58,7 @@ const ReactNative: Runtime = {
|
|
|
59
58
|
},
|
|
60
59
|
|
|
61
60
|
randomInt(max: number): number {
|
|
62
|
-
return
|
|
61
|
+
return Math.floor(Math.random() * max);
|
|
63
62
|
}
|
|
64
63
|
};
|
|
65
64
|
|
|
@@ -62,7 +62,7 @@ const Worker: Runtime = {
|
|
|
62
62
|
* Return values in the range of [0, 1[
|
|
63
63
|
*/
|
|
64
64
|
const random = function() {
|
|
65
|
-
const crypto =
|
|
65
|
+
const crypto = globalThis.crypto || globalThis['msCrypto'];
|
|
66
66
|
const random = crypto.getRandomValues(new Uint32Array(1))[0];
|
|
67
67
|
|
|
68
68
|
return random / 2 ** 32;
|