@quiltt/core 3.9.4 → 3.9.6

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,17 @@
1
1
  # @quiltt/core
2
2
 
3
+ ## 3.9.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#328](https://github.com/quiltt/quiltt-js/pull/328) [`6b8751c`](https://github.com/quiltt/quiltt-js/commit/6b8751c981e9e74b347227bc9f427585d21870cd) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Updated QuilttConnector OAuth handler
8
+
9
+ ## 3.9.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [#325](https://github.com/quiltt/quiltt-js/pull/325) [`62b7323`](https://github.com/quiltt/quiltt-js/commit/62b732371a8d57242170e0ae838baa4ca8e78059) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Improve useSession and useStorage hooks
14
+
3
15
  ## 3.9.4
4
16
 
5
17
  ### Patch Changes
@@ -26,7 +26,7 @@ import { print } from 'graphql';
26
26
  if (typeof window === 'undefined' || typeof window.localStorage === 'undefined') return undefined;
27
27
  try {
28
28
  const state = window.localStorage.getItem(`quiltt.${key}`);
29
- return state ? JSON.parse(state) : state;
29
+ return state ? JSON.parse(state) : null;
30
30
  } catch (error) {
31
31
  console.warn(`localStorage Error: "quiltt.${key}"`, error);
32
32
  return undefined;
@@ -204,7 +204,7 @@ import { print } from 'graphql';
204
204
  */ const GlobalStorage = new Storage();
205
205
 
206
206
  var name = "@quiltt/core";
207
- var version$1 = "3.9.4";
207
+ var version$1 = "3.9.6";
208
208
 
209
209
  const QUILTT_API_INSECURE = (()=>{
210
210
  try {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ApolloLink, ApolloClient } from '@apollo/client/core/index.js';
2
2
  export { gql } from '@apollo/client/core/index.js';
3
- import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth } from './SubscriptionLink-client-CjPQ3_hI.js';
4
- export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-CjPQ3_hI.js';
3
+ import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth } from './SubscriptionLink-client-CnYvVR0v.js';
4
+ export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-CnYvVR0v.js';
5
5
  import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http/index.js';
6
6
  import crossfetch from 'cross-fetch';
7
7
  import { onError } from '@apollo/client/link/error/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/core",
3
- "version": "3.9.4",
3
+ "version": "3.9.6",
4
4
  "description": "Javascript API client and utilities for Quiltt",
5
5
  "keywords": [
6
6
  "quiltt",
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@biomejs/biome": "1.9.4",
44
- "@types/node": "22.10.5",
44
+ "@types/node": "22.13.10",
45
45
  "@types/rails__actioncable": "6.1.11",
46
46
  "@types/react": "18.3.12",
47
- "bunchee": "6.2.0",
47
+ "bunchee": "6.3.4",
48
48
  "rimraf": "6.0.1",
49
49
  "typescript": "5.7.3"
50
50
  },
@@ -2,7 +2,7 @@ import type { ApolloClientOptions, NormalizedCacheObject, Operation } from '@apo
2
2
  import { ApolloClient, ApolloLink } from '@apollo/client/core/index.js'
3
3
  import type { DefinitionNode, OperationDefinitionNode } from 'graphql'
4
4
 
5
- import { debugging } from '../../configuration'
5
+ import { debugging } from '@/configuration'
6
6
  import {
7
7
  AuthLink,
8
8
  BatchHttpLink,
@@ -1,5 +1,5 @@
1
- import type { Observer } from '../Observable'
2
- import type { Maybe } from '../types'
1
+ import type { Observer } from '@/Observable'
2
+ import type { Maybe } from '@/types'
3
3
 
4
4
  /**
5
5
  * An error and type safe wrapper for localStorage.
@@ -34,7 +34,7 @@ export class LocalStorage<T> {
34
34
 
35
35
  try {
36
36
  const state = window.localStorage.getItem(`quiltt.${key}`)
37
- return state ? JSON.parse(state) : state
37
+ return state ? (JSON.parse(state) as T) : null
38
38
  } catch (error) {
39
39
  console.warn(`localStorage Error: "quiltt.${key}"`, error)
40
40
  return undefined
@@ -1,7 +1,6 @@
1
- import type { Maybe } from '../types'
2
-
3
- import { Observable } from '../Observable'
4
- import type { Observer } from '../Observable'
1
+ import { Observable } from '@/Observable'
2
+ import type { Observer } from '@/Observable'
3
+ import type { Maybe } from '@/types'
5
4
 
6
5
  /**
7
6
  * This is designed to support effectively an in memory key value store singleton,
@@ -1,8 +1,7 @@
1
- import type { Maybe } from '../types'
2
-
3
- import type { Observer } from '../Observable'
4
- import { LocalStorage } from './Local'
5
- import { MemoryStorage } from './Memory'
1
+ import type { Observer } from '@/Observable'
2
+ import { LocalStorage } from '@/storage/Local'
3
+ import { MemoryStorage } from '@/storage/Memory'
4
+ import type { Maybe } from '@/types'
6
5
 
7
6
  /**
8
7
  * This is wraps both local and memory storage to create a unified interface, that