tsdf 9.0.0 → 9.1.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/dist/main.cjs CHANGED
@@ -1255,6 +1255,8 @@ function newTSDFListQueryStore({
1255
1255
  const queryState = getQueryState(params);
1256
1256
  if (!queryState || !queryState.hasMore)
1257
1257
  return "skipped";
1258
+ if (queryState.status !== "success")
1259
+ return "skipped";
1258
1260
  return fetchQueryOrquestrator.get(getQueryKey(params)).scheduleFetch("highPriority", ["loadMore", params, size]);
1259
1261
  }
1260
1262
  function getQueryItems(query, itemDataSelector) {
package/dist/main.d.ts CHANGED
@@ -218,7 +218,7 @@ declare function newTSDFListQueryStore<ItemState extends ValidStoreState, NError
218
218
  }[];
219
219
  (itemPayload: ItemPayload): ItemState | null | undefined;
220
220
  };
221
- loadMore: (params: QueryPayload, size: number) => ScheduleFetchResults;
221
+ loadMore: (params: QueryPayload, size?: number) => ScheduleFetchResults;
222
222
  invalidateQuery: (queryPayload: QueryPayload | ((params: QueryPayload, data: TSFDListQuery<NError, QueryPayload>, queryKey: string) => boolean) | QueryPayload[], priority?: FetchType, ignoreInvalidationSync?: boolean) => void;
223
223
  invalidateItem: (itemId: ItemPayload | ((ItemPayload: ItemPayload, itemState: ItemState) => boolean) | ItemPayload[], priority?: FetchType, ignoreInvalidationSync?: boolean) => void;
224
224
  scheduleItemFetch: {
package/dist/main.js CHANGED
@@ -1221,6 +1221,8 @@ function newTSDFListQueryStore({
1221
1221
  const queryState = getQueryState(params);
1222
1222
  if (!queryState || !queryState.hasMore)
1223
1223
  return "skipped";
1224
+ if (queryState.status !== "success")
1225
+ return "skipped";
1224
1226
  return fetchQueryOrquestrator.get(getQueryKey(params)).scheduleFetch("highPriority", ["loadMore", params, size]);
1225
1227
  }
1226
1228
  function getQueryItems(query, itemDataSelector) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdf",
3
- "version": "9.0.0",
3
+ "version": "9.1.1",
4
4
  "description": "A data fetching solution based on t-state",
5
5
  "license": "MIT",
6
6
  "author": "Lucas Santos",
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "scripts": {
26
26
  "test": "vitest --ui --mode development",
27
+ "test:changed": "vitest --changed --ui --mode development",
27
28
  "lint": "pnpm tsc && pnpm eslint && pnpm format",
28
29
  "eslint": "CI=true eslint --color --ext .jsx,.js,.ts,.tsx src/ test/",
29
30
  "format": "prettier --write src/**/*.ts",