@checkstack/frontend-api 0.2.0 → 0.3.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,28 @@
1
1
  # @checkstack/frontend-api
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [83557c7]
8
+ - @checkstack/common@0.4.0
9
+
10
+ ## 0.3.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 4eed42d: Fix "No QueryClient set" error in containerized builds
15
+
16
+ **Problem**: The containerized application was throwing "No QueryClient set, use QueryClientProvider to set one" errors during plugin registration. This didn't happen in dev mode.
17
+
18
+ **Root Cause**: The `@tanstack/react-query` package was being bundled separately in different workspace packages, causing multiple React Query contexts. The `QueryClientProvider` from the main app wasn't visible to plugin code due to this module duplication.
19
+
20
+ **Changes**:
21
+
22
+ - `@checkstack/frontend-api`: Export `useQueryClient` from the centralized React Query import, ensuring all packages use the same context
23
+ - `@checkstack/dashboard-frontend`: Import `useQueryClient` from `@checkstack/frontend-api` instead of directly from `@tanstack/react-query`, and remove the direct dependency
24
+ - `@checkstack/frontend`: Add `@tanstack/react-query` to Vite's `resolve.dedupe` as a safety net
25
+
3
26
  ## 0.2.0
4
27
 
5
28
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/frontend-api",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "scripts": {
@@ -13,6 +13,10 @@ import {
13
13
  type UseQueryOptions,
14
14
  type UseMutationOptions,
15
15
  } from "@tanstack/react-query";
16
+
17
+ // Re-export useQueryClient for cache invalidation in consuming packages
18
+ // This ensures all packages use the same React Query instance
19
+ export { useQueryClient } from "@tanstack/react-query";
16
20
  import { useApi } from "./api-context";
17
21
  import { rpcApiRef } from "./core-apis";
18
22
  import type { ClientDefinition, InferClient } from "@checkstack/common";