Skip to content

Commit e76c6c2

Browse files
ci: apply automated fixes
1 parent da3009b commit e76c6c2

7 files changed

Lines changed: 39 additions & 33 deletions

File tree

.changeset/curly-bikes-play.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
'@tanstack/devtools': patch
66
---
77

8-
98
Number of improvements to various parts of the DevTools:
9+
1010
- Update event client to allow users to disable it
1111
- Allow trigger to be completely hidden
1212
- Add a new package `@tanstack/devtools-client` to allow users to listen to events we emit from Vite.
13-
- Fix bugs inside of the DevTools like plugins being nuked on page refresh.
13+
- Fix bugs inside of the DevTools like plugins being nuked on page refresh.

examples/angular/ssr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"name": "ssr",
33
"version": "0.0.0",
44
"private": true
5-
}
5+
}

examples/react/basic/src/package-json-panel.tsx

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ export const PackageJsonPanel = () => {
1818

1919
useEffect(() => {
2020
devtoolsEventClient.emit('mounted', undefined as any)
21-
const cleanupOutdated = devtoolsEventClient.on("outdated-deps-read", (event) => {
22-
setOutdatedDeps(event.payload.outdatedDeps || {})
23-
})
24-
const cleanupPackageJson = devtoolsEventClient.on("package-json-read", (event) => {
25-
console.log('package-json-read', event)
26-
setPackageJson(event.payload.packageJson)
27-
})
21+
const cleanupOutdated = devtoolsEventClient.on(
22+
'outdated-deps-read',
23+
(event) => {
24+
setOutdatedDeps(event.payload.outdatedDeps || {})
25+
},
26+
)
27+
const cleanupPackageJson = devtoolsEventClient.on(
28+
'package-json-read',
29+
(event) => {
30+
console.log('package-json-read', event)
31+
setPackageJson(event.payload.packageJson)
32+
},
33+
)
2834
return () => {
2935
cleanupOutdated()
3036
cleanupPackageJson()
@@ -126,11 +132,11 @@ export const PackageJsonPanel = () => {
126132
}) => {
127133
const info = outdatedDeps[dep] as
128134
| {
129-
current: string
130-
wanted: string
131-
latest: string
132-
type?: 'dependencies' | 'devDependencies'
133-
}
135+
current: string
136+
wanted: string
137+
latest: string
138+
type?: 'dependencies' | 'devDependencies'
139+
}
134140
| undefined
135141
const current = info?.current ?? specified
136142
const latest = info?.latest
@@ -153,11 +159,11 @@ export const PackageJsonPanel = () => {
153159
const UpgradeRowActions = ({ name }: { name: string }) => {
154160
const info = outdatedDeps[name] as
155161
| {
156-
current: string
157-
wanted: string
158-
latest: string
159-
type?: 'dependencies' | 'devDependencies'
160-
}
162+
current: string
163+
wanted: string
164+
latest: string
165+
type?: 'dependencies' | 'devDependencies'
166+
}
161167
| undefined
162168
if (!info) return null
163169
return (
@@ -248,11 +254,11 @@ export const PackageJsonPanel = () => {
248254
{Object.entries(deps || {}).map(([dep, version]) => {
249255
const info = outdatedDeps[dep] as
250256
| {
251-
current: string
252-
wanted: string
253-
latest: string
254-
type?: 'dependencies' | 'devDependencies'
255-
}
257+
current: string
258+
wanted: string
259+
latest: string
260+
type?: 'dependencies' | 'devDependencies'
261+
}
256262
| undefined
257263
const isOutdated = !!info && info.current !== info.latest
258264
return (

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@
8585
"@tanstack/solid-devtools": "workspace:*",
8686
"@tanstack/devtools-vite": "workspace:*"
8787
}
88-
}
88+
}

packages/devtools-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@
4848
"test:build": "publint --strict",
4949
"build": "vite build"
5050
}
51-
}
51+
}

packages/devtools-vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@
6767
"@types/babel__traverse": "^7.28.0",
6868
"happy-dom": "^18.0.1"
6969
}
70-
}
70+
}

packages/devtools/src/context/devtools-context.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ export interface TanStackDevtoolsPlugin {
3939
* ```
4040
*/
4141
name:
42-
| string
43-
| ((
44-
el: HTMLHeadingElement,
45-
theme: DevtoolsStore['settings']['theme'],
46-
) => void)
42+
| string
43+
| ((
44+
el: HTMLHeadingElement,
45+
theme: DevtoolsStore['settings']['theme'],
46+
) => void)
4747
/**
4848
* Unique identifier for the plugin.
4949
* If not provided, it will be generated based on the name.

0 commit comments

Comments
 (0)