Files
agency/.pnpm-store/v3/files/d0/9725e1adac0a281a20a4ecb5e3d0a65593b89e54253eff8db2cd128c326a73c69cad9d07aeb9cca61b55b41528268579af0fb8947158e57dd524d0f4b95876
hanzo-agent 5af6960b87 run project
Run: sess_f37640604ae254cb4d11dc6217f7b721
2026-09-30 00:04:56 +00:00

26 lines
605 B
Plaintext

module.exports = (file, api) => {
const jscodeshift = api.jscodeshift
const root = jscodeshift(file.source)
const replacements = [
{ from: 'react-query', to: '@tanstack/react-query' },
{ from: 'react-query/devtools', to: '@tanstack/react-query-devtools' },
]
replacements.forEach(({ from, to }) => {
root
.find(jscodeshift.ImportDeclaration, {
source: {
value: from,
},
})
.replaceWith(({ node }) => {
node.source.value = to
return node
})
})
return root.toSource({ quote: 'single', lineTerminator: '\n' })
}