Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/flat-bears-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@tanstack/preact-query": patch
"@tanstack/react-query": patch
---

fix(codemods): avoid copying unnecessary files from codemods project
4 changes: 2 additions & 2 deletions docs/framework/react/guides/migrating-to-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ If you want to run it against `.js` or `.jsx` files, please use the command belo
```
npx jscodeshift@latest ./path/to/src/ \
--extensions=js,jsx \
--transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs
--transform=./node_modules/@tanstack/react-query/build/codemods/v5/remove-overloads/remove-overloads.cjs
```

If you want to run it against `.ts` or `.tsx` files, please use the command below:
Expand All @@ -123,7 +123,7 @@ If you want to run it against `.ts` or `.tsx` files, please use the command belo
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.cjs
--transform=./node_modules/@tanstack/react-query/build/codemods/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!
Expand Down
3 changes: 1 addition & 2 deletions integrations/react-webpack-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-webpack-4",
"private": true,
"scripts": {
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --mode production"
"build": "NODE_OPTIONS=--openssl-legacy-provider webpack --mode production"
},
"dependencies": {
"@tanstack/react-query": "workspace:*",
Expand All @@ -15,7 +15,6 @@
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"babel-loader": "^8.3.0",
"cross-env": "^10.1.0",
"html-webpack-plugin": "^4.5.2",
"webpack": "^4.44.2",
"webpack-cli": "^4.10.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"premove": "^4.0.0",
"prettier": "^3.9.9",
"prettier-plugin-svelte": "^4.1.1",
"publint": "^0.3.13",
"publint": "^0.3.24",
"react": "^19.2.1",
"react-dom": "^19.2.1",
"sherif": "^1.13.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/preact-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test:build": "publint --strict && attw --pack",
"build": "pnpm build:tsdown && pnpm build:codemods",
"build:tsdown": "tsdown --tsconfig tsconfig.prod.json",
"build:codemods": "cpy ../query-codemods/* ./build/codemods"
"build:codemods": "rm -rf ./build/codemods && mkdir ./build/codemods && cp -r ../query-codemods/src/* ./build/codemods"
},
"type": "module",
"types": "build/legacy/index.d.ts",
Expand Down Expand Up @@ -68,7 +68,6 @@
"@tanstack/query-persist-client-core": "workspace:*",
"@tanstack/query-test-utils": "workspace:*",
"@testing-library/preact": "^3.2.4",
"cpy-cli": "^5.0.0",
"eslint-config-preact": "^2.0.0",
"npm-run-all2": "^9.0.3",
"preact": "^10.29.8",
Expand Down
3 changes: 0 additions & 3 deletions packages/query-codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"test:lib:dev": "pnpm run test:lib --watch"
},
"type": "module",
"exports": {
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"src",
Expand Down
3 changes: 1 addition & 2 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test:build": "publint --strict && attw --pack",
"build": "pnpm build:tsdown && pnpm build:codemods",
"build:tsdown": "tsdown --tsconfig tsconfig.prod.json",
"build:codemods": "cpy ../query-codemods/* ./build/codemods"
"build:codemods": "rm -rf ./build/codemods && mkdir ./build/codemods && cp -r ../query-codemods/src/* ./build/codemods"
},
"type": "module",
"types": "build/legacy/index.d.ts",
Expand Down Expand Up @@ -72,7 +72,6 @@
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.3.4",
"cpy-cli": "^5.0.0",
"npm-run-all2": "^9.0.3",
"react": "^19.2.1",
"react-dom": "^19.2.1",
Expand Down
Loading
Loading