You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your interest in contributing to react-codemod!
3
+
This repository is a pnpm workspace of JSSG codemods under `codemods/*`.
4
4
5
-
## Development setup
5
+
## Setup
6
6
7
7
```bash
8
-
# Install dependencies
9
8
pnpm install
10
-
11
-
# Run all tests
12
-
pnpm test
13
-
14
-
# Type-check all codemods
15
-
pnpm check-types
16
9
```
17
10
18
-
## Making changes
19
-
20
-
1. Create a branch from `main`.
21
-
2. Make your changes and add or update tests.
22
-
3. Run `pnpm test` and `pnpm check-types` to verify everything passes.
23
-
4. Add a changeset (see below).
24
-
5. Open a pull request.
11
+
Required local checks before opening a pull request:
25
12
26
-
## Adding a changeset
13
+
```bash
14
+
pnpm run test
15
+
pnpm run check-types
16
+
```
27
17
28
-
This repo uses [Changesets](https://github.com/changesets/changesets) for versioning and releases. Every PR that changes a codemod must include a changeset.
18
+
Or run the combined check:
29
19
30
20
```bash
31
-
pnpm changeset
21
+
pnpm run ci
32
22
```
33
23
34
-
Follow the prompts to:
35
-
1. Select the affected codemod(s).
36
-
2. Choose the semver bump type — **patch** for bug fixes, **minor** for new features, **major** for breaking changes.
37
-
3. Write a short summary of the change.
24
+
## Adding or updating codemods
38
25
39
-
This creates a markdown file in `.changeset/` that should be committed with your PR.
26
+
- Keep each codemod self-contained under `codemods/<slug>/`.
27
+
- Update the codemod package README when behavior or usage changes.
28
+
- Add or extend snapshot fixtures under the codemod’s `tests/` directory for every behavioral change.
40
29
41
-
## Release workflow
30
+
## Versioning and publishing
42
31
43
-
1. Merge a PR with one or more changesets into `main`.
44
-
2. CI automatically opens a **Version Packages** PR that bumps versions in `package.json` and `codemod.yaml`.
45
-
3. Merge the version PR — git tags are created and the updated codemods are published to the Codemod registry.
32
+
This repo uses Changesets to version codemod packages.
46
33
47
-
## Adding a new codemod
34
+
To prepare a release entry for your change:
48
35
49
-
Each codemod lives in its own directory under `codemods/jssg/`:
Copy file name to clipboardExpand all lines: PARITY_STATUS.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
# Parity Status
2
2
3
-
Last updated: 2026-04-15
3
+
Last updated: 2026-04-21
4
4
5
5
Status meanings:
6
6
7
7
-`Certified`: replacement-grade confidence. Tests are green, public test posture is portable, and there are no known logic gaps versus the original jscodeshift codemod. May include safe extensions on edge cases the original did not handle, as long as original behavior remains unbroken.
8
-
-`Legacy`: available as a jscodeshift codemod under `codemods/legacy/`. Not yet ported to JSSG.
8
+
-`Fixture-Verified`: JSSG port exists in this branch, package fixture suites are green, and type checks pass. May include differential/error/warning tests, but replacement-grade real-repo parity has not yet been established to the same standard as `Certified`.
9
+
-`Deferred`: intentionally out of scope for now. Not ported to JSSG yet.
9
10
10
11
## JSSG Codemods
11
12
@@ -17,23 +18,23 @@ Status meanings:
17
18
|`replace-reactdom-render`|`replace-reactdom-render.ts`|`Certified`| Full fixture coverage plus multi-alias regression tests are green. |
18
19
|`react-proptypes-to-prop-types`|`React-PropTypes-to-prop-types.js`|`Certified`| Full original fixture surface is green. No JSSG-specific rollout blocker found. |
19
20
|`use-context-hook`|`use-context-hook.ts`|`Certified`| Full fixture coverage plus multi-import regression tests are green. |
20
-
21
-
## Legacy Codemods
22
-
23
-
These codemods are available as jscodeshift transforms under [`codemods/legacy/transforms/`](./codemods/legacy/transforms/):
21
+
|`create-element-to-jsx`|`create-element-to-jsx.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. 34 fixture cases plus error/differential checks are green. |
22
+
|`error-boundaries`|`error-boundaries.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
23
+
|`find-dom-node`|`findDOMNode.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
24
+
|`manual-bind-to-arrow`|`manual-bind-to-arrow.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
25
+
|`pure-component`|`pure-component.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. 11 fixtures plus warning/differential checks are green. |
26
+
|`pure-render-mixin`|`pure-render-mixin.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
27
+
|`react-dom-to-react-dom-factories`|`React-DOM-to-react-dom-factories.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
28
+
|`react-native-view-prop-types`|`ReactNative-View-propTypes.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
29
+
|`react-to-react-dom`|`react-to-react-dom.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. 14 fixtures plus error tests are green. |
30
+
|`remove-context-provider`|`remove-context-provider.ts`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
31
+
|`remove-forward-ref`|`remove-forward-ref.ts`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
32
+
|`rename-unsafe-lifecycles`|`rename-unsafe-lifecycles.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
33
+
|`sort-comp`|`sort-comp.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. Package fixtures and type checks are green. |
34
+
|`update-react-imports`|`update-react-imports.js`|`Fixture-Verified`| Imported from `align-with-legacy-codemods` on 2026-04-20. 33 fixtures are green. |
35
+
36
+
## Deferred Codemods
37
+
38
+
These codemods are still deferred and do not have a JSSG port in this repo:
See [`react-proptypes-to-prop-types`](./codemods/jssg/react-proptypes-to-prop-types/) for details.
93
-
94
-
#### Legacy Codemods
95
-
96
-
Additional jscodeshift-based codemods from the original `react-codemod` project are available under [`codemods/legacy/`](./codemods/legacy/). See [LEGACY.md](./LEGACY.md) for the full catalog.
90
+
See [@react-new/react-proptypes-to-prop-types](https://app.codemod.com/registry/@react-new/react-proptypes-to-prop-types).
0 commit comments