MCPcopy Create free account
hub / github.com/TanStack/devtools / UpgradeRowActions

Function UpgradeRowActions

examples/preact/basic/src/package-json-panel.tsx:158–187  ·  view source on GitHub ↗
({ name }: { name: string })

Source from the content-addressed store, hash-verified

156 }
157
158 const UpgradeRowActions = ({ name }: { name: string }) => {
159 const info = outdatedDeps[name] as
160 | {
161 current: string
162 wanted: string
163 latest: string
164 type?: 'dependencies' | 'devDependencies'
165 }
166 | undefined
167 if (!info) return null
168 return (
169 <div style={{ display: 'flex', gap: 6 }}>
170 {btn('Wanted', () =>
171 (devtoolsEventClient as any).emit('upgrade-dependency', {
172 name,
173 target: info.wanted,
174 } as any),
175 )}
176 {btn(
177 'Latest',
178 () =>
179 (devtoolsEventClient as any).emit('upgrade-dependency', {
180 name,
181 target: info.latest,
182 } as any),
183 'ghost',
184 )}
185 </div>
186 )
187 }
188
189 const makeLists = (names?: Array<string>) => {
190 const entries = Object.entries(outdatedDeps).filter(

Callers

nothing calls this directly

Calls 2

btnFunction · 0.70
emitMethod · 0.45

Tested by

no test coverage detected