Socket
Socket
Sign inDemoInstall

@tanstack/query-core

Package Overview
Dependencies
Maintainers
2
Versions
266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/query-core - npm Package Compare versions

Comparing version 5.28.12 to 5.28.13

6

build/legacy/queriesObserver.d.ts

@@ -12,8 +12,8 @@ import { ak as QueryObserverResult, b as QueryClient, W as QueryObserverOptions, aP as NotifyOptions, o as Query, t as QueryKey, c as QueryObserver } from './queryClient-K0zFyarY.js';

#private;
constructor(client: QueryClient, queries: Array<QueryObserverOptions>, options?: QueriesObserverOptions<TCombinedResult>);
constructor(client: QueryClient, queries: Array<QueryObserverOptions>, _options?: QueriesObserverOptions<TCombinedResult>);
protected onSubscribe(): void;
protected onUnsubscribe(): void;
destroy(): void;
setQueries(queries: Array<QueryObserverOptions>, options?: QueriesObserverOptions<TCombinedResult>, notifyOptions?: NotifyOptions): void;
getCurrentResult(): TCombinedResult;
setQueries(queries: Array<QueryObserverOptions>, _options?: QueriesObserverOptions<TCombinedResult>, notifyOptions?: NotifyOptions): void;
getCurrentResult(): Array<QueryObserverResult>;
getQueries(): Query<unknown, Error, unknown, QueryKey>[];

@@ -20,0 +20,0 @@ getObservers(): QueryObserver<unknown, Error, unknown, unknown, QueryKey>[];

@@ -21,7 +21,6 @@ import {

}
var _client, _result, _queries, _observers, _options, _combinedResult, _setResult, setResult_fn, _combineResult, combineResult_fn, _findMatchingObservers, findMatchingObservers_fn, _onUpdate, onUpdate_fn, _notify, notify_fn;
var _client, _result, _queries, _observers, _combinedResult, _combineResult, combineResult_fn, _findMatchingObservers, findMatchingObservers_fn, _onUpdate, onUpdate_fn, _notify, notify_fn;
var QueriesObserver = class extends Subscribable {
constructor(client, queries, options) {
constructor(client, queries, _options) {
super();
__privateAdd(this, _setResult);
__privateAdd(this, _combineResult);

@@ -35,3 +34,2 @@ __privateAdd(this, _findMatchingObservers);

__privateAdd(this, _observers, void 0);
__privateAdd(this, _options, void 0);
__privateAdd(this, _combinedResult, void 0);

@@ -41,4 +39,4 @@ __privateSet(this, _client, client);

__privateSet(this, _observers, []);
__privateMethod(this, _setResult, setResult_fn).call(this, []);
this.setQueries(queries, options);
__privateSet(this, _result, []);
this.setQueries(queries);
}

@@ -65,5 +63,4 @@ onSubscribe() {

}
setQueries(queries, options, notifyOptions) {
setQueries(queries, _options, notifyOptions) {
__privateSet(this, _queries, queries);
__privateSet(this, _options, options);
notifyManager.batch(() => {

@@ -86,3 +83,3 @@ const prevObservers = __privateGet(this, _observers);

__privateSet(this, _observers, newObservers);
__privateMethod(this, _setResult, setResult_fn).call(this, newResult);
__privateSet(this, _result, newResult);
if (!this.hasListeners()) {

@@ -103,3 +100,3 @@ return;

getCurrentResult() {
return __privateGet(this, _combinedResult);
return __privateGet(this, _result);
}

@@ -139,10 +136,3 @@ getQueries() {

_observers = new WeakMap();
_options = new WeakMap();
_combinedResult = new WeakMap();
_setResult = new WeakSet();
setResult_fn = function(value) {
var _a;
__privateSet(this, _result, value);
__privateSet(this, _combinedResult, __privateMethod(this, _combineResult, combineResult_fn).call(this, value, (_a = __privateGet(this, _options)) == null ? void 0 : _a.combine));
};
_combineResult = new WeakSet();

@@ -197,3 +187,3 @@ combineResult_fn = function(input, combine) {

if (index !== -1) {
__privateMethod(this, _setResult, setResult_fn).call(this, replaceAt(__privateGet(this, _result), index, result));
__privateSet(this, _result, replaceAt(__privateGet(this, _result), index, result));
__privateMethod(this, _notify, notify_fn).call(this);

@@ -200,0 +190,0 @@ }

@@ -12,8 +12,8 @@ import { ak as QueryObserverResult, b as QueryClient, W as QueryObserverOptions, aP as NotifyOptions, o as Query, t as QueryKey, c as QueryObserver } from './queryClient-K0zFyarY.js';

#private;
constructor(client: QueryClient, queries: Array<QueryObserverOptions>, options?: QueriesObserverOptions<TCombinedResult>);
constructor(client: QueryClient, queries: Array<QueryObserverOptions>, _options?: QueriesObserverOptions<TCombinedResult>);
protected onSubscribe(): void;
protected onUnsubscribe(): void;
destroy(): void;
setQueries(queries: Array<QueryObserverOptions>, options?: QueriesObserverOptions<TCombinedResult>, notifyOptions?: NotifyOptions): void;
getCurrentResult(): TCombinedResult;
setQueries(queries: Array<QueryObserverOptions>, _options?: QueriesObserverOptions<TCombinedResult>, notifyOptions?: NotifyOptions): void;
getCurrentResult(): Array<QueryObserverResult>;
getQueries(): Query<unknown, Error, unknown, QueryKey>[];

@@ -20,0 +20,0 @@ getObservers(): QueryObserver<unknown, Error, unknown, unknown, QueryKey>[];

@@ -19,5 +19,4 @@ // src/queriesObserver.ts

#observers;
#options;
#combinedResult;
constructor(client, queries, options) {
constructor(client, queries, _options) {
super();

@@ -27,9 +26,5 @@ this.#client = client;

this.#observers = [];
this.#setResult([]);
this.setQueries(queries, options);
this.#result = [];
this.setQueries(queries);
}
#setResult(value) {
this.#result = value;
this.#combinedResult = this.#combineResult(value, this.#options?.combine);
}
onSubscribe() {

@@ -55,5 +50,4 @@ if (this.listeners.size === 1) {

}
setQueries(queries, options, notifyOptions) {
setQueries(queries, _options, notifyOptions) {
this.#queries = queries;
this.#options = options;
notifyManager.batch(() => {

@@ -76,3 +70,3 @@ const prevObservers = this.#observers;

this.#observers = newObservers;
this.#setResult(newResult);
this.#result = newResult;
if (!this.hasListeners()) {

@@ -93,3 +87,3 @@ return;

getCurrentResult() {
return this.#combinedResult;
return this.#result;
}

@@ -170,3 +164,3 @@ getQueries() {

if (index !== -1) {
this.#setResult(replaceAt(this.#result, index, result));
this.#result = replaceAt(this.#result, index, result);
this.#notify();

@@ -173,0 +167,0 @@ }

{
"name": "@tanstack/query-core",
"version": "5.28.12",
"version": "5.28.13",
"description": "The framework agnostic core that powers TanStack Query",

@@ -5,0 +5,0 @@ "author": "tannerlinsley",

@@ -42,4 +42,3 @@ import { notifyManager } from './notifyManager'

#observers: Array<QueryObserver>
#options?: QueriesObserverOptions<TCombinedResult>
#combinedResult!: TCombinedResult
#combinedResult?: TCombinedResult

@@ -49,3 +48,3 @@ constructor(

queries: Array<QueryObserverOptions>,
options?: QueriesObserverOptions<TCombinedResult>,
_options?: QueriesObserverOptions<TCombinedResult>,
) {

@@ -57,12 +56,7 @@ super()

this.#observers = []
this.#result = []
this.#setResult([])
this.setQueries(queries, options)
this.setQueries(queries)
}
#setResult(value: Array<QueryObserverResult>) {
this.#result = value
this.#combinedResult = this.#combineResult(value, this.#options?.combine)
}
protected onSubscribe(): void {

@@ -93,7 +87,6 @@ if (this.listeners.size === 1) {

queries: Array<QueryObserverOptions>,
options?: QueriesObserverOptions<TCombinedResult>,
_options?: QueriesObserverOptions<TCombinedResult>,
notifyOptions?: NotifyOptions,
): void {
this.#queries = queries
this.#options = options

@@ -124,3 +117,3 @@ notifyManager.batch(() => {

this.#observers = newObservers
this.#setResult(newResult)
this.#result = newResult

@@ -145,4 +138,4 @@ if (!this.hasListeners()) {

getCurrentResult(): TCombinedResult {
return this.#combinedResult
getCurrentResult(): Array<QueryObserverResult> {
return this.#result
}

@@ -263,3 +256,3 @@

if (index !== -1) {
this.#setResult(replaceAt(this.#result, index, result))
this.#result = replaceAt(this.#result, index, result)
this.#notify()

@@ -266,0 +259,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc