Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Aug 8, 2022
1 parent 3eff34d commit 75dfe17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-sharp/src/index.js
Expand Up @@ -262,7 +262,7 @@ async function generateBase64({ file, args = {}, reporter }) {
})
let pipeline
try {
pipeline = sharp({ failOn: options.failOn })
pipeline = sharp({ failOn: pluginOptions.failOn })

if (!options.rotate) {
pipeline.rotate()
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-sharp/src/plugin-options.ts
Expand Up @@ -23,7 +23,7 @@ export interface ISharpPluginOptions {
useMozJpeg?: boolean
stripMetadata?: boolean
lazyImageGeneration?: boolean
defaultQuality?: number
defaultQuality: number
failOn?: SharpOptions["failOn"]
defaults?: PluginOptionsDefaults
}
Expand Down Expand Up @@ -162,7 +162,7 @@ export const healOptions = (
{
defaultQuality: quality,
base64Width,
}: { defaultQuality: number; base64Width?: number },
}: Pick<ISharpPluginOptions, "defaultQuality" | "base64Width">,
args: ITransformArgs,
fileExtension = ``,
defaultArgs = {}
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-sharp/src/process-file.ts
Expand Up @@ -30,7 +30,7 @@ interface ITransform {
export const processFile = async (
file: string,
transforms: Array<ITransform>,
options: ISharpPluginOptions = {}
options = {} as ISharpPluginOptions
): Promise<Array<ITransform>> => {
let pipeline
try {
Expand Down

0 comments on commit 75dfe17

Please sign in to comment.