-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(codemod): improvements to s1-to-s2 codemod (agent mode, E2E tests, more) #9754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
reidbarber
wants to merge
18
commits into
main
Choose a base branch
from
codemod-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,190
−141
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5b0ef13
fixed TabList render function children kept Item instead of convertin…
reidbarber be66290
import cleanup: removeComponentImport was only checking the first mat…
reidbarber 914f03c
dynamic import('@react-spectrum/s2') was incorrectly flagged as a v3 …
reidbarber d596a6c
Fixed in codemod options parsing
reidbarber 171529a
more import fixes
reidbarber a2509b5
add agent mode (non-interactive, run transforms only)
reidbarber 48f1768
add e2e tests
reidbarber ff6271f
have --components include related components
reidbarber 5c023f9
yarn.lock
reidbarber b871a88
update outdated links
reidbarber 6186108
Merge branch 'main' into codemod-fixes
reidbarber 4d6af4c
bump @adobe/react-spectrum version
reidbarber 323ad01
fix missing imports and remove unused
reidbarber 9bb8185
Merge remote-tracking branch 'origin/main' into codemod-fixes
reidbarber 3e71ffb
fix snapshot
reidbarber 83b52c6
yarn.lock
reidbarber 62a60ab
map illustrations to s2 illustrations
reidbarber d4dfa4e
Merge remote-tracking branch 'origin/main' into codemod-fixes
reidbarber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
7 changes: 7 additions & 0 deletions
7
...es/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/input/package.fixture.json
This file contains hidden or 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,7 @@ | ||
| { | ||
| "name": "s1-to-s2-cli-fixture", | ||
| "private": true, | ||
| "devDependencies": { | ||
| "parcel": "^2.12.0" | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/input/src/App.tsx
This file contains hidden or 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 {Button} from '@adobe/react-spectrum'; | ||
| import React from 'react'; | ||
|
|
||
| export function App() { | ||
| return ( | ||
| <Button variant="cta"> | ||
| Save | ||
| </Button> | ||
| ); | ||
| } |
6 changes: 6 additions & 0 deletions
6
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/input/src/Form.tsx
This file contains hidden or 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,6 @@ | ||
| import React from 'react'; | ||
| import {TextArea} from '@adobe/react-spectrum'; | ||
|
|
||
| export function Form() { | ||
| return <TextArea isQuiet />; | ||
| } |
1 change: 1 addition & 0 deletions
1
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/input/yarn.lock
This file contains hidden or 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 @@ | ||
| # yarn lockfile v1 |
7 changes: 7 additions & 0 deletions
7
...s/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/output/package.fixture.json
This file contains hidden or 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,7 @@ | ||
| { | ||
| "name": "s1-to-s2-cli-fixture", | ||
| "private": true, | ||
| "devDependencies": { | ||
| "parcel": "^2.12.0" | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletions
6
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/output/src/App.tsx
This file contains hidden or 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,6 @@ | ||
| import { Button } from "@react-spectrum/s2"; | ||
| import React from 'react'; | ||
|
|
||
| export function App() { | ||
| return (<Button variant="accent">Save</Button>); | ||
| } |
6 changes: 6 additions & 0 deletions
6
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/output/src/Form.tsx
This file contains hidden or 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,6 @@ | ||
| import React from 'react'; | ||
| import { TextArea } from "@react-spectrum/s2"; | ||
|
|
||
| export function Form() { | ||
| return <TextArea />; | ||
| } |
1 change: 1 addition & 0 deletions
1
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/full-project/output/yarn.lock
This file contains hidden or 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 @@ | ||
| # yarn lockfile v1 |
7 changes: 7 additions & 0 deletions
7
.../dev/codemods/src/s1-to-s2/__testfixtures__/cli/subset-project/input/package.fixture.json
This file contains hidden or 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,7 @@ | ||
| { | ||
| "name": "s1-to-s2-cli-subset-fixture", | ||
| "private": true, | ||
| "devDependencies": { | ||
| "parcel": "^2.12.0" | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/subset-project/input/src/Form.tsx
This file contains hidden or 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,11 @@ | ||
| import {Button, TextArea} from '@adobe/react-spectrum'; | ||
| import React from 'react'; | ||
|
|
||
| export function Form() { | ||
| return ( | ||
| <> | ||
| <Button variant="cta">Save</Button> | ||
| <TextArea isQuiet /> | ||
| </> | ||
| ); | ||
| } |
1 change: 1 addition & 0 deletions
1
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/subset-project/input/yarn.lock
This file contains hidden or 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 @@ | ||
| # yarn lockfile v1 |
7 changes: 7 additions & 0 deletions
7
...dev/codemods/src/s1-to-s2/__testfixtures__/cli/subset-project/output/package.fixture.json
This file contains hidden or 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,7 @@ | ||
| { | ||
| "name": "s1-to-s2-cli-subset-fixture", | ||
| "private": true, | ||
| "devDependencies": { | ||
| "parcel": "^2.12.0" | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/subset-project/output/src/Form.tsx
This file contains hidden or 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 { TextArea } from '@adobe/react-spectrum'; | ||
| import { Button } from "@react-spectrum/s2"; | ||
| import React from 'react'; | ||
|
|
||
| export function Form() { | ||
| return (<> | ||
| <Button variant="accent">Save</Button> | ||
| <TextArea isQuiet /> | ||
| </>); | ||
| } |
1 change: 1 addition & 0 deletions
1
packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/subset-project/output/yarn.lock
This file contains hidden or 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 @@ | ||
| # yarn lockfile v1 |
This file contains hidden or 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
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/dev/codemods/src/s1-to-s2/__tests__/__snapshots__/dropzone.test.ts.snap
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.