Skip to content
Source
Sign inSign up
TanStack/query

fix(codemods): Use .cjs extension for CommonJS files #7333

Mergedontanj(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/7333/headmerged by lachlancollins(GitHub profile, opens in a new tab) View on GitHub

Showing 28 changed files with 2 additions and 2 deletions (loading 25).

x
0 of 28 viewed, 28 left
2 additions and 2 deletionsdocs/framework/react/guides/migrating-to-v5.mdModified
View file
@@ -91,7 +91,7 @@
```
npx jscodeshift@latest ./path/to/src/ \
--extensions=js,jsx \
- --transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.js
+ --transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs
```
​
If you want to run it against `.ts` or `.tsx` files, please use the command below:
@@ -100,7 +100,7 @@
npx jscodeshift@latest ./path/to/src/ \
--extensions=ts,tsx \
--parser=tsx \
- --transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.js
+ --transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs
```
​
Please note in the case of `TypeScript` you need to use `tsx` as the parser; otherwise, the codemod won't be applied properly!
0 additions and 0 deletionspackages/query-codemods/src/utils/transformers/query-cache-transformer.jsrenamed topackages/query-codemods/src/utils/transformers/query-cache-transformer.cjsRenamed
View file

File renamed without changes.