-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gatsby-codemods): Handle or warn on nested options changes (#29046)
* handle or warn on options changes * remove srcSetBreakpoints from list * use forEach instead
- Loading branch information
LB
authored
Jan 18, 2021
1 parent
c0e6c92
commit 2439b44
Showing
5 changed files
with
69 additions
and
5 deletions.
There are no files selected for viewing
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
14 changes: 14 additions & 0 deletions
14
...y-codemods/src/transforms/__testfixtures__/gatsby-plugin-image/transform-options.input.js
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,14 @@ | ||
import React from "react" | ||
import { graphql } from "gatsby" | ||
|
||
export const query = graphql` | ||
{ | ||
file(relativePath: {eq: "icon.png"}) { | ||
childImageSharp { | ||
fluid(duotone: {highlight: "#f00e2e", shadow: "#192550"}, rotate: 50) { | ||
...GatsbyImageSharpFluid | ||
} | ||
} | ||
} | ||
} | ||
` |
11 changes: 11 additions & 0 deletions
11
...-codemods/src/transforms/__testfixtures__/gatsby-plugin-image/transform-options.output.js
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,11 @@ | ||
import React from "react" | ||
import { graphql } from "gatsby" | ||
|
||
export const query = graphql`{ | ||
file(relativePath: {eq: "icon.png"}) { | ||
childImageSharp { | ||
gatsbyImageData(transformOptions: {duotone: {highlight: "#f00e2e", shadow: "#192550"}, rotate: 50}, layout: FULL_WIDTH) | ||
} | ||
} | ||
} | ||
` |
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ const tests = [ | |
`optional-chaining`, | ||
`styled`, | ||
`fluid`, | ||
`transform-options`, | ||
`variable-src`, | ||
] | ||
|
||
|
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