File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ This codemod automatically updates your `package.json` to prepare for React Nati
66
77- Removes ` @types/react-test-renderer ` and ` react-test-renderer ` (no longer needed)
88- Moves ` @testing-library/react-native ` to ` devDependencies ` if it's in ` dependencies `
9- - Updates ` @testing-library/react-native ` to ` ^14.0.0-alpha.5 `
9+ - Updates ` @testing-library/react-native ` to ` ^14.0.0-beta.0 `
1010- Adds ` test-renderer@0.14.0 ` to ` devDependencies `
1111
1212## Usage
@@ -37,8 +37,8 @@ npx codemod@latest run rntl-v14-update-deps --target ./path/to/your/project
3737``` json
3838{
3939 "devDependencies" : {
40- "@testing-library/react-native" : " ^14.0.0-alpha.5 " ,
41- "test-renderer" : " 0.12 .0"
40+ "@testing-library/react-native" : " ^14.0.0-beta.0 " ,
41+ "test-renderer" : " 0.14 .0"
4242 }
4343}
4444```
@@ -50,7 +50,7 @@ npx codemod@latest run rntl-v14-update-deps --target ./path/to/your/project
5050 npm install
5151 # or yarn install / pnpm install
5252 ```
53- - The codemod sets the version to ` ^14.0.0-alpha.5 ` . You can manually update this if needed.
53+ - The codemod sets the version to ` ^14.0.0-beta.0 ` . You can manually update this if needed.
5454- For monorepos, the codemod processes each ` package.json ` file individually.
5555
5656## Next steps
Original file line number Diff line number Diff line change 33import type { Transform } from 'codemod:ast-grep' ;
44import type JSONLang from 'codemod:ast-grep/langs/json' ;
55
6- const RNTL_VERSION = '^14.0.0-alpha.6 ' ;
7- const TEST_RENDERER_VERSION = '0.13.2 ' ;
6+ const RNTL_VERSION = '^14.0.0-beta.0 ' ;
7+ const TEST_RENDERER_VERSION = '0.14.0 ' ;
88
99interface PackageJson {
1010 dependencies ? : Record < string , string > ;
Original file line number Diff line number Diff line change 22 "name" : " test-project" ,
33 "version" : " 1.0.0" ,
44 "devDependencies" : {
5- "@testing-library/react-native" : " ^14.0.0-alpha.6 " ,
6- "test-renderer" : " 0.13.2 "
5+ "@testing-library/react-native" : " ^14.0.0-beta.0 " ,
6+ "test-renderer" : " 0.14.0 "
77 }
88}
Original file line number Diff line number Diff line change 22 "name" : " test-project" ,
33 "version" : " 1.0.0" ,
44 "devDependencies" : {
5- "@testing-library/react-native" : " ^14.0.0-alpha.6 " ,
6- "test-renderer" : " 0.13.2 "
5+ "@testing-library/react-native" : " ^14.0.0-beta.0 " ,
6+ "test-renderer" : " 0.14.0 "
77 }
88}
Original file line number Diff line number Diff line change 22 "name" : " test-project" ,
33 "version" : " 1.0.0" ,
44 "devDependencies" : {
5- "@testing-library/react-native" : " ^14.0.0-alpha.6 " ,
6- "test-renderer" : " 0.13.2 "
5+ "@testing-library/react-native" : " ^14.0.0-beta.0 " ,
6+ "test-renderer" : " 0.14.0 "
77 }
88}
Original file line number Diff line number Diff line change 11{
22 "devDependencies" : {
3- "@testing-library/react-native" : " ^14.0.0-alpha.6 " ,
4- "test-renderer" : " 0.13.2 "
3+ "@testing-library/react-native" : " ^14.0.0-beta.0 " ,
4+ "test-renderer" : " 0.14.0 "
55 }
66}
Original file line number Diff line number Diff line change 22 "name" : " test-project" ,
33 "version" : " 1.0.0" ,
44 "devDependencies" : {
5- "@testing-library/react-native" : " ^14.0.0-alpha.6 " ,
6- "test-renderer" : " 0.13.2 "
5+ "@testing-library/react-native" : " ^14.0.0-beta.0 " ,
6+ "test-renderer" : " 0.14.0 "
77 }
88}
You can’t perform that action at this time.
0 commit comments