@quiltt/core 3.8.1 → 3.9.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,10 +1,27 @@
1
1
  # @quiltt/core
2
2
 
3
+ ## 3.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#307](https://github.com/quiltt/quiltt-js/pull/307) [`d0033cd`](https://github.com/quiltt/quiltt-js/commit/d0033cdbdaf33f9227afa55c9a6078156809a563) Thanks [@rubendinho](https://github.com/rubendinho)! - - Significantly reduce bundle size by migrating @apollo/client to "deep entrypoint import style"
8
+ - Bump @apollo/client to v3.11.8
9
+
10
+ ### Patch Changes
11
+
12
+ - [#305](https://github.com/quiltt/quiltt-js/pull/305) [`803a4d0`](https://github.com/quiltt/quiltt-js/commit/803a4d09e458ed2e72781fcd475ad5f9639f2bf2) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Optimize connector WebView implementation
13
+
14
+ ## 3.8.2
15
+
16
+ ### Patch Changes
17
+
18
+ - [#303](https://github.com/quiltt/quiltt-js/pull/303) [`d1ceb66`](https://github.com/quiltt/quiltt-js/commit/d1ceb6648f4c2747988f8d6cacbee9946beaea0c) Thanks [@rubendinho](https://github.com/rubendinho)! - Reduce bundle size
19
+
3
20
  ## 3.8.1
4
21
 
5
22
  ### Patch Changes
6
23
 
7
- - [#300](https://github.com/quiltt/quiltt-js/pull/300) [`a359810`](https://github.com/quiltt/quiltt-js/commit/a3598104565b4428beef9de37f85211e9caf465b)
24
+ - [#300](https://github.com/quiltt/quiltt-js/pull/300) [`a359810`](https://github.com/quiltt/quiltt-js/commit/a3598104565b4428beef9de37f85211e9caf465b)
8
25
  - Thanks [@zubairaziz](https://github.com/zubairaziz)! - Make @quiltt/react-native ESM only
9
26
 
10
27
  ## 3.8.0
@@ -1,5 +1,6 @@
1
1
  'use client';
2
- import { ApolloLink, Observable as Observable$1 } from '@apollo/client/core/index.js';
2
+ import { ApolloLink } from '@apollo/client/core';
3
+ import { Observable as Observable$1 } from '@apollo/client/utilities';
3
4
  import { createConsumer } from '@rails/actioncable';
4
5
  import { print } from 'graphql';
5
6
 
@@ -203,7 +204,7 @@ import { print } from 'graphql';
203
204
  */ const GlobalStorage = new Storage();
204
205
 
205
206
  var name = "@quiltt/core";
206
- var version$1 = "3.8.1";
207
+ var version$1 = "3.9.0";
207
208
 
208
209
  const QUILTT_API_INSECURE = (()=>{
209
210
  try {
package/dist/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
- import { ApolloLink, Operation, NextLink, Observable as Observable$1, FetchResult, ApolloClientOptions, ApolloClient } from '@apollo/client/index.js';
2
- export { ApolloError, InMemoryCache, NormalizedCacheObject, OperationVariables, gql, useMutation, useQuery, useSubscription } from '@apollo/client/index.js';
3
- import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http/index.js';
4
- import * as _apollo_client from '@apollo/client';
5
- import { HttpLink as HttpLink$1 } from '@apollo/client/link/http/index.js';
6
- import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry/index.js';
7
- import { ApolloLink as ApolloLink$1, Operation as Operation$1, NextLink as NextLink$1, Observable as Observable$2, FetchResult as FetchResult$1 } from '@apollo/client/core/index.js';
1
+ import * as _apollo_client_core from '@apollo/client/core';
2
+ import { ApolloLink, Operation, NextLink, FetchResult, ApolloClientOptions, ApolloClient } from '@apollo/client/core';
3
+ export { ApolloError, OperationVariables, gql } from '@apollo/client/core';
4
+ import { Observable as Observable$1 } from '@apollo/client/utilities';
5
+ import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http';
6
+ import { HttpLink as HttpLink$1 } from '@apollo/client/link/http';
7
+ import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry';
8
8
  import { Consumer } from '@rails/actioncable';
9
9
  import { Dispatch, SetStateAction } from 'react';
10
+ export { InMemoryCache, NormalizedCacheObject } from '@apollo/client/cache';
11
+ export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks';
10
12
 
11
13
  interface CallbackManager {
12
14
  onEvent(callback: ConnectorSDKOnEventCallback): void;
@@ -135,7 +137,7 @@ declare class AuthLink extends ApolloLink {
135
137
 
136
138
  declare const BatchHttpLink: BatchHttpLink$1;
137
139
 
138
- declare const ErrorLink: _apollo_client.ApolloLink;
140
+ declare const ErrorLink: _apollo_client_core.ApolloLink;
139
141
 
140
142
  declare const ForwardableLink: ApolloLink;
141
143
 
@@ -143,11 +145,11 @@ declare const HttpLink: HttpLink$1;
143
145
 
144
146
  declare const RetryLink: RetryLink$1;
145
147
 
146
- type RequestResult = FetchResult$1<{
148
+ type RequestResult = FetchResult<{
147
149
  [key: string]: unknown;
148
150
  }, Record<string, unknown>, Record<string, unknown>>;
149
- type ConnectionParams = object | ((operation: Operation$1) => object);
150
- declare class ActionCableLink extends ApolloLink$1 {
151
+ type ConnectionParams = object | ((operation: Operation) => object);
152
+ declare class ActionCableLink extends ApolloLink {
151
153
  cables: {
152
154
  [id: string]: Consumer;
153
155
  };
@@ -159,7 +161,7 @@ declare class ActionCableLink extends ApolloLink$1 {
159
161
  actionName?: string;
160
162
  connectionParams?: ConnectionParams;
161
163
  });
162
- request(operation: Operation$1, _next: NextLink$1): Observable$2<RequestResult> | null;
164
+ request(operation: Operation, _next: NextLink): Observable$1<RequestResult> | null;
163
165
  }
164
166
 
165
167
  declare class SubscriptionLink extends ActionCableLink {
package/dist/index.js CHANGED
@@ -1,12 +1,14 @@
1
- import { ApolloLink, ApolloClient } from '@apollo/client/index.js';
2
- export { InMemoryCache, gql, useMutation, useQuery, useSubscription } from '@apollo/client/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-DpChu6_6.js';
4
- export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-DpChu6_6.js';
5
- import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http/index.js';
1
+ import { ApolloLink, ApolloClient } from '@apollo/client/core';
2
+ export { gql } from '@apollo/client/core';
3
+ import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth } from './SubscriptionLink-client-DwoIOVtr.js';
4
+ export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-DwoIOVtr.js';
5
+ import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http';
6
6
  import crossfetch from 'cross-fetch';
7
- import { onError } from '@apollo/client/link/error/index.js';
8
- import { HttpLink as HttpLink$1 } from '@apollo/client/link/http/index.js';
9
- import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry/index.js';
7
+ import { onError } from '@apollo/client/link/error';
8
+ import { HttpLink as HttpLink$1 } from '@apollo/client/link/http';
9
+ import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry';
10
+ export { InMemoryCache } from '@apollo/client/cache';
11
+ export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks';
10
12
 
11
13
  /**
12
14
  * Enum representing the different types of events emitted by the Connector.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/core",
3
- "version": "3.8.1",
3
+ "version": "3.9.0",
4
4
  "description": "Javascript API client and utilities for Quiltt",
5
5
  "keywords": [
6
6
  "quiltt",
@@ -31,7 +31,7 @@
31
31
  "CHANGELOG.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@apollo/client": "^3.9.11",
34
+ "@apollo/client": "^3.11.8",
35
35
  "@rails/actioncable": "^7.2.200",
36
36
  "braces": "^3.0.3",
37
37
  "cross-fetch": "^4.0.0",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@biomejs/biome": "1.9.4",
43
- "@types/node": "22.9.0",
43
+ "@types/node": "22.10.2",
44
44
  "@types/rails__actioncable": "6.1.11",
45
45
  "@types/react": "18.3.12",
46
46
  "bunchee": "5.6.1",
@@ -1,5 +1,5 @@
1
- import type { ApolloClientOptions, Operation } from '@apollo/client/index.js'
2
- import { ApolloClient, ApolloLink } from '@apollo/client/index.js'
1
+ import type { ApolloClientOptions, Operation } from '@apollo/client/core'
2
+ import { ApolloClient, ApolloLink } from '@apollo/client/core'
3
3
 
4
4
  import { debugging } from '../../configuration'
5
5
  import {
@@ -44,9 +44,16 @@ export class QuilttClient<T> extends ApolloClient<T> {
44
44
  }
45
45
  }
46
46
 
47
- export { InMemoryCache, gql, useMutation, useQuery, useSubscription } from '@apollo/client/index.js'
48
- export type {
49
- NormalizedCacheObject,
50
- OperationVariables,
51
- ApolloError,
52
- } from '@apollo/client/index.js'
47
+ /**
48
+ /* Export Apollo GraphQL assets using deep-imports to prevent unnecessary imports
49
+ /* and make tree-shaking more effective
50
+ */
51
+
52
+ /** Client and Tooling */
53
+ export { gql } from '@apollo/client/core'
54
+ export { InMemoryCache } from '@apollo/client/cache'
55
+ export type { ApolloError, OperationVariables } from '@apollo/client/core'
56
+ export type { NormalizedCacheObject } from '@apollo/client/cache'
57
+
58
+ /** React hooks used by @quiltt/react-native and @quiltt/react */
59
+ export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks'
@@ -1,5 +1,7 @@
1
- import type { FetchResult, NextLink, Operation } from '@apollo/client/core/index.js'
2
- import { ApolloLink, Observable } from '@apollo/client/core/index.js'
1
+ import { ApolloLink } from '@apollo/client/core'
2
+ import { Observable } from '@apollo/client/utilities'
3
+ import type { FetchResult, NextLink, Operation } from '@apollo/client/core'
4
+
3
5
  import { createConsumer } from '@rails/actioncable'
4
6
  import type { Consumer } from '@rails/actioncable'
5
7
  import { print } from 'graphql'
@@ -1,5 +1,6 @@
1
- import type { FetchResult, NextLink, Observable, Operation } from '@apollo/client/index.js'
2
- import { ApolloLink } from '@apollo/client/index.js'
1
+ import { ApolloLink } from '@apollo/client/core'
2
+ import type { FetchResult, NextLink, Operation } from '@apollo/client/core'
3
+ import type { Observable } from '@apollo/client/utilities'
3
4
 
4
5
  import { GlobalStorage } from '@/storage'
5
6
 
@@ -1,4 +1,4 @@
1
- import { BatchHttpLink as ApolloHttpLink } from '@apollo/client/link/batch-http/index.js'
1
+ import { BatchHttpLink as ApolloHttpLink } from '@apollo/client/link/batch-http'
2
2
  import crossfetch from 'cross-fetch'
3
3
 
4
4
  import { endpointGraphQL } from '@/configuration'
@@ -1,7 +1,7 @@
1
1
  import { GlobalStorage } from '@/storage'
2
2
 
3
- import type { ServerError } from '@apollo/client/index.js'
4
- import { onError } from '@apollo/client/link/error/index.js'
3
+ import type { ServerError } from '@apollo/client/core'
4
+ import { onError } from '@apollo/client/link/error'
5
5
 
6
6
  export const ErrorLink = onError(({ graphQLErrors, networkError }) => {
7
7
  if (graphQLErrors) {
@@ -1,4 +1,4 @@
1
- import { ApolloLink } from '@apollo/client/index.js'
1
+ import { ApolloLink } from '@apollo/client/core'
2
2
 
3
3
  export const ForwardableLink = new ApolloLink((operation, forward) => forward(operation))
4
4
 
@@ -1,4 +1,4 @@
1
- import { HttpLink as ApolloHttpLink } from '@apollo/client/link/http/index.js'
1
+ import { HttpLink as ApolloHttpLink } from '@apollo/client/link/http'
2
2
  import crossfetch from 'cross-fetch'
3
3
 
4
4
  // Use `cross-fetch` only if `fetch` is not available on the `globalThis` object
@@ -1,4 +1,4 @@
1
- import { RetryLink as ApolloRetryLink } from '@apollo/client/link/retry/index.js'
1
+ import { RetryLink as ApolloRetryLink } from '@apollo/client/link/retry'
2
2
 
3
3
  export const RetryLink = new ApolloRetryLink({
4
4
  attempts: {
@@ -1,4 +1,4 @@
1
- import { ApolloLink } from '@apollo/client/index.js'
1
+ import { ApolloLink } from '@apollo/client/core'
2
2
 
3
3
  export const TerminatingLink = new ApolloLink(() => null)
4
4
 
@@ -1,4 +1,4 @@
1
- import { ApolloLink } from '@apollo/client/index.js'
1
+ import { ApolloLink } from '@apollo/client/core'
2
2
 
3
3
  import { version } from '@/configuration'
4
4