New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@tanstack/devtools

Package Overview
Dependencies
Maintainers
7
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/devtools - npm Package Compare versions

Comparing version
0.11.1
to
0.11.2
+12
-19
dist/dev.js

@@ -10,5 +10,4 @@ export { PLUGIN_CONTAINER_ID, PLUGIN_TITLE_CONTAINER_ID } from './chunk/A767CXXU.js';

#plugins = [];
#isMounted = false;
#isMounting = false;
#abortMount = false;
#state = "unmounted";
#mountAbortController;
#dispose;

@@ -28,10 +27,9 @@ #eventBus;

if (typeof document === "undefined") return;
if (this.#isMounted || this.#isMounting) {
if (this.#state === "mounted" || this.#state === "mounting") {
throw new Error("Devtools is already mounted");
}
this.#isMounting = true;
this.#abortMount = false;
this.#state = "mounting";
const { signal } = this.#mountAbortController = new AbortController();
import('./mount-impl/3OW54XWT.js').then(({ mountDevtools }) => {
if (this.#abortMount) {
this.#isMounting = false;
if (signal.aborted) {
return;

@@ -50,6 +48,5 @@ }

this.#eventBus = result.eventBus;
this.#isMounted = true;
this.#isMounting = false;
this.#state = "mounted";
}).catch((err) => {
this.#isMounting = false;
this.#state = "unmounted";
console.error("[TanStack Devtools] Failed to load:", err);

@@ -59,13 +56,9 @@ });

unmount() {
if (!this.#isMounted && !this.#isMounting) {
if (this.#state === "unmounted") {
throw new Error("Devtools is not mounted");
}
if (this.#isMounting) {
this.#abortMount = true;
this.#isMounting = false;
return;
}
this.#mountAbortController?.abort();
this.#eventBus?.stop();
this.#dispose?.();
this.#isMounted = false;
this.#state = "unmounted";
}

@@ -79,3 +72,3 @@ setConfig(config) {

this.#plugins = config.plugins;
if (this.#isMounted && this.#setPlugins) {
if (this.#state === "mounted" && this.#setPlugins) {
this.#setPlugins(config.plugins);

@@ -82,0 +75,0 @@ }

@@ -10,5 +10,4 @@ export { PLUGIN_CONTAINER_ID, PLUGIN_TITLE_CONTAINER_ID } from './chunk/A767CXXU.js';

#plugins = [];
#isMounted = false;
#isMounting = false;
#abortMount = false;
#state = "unmounted";
#mountAbortController;
#dispose;

@@ -28,10 +27,9 @@ #eventBus;

if (typeof document === "undefined") return;
if (this.#isMounted || this.#isMounting) {
if (this.#state === "mounted" || this.#state === "mounting") {
throw new Error("Devtools is already mounted");
}
this.#isMounting = true;
this.#abortMount = false;
this.#state = "mounting";
const { signal } = this.#mountAbortController = new AbortController();
import('./mount-impl/3OW54XWT.js').then(({ mountDevtools }) => {
if (this.#abortMount) {
this.#isMounting = false;
if (signal.aborted) {
return;

@@ -50,20 +48,15 @@ }

this.#eventBus = result.eventBus;
this.#isMounted = true;
this.#isMounting = false;
this.#state = "mounted";
}).catch((err) => {
this.#isMounting = false;
this.#state = "unmounted";
});
}
unmount() {
if (!this.#isMounted && !this.#isMounting) {
if (this.#state === "unmounted") {
throw new Error("Devtools is not mounted");
}
if (this.#isMounting) {
this.#abortMount = true;
this.#isMounting = false;
return;
}
this.#mountAbortController?.abort();
this.#eventBus?.stop();
this.#dispose?.();
this.#isMounted = false;
this.#state = "unmounted";
}

@@ -77,3 +70,3 @@ setConfig(config) {

this.#plugins = config.plugins;
if (this.#isMounted && this.#setPlugins) {
if (this.#state === "mounted" && this.#setPlugins) {
this.#setPlugins(config.plugins);

@@ -80,0 +73,0 @@ }

@@ -10,5 +10,4 @@ export { PLUGIN_CONTAINER_ID, PLUGIN_TITLE_CONTAINER_ID } from './chunk/A767CXXU.js';

#plugins = [];
#isMounted = false;
#isMounting = false;
#abortMount = false;
#state = "unmounted";
#mountAbortController;
#dispose;

@@ -28,10 +27,9 @@ #eventBus;

if (typeof document === "undefined") return;
if (this.#isMounted || this.#isMounting) {
if (this.#state === "mounted" || this.#state === "mounting") {
throw new Error("Devtools is already mounted");
}
this.#isMounting = true;
this.#abortMount = false;
this.#state = "mounting";
const { signal } = this.#mountAbortController = new AbortController();
import('./mount-impl/QJF6LBVF.js').then(({ mountDevtools }) => {
if (this.#abortMount) {
this.#isMounting = false;
if (signal.aborted) {
return;

@@ -50,20 +48,15 @@ }

this.#eventBus = result.eventBus;
this.#isMounted = true;
this.#isMounting = false;
this.#state = "mounted";
}).catch((err) => {
this.#isMounting = false;
this.#state = "unmounted";
});
}
unmount() {
if (!this.#isMounted && !this.#isMounting) {
if (this.#state === "unmounted") {
throw new Error("Devtools is not mounted");
}
if (this.#isMounting) {
this.#abortMount = true;
this.#isMounting = false;
return;
}
this.#mountAbortController?.abort();
this.#eventBus?.stop();
this.#dispose?.();
this.#isMounted = false;
this.#state = "unmounted";
}

@@ -77,3 +70,3 @@ setConfig(config) {

this.#plugins = config.plugins;
if (this.#isMounted && this.#setPlugins) {
if (this.#state === "mounted" && this.#setPlugins) {
this.#setPlugins(config.plugins);

@@ -80,0 +73,0 @@ }

{
"name": "@tanstack/devtools",
"version": "0.11.1",
"version": "0.11.2",
"description": "TanStack Devtools is a set of tools for building advanced devtools for your application.",

@@ -5,0 +5,0 @@ "author": "Tanner Linsley",

@@ -43,5 +43,4 @@ import { initialState } from './context/devtools-store'

#plugins: Array<TanStackDevtoolsPlugin> = []
#isMounted = false
#isMounting = false
#abortMount = false
#state: 'mounted' | 'mounting' | 'unmounted' = 'unmounted'
#mountAbortController?: AbortController
#dispose?: () => void

@@ -64,12 +63,11 @@ #eventBus?: { stop: () => void }

if (this.#isMounted || this.#isMounting) {
if (this.#state === 'mounted' || this.#state === 'mounting') {
throw new Error('Devtools is already mounted')
}
this.#isMounting = true
this.#abortMount = false
this.#state = 'mounting'
const { signal } = (this.#mountAbortController = new AbortController())
import('./mount-impl')
.then(({ mountDevtools }) => {
if (this.#abortMount) {
this.#isMounting = false
if (signal.aborted) {
return

@@ -90,7 +88,6 @@ }

this.#eventBus = result.eventBus
this.#isMounted = true
this.#isMounting = false
this.#state = 'mounted'
})
.catch((err) => {
this.#isMounting = false
this.#state = 'unmounted'
console.error('[TanStack Devtools] Failed to load:', err)

@@ -101,13 +98,9 @@ })

unmount() {
if (!this.#isMounted && !this.#isMounting) {
if (this.#state === 'unmounted') {
throw new Error('Devtools is not mounted')
}
if (this.#isMounting) {
this.#abortMount = true
this.#isMounting = false
return
}
this.#mountAbortController?.abort()
this.#eventBus?.stop()
this.#dispose?.()
this.#isMounted = false
this.#state = 'unmounted'
}

@@ -123,3 +116,3 @@

// Update the reactive store if mounted
if (this.#isMounted && this.#setPlugins) {
if (this.#state === 'mounted' && this.#setPlugins) {
this.#setPlugins(config.plugins)

@@ -126,0 +119,0 @@ }