@ethlete/query 6.0.0-next.49 → 6.0.0-next.50

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,11 @@
1
1
  # @ethlete/query
2
2
 
3
+ ## 6.0.0-next.50
4
+
5
+ ### Patch Changes
6
+
7
+ - Legacy interop: `execute()` and `abort()` read the query state untracked again, so `queryComputed(() => legacyQuery.prepare(...).execute())` no longer re-runs on every state change and floods the API until the tab runs out of memory.
8
+
3
9
  ## 6.0.0-next.49
4
10
 
5
11
  ### Minor Changes
@@ -10512,7 +10512,7 @@ const armQueryDevtoolsOverrideTransfer = (recorder, ops) => {
10512
10512
 
10513
10513
  // Generated from package.json by tools/scripts/generate-version.js - do not edit.
10514
10514
  /** The version of `@ethlete/query` this build was cut from. */
10515
- const QUERY_VERSION = '6.0.0-next.49';
10515
+ const QUERY_VERSION = '6.0.0-next.50';
10516
10516
 
10517
10517
  /** How deep a schema is expanded before a nested branch is given up on. */
10518
10518
  const MAX_DEPTH = 12;
@@ -13449,7 +13449,9 @@ class LegacyQuery {
13449
13449
  this.newQuery.subtle.destroy();
13450
13450
  }
13451
13451
  execute(options = {}) {
13452
- if (isQueryStateLoading(this.rawState)) {
13452
+ // Untracked: `prepare().execute()` inside `queryComputed` would otherwise re-run the computation on every
13453
+ // state change and send a new request each time.
13454
+ if (isQueryStateLoading(untracked(() => this.rawState))) {
13453
13455
  if (options.cancelPrevious !== true) {
13454
13456
  return this;
13455
13457
  }
@@ -13465,7 +13467,7 @@ class LegacyQuery {
13465
13467
  return this;
13466
13468
  }
13467
13469
  abort() {
13468
- if (!isQueryStateLoading(this.rawState)) {
13470
+ if (!isQueryStateLoading(untracked(() => this.rawState))) {
13469
13471
  return this;
13470
13472
  }
13471
13473
  this._wasAborted = true;