-
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.
fix(codemod): Fix replace-component-svgs codemod to deal with re-expo…
…rted (#9053)
- Loading branch information
Showing
22 changed files
with
188 additions
and
37 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...s/src/codemods/v6.x.x/replaceComponentSvgs/__testfixtures__/reExported/input/redwood.toml
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,18 @@ | ||
# This file contains the configuration settings for your Redwood app. | ||
# This file is also what makes your Redwood app a Redwood app. | ||
# If you remove it and try to run `yarn rw dev`, you'll get an error. | ||
# | ||
# For the full list of options, see the "App Configuration: redwood.toml" doc: | ||
# https://redwoodjs.com/docs/app-configuration-redwood-toml | ||
|
||
[web] | ||
title = "Redwood App" | ||
port = 8910 | ||
apiUrl = "/.redwood/functions" # you can customise graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths | ||
includeEnvironmentVariables = [] # any ENV vars that should be available to the web side, see https://redwoodjs.com/docs/environment-variables#web | ||
[api] | ||
port = 8911 | ||
[browser] | ||
open = true | ||
[notifications] | ||
versionUpdates = ["latest"] |
8 changes: 8 additions & 0 deletions
8
...replaceComponentSvgs/__testfixtures__/reExported/input/web/src/components/Icons/Icons.tsx
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,8 @@ | ||
import CurrencyYen from './currency-yen.svg' | ||
import Database from './database.svg' | ||
import Desktop from 'src/components/other/desktop-computer.svg' | ||
import DeviceMobile from './device-mobile.svg' | ||
|
||
export { CurrencyYen, Database as DBIcon, Desktop, DeviceMobile as Mobile } | ||
|
||
export { default as CursorClick } from './cursor-click.svg' |
3 changes: 3 additions & 0 deletions
3
...vgs/__testfixtures__/reExported/input/web/src/components/Icons/currency-yen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...vgs/__testfixtures__/reExported/input/web/src/components/Icons/cursor-click.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
...entSvgs/__testfixtures__/reExported/input/web/src/components/Icons/database.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...gs/__testfixtures__/reExported/input/web/src/components/Icons/device-mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...__testfixtures__/reExported/input/web/src/components/other/desktop-computer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions
18
.../src/codemods/v6.x.x/replaceComponentSvgs/__testfixtures__/reExported/output/redwood.toml
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,18 @@ | ||
# This file contains the configuration settings for your Redwood app. | ||
# This file is also what makes your Redwood app a Redwood app. | ||
# If you remove it and try to run `yarn rw dev`, you'll get an error. | ||
# | ||
# For the full list of options, see the "App Configuration: redwood.toml" doc: | ||
# https://redwoodjs.com/docs/app-configuration-redwood-toml | ||
|
||
[web] | ||
title = "Redwood App" | ||
port = 8910 | ||
apiUrl = "/.redwood/functions" # you can customise graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths | ||
includeEnvironmentVariables = [] # any ENV vars that should be available to the web side, see https://redwoodjs.com/docs/environment-variables#web | ||
[api] | ||
port = 8911 | ||
[browser] | ||
open = true | ||
[notifications] | ||
versionUpdates = ["latest"] |
3 changes: 3 additions & 0 deletions
3
...ponentSvgs/__testfixtures__/reExported/output/web/src/components/Icons/CurrencyYenSVG.tsx
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,3 @@ | ||
import type { SVGProps } from "react"; | ||
const CurrencyYen = (props: SVGProps<SVGSVGElement>) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" {...props}><path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM7.858 5.485a1 1 0 00-1.715 1.03L7.633 9H7a1 1 0 100 2h1.834l.166.277V12H7a1 1 0 100 2h2v1a1 1 0 102 0v-1h2a1 1 0 100-2h-2v-.723l.166-.277H13a1 1 0 100-2h-.634l1.492-2.486a1 1 0 10-1.716-1.029L10.034 9h-.068L7.858 5.485z" clipRule="evenodd" /></svg>; | ||
export default CurrencyYen; |
3 changes: 3 additions & 0 deletions
3
...ponentSvgs/__testfixtures__/reExported/output/web/src/components/Icons/CursorClickSVG.tsx
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,3 @@ | ||
import type { SVGProps } from "react"; | ||
const CursorClick = (props: SVGProps<SVGSVGElement>) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" {...props}><path fillRule="evenodd" d="M6.672 1.911a1 1 0 10-1.932.518l.259.966a1 1 0 001.932-.518l-.26-.966zM2.429 4.74a1 1 0 10-.517 1.932l.966.259a1 1 0 00.517-1.932l-.966-.26zm8.814-.569a1 1 0 00-1.415-1.414l-.707.707a1 1 0 101.415 1.415l.707-.708zm-7.071 7.072l.707-.707A1 1 0 003.465 9.12l-.708.707a1 1 0 001.415 1.415zm3.2-5.171a1 1 0 00-1.3 1.3l4 10a1 1 0 001.823.075l1.38-2.759 3.018 3.02a1 1 0 001.414-1.415l-3.019-3.02 2.76-1.379a1 1 0 00-.076-1.822l-10-4z" clipRule="evenodd" /></svg>; | ||
export default CursorClick; |
3 changes: 3 additions & 0 deletions
3
...ComponentSvgs/__testfixtures__/reExported/output/web/src/components/Icons/DatabaseSVG.tsx
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,3 @@ | ||
import type { SVGProps } from "react"; | ||
const Database = (props: SVGProps<SVGSVGElement>) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" {...props}><path d="M3 12v3c0 1.657 3.134 3 7 3s7-1.343 7-3v-3c0 1.657-3.134 3-7 3s-7-1.343-7-3z" /><path d="M3 7v3c0 1.657 3.134 3 7 3s7-1.343 7-3V7c0 1.657-3.134 3-7 3S3 8.657 3 7z" /><path d="M17 5c0 1.657-3.134 3-7 3S3 6.657 3 5s3.134-3 7-3 7 1.343 7 3z" /></svg>; | ||
export default Database; |
3 changes: 3 additions & 0 deletions
3
...onentSvgs/__testfixtures__/reExported/output/web/src/components/Icons/DeviceMobileSVG.tsx
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,3 @@ | ||
import type { SVGProps } from "react"; | ||
const DeviceMobile = (props: SVGProps<SVGSVGElement>) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" {...props}><path fillRule="evenodd" d="M7 2a2 2 0 00-2 2v12a2 2 0 002 2h6a2 2 0 002-2V4a2 2 0 00-2-2H7zm3 14a1 1 0 100-2 1 1 0 000 2z" clipRule="evenodd" /></svg>; | ||
export default DeviceMobile; |
8 changes: 8 additions & 0 deletions
8
...eplaceComponentSvgs/__testfixtures__/reExported/output/web/src/components/Icons/Icons.tsx
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,8 @@ | ||
import CurrencyYen from "./CurrencyYenSVG" | ||
import Database from "./DatabaseSVG" | ||
import Desktop from "src/components/other/DesktopComputerSVG" | ||
import DeviceMobile from "./DeviceMobileSVG" | ||
|
||
export { CurrencyYen, Database as DBIcon, Desktop, DeviceMobile as Mobile} | ||
|
||
export { default as CursorClick } from "./CursorClickSVG" |
3 changes: 3 additions & 0 deletions
3
...gs/__testfixtures__/reExported/output/web/src/components/Icons/currency-yen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...gs/__testfixtures__/reExported/output/web/src/components/Icons/cursor-click.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
...ntSvgs/__testfixtures__/reExported/output/web/src/components/Icons/database.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...s/__testfixtures__/reExported/output/web/src/components/Icons/device-mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...ntSvgs/__testfixtures__/reExported/output/web/src/components/other/DesktopComputerSVG.tsx
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,3 @@ | ||
import type { SVGProps } from "react"; | ||
const DesktopComputer = (props: SVGProps<SVGSVGElement>) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" {...props}><path fillRule="evenodd" d="M3 5a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2h-2.22l.123.489.804.804A1 1 0 0113 18H7a1 1 0 01-.707-1.707l.804-.804L7.22 15H5a2 2 0 01-2-2V5zm5.771 7H5V5h10v7H8.771z" clipRule="evenodd" /></svg>; | ||
export default DesktopComputer; |
3 changes: 3 additions & 0 deletions
3
..._testfixtures__/reExported/output/web/src/components/other/desktop-computer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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