@raf-query/core 0.1.13 → 0.1.14

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,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.14](https://github.com/KATT/raf-query/compare/0.1.13...0.1.14) (2026-10-13)
4
+
5
+ ### Performance Improvements
6
+
7
+ * **core:** mark top-level Effect constructors pure ([#46](https://github.com/KATT/raf-query/issues/46)) ([9fb7f76](https://github.com/KATT/raf-query/commit/9fb7f76fb3dad5e5fa4566de011727ce46ac3bbc))
8
+
3
9
  ## [0.1.13](https://github.com/KATT/raf-query/compare/0.1.12...0.1.13) (2026-10-13)
4
10
 
5
11
  ### Bug Fixes
6
12
 
7
- * **deps:** make effect a peer dependency ([#40](https://github.com/KATT/raf-query/issues/40)) ([f172515](https://github.com/KATT/raf-query/commit/f17251515788e2aaf243cce33e5af09bf87db59e))
13
+ - **deps:** make effect a peer dependency ([#40](https://github.com/KATT/raf-query/issues/40)) ([f172515](https://github.com/KATT/raf-query/commit/f17251515788e2aaf243cce33e5af09bf87db59e))
8
14
 
9
15
  ## [0.1.12](https://github.com/KATT/raf-query/compare/0.1.11...0.1.12) (2026-10-13)
10
16
 
package/dist/cache.mjs CHANGED
@@ -29,7 +29,7 @@ var cache_exports = /* @__PURE__ */ __exportAll({
29
29
  make: () => make
30
30
  });
31
31
  const TypeId = "~@raf-query/core/QueryCache";
32
- const QueryCache = Context.Service(TypeId);
32
+ const QueryCache = /*#__PURE__*/ Context.Service(TypeId);
33
33
  function isQueryCache(value) {
34
34
  return Predicate.hasProperty(value, TypeId);
35
35
  }
@@ -81,7 +81,7 @@ function settleAll(effects) {
81
81
  });
82
82
  }
83
83
  /** Build a cache in the current scope, with the current `Clock` and {@link Platform}. */
84
- const make = Effect.fnUntraced(function* (config = {}) {
84
+ const make = /*#__PURE__*/ Effect.fnUntraced(function* (config = {}) {
85
85
  const platform = yield* Platform;
86
86
  const state = {
87
87
  clock: yield* Clock.Clock,
@@ -63,7 +63,7 @@ function dehydrateEntries(queries, options) {
63
63
  * handed to the reader before that microtask ends: ahead of the Suspense
64
64
  * boundaries React resumes for those entries.
65
65
  */
66
- const dehydrateStream = Effect.fnUntraced(function* (queries, subscribe, options) {
66
+ const dehydrateStream = /*#__PURE__*/ Effect.fnUntraced(function* (queries, subscribe, options) {
67
67
  const sent = options.sent ?? /* @__PURE__ */ new Set();
68
68
  const send = {
69
69
  ...options,
package/dist/infinite.mjs CHANGED
@@ -32,7 +32,7 @@ function addPage(data, page, pageParam, direction, maxPages) {
32
32
  * `current`. Otherwise loads from the first page param again: as many pages
33
33
  * as `current` has, or `pages` if that's more, stopping at the last page.
34
34
  */
35
- const fetchPages = Effect.fnUntraced(function* (options, current, request, fetchPage) {
35
+ const fetchPages = /*#__PURE__*/ Effect.fnUntraced(function* (options, current, request, fetchPage) {
36
36
  if (request.direction && current) {
37
37
  const pageParam = request.direction === "forward" ? nextPageParam(options, current) : previousPageParam(options, current);
38
38
  if (pageParam == null) return current;
package/dist/platform.mjs CHANGED
@@ -25,12 +25,12 @@ const globalPlatform = {
25
25
  };
26
26
  }
27
27
  };
28
- const Platform = Context.Reference("@raf-query/core/Platform", { defaultValue: () => globalPlatform });
28
+ const Platform = /*#__PURE__*/ Context.Reference("@raf-query/core/Platform", { defaultValue: () => globalPlatform });
29
29
  /**
30
30
  * Succeeds now if the platform is online, else on its next `"online"` event.
31
31
  * Interrupting it unsubscribes.
32
32
  */
33
- const whenOnline = Effect.gen(function* () {
33
+ const whenOnline = /*#__PURE__*/ Effect.gen(function* () {
34
34
  const platform = yield* Platform;
35
35
  if (platform.isOnlineUnsafe()) return;
36
36
  yield* Effect.callback((resume) => {
package/dist/retry.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Effect, Predicate, Schedule } from "effect";
2
2
  //#region src/retry.ts
3
3
  /** Doubling from 1 s, at most 30 s. */
4
- const defaultDelays = Schedule.min([Schedule.exponential("1 second"), Schedule.spaced("30 seconds")]);
4
+ const defaultDelays = /*#__PURE__*/ Schedule.min([Schedule.exponential("1 second"), Schedule.spaced("30 seconds")]);
5
5
  function delays(retryDelay) {
6
6
  if (retryDelay === void 0) return defaultDelays;
7
7
  if (Predicate.isNumber(retryDelay)) return Schedule.spaced(retryDelay);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raf-query/core",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Framework-agnostic core of raf-query, a render-as-you-fetch query library",
5
5
  "keywords": [
6
6
  "query",