Skip to content

Commit 3be7675

Browse files
committed
chore: update codemods
1 parent cd963a4 commit 3be7675

7 files changed

Lines changed: 16 additions & 16 deletions

File tree

codemods/v14-update-deps/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

codemods/v14-update-deps/scripts/codemod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import type { Transform } from 'codemod:ast-grep';
44
import 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

99
interface PackageJson {
1010
dependencies?: Record<string, string>;

codemods/v14-update-deps/tests/fixtures/already-alpha/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
}

codemods/v14-update-deps/tests/fixtures/basic-update/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
}

codemods/v14-update-deps/tests/fixtures/move-from-deps/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
}

codemods/v14-update-deps/tests/fixtures/with-peer-deps/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
}

0 commit comments

Comments
 (0)