-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
58 additions
and
40 deletions.
There are no files selected for viewing
7 changes: 0 additions & 7 deletions
7
packages/codemods/src/codemods/v5.x.x/checkReactRoot/__tests__/checkReactRoot.test.ts
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
packages/codemods/src/codemods/v5.x.x/checkReactRoot/checkReactRoot.yargs.ts
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
.../codemods/v5.x.x/checkReactRoot/README.md → ...odemods/v5.x.x/upgradeToReact18/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
packages/codemods/src/codemods/v5.x.x/upgradeToReact18/__tests__/upgradeToReact18.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { checkAndTransformReactRoot } from '../upgradeToReact18' | ||
|
||
describe('upgradeToReact18', () => { | ||
it('Checks and transforms the react root', async () => { | ||
await matchFolderTransform( | ||
() => checkAndTransformReactRoot({ setWarning: () => {} }), | ||
'default' | ||
) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/codemods/src/codemods/v5.x.x/upgradeToReact18/upgradeToReact18.yargs.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import task from 'tasuku' | ||
|
||
import { | ||
checkAndTransformReactRoot, | ||
upgradeReactDepsTo18, | ||
} from './upgradeToReact18' | ||
|
||
export const command = 'upgrade-to-react-18' | ||
|
||
export const description = '(v4.x.x->v5.0.0) Upgrade to React 18' | ||
|
||
export const handler = () => { | ||
task('Check and transform react root', async (taskContext) => { | ||
checkAndTransformReactRoot(taskContext) | ||
}) | ||
|
||
task('Update react deps', async () => { | ||
await upgradeReactDepsTo18() | ||
}) | ||
} |