@quiltt/react-native 4.0.0 → 4.1.0

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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @quiltt/react-native
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#342](https://github.com/quiltt/quiltt-js/pull/342) [`6a387ba`](https://github.com/quiltt/quiltt-js/commit/6a387ba0db77912df85c6cd1924f63edf50f9cdd) Thanks [@sirwolfgang](https://github.com/sirwolfgang)! - Create useQuilttInstitutions hook
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`6a387ba`](https://github.com/quiltt/quiltt-js/commit/6a387ba0db77912df85c6cd1924f63edf50f9cdd)]:
12
+ - @quiltt/react@4.1.0
13
+ - @quiltt/core@4.1.0
14
+
15
+ ## 4.0.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#343](https://github.com/quiltt/quiltt-js/pull/343) [`da152b7`](https://github.com/quiltt/quiltt-js/commit/da152b7f42606defde5f55488632bcdc095be592) Thanks [@sirwolfgang](https://github.com/sirwolfgang)! - Add the ability to set nonce for the Quiltt SDK Script
20
+
21
+ - Updated dependencies [[`da152b7`](https://github.com/quiltt/quiltt-js/commit/da152b7f42606defde5f55488632bcdc095be592)]:
22
+ - @quiltt/react@4.0.1
23
+ - @quiltt/core@4.0.1
24
+
3
25
  ## 4.0.0
4
26
 
5
27
  ### Major Changes
package/dist/index.d.ts CHANGED
@@ -25,4 +25,5 @@ declare const QuilttConnector: {
25
25
  displayName: string;
26
26
  };
27
27
 
28
- export { type PreFlightCheck, QuilttConnector, checkConnectorUrl, handleOAuthUrl };
28
+ export { QuilttConnector, checkConnectorUrl, handleOAuthUrl };
29
+ export type { PreFlightCheck };
package/dist/index.js CHANGED
@@ -4,34 +4,30 @@ import { useQuilttSession, ConnectorSDKEventType } from '@quiltt/react';
4
4
  export { QuilttAuthProvider, QuilttProvider, QuilttSettingsProvider, useQuilttClient, useQuilttConnector, useQuilttSession, useQuilttSettings, useSession, useStorage } from '@quiltt/react';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
  import { useRef, useState, useCallback, useMemo, useEffect } from 'react';
7
- import { StyleSheet, Platform, StatusBar, SafeAreaView, View, Text, Pressable, ActivityIndicator, Linking } from 'react-native';
7
+ import { StyleSheet, StatusBar, Platform, SafeAreaView, View, Text, Pressable, ActivityIndicator, Linking } from 'react-native';
8
8
  import { URL } from 'react-native-url-polyfill';
9
9
  import { WebView } from 'react-native-webview';
10
10
  import { generateStackTrace, makeBacktrace, getCauses } from '@honeybadger-io/core/build/src/util';
11
11
 
12
- var version = "4.0.0";
12
+ var version = "4.1.0";
13
13
 
14
- const ErrorReporterConfig = {
15
- honeybadger_api_key: 'undefined'
16
- };
17
-
18
- // Quick hack to send error to Honeybadger to debug why the connector is not routable
14
+ // Custom Error Reporter to avoid hooking into or colliding with a client's Honeybadger singleton
19
15
  const notifier = {
20
16
  name: 'Quiltt React Native SDK Reporter',
21
- url: 'https://www.quiltt.dev/guides/connector/react-native',
17
+ url: 'https://www.quiltt.dev/connector/sdk/react-native',
22
18
  version: version
23
19
  };
24
20
  class ErrorReporter {
25
21
  constructor(platform){
26
22
  this.noticeUrl = 'https://api.honeybadger.io/v1/notices';
27
- this.apiKey = ErrorReporterConfig.honeybadger_api_key;
23
+ this.apiKey = process.env.HONEYBADGER_API_KEY_REACT_NATIVE || '';
28
24
  this.clientName = 'react-native-sdk';
29
25
  this.clientVersion = version;
30
26
  this.platform = platform;
31
27
  this.logger = console;
32
28
  this.userAgent = `${this.clientName} ${this.clientVersion}; ${this.platform}`;
33
29
  }
34
- async send(error, context) {
30
+ async notify(error, context) {
35
31
  const headers = {
36
32
  'X-API-Key': this.apiKey,
37
33
  'Content-Type': 'application/json',
@@ -287,7 +283,7 @@ const checkConnectorUrl = async (connectorUrl, retryCount = 0)=>{
287
283
  connectorUrl,
288
284
  responseStatus
289
285
  };
290
- if (responseStatus !== 404) await errorReporter.send(errorToSend, context);
286
+ if (responseStatus !== 404) await errorReporter.notify(errorToSend, context);
291
287
  return {
292
288
  checked: true,
293
289
  error: errorMessage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/react-native",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "React Native Components for Quiltt Connector",
5
5
  "homepage": "https://github.com/quiltt/quiltt-js/tree/main/packages/react-native#readme",
6
6
  "repository": {
@@ -30,15 +30,15 @@
30
30
  "dependencies": {
31
31
  "@honeybadger-io/core": "6.6.0",
32
32
  "lodash.debounce": "4.0.8",
33
- "@quiltt/react": "4.0.0",
34
- "@quiltt/core": "4.0.0"
33
+ "@quiltt/core": "4.1.0",
34
+ "@quiltt/react": "4.1.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@biomejs/biome": "1.9.4",
38
38
  "@types/base-64": "1.0.2",
39
39
  "@types/lodash.debounce": "4.0.9",
40
- "@types/node": "22.13.10",
41
- "@types/react": "18.3.12",
40
+ "@types/node": "22.14.1",
41
+ "@types/react": "18.3.20",
42
42
  "base-64": "1.0.0",
43
43
  "bunchee": "6.3.4",
44
44
  "react": "18.3.1",
@@ -46,7 +46,7 @@
46
46
  "react-native-url-polyfill": "2.0.0",
47
47
  "react-native-webview": "13.12.5",
48
48
  "rimraf": "6.0.1",
49
- "typescript": "5.7.3"
49
+ "typescript": "5.8.2"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "base-64": "^1.0.0",
@@ -63,8 +63,7 @@
63
63
  "access": "public"
64
64
  },
65
65
  "scripts": {
66
- "addApiKey": "node scripts/addApiKey.js",
67
- "build": "pnpm run addApiKey && bunchee",
66
+ "build": "bunchee",
68
67
  "clean": "rimraf .turbo dist",
69
68
  "dev": "bunchee --watch",
70
69
  "lint": "TIMING=1 biome check src/ tests/ --fix",
@@ -54,7 +54,7 @@ export const checkConnectorUrl = async (
54
54
  const errorMessage = getErrorMessage(responseStatus, error as Error)
55
55
  const errorToSend = (error as Error) || new Error(errorMessage)
56
56
  const context = { connectorUrl, responseStatus }
57
- if (responseStatus !== 404) await errorReporter.send(errorToSend, context)
57
+ if (responseStatus !== 404) await errorReporter.notify(errorToSend, context)
58
58
  return { checked: true, error: errorMessage }
59
59
  }
60
60
  }
@@ -1,13 +1,12 @@
1
- // Quick hack to send error to Honeybadger to debug why the connector is not routable
1
+ // Custom Error Reporter to avoid hooking into or colliding with a client's Honeybadger singleton
2
2
  import type { Notice, NoticeTransportPayload } from '@honeybadger-io/core/build/src/types'
3
3
  import { generateStackTrace, getCauses, makeBacktrace } from '@honeybadger-io/core/build/src/util'
4
4
 
5
5
  import { version } from '@/version'
6
- import { ErrorReporterConfig } from './ErrorReporterConfig'
7
6
 
8
7
  const notifier = {
9
8
  name: 'Quiltt React Native SDK Reporter',
10
- url: 'https://www.quiltt.dev/guides/connector/react-native',
9
+ url: 'https://www.quiltt.dev/connector/sdk/react-native',
11
10
  version: version,
12
11
  }
13
12
 
@@ -26,7 +25,7 @@ class ErrorReporter {
26
25
 
27
26
  constructor(platform: string) {
28
27
  this.noticeUrl = 'https://api.honeybadger.io/v1/notices'
29
- this.apiKey = ErrorReporterConfig.honeybadger_api_key
28
+ this.apiKey = process.env.HONEYBADGER_API_KEY_REACT_NATIVE || ''
30
29
  this.clientName = 'react-native-sdk'
31
30
  this.clientVersion = version
32
31
  this.platform = platform
@@ -34,7 +33,7 @@ class ErrorReporter {
34
33
  this.userAgent = `${this.clientName} ${this.clientVersion}; ${this.platform}`
35
34
  }
36
35
 
37
- async send(error: Error, context?: any): Promise<void> {
36
+ async notify(error: Error, context?: any): Promise<void> {
38
37
  const headers = {
39
38
  'X-API-Key': this.apiKey,
40
39
  'Content-Type': 'application/json',
@@ -1,3 +0,0 @@
1
- export const ErrorReporterConfig = {
2
- honeybadger_api_key: 'undefined',
3
- }