@quiltt/core 3.8.2 → 3.9.1

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,22 @@
1
1
  # @quiltt/core
2
2
 
3
+ ## 3.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#310](https://github.com/quiltt/quiltt-js/pull/310) [`86b39ac`](https://github.com/quiltt/quiltt-js/commit/86b39ac7015fcf21d1c1962df1a76f84c2af9801) Thanks [@rubendinho](https://github.com/rubendinho)! - Added explicit file extensions to import statements to comply with strict ESM module resolution.
8
+
9
+ ## 3.9.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#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"
14
+ - Bump @apollo/client to v3.11.8
15
+
16
+ ### Patch Changes
17
+
18
+ - [#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
19
+
3
20
  ## 3.8.2
4
21
 
5
22
  ### Patch Changes
@@ -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/index.js';
3
+ import { Observable as Observable$1 } from '@apollo/client/utilities/index.js';
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.2";
207
+ var version$1 = "3.9.1";
207
208
 
208
209
  const QUILTT_API_INSECURE = (()=>{
209
210
  try {
package/dist/index.d.ts CHANGED
@@ -1,12 +1,18 @@
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';
1
+ import { ApolloLink, ApolloClient } from '@apollo/client/core/index.js';
2
+ export { gql } from '@apollo/client/core/index.js';
3
+ import * as _apollo_client_core from '@apollo/client/core';
4
+ import { Operation, NextLink, FetchResult, ApolloClientOptions } from '@apollo/client/core';
5
+ export { ApolloError, OperationVariables } from '@apollo/client/core';
6
+ import { Observable as Observable$1 } from '@apollo/client/utilities';
3
7
  import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http/index.js';
4
- import * as _apollo_client from '@apollo/client';
5
8
  import { HttpLink as HttpLink$1 } from '@apollo/client/link/http/index.js';
6
9
  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';
10
+ import { Observable as Observable$2 } from '@apollo/client/utilities/index.js';
8
11
  import { Consumer } from '@rails/actioncable';
9
12
  import { Dispatch, SetStateAction } from 'react';
13
+ export { InMemoryCache } from '@apollo/client/cache/index.js';
14
+ export { NormalizedCacheObject } from '@apollo/client/cache';
15
+ export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks/index.js';
10
16
 
11
17
  interface CallbackManager {
12
18
  onEvent(callback: ConnectorSDKOnEventCallback): void;
@@ -135,7 +141,7 @@ declare class AuthLink extends ApolloLink {
135
141
 
136
142
  declare const BatchHttpLink: BatchHttpLink$1;
137
143
 
138
- declare const ErrorLink: _apollo_client.ApolloLink;
144
+ declare const ErrorLink: _apollo_client_core.ApolloLink;
139
145
 
140
146
  declare const ForwardableLink: ApolloLink;
141
147
 
@@ -143,11 +149,11 @@ declare const HttpLink: HttpLink$1;
143
149
 
144
150
  declare const RetryLink: RetryLink$1;
145
151
 
146
- type RequestResult = FetchResult$1<{
152
+ type RequestResult = FetchResult<{
147
153
  [key: string]: unknown;
148
154
  }, Record<string, unknown>, Record<string, unknown>>;
149
- type ConnectionParams = object | ((operation: Operation$1) => object);
150
- declare class ActionCableLink extends ApolloLink$1 {
155
+ type ConnectionParams = object | ((operation: Operation) => object);
156
+ declare class ActionCableLink extends ApolloLink {
151
157
  cables: {
152
158
  [id: string]: Consumer;
153
159
  };
@@ -159,7 +165,7 @@ declare class ActionCableLink extends ApolloLink$1 {
159
165
  actionName?: string;
160
166
  connectionParams?: ConnectionParams;
161
167
  });
162
- request(operation: Operation$1, _next: NextLink$1): Observable$2<RequestResult> | null;
168
+ request(operation: Operation, _next: NextLink): Observable$2<RequestResult> | null;
163
169
  }
164
170
 
165
171
  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-Cm-b-MAk.js';
4
- export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-Cm-b-MAk.js';
1
+ import { ApolloLink, ApolloClient } from '@apollo/client/core/index.js';
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-C6YiQ8Q3.js';
4
+ export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-C6YiQ8Q3.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';
8
8
  import { HttpLink as HttpLink$1 } from '@apollo/client/link/http/index.js';
9
9
  import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry/index.js';
10
+ export { InMemoryCache } from '@apollo/client/cache/index.js';
11
+ export { useMutation, useQuery, useSubscription } from '@apollo/client/react/hooks/index.js';
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.2",
3
+ "version": "3.9.1",
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 { ApolloClient, ApolloLink } from '@apollo/client/core/index.js'
2
+ import type { ApolloClientOptions, Operation } 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/index.js'
54
+ export { InMemoryCache } from '@apollo/client/cache/index.js'
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/index.js'
@@ -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/index.js'
2
+ import { Observable } from '@apollo/client/utilities/index.js'
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/index.js'
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,7 +1,7 @@
1
1
  import { GlobalStorage } from '@/storage'
2
2
 
3
- import type { ServerError } from '@apollo/client/index.js'
4
3
  import { onError } from '@apollo/client/link/error/index.js'
4
+ import type { ServerError } from '@apollo/client/core'
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/index.js'
2
2
 
3
3
  export const ForwardableLink = new ApolloLink((operation, forward) => forward(operation))
4
4
 
@@ -1,4 +1,4 @@
1
- import { ApolloLink } from '@apollo/client/index.js'
1
+ import { ApolloLink } from '@apollo/client/core/index.js'
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/index.js'
2
2
 
3
3
  import { version } from '@/configuration'
4
4