From 0c45654476ca506cb268b17784ae46399ae178d8 Mon Sep 17 00:00:00 2001 From: GatsbyJS Bot Date: Tue, 6 Dec 2022 10:10:26 -0700 Subject: [PATCH] chore: remove tracedSVG (#37093) (#37137) * chore: remove tracedSVG (#37093) * init * gri * update shopify snapshot * gatsby-plugin-sharp tests * update gatsby-remark-images/gatsby-node tests * update gatsby-plugin-image tests * update schema print tests * remove traceSVG unit tests as it was removed * legacy gatsby-image fields * update polyfill tests * update cypress assertion * update contentful cypress assertions * drop few more packages from gatsby-plugin-sharp as they are no onger used * correct IMAGE_CDN fallback for TRACE_SVG * update generateImageData * update e2e-prod/assertions * update unit test * update snapshot * update e2e-dev/assertions * drop more unused * sync yarn.lock * a bit more prod warnings * adjust gatsby-remark-images plugin options warning * add link to gatsby-remark-images warning (cherry picked from commit 94c2d735ad378bf05836e74cc47f7ca9523cabdc) * gatsby recipe tests * cli tests * babel config tests * update assertion * some reverts? * update assertion * contentful extend node type * fallback in test * fix tracedSVG fields * fix(gatsby-cli): relax error location validation and ignore extra fields (#34559) * package.json removals Co-authored-by: Michal Piechowiak --- .../cypress/integration/gatsby-image.js | 4 +- .../integration/gatsby-plugin-image.js | 2 +- .../contentful/cypress/integration/tags.js | 2 +- .../src/pages/gatsby-plugin-image.js | 4 +- .../cypress/integration/traced.js | 12 +- examples/using-contentful/package.json | 1 + integration-tests/gatsby-cli/__tests__/new.js | 8 +- .../src/structured-errors/error-schema.ts | 12 +- .../gatsby-plugin-image/src/resolver-utils.ts | 6 +- packages/gatsby-plugin-sharp/package.json | 3 - .../src/__tests__/__snapshots__/index.js.snap | 8 +- .../src/__tests__/index.js | 12 +- .../src/__tests__/trace-svg.js | 236 --------- .../gatsby-plugin-sharp/src/image-data.ts | 13 +- packages/gatsby-plugin-sharp/src/index.js | 72 ++- packages/gatsby-plugin-sharp/src/trace-svg.js | 179 ------- .../npm/__snapshots__/package.test.js.snap | 4 +- .../src/providers/npm/package.js | 12 +- packages/gatsby-remark-images/package.json | 1 - .../src/__tests__/__snapshots__/index.js.snap | 62 +-- .../src/__tests__/gatsby-node.js | 170 ++++--- .../src/__tests__/index.js | 14 +- .../gatsby-remark-images/src/gatsby-node.js | 32 +- packages/gatsby-remark-images/src/index.js | 27 +- .../src/extend-node-type.js | 87 ++-- .../gatsby-transformer-sharp/package.json | 1 - .../src/customize-schema.js | 79 +-- .../gatsby-transformer-sharp/src/types.ts | 13 +- .../cache-dir/__tests__/minimal-config.js | 13 + yarn.lock | 477 +----------------- 30 files changed, 395 insertions(+), 1171 deletions(-) delete mode 100644 packages/gatsby-plugin-sharp/src/__tests__/trace-svg.js delete mode 100644 packages/gatsby-plugin-sharp/src/trace-svg.js diff --git a/e2e-tests/contentful/cypress/integration/gatsby-image.js b/e2e-tests/contentful/cypress/integration/gatsby-image.js index 2b47919a5fa67..e192cc2f06557 100644 --- a/e2e-tests/contentful/cypress/integration/gatsby-image.js +++ b/e2e-tests/contentful/cypress/integration/gatsby-image.js @@ -52,7 +52,9 @@ describe(`gatsby-image`, () => { it(`fluid`, testConfig, () => testGatsbyImage(`fluid`, hasBase64Placeholder)) it(`fixed`, testConfig, () => testGatsbyImage(`fixed`, hasBase64Placeholder)) it(`webp`, testConfig, () => testGatsbyImage(`webp`, hasBase64Placeholder)) - it(`traced`, testConfig, () => testGatsbyImage(`traced`, hasSVGPlaceholder)) + it(`traced`, testConfig, () => + testGatsbyImage(`traced`, hasBase64Placeholder) + ) it(`sqip`, testConfig, () => testGatsbyImage(`sqip`, hasSVGPlaceholder)) it(`english`, testConfig, () => { diff --git a/e2e-tests/contentful/cypress/integration/gatsby-plugin-image.js b/e2e-tests/contentful/cypress/integration/gatsby-plugin-image.js index 98ae486d7f9e8..ec27c6c0660fc 100644 --- a/e2e-tests/contentful/cypress/integration/gatsby-plugin-image.js +++ b/e2e-tests/contentful/cypress/integration/gatsby-plugin-image.js @@ -74,7 +74,7 @@ describe(`gatsby-plugin-image`, () => { testGatsbyPluginImage(`dominant-color`, hasColorPlaceholder) ) it(`traced`, testConfig, () => - testGatsbyPluginImage(`traced`, hasSVGPlaceholder) + testGatsbyPluginImage(`traced`, hasColorPlaceholder) ) it(`blurred`, testConfig, () => testGatsbyPluginImage(`blurred`, hasBase64Placeholder) diff --git a/e2e-tests/contentful/cypress/integration/tags.js b/e2e-tests/contentful/cypress/integration/tags.js index bb5b50b45e113..7e41f1d39f25e 100644 --- a/e2e-tests/contentful/cypress/integration/tags.js +++ b/e2e-tests/contentful/cypress/integration/tags.js @@ -19,7 +19,7 @@ describe(`tags`, () => { "have.text", "numberInteger" ) - cy.get('[data-cy-id^="tag-"]').should("have.length", 2) + cy.get('[data-cy-id^="tag-"]').should("have.length", 5) }) it(`Filtered Entries`, () => { cy.get('[data-cy-integers] [data-cy-id="number-integer"]').should( diff --git a/e2e-tests/contentful/src/pages/gatsby-plugin-image.js b/e2e-tests/contentful/src/pages/gatsby-plugin-image.js index 38f11874aa32f..6034696e46512 100644 --- a/e2e-tests/contentful/src/pages/gatsby-plugin-image.js +++ b/e2e-tests/contentful/src/pages/gatsby-plugin-image.js @@ -85,7 +85,9 @@ const GatsbyPluginImagePage = ({ data }) => { ))} -

gatsby-plugin-image: Traced SVG Placeholder

+

+ gatsby-plugin-image: Traced SVG Placeholder (fallback to DOMINANT_COLOR) +

{data.default.nodes.map(node => (
diff --git a/e2e-tests/gatsby-static-image/cypress/integration/traced.js b/e2e-tests/gatsby-static-image/cypress/integration/traced.js index 1ae2902980036..b57574cfb16db 100644 --- a/e2e-tests/gatsby-static-image/cypress/integration/traced.js +++ b/e2e-tests/gatsby-static-image/cypress/integration/traced.js @@ -5,12 +5,14 @@ describe(`fixed`, () => { cy.visit(`/traced`).waitForRouteChange() }) - it(`renders a traced svg`, () => { + it(`traced svg (falls back to DOMINANT_COLOR)`, () => { cy.getTestElement(tracedTestId) - .find(`.gatsby-image-wrapper > img`) - .should(`have.attr`, `src`) - .and(src => { - ;[`data:image/svg+xml`].forEach(part => expect(src).to.include(part)) + .find(`.gatsby-image-wrapper > [data-placeholder-image]`) + .first() + .should($el => { + // traced falls + expect($el.prop("tagName")).to.be.equal("DIV") + expect($el).to.be.empty }) }) diff --git a/examples/using-contentful/package.json b/examples/using-contentful/package.json index bee4a0c26c41c..838a1bf31d704 100644 --- a/examples/using-contentful/package.json +++ b/examples/using-contentful/package.json @@ -30,6 +30,7 @@ "scripts": { "develop": "gatsby develop", "build": "gatsby build", + "clean": "gatsby clean", "start": "gatsby serve" } } diff --git a/integration-tests/gatsby-cli/__tests__/new.js b/integration-tests/gatsby-cli/__tests__/new.js index 6cf61330aff15..b4e10b2d1ff69 100644 --- a/integration-tests/gatsby-cli/__tests__/new.js +++ b/integration-tests/gatsby-cli/__tests__/new.js @@ -29,7 +29,11 @@ describe(`gatsby new`, () => { }) it(`creates a gatsby site with the default starter`, () => { - const [code, logs] = GatsbyCLI.from(cwd).invoke([`new`, `gatsby-default`]) + const [code, logs] = GatsbyCLI.from(cwd).invoke([ + `new`, + `gatsby-default`, + `gatsbyjs/gatsby-starter-default#v3`, + ]) logs.should.contain( `info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-default.git` @@ -48,7 +52,7 @@ describe(`gatsby new`, () => { const [code, logs] = GatsbyCLI.from(cwd).invoke([ `new`, `gatsby-blog`, - `gatsbyjs/gatsby-starter-blog`, + `gatsbyjs/gatsby-starter-blog#v3`, ]) logs.should.contain( diff --git a/packages/gatsby-cli/src/structured-errors/error-schema.ts b/packages/gatsby-cli/src/structured-errors/error-schema.ts index 306da6d31bdee..ec7dcdbb0e89c 100644 --- a/packages/gatsby-cli/src/structured-errors/error-schema.ts +++ b/packages/gatsby-cli/src/structured-errors/error-schema.ts @@ -1,10 +1,12 @@ import Joi from "joi" import { ILocationPosition, IStructuredError } from "./types" -export const Position: Joi.ObjectSchema = Joi.object().keys({ - line: Joi.number(), - column: Joi.number(), -}) +export const Position: Joi.ObjectSchema = Joi.object() + .keys({ + line: Joi.number(), + column: Joi.number(), + }) + .unknown() export const errorSchema: Joi.ObjectSchema = Joi.object().keys({ @@ -27,7 +29,7 @@ export const errorSchema: Joi.ObjectSchema = location: Joi.object({ start: Position.required(), end: Position, - }), + }).unknown(), docsUrl: Joi.string().uri({ allowRelative: false, relativeOnly: false, diff --git a/packages/gatsby-plugin-image/src/resolver-utils.ts b/packages/gatsby-plugin-image/src/resolver-utils.ts index b21a3ab991ff2..a0bac3ff2c8d2 100644 --- a/packages/gatsby-plugin-image/src/resolver-utils.ts +++ b/packages/gatsby-plugin-image/src/resolver-utils.ts @@ -201,9 +201,9 @@ export function getGatsbyImageFieldConfig( type: ImagePlaceholderType.name, description: stripIndent` Format of generated placeholder image, displayed while the main image loads. - BLURRED: a blurred, low resolution image, encoded as a base64 data URI (default) - DOMINANT_COLOR: a solid color, calculated from the dominant color of the image. - TRACED_SVG: a low-resolution traced SVG of the image. + BLURRED: a blurred, low resolution image, encoded as a base64 data URI. + DOMINANT_COLOR: a solid color, calculated from the dominant color of the image (default). + TRACED_SVG: deprecated. Will use DOMINANT_COLOR. NONE: no placeholder. Set the argument "backgroundColor" to use a fixed background color.`, }, formats: { diff --git a/packages/gatsby-plugin-sharp/package.json b/packages/gatsby-plugin-sharp/package.json index 41fea2eb19a18..b82a9d1509bf0 100644 --- a/packages/gatsby-plugin-sharp/package.json +++ b/packages/gatsby-plugin-sharp/package.json @@ -17,13 +17,10 @@ "gatsby-telemetry": "^2.14.0", "got": "^11.8.2", "lodash": "^4.17.21", - "mini-svg-data-uri": "^1.3.3", - "potrace": "^2.1.8", "probe-image-size": "^6.0.0", "progress": "^2.0.3", "semver": "^7.3.5", "sharp": "^0.29.0", - "svgo": "1.3.2", "uuid": "3.4.0" }, "devDependencies": { diff --git a/packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap b/packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap index ad86535eea532..79b914277c34f 100644 --- a/packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap +++ b/packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap @@ -1604,7 +1604,7 @@ Object { } `; -exports[`gatsby-plugin-sharp tracedSVG runs on demand 1`] = ` +exports[`gatsby-plugin-sharp tracedSVG runs on demand (and falls back to blurred): fixed 1`] = ` Object { "aspectRatio": 1, "base64": undefined, @@ -1612,12 +1612,12 @@ Object { "originalName": "test.png", "src": "/static/1234/7e516/test.png", "srcSet": "/static/1234/7e516/test.png 1x", - "tracedSVG": "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='100'%20viewBox='0%200%20100%20100'%20preserveAspectRatio='none'%3e%3cpath%20d='M41%2024c-18%207-24%2029-11%2043%2015%2017%2044%208%2046-15%201-19-17-34-35-28'%20fill='red'%20fill-rule='evenodd'/%3e%3c/svg%3e", + "tracedSVG": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAACXBIWXMAAAsTAAALEwEAmpwYAAABP0lEQVQ4y2P4r8ZANmKgvuZ/agy/VaHojyopmv+CNf/XQCCoCEHNf1VBqv+oM5yVY1giwbBakuG2AkjknzoW/eh2/tdgOCPHYM7OwMDAwAgiGFgYGMJ5GF4og43ApRmuk58JqpMJRjIwMBizMbxTZviPaj8ihCD6rThAStkgljJATWEHc3P5wT5SxdD8B2ztERmQIiYGdAAxSpaF4T2q5TDN4HCaLgZSxMyAE1yQgwY+Fs1zxQloviSPTTMktM7JgVzIiKEH4hElFoavKogAQgltiJA3F0gdOyPC58yw8GsUwhFgUMvVGR4oMqiwogQbhOHLxfBLDcVabIlEneGxEkMMLwMvTLc4M0OdEMN3VfRIxp48/6mDnPdCieGkHCiRflRh+K+JPXljz1IQJ0AzhjrRGQPZC5As+ZeuhQGRmgHU8mT34D0STQAAAABJRU5ErkJggg==", "width": 100, } `; -exports[`gatsby-plugin-sharp tracedSVG runs on demand 2`] = ` +exports[`gatsby-plugin-sharp tracedSVG runs on demand (and falls back to blurred): fluid 1`] = ` Object { "aspectRatio": 1, "base64": undefined, @@ -1632,6 +1632,6 @@ Object { /static/1234/a1812/test.png 50w, /static/1234/7e516/test.png 100w", "srcSetType": "image/png", - "tracedSVG": "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='100'%20viewBox='0%200%20100%20100'%20preserveAspectRatio='none'%3e%3cpath%20d='M41%2024c-18%207-24%2029-11%2043%2015%2017%2044%208%2046-15%201-19-17-34-35-28'%20fill='red'%20fill-rule='evenodd'/%3e%3c/svg%3e", + "tracedSVG": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAACXBIWXMAAAsTAAALEwEAmpwYAAABP0lEQVQ4y2P4r8ZANmKgvuZ/agy/VaHojyopmv+CNf/XQCCoCEHNf1VBqv+oM5yVY1giwbBakuG2AkjknzoW/eh2/tdgOCPHYM7OwMDAwAgiGFgYGMJ5GF4og43ApRmuk58JqpMJRjIwMBizMbxTZviPaj8ihCD6rThAStkgljJATWEHc3P5wT5SxdD8B2ztERmQIiYGdAAxSpaF4T2q5TDN4HCaLgZSxMyAE1yQgwY+Fs1zxQloviSPTTMktM7JgVzIiKEH4hElFoavKogAQgltiJA3F0gdOyPC58yw8GsUwhFgUMvVGR4oMqiwogQbhOHLxfBLDcVabIlEneGxEkMMLwMvTLc4M0OdEMN3VfRIxp48/6mDnPdCieGkHCiRflRh+K+JPXljz1IQJ0AzhjrRGQPZC5As+ZeuhQGRmgHU8mT34D0STQAAAABJRU5ErkJggg==", } `; diff --git a/packages/gatsby-plugin-sharp/src/__tests__/index.js b/packages/gatsby-plugin-sharp/src/__tests__/index.js index dd8bbb209b32a..4e55c971fa258 100644 --- a/packages/gatsby-plugin-sharp/src/__tests__/index.js +++ b/packages/gatsby-plugin-sharp/src/__tests__/index.js @@ -651,7 +651,7 @@ describe(`gatsby-plugin-sharp`, () => { expect(result.tracedSVG).toBeUndefined() }) - it(`runs on demand`, async () => { + it(`runs on demand (and falls back to blurred)`, async () => { const args = { maxWidth: 100, width: 100, @@ -665,14 +665,20 @@ describe(`gatsby-plugin-sharp`, () => { args, }) - expect(fixedSvg).toMatchSnapshot() + expect(fixedSvg).toMatchSnapshot(`fixed`) + + expect(fixedSvg.tracedSVG).toMatch(`data:image/png;base64`) + expect(fixedSvg.tracedSVG).not.toMatch(`data:image/svg+xml`) const fluidSvg = await fluid({ file, args, }) - expect(fluidSvg).toMatchSnapshot() + expect(fluidSvg).toMatchSnapshot(`fluid`) + + expect(fluidSvg.tracedSVG).toMatch(`data:image/png;base64`) + expect(fluidSvg.tracedSVG).not.toMatch(`data:image/svg+xml`) }) }) diff --git a/packages/gatsby-plugin-sharp/src/__tests__/trace-svg.js b/packages/gatsby-plugin-sharp/src/__tests__/trace-svg.js deleted file mode 100644 index ddb790fa5b049..0000000000000 --- a/packages/gatsby-plugin-sharp/src/__tests__/trace-svg.js +++ /dev/null @@ -1,236 +0,0 @@ -jest.mock(`sharp`, () => { - const sharp = path => { - const pipeline = { - rotate: () => pipeline, - resize: () => pipeline, - png: () => pipeline, - jpeg: () => pipeline, - toFile: (_, cb) => cb(), - on: () => pipeline, - once: () => pipeline, - write: () => pipeline, - end: () => pipeline, - emit: () => pipeline, - } - return pipeline - } - - sharp.simd = jest.fn() - sharp.concurrency = jest.fn() - - return sharp -}) - -jest.mock(`fs-extra`, () => { - return { - ...jest.requireActual(`fs-extra`), - createReadStream: () => { - const stream = { - pipe: () => stream, - } - return stream - }, - } -}) - -jest.mock(`potrace`, () => { - const circleSvgString = `` - return { - trace: (_, _2, cb) => cb(null, circleSvgString), - Potrace: { - TURNPOLICY_MAJORITY: `wat`, - }, - } -}) - -const path = require(`path`) - -const traceSVGHelpers = require(`../trace-svg`) - -const notMemoizedtraceSVG = jest.spyOn(traceSVGHelpers, `notMemoizedtraceSVG`) -const notMemoizedPrepareTraceSVGInputFile = jest.spyOn( - traceSVGHelpers, - `notMemoizedPrepareTraceSVGInputFile` -) -// note that we started spying on not memoized functions first -// now we recreate memoized functions that will use function we just started -// spying on -traceSVGHelpers.createMemoizedFunctions() -const memoizedTraceSVG = jest.spyOn(traceSVGHelpers, `memoizedTraceSVG`) -const memoizedPrepareTraceSVGInputFile = jest.spyOn( - traceSVGHelpers, - `memoizedPrepareTraceSVGInputFile` -) - -const { traceSVG } = require(`../`) - -function getFileObject(absolutePath, name = path.parse(absolutePath).name) { - return { - id: `${absolutePath} absPath of file`, - name: name, - absolutePath, - extension: `png`, - internal: { - contentDigest: `1234`, - }, - } -} - -describe(`traceSVG memoization`, () => { - const file = getFileObject(path.join(__dirname, `images/test.png`)) - const copyOfFile = getFileObject(path.join(__dirname, `images/test-copy.png`)) - const differentFile = getFileObject( - path.join(__dirname, `images/different.png`) - ) - differentFile.internal.contentDigest = `4321` - - beforeEach(() => { - traceSVGHelpers.clearMemoizeCaches() - memoizedTraceSVG.mockClear() - notMemoizedtraceSVG.mockClear() - memoizedPrepareTraceSVGInputFile.mockClear() - notMemoizedPrepareTraceSVGInputFile.mockClear() - }) - - it(`Baseline`, async () => { - await traceSVG({ - file, - }) - - expect(memoizedTraceSVG).toBeCalledTimes(1) - expect(notMemoizedtraceSVG).toBeCalledTimes(1) - expect(memoizedPrepareTraceSVGInputFile).toBeCalledTimes(1) - expect(notMemoizedPrepareTraceSVGInputFile).toBeCalledTimes(1) - }) - - it(`Is memoizing results for same args`, async () => { - await traceSVG({ - file, - }) - - await traceSVG({ - file, - }) - - expect(memoizedTraceSVG).toBeCalledTimes(2) - expect(notMemoizedtraceSVG).toBeCalledTimes(1) - expect(memoizedPrepareTraceSVGInputFile).toBeCalledTimes(1) - expect(notMemoizedPrepareTraceSVGInputFile).toBeCalledTimes(1) - }) - - it(`Is calling functions with same input file when params change`, async () => { - await traceSVG({ - file, - args: { - color: `red`, - }, - fileArgs: { - width: 400, - }, - }) - await traceSVG({ - file, - args: { - color: `blue`, - }, - fileArgs: { - width: 400, - }, - }) - await traceSVG({ - file, - args: { - color: `red`, - }, - fileArgs: { - width: 200, - }, - }) - await traceSVG({ - file, - args: { - color: `blue`, - }, - fileArgs: { - width: 200, - }, - }) - await traceSVG({ - file: differentFile, - args: { - color: `red`, - }, - fileArgs: { - width: 400, - }, - }) - - expect(memoizedTraceSVG).toBeCalledTimes(5) - expect(notMemoizedtraceSVG).toBeCalledTimes(5) - expect(memoizedPrepareTraceSVGInputFile).toBeCalledTimes(5) - // trace svg should be actually created just 3 times - // because it's affected just by `fileArgs`, and not `args` - // this makes sure we don't try to write to same input file multiple times - expect(notMemoizedPrepareTraceSVGInputFile).toBeCalledTimes(3) - expect(notMemoizedPrepareTraceSVGInputFile).toHaveBeenNthCalledWith( - 1, - expect.objectContaining({ - file, - options: expect.objectContaining({ - width: 400, - }), - }) - ) - expect(notMemoizedPrepareTraceSVGInputFile).toHaveBeenNthCalledWith( - 2, - expect.objectContaining({ - file, - options: expect.objectContaining({ - width: 200, - }), - }) - ) - expect(notMemoizedPrepareTraceSVGInputFile).toHaveBeenNthCalledWith( - 3, - expect.objectContaining({ - file: differentFile, - options: expect.objectContaining({ - width: 400, - }), - }) - ) - - const usedTmpFilePaths = notMemoizedPrepareTraceSVGInputFile.mock.calls.map( - args => args[0].tmpFilePath - ) - - // tmpFilePath was always unique - expect(usedTmpFilePaths.length).toBe(new Set(usedTmpFilePaths).size) - }) - - it(`Use memoized results for file copies`, async () => { - await traceSVG({ - file, - args: { - color: `red`, - }, - fileArgs: { - width: 400, - }, - }) - await traceSVG({ - file: copyOfFile, - args: { - color: `red`, - }, - fileArgs: { - width: 400, - }, - }) - - expect(memoizedTraceSVG).toBeCalledTimes(2) - expect(notMemoizedtraceSVG).toBeCalledTimes(1) - expect(memoizedPrepareTraceSVGInputFile).toBeCalledTimes(1) - expect(notMemoizedPrepareTraceSVGInputFile).toBeCalledTimes(1) - }) -}) diff --git a/packages/gatsby-plugin-sharp/src/image-data.ts b/packages/gatsby-plugin-sharp/src/image-data.ts index bd48443bed063..4cc87340c38af 100644 --- a/packages/gatsby-plugin-sharp/src/image-data.ts +++ b/packages/gatsby-plugin-sharp/src/image-data.ts @@ -89,6 +89,7 @@ function normalizeFormat(format: string): ImageFormat { return format as ImageFormat } +let didShowTraceSVGRemovalWarning = false export async function generateImageData({ file, args, @@ -98,7 +99,7 @@ export async function generateImageData({ }: IImageDataArgs): Promise { args = mergeDefaults(args) - const { + let { layout = `constrained`, placeholder = `dominantColor`, tracedSVGOptions = {}, @@ -115,6 +116,16 @@ export async function generateImageData({ : DEFAULT_BREAKPOINTS } + if (placeholder === `tracedSVG`) { + if (!didShowTraceSVGRemovalWarning) { + console.warn( + `"TRACED_SVG" placeholder argument value is no longer supported (used in gatsbyImageData processing), falling back to "DOMINANT_COLOR". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarning = true + } + placeholder = `dominantColor` + } + const { fit = `cover`, cropFocus = sharp.strategy.attention, diff --git a/packages/gatsby-plugin-sharp/src/index.js b/packages/gatsby-plugin-sharp/src/index.js index 0d701feff6ad3..ac738c04abe31 100644 --- a/packages/gatsby-plugin-sharp/src/index.js +++ b/packages/gatsby-plugin-sharp/src/index.js @@ -16,7 +16,6 @@ const { createTransformObject, removeDefaultValues, } = require(`./plugin-options`) -const { memoizedTraceSVG, notMemoizedtraceSVG } = require(`./trace-svg`) const duotone = require(`./duotone`) const { IMAGE_PROCESSING_JOB_NAME } = require(`./gatsby-worker`) const { getDimensionsAndAspectRatio } = require(`./utils`) @@ -387,26 +386,17 @@ async function base64(arg) { return await memoizedBase64(arg) } +let didShowTraceSVGRemovalWarning = false async function traceSVG(args) { - if (args.cache) { - // Not all transformer plugins are going to provide cache - return await cachifiedProcess(args, generateCacheKey, notMemoizedtraceSVG) + if (!didShowTraceSVGRemovalWarning) { + console.warn( + `traceSVG placeholder generation is no longer supported, falling back to blurred. See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarning = true } - return await memoizedTraceSVG(args) -} -async function getTracedSVG({ file, options, cache, reporter }) { - if (options.generateTracedSVG && options.tracedSVG) { - const tracedSVG = await traceSVG({ - args: options.tracedSVG, - fileArgs: options, - file, - cache, - reporter, - }) - return tracedSVG - } - return undefined + const { src } = await base64(args) + return src } async function stats({ file, reporter }) { @@ -430,6 +420,7 @@ async function stats({ file, reporter }) { } } +let didShowTraceSVGRemovalWarningFluid = false async function fluid({ file, args = {}, reporter, cache }) { const options = healOptions(getPluginOptions(), args, file.extension) if (options.sizeByPixelDensity) { @@ -564,8 +555,17 @@ async function fluid({ file, args = {}, reporter, cache }) { reporter, }) + if (options.generateTracedSVG && options.tracedSVG) { + if (!didShowTraceSVGRemovalWarningFluid) { + console.warn( + `tracedSVG placeholder generation for fluid images is no longer supported, falling back to blurred. See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningFluid = true + } + } + let base64Image - if (options.base64) { + if (options.base64 || (options.generateTracedSVG && options.tracedSVG)) { const base64Width = options.base64Width const base64Height = Math.max( 1, @@ -588,8 +588,6 @@ async function fluid({ file, args = {}, reporter, cache }) { base64Image = await base64({ file, args: base64Args, reporter, cache }) } - const tracedSVG = await getTracedSVG({ options, file, cache, reporter }) - // Construct src and srcSet strings. const originalImg = _.maxBy(images, image => image.width).src const fallbackSrc = _.minBy(images, image => @@ -636,7 +634,7 @@ async function fluid({ file, args = {}, reporter, cache }) { `(max-width: ${presentationWidth}px) 100vw, ${presentationWidth}px` return { - base64: base64Image && base64Image.src, + base64: (options.base64 && base64Image && base64Image.src) || undefined, aspectRatio: images[0].aspectRatio, src: fallbackSrc, srcSet, @@ -647,10 +645,16 @@ async function fluid({ file, args = {}, reporter, cache }) { density, presentationWidth, presentationHeight, - tracedSVG, + tracedSVG: + (options.generateTracedSVG && + options.tracedSVG && + base64Image && + base64Image.src) || + undefined, } } +let didShowTraceSVGRemovalWarningFixed = false async function fixed({ file, args = {}, reporter, cache }) { const options = healOptions(getPluginOptions(), args, file.extension) @@ -703,8 +707,17 @@ async function fixed({ file, args = {}, reporter, cache }) { reporter, }) + if (options.generateTracedSVG && options.tracedSVG) { + if (!didShowTraceSVGRemovalWarningFixed) { + console.warn( + `tracedSVG placeholder generation for fixed images is no longer supported, falling back to blurred. See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningFixed = true + } + } + let base64Image - if (options.base64) { + if (options.base64 || (options.generateTracedSVG && options.tracedSVG)) { const base64Width = options.base64Width const base64Height = Math.max( 1, @@ -732,8 +745,6 @@ async function fixed({ file, args = {}, reporter, cache }) { }) } - const tracedSVG = await getTracedSVG({ options, file, reporter, cache }) - const fallbackSrc = images[0].src const srcSet = images .map((image, i) => { @@ -757,14 +768,19 @@ async function fixed({ file, args = {}, reporter, cache }) { const originalName = file.base return { - base64: base64Image && base64Image.src, + base64: (options.base64 && base64Image && base64Image.src) || undefined, aspectRatio: images[0].aspectRatio, width: images[0].width, height: images[0].height, src: fallbackSrc, srcSet, originalName: originalName, - tracedSVG, + tracedSVG: + (options.generateTracedSVG && + options.tracedSVG && + base64Image && + base64Image.src) || + undefined, } } diff --git a/packages/gatsby-plugin-sharp/src/trace-svg.js b/packages/gatsby-plugin-sharp/src/trace-svg.js deleted file mode 100644 index b9a894d9f66d3..0000000000000 --- a/packages/gatsby-plugin-sharp/src/trace-svg.js +++ /dev/null @@ -1,179 +0,0 @@ -const { promisify } = require(`bluebird`) -const fs = require(`fs-extra`) -const _ = require(`lodash`) -const tmpDir = require(`os`).tmpdir() -const path = require(`path`) -const sharp = require(`./safe-sharp`) -const filenamify = require(`filenamify`) -const duotone = require(`./duotone`) -const { getPluginOptions, healOptions } = require(`./plugin-options`) -const { reportError } = require(`./report-error`) -const { createContentDigest } = require(`gatsby-core-utils`) - -exports.notMemoizedPrepareTraceSVGInputFile = async ({ - file, - options, - tmpFilePath, - reporter, -}) => { - let pipeline - try { - pipeline = sharp() - - if (!options.rotate) { - pipeline.rotate() - } - fs.createReadStream(file.absolutePath).pipe(pipeline) - } catch (err) { - reportError(`Failed to process image ${file.absolutePath}`, err, reporter) - return - } - - pipeline - .resize(options.width, options.height, { - position: options.cropFocus, - }) - .png({ - compressionLevel: options.pngCompressionLevel, - adaptiveFiltering: false, - force: options.toFormat === `png`, - }) - .jpeg({ - quality: options.quality, - progressive: options.jpegProgressive, - force: options.toFormat === `jpg`, - }) - - // grayscale - if (options.grayscale) { - pipeline = pipeline.grayscale() - } - - // rotate - if (options.rotate && options.rotate !== 0) { - pipeline = pipeline.rotate(options.rotate) - } - - // duotone - if (options.duotone) { - pipeline = await duotone(options.duotone, options.toFormat, pipeline) - } - - await new Promise((resolve, reject) => - pipeline.toFile(tmpFilePath, err => { - if (err) { - return reject(err) - } - return resolve() - }) - ) -} - -const optimize = svg => { - const SVGO = require(`svgo`) - const svgo = new SVGO({ - multipass: true, - floatPrecision: 0, - plugins: [ - { - removeViewBox: false, - }, - { - addAttributesToSVGElement: { - attributes: [ - { - preserveAspectRatio: `none`, - }, - ], - }, - }, - ], - }) - return svgo.optimize(svg).then(({ data }) => data) -} - -exports.notMemoizedtraceSVG = async ({ file, args, fileArgs, reporter }) => { - const options = healOptions( - getPluginOptions(), - { - // use maxWidth/maxHeight as width/height if available - // if width/height is used in fileArgs, the maxWidth/maxHeight - // values will be overritten - ...(fileArgs && fileArgs.maxWidth && fileArgs.maxHeight - ? { - height: fileArgs.maxHeight, - width: fileArgs.maxWidth, - } - : {}), - ...fileArgs, - }, - file.extension - ) - - const optionsHash = createContentDigest(options) - - const tmpFilePath = path.join( - tmpDir, - filenamify( - `${file.internal.contentDigest}-${file.name}-${optionsHash}.${file.extension}` - ) - ) - - await exports.memoizedPrepareTraceSVGInputFile({ - tmpFilePath, - file, - options, - reporter, - }) - - const svgToMiniDataURI = require(`mini-svg-data-uri`) - const potrace = require(`potrace`) - const trace = promisify(potrace.trace) - - const defaultArgs = { - color: `lightgray`, - optTolerance: 0.4, - turdSize: 100, - turnPolicy: potrace.Potrace.TURNPOLICY_MAJORITY, - } - - const optionsSVG = _.defaults({}, args, defaultArgs) - - // `srcset` attribute rejects URIs with literal spaces - const encodeSpaces = str => str.replace(/ /gi, `%20`) - - return trace(tmpFilePath, optionsSVG) - .then(optimize) - .then(svgToMiniDataURI) - .then(encodeSpaces) -} - -let memoizedPrepareTraceSVGInputFile -let memoizedTraceSVG -const createMemoizedFunctions = () => { - exports.memoizedPrepareTraceSVGInputFile = memoizedPrepareTraceSVGInputFile = - _.memoize( - exports.notMemoizedPrepareTraceSVGInputFile, - ({ tmpFilePath }) => tmpFilePath - ) - - exports.memoizedTraceSVG = memoizedTraceSVG = _.memoize( - exports.notMemoizedtraceSVG, - ({ file, args, fileArgs }) => - `${file.internal.contentDigest}${JSON.stringify(args)}${JSON.stringify( - fileArgs - )}` - ) -} - -// This is very hacky, but memoized function are pretty tricky to spy on -// in tests ;( -createMemoizedFunctions() -exports.createMemoizedFunctions = () => { - createMemoizedFunctions() -} - -exports.clearMemoizeCaches = () => { - memoizedTraceSVG.cache.clear() - memoizedPrepareTraceSVGInputFile.cache.clear() -} diff --git a/packages/gatsby-recipes/src/providers/npm/__snapshots__/package.test.js.snap b/packages/gatsby-recipes/src/providers/npm/__snapshots__/package.test.js.snap index 86fe29313d72f..029c6414cc4cc 100644 --- a/packages/gatsby-recipes/src/providers/npm/__snapshots__/package.test.js.snap +++ b/packages/gatsby-recipes/src/providers/npm/__snapshots__/package.test.js.snap @@ -48,11 +48,11 @@ Object { exports[`npm package resource installs 2 resources, one prod & one dev 1`] = ` Object { - "_message": "Installed NPM package div@2.0.1", + "_message": "Installed NPM package div@2.0.2", "description": "<Div row> Use flexbox with ease in React! </Div>", "id": "div", "name": "div", - "version": "2.0.1", + "version": "2.0.2", } `; diff --git a/packages/gatsby-recipes/src/providers/npm/package.js b/packages/gatsby-recipes/src/providers/npm/package.js index 6e8ce2bd0b5d1..3361a87715e95 100644 --- a/packages/gatsby-recipes/src/providers/npm/package.js +++ b/packages/gatsby-recipes/src/providers/npm/package.js @@ -170,9 +170,15 @@ const destroy = async ({ root }, resource) => { return undefined } - await execa(`yarn`, [`remove`, resource.name, `-W`], { - cwd: root, - }) + if (PACKAGE_MANGER === `yarn`) { + await execa(`yarn`, [`remove`, resource.name, `-W`], { + cwd: root, + }) + } else { + await execa(`npm`, [`uninstall`, resource.name], { + cwd: root, + }) + } return readResource } diff --git a/packages/gatsby-remark-images/package.json b/packages/gatsby-remark-images/package.json index 3c9eb482ddb8d..1a17ccbd15fb6 100644 --- a/packages/gatsby-remark-images/package.json +++ b/packages/gatsby-remark-images/package.json @@ -14,7 +14,6 @@ "is-relative-url": "^3.0.0", "lodash": "^4.17.21", "mdast-util-definitions": "^4.0.0", - "potrace": "^2.1.8", "query-string": "^6.13.3", "unist-util-select": "^3.0.4", "unist-util-visit-parents": "^3.1.1" diff --git a/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap b/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap index ea64aca0a8481..a8e2f2f1bd19b 100644 --- a/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap +++ b/packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap @@ -124,6 +124,37 @@ exports[`disableBgImageOnAlpha does not disable background image on transparent " `; +exports[`it doesn't use tracedSVG placeholder (deprecated and fallback to base64) 1`] = ` +" + + + \\"image\\" + + " +`; + exports[`it handles goofy nesting properly 1`] = ` "" `; -exports[`it uses tracedSVG placeholder when enabled 1`] = ` -" - - - \\"image\\" - - " -`; - exports[`markdownCaptions display title in markdown as caption when showCaptions === true && markdownCaptions === true 1`] = ` "
{ + // silence warnings +}) + +beforeEach(() => { + warnSpy.mockClear() +}) describe(`pluginOptionsSchema`, () => { it(`should provide meaningful errors when fields are invalid`, async () => { @@ -44,25 +51,33 @@ describe(`pluginOptionsSchema`, () => { }) it(`should validate the schema`, async () => { - const { isValid } = await testPluginOptionsSchema(pluginOptionsSchema, { - maxWidth: 700, - linkImagesToOriginal: false, - showCaptions: true, - markdownCaptions: true, - sizeByPixelDensity: true, - wrapperStyle: { marginTop: `1rem`, padding: `1.5rem`, color: `blue` }, - backgroundColor: `red`, - quality: 77, - withWebp: true, - tracedSVG: true, - loading: `eager`, - decoding: `async`, - disableBgImageOnAlpha: true, - disableBgImage: true, - srcSetBreakpoints: [400, 600, 800], - }) + const { isValid, errors } = await testPluginOptionsSchema( + pluginOptionsSchema, + { + maxWidth: 700, + linkImagesToOriginal: false, + showCaptions: true, + markdownCaptions: true, + sizeByPixelDensity: true, + wrapperStyle: { marginTop: `1rem`, padding: `1.5rem`, color: `blue` }, + backgroundColor: `red`, + quality: 77, + withWebp: true, + tracedSVG: true, + loading: `eager`, + decoding: `async`, + disableBgImageOnAlpha: true, + disableBgImage: true, + srcSetBreakpoints: [400, 600, 800], + } + ) expect(isValid).toBe(true) + + expect(warnSpy).toBeCalledWith( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + expect(errors).toEqual([]) }) it(`should validate the withWebp prop`, async () => { @@ -113,49 +128,75 @@ describe(`pluginOptionsSchema`, () => { [`true`, true], [`false`, false], ])(`%s`, async (_title, booleanValue) => { - const { isValid } = await testPluginOptionsSchema(pluginOptionsSchema, { - tracedSVG: booleanValue, - }) + const { isValid, errors } = await testPluginOptionsSchema( + pluginOptionsSchema, + { + tracedSVG: booleanValue, + } + ) expect(isValid).toBe(true) + + if (booleanValue) { + expect(warnSpy).toBeCalledWith( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + } + expect(errors).toEqual([]) }) }) describe(`supports object notation`, () => { it(`should validate when all fields are set`, async () => { - const { isValid } = await testPluginOptionsSchema(pluginOptionsSchema, { - tracedSVG: { - turnPolicy: Potrace.TURNPOLICY_RIGHT, - turdSize: 50, - alphaMax: 0.5, - optCurve: false, - optTolerance: 0.9, - threshold: 230, - blackOnWhite: false, - color: `red`, - background: `green`, - }, - }) + const { isValid, errors } = await testPluginOptionsSchema( + pluginOptionsSchema, + { + tracedSVG: { + turnPolicy: `TURNPOLICY_RIGHT`, + turdSize: 50, + alphaMax: 0.5, + optCurve: false, + optTolerance: 0.9, + threshold: 230, + blackOnWhite: false, + color: `red`, + background: `green`, + }, + } + ) expect(isValid).toBe(true) + + expect(warnSpy).toBeCalledWith( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + expect(errors).toEqual([]) }) it(`should validate when some fields are set`, async () => { - const { isValid } = await testPluginOptionsSchema(pluginOptionsSchema, { - tracedSVG: { - turnPolicy: Potrace.TURNPOLICY_RIGHT, - turdSize: 50, - // alphaMax: 0.5, - // optCurve: 0.2, - // optTolerance: 0.9, - // threshold: 230, - // blackOnWhite: false, - color: `red`, - background: `green`, - }, - }) + const { isValid, errors } = await testPluginOptionsSchema( + pluginOptionsSchema, + { + tracedSVG: { + turnPolicy: `TURNPOLICY_RIGHT`, + turdSize: 50, + // alphaMax: 0.5, + // optCurve: 0.2, + // optTolerance: 0.9, + // threshold: 230, + // blackOnWhite: false, + color: `red`, + background: `green`, + }, + } + ) expect(isValid).toBe(true) + + expect(warnSpy).toBeCalledWith( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + expect(errors).toEqual([]) }) it(`should fail validation when unknown fields are set`, async () => { @@ -185,7 +226,7 @@ describe(`pluginOptionsSchema`, () => { `TURNPOLICY_MINORITY`, `TURNPOLICY_MAJORITY`, ])(`supports setting by policy name (%s)`, async name => { - const { isValid } = await testPluginOptionsSchema( + const { isValid, errors } = await testPluginOptionsSchema( pluginOptionsSchema, { tracedSVG: { turnPolicy: name }, @@ -193,17 +234,22 @@ describe(`pluginOptionsSchema`, () => { ) expect(isValid).toBe(true) + + expect(warnSpy).toBeCalledWith( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + expect(errors).toEqual([]) }) it.each([ - Potrace.TURNPOLICY_BLACK, - Potrace.TURNPOLICY_WHITE, - Potrace.TURNPOLICY_LEFT, - Potrace.TURNPOLICY_RIGHT, - Potrace.TURNPOLICY_MINORITY, - Potrace.TURNPOLICY_MAJORITY, + `black`, + `white`, + `left`, + `TURNPOLICY_RIGHT`, + `minority`, + `majority`, ])(`supports setting by policy value (%s)`, async value => { - const { isValid } = await testPluginOptionsSchema( + const { isValid, errors } = await testPluginOptionsSchema( pluginOptionsSchema, { tracedSVG: { turnPolicy: value }, @@ -211,6 +257,11 @@ describe(`pluginOptionsSchema`, () => { ) expect(isValid).toBe(true) + + expect(warnSpy).toBeCalledWith( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + expect(errors).toEqual([]) }) it(`Doesn't support arbitrary string values`, async () => { @@ -236,7 +287,7 @@ describe(`pluginOptionsSchema`, () => { [ `THRESHOLD_AUTO`, { - value: Potrace.THRESHOLD_AUTO, + value: -1, expectedIsValid: true, }, ], @@ -264,7 +315,7 @@ describe(`pluginOptionsSchema`, () => { value = titleAndMaybeValue } - const { isValid } = await testPluginOptionsSchema( + const { isValid, errors } = await testPluginOptionsSchema( pluginOptionsSchema, { tracedSVG: { threshold: value }, @@ -272,6 +323,11 @@ describe(`pluginOptionsSchema`, () => { ) expect(isValid).toBe(true) + + expect(warnSpy).toBeCalledWith( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + expect(errors).toEqual([]) }) // invalid settings diff --git a/packages/gatsby-remark-images/src/__tests__/index.js b/packages/gatsby-remark-images/src/__tests__/index.js index 183b6f93deacd..5e01c55b36e14 100644 --- a/packages/gatsby-remark-images/src/__tests__/index.js +++ b/packages/gatsby-remark-images/src/__tests__/index.js @@ -25,7 +25,6 @@ jest.mock(`gatsby-plugin-sharp`, () => { }) const Remark = require(`remark`) -const { Potrace } = require(`potrace`) const queryString = require(`query-string`) const cheerio = require(`cheerio`) const toHAST = require(`mdast-util-to-hast`) @@ -371,7 +370,7 @@ test(`it transforms images in markdown with query strings`, async () => { expect(node.value).not.toMatch(``) }) -test(`it uses tracedSVG placeholder when enabled`, async () => { +test(`it doesn't use tracedSVG placeholder (deprecated and fallback to base64)`, async () => { const imagePath = `images/my-image.jpeg` const content = ` ![image](./${imagePath}) @@ -387,16 +386,7 @@ test(`it uses tracedSVG placeholder when enabled`, async () => { expect(node.type).toBe(`html`) expect(node.value).toMatchSnapshot() expect(node.value).not.toMatch(``) - expect(mockTraceSVG).toBeCalledTimes(1) - - expect(mockTraceSVG).toBeCalledWith( - expect.objectContaining({ - // fileArgs cannot be left undefined or traceSVG errors - fileArgs: expect.any(Object), - // args containing Potrace constants should be translated to their values - args: { color: Potrace.COLOR_AUTO, turnPolicy: Potrace.TURNPOLICY_LEFT }, - }) - ) + expect(mockTraceSVG).toBeCalledTimes(0) }) describe(`showCaptions`, () => { diff --git a/packages/gatsby-remark-images/src/gatsby-node.js b/packages/gatsby-remark-images/src/gatsby-node.js index db2e87e8015d6..e650193136e1b 100644 --- a/packages/gatsby-remark-images/src/gatsby-node.js +++ b/packages/gatsby-remark-images/src/gatsby-node.js @@ -1,5 +1,3 @@ -const { Potrace } = require(`potrace`) - exports.pluginOptionsSchema = function ({ Joi }) { return Joi.object({ maxWidth: Joi.number() @@ -68,30 +66,34 @@ exports.pluginOptionsSchema = function ({ Joi }) { `TURNPOLICY_MINORITY`, `TURNPOLICY_MAJORITY`, // it also allow using actual policy values - Potrace.TURNPOLICY_BLACK, - Potrace.TURNPOLICY_WHITE, - Potrace.TURNPOLICY_LEFT, - Potrace.TURNPOLICY_RIGHT, - Potrace.TURNPOLICY_MINORITY, - Potrace.TURNPOLICY_MAJORITY + `black`, + `white`, + `left`, + `right`, + `minority`, + `majority` ) - .default(Potrace.TURNPOLICY_MAJORITY), + .default(`majority`), turdSize: Joi.number().default(100), alphaMax: Joi.number(), optCurve: Joi.boolean().default(true), optTolerance: Joi.number().default(0.4), threshold: Joi.alternatives() - .try( - Joi.number().min(0).max(255), - Joi.number().valid(Potrace.THRESHOLD_AUTO) - ) - .default(Potrace.THRESHOLD_AUTO), + .try(Joi.number().min(0).max(255), Joi.number().valid(-1)) + .default(-1), blackOnWhite: Joi.boolean().default(true), color: Joi.string().default(`lightgray`), background: Joi.string().default(`transparent`), }) ) - .default(false) + .custom(value => { + if (!!value && !process.env.GATSBY_WORKER_ID) { + console.warn( + `"tracedSVG" plugin option for "gatsby-remark-images" is no longer supported. Blurred placeholder will be used. See https://gatsby.dev/tracesvg-removal/` + ) + } + return undefined + }) .description( `Use traced SVGs for placeholder images instead of the “blur up” effect. Pass true for traced SVGs with the default settings (seen here), or an object of options to override the default. For example, pass { color: "#F00", turnPolicy: "TURNPOLICY_MAJORITY" } to change the color of the trace to red and the turn policy to TURNPOLICY_MAJORITY. See node-potrace parameter documentation for a full listing and explanation of the available options.` ), diff --git a/packages/gatsby-remark-images/src/index.js b/packages/gatsby-remark-images/src/index.js index aa00ff298eae1..c294444ab31c3 100644 --- a/packages/gatsby-remark-images/src/index.js +++ b/packages/gatsby-remark-images/src/index.js @@ -309,32 +309,7 @@ module.exports = ( `.trim() } - let placeholderImageData = fluidResult.base64 - - // if options.tracedSVG is enabled generate the traced SVG and use that as the placeholder image - if (options.tracedSVG) { - let args = typeof options.tracedSVG === `object` ? options.tracedSVG : {} - - // Translate Potrace constants (e.g. TURNPOLICY_LEFT, COLOR_AUTO) to the values Potrace expects - const { Potrace } = require(`potrace`) - const argsKeys = Object.keys(args) - args = argsKeys.reduce((result, key) => { - const value = args[key] - result[key] = Potrace.hasOwnProperty(value) ? Potrace[value] : value - return result - }, {}) - - const tracedSVG = await traceSVG({ - file: imageNode, - args, - fileArgs: args, - cache, - reporter, - }) - - // Escape single quotes so the SVG data can be used in inline style attribute with single quotes - placeholderImageData = tracedSVG.replace(/'/g, `\\'`) - } + const placeholderImageData = fluidResult.base64 const ratio = `${(1 / fluidResult.aspectRatio) * 100}%` diff --git a/packages/gatsby-source-contentful/src/extend-node-type.js b/packages/gatsby-source-contentful/src/extend-node-type.js index 0ca0e27378b8e..63ddf9980902f 100644 --- a/packages/gatsby-source-contentful/src/extend-node-type.js +++ b/packages/gatsby-source-contentful/src/extend-node-type.js @@ -498,7 +498,7 @@ const resolveResize = (image, options) => { exports.resolveResize = resolveResize -const fixedNodeType = ({ name, getTracedSVG, reporter }) => { +const fixedNodeType = ({ name, reporter }) => { return { type: new GraphQLObjectType({ name: name, @@ -509,7 +509,15 @@ const fixedNodeType = ({ name, getTracedSVG, reporter }) => { }, tracedSVG: { type: GraphQLString, - resolve: getTracedSVG, + resolve: imageProps => { + if (!didShowTraceSVGRemovalWarningFixed) { + console.warn( + `"tracedSVG" placeholder field is no longer supported (used in ContentfulAsset.fixed processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningFixed = true + } + return getBase64Image(imageProps, reporter) + }, }, aspectRatio: { type: GraphQLFloat }, width: { type: new GraphQLNonNull(GraphQLFloat) }, @@ -600,7 +608,7 @@ const fixedNodeType = ({ name, getTracedSVG, reporter }) => { } } -const fluidNodeType = ({ name, getTracedSVG, reporter }) => { +const fluidNodeType = ({ name, reporter }) => { return { type: new GraphQLObjectType({ name: name, @@ -611,7 +619,15 @@ const fluidNodeType = ({ name, getTracedSVG, reporter }) => { }, tracedSVG: { type: GraphQLString, - resolve: getTracedSVG, + resolve: imageProps => { + if (!didShowTraceSVGRemovalWarningFluid) { + console.warn( + `"tracedSVG" placeholder field is no longer supported (used in ContentfulAsset.fluid processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningFluid = true + } + return getBase64Image(imageProps, reporter) + }, }, aspectRatio: { type: new GraphQLNonNull(GraphQLFloat) }, src: { type: new GraphQLNonNull(GraphQLString) }, @@ -704,38 +720,16 @@ const fluidNodeType = ({ name, getTracedSVG, reporter }) => { } } +let didShowTraceSVGRemovalWarningImageData = false +let didShowTraceSVGRemovalWarningResize = false +let didShowTraceSVGRemovalWarningFixed = false +let didShowTraceSVGRemovalWarningFluid = false + exports.extendNodeType = ({ type, store, reporter }) => { if (type.name !== `ContentfulAsset`) { return {} } - const getTracedSVG = async args => { - const { traceSVG } = require(`gatsby-plugin-sharp`) - - const { image, options } = args - const { - file: { contentType }, - } = image - - if (contentType.indexOf(`image/`) !== 0) { - return null - } - - const absolutePath = await cacheImage(store, image, options, reporter) - const extension = path.extname(absolutePath) - - return traceSVG({ - file: { - internal: image.internal, - name: image.file.fileName, - extension, - absolutePath, - }, - args: { toFormat: `` }, - fileArgs: options, - }) - } - const getDominantColor = async ({ image, options, reporter }) => { let pluginSharp @@ -774,6 +768,16 @@ exports.extendNodeType = ({ type, store, reporter }) => { const { generateImageData } = require(`gatsby-plugin-image`) + if (options?.placeholder === `tracedSVG`) { + if (!didShowTraceSVGRemovalWarningImageData) { + console.warn( + `"TRACED_SVG" placeholder argument value is no longer supported (used in ContentfulAsset.gatsbyImageData processing), falling back to "DOMINANT_COLOR". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningImageData = true + } + options.placeholder = `dominantColor` + } + const { baseUrl, contentType, width, height } = getBasicImageProps( image, options @@ -813,13 +817,6 @@ exports.extendNodeType = ({ type, store, reporter }) => { ) } - if (options.placeholder === `tracedSVG`) { - placeholderDataURI = await getTracedSVG({ - image, - options, - }) - } - if (placeholderDataURI) { imageProps.placeholder = { fallback: placeholderDataURI } } @@ -829,13 +826,11 @@ exports.extendNodeType = ({ type, store, reporter }) => { const fixedNode = fixedNodeType({ name: `ContentfulFixed`, - getTracedSVG, reporter, }) const fluidNode = fluidNodeType({ name: `ContentfulFluid`, - getTracedSVG, reporter, }) @@ -883,7 +878,7 @@ exports.extendNodeType = ({ type, store, reporter }) => { Format of generated placeholder image, displayed while the main image loads. BLURRED: a blurred, low resolution image, encoded as a base64 data URI (default) DOMINANT_COLOR: a solid color, calculated from the dominant color of the image. - TRACED_SVG: a low-resolution traced SVG of the image. + TRACED_SVG: deprecated. Will use DOMINANT_COLOR. NONE: no placeholder. Set the argument "backgroundColor" to use a fixed background color.`, }, formats: { @@ -920,7 +915,15 @@ exports.extendNodeType = ({ type, store, reporter }) => { }, tracedSVG: { type: GraphQLString, - resolve: getTracedSVG, + resolve: imageProps => { + if (!didShowTraceSVGRemovalWarningResize) { + console.warn( + `"tracedSVG" placeholder field is no longer supported (used in ContentfulAsset.resize processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningResize = true + } + return getBase64Image(imageProps, reporter) + }, }, src: { type: GraphQLString }, width: { type: GraphQLInt }, diff --git a/packages/gatsby-transformer-sharp/package.json b/packages/gatsby-transformer-sharp/package.json index 5bf030cdd1dbf..2a64190af7e73 100644 --- a/packages/gatsby-transformer-sharp/package.json +++ b/packages/gatsby-transformer-sharp/package.json @@ -11,7 +11,6 @@ "bluebird": "^3.7.2", "common-tags": "^1.8.0", "fs-extra": "^10.0.0", - "potrace": "^2.1.8", "probe-image-size": "^6.0.0", "semver": "^7.3.5", "sharp": "^0.29.0" diff --git a/packages/gatsby-transformer-sharp/src/customize-schema.js b/packages/gatsby-transformer-sharp/src/customize-schema.js index 455ad706a3210..caaf473ffafcc 100644 --- a/packages/gatsby-transformer-sharp/src/customize-schema.js +++ b/packages/gatsby-transformer-sharp/src/customize-schema.js @@ -14,7 +14,6 @@ const { base64, fluid, fixed, - traceSVG, generateImageData, } = require(`gatsby-plugin-sharp`) @@ -66,15 +65,7 @@ function toArray(buf) { return arr } -const getTracedSVG = async ({ file, image, fieldArgs, cache, reporter }) => - traceSVG({ - file, - args: { ...fieldArgs.traceSVG }, - fileArgs: fieldArgs, - cache, - reporter, - }) - +let didShowTraceSVGRemovalWarningFixed = false const fixedNodeType = ({ pathPrefix, getNodeAndSavePathDependency, @@ -89,12 +80,15 @@ const fixedNodeType = ({ base64: { type: GraphQLString }, tracedSVG: { type: GraphQLString, - resolve: parent => - getTracedSVG({ - ...parent, - cache, - reporter, - }), + resolve: parent => { + if (!didShowTraceSVGRemovalWarningFixed) { + console.warn( + `"tracedSVG" placeholder field is no longer supported (used in ImageSharp.fixed processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningFixed = true + } + return parent.base64 + }, }, aspectRatio: { type: GraphQLFloat }, width: { type: new GraphQLNonNull(GraphQLFloat) }, @@ -233,6 +227,7 @@ const fixedNodeType = ({ } } +let didShowTraceSVGRemovalWarningFluid = false const fluidNodeType = ({ pathPrefix, getNodeAndSavePathDependency, @@ -247,12 +242,15 @@ const fluidNodeType = ({ base64: { type: GraphQLString }, tracedSVG: { type: GraphQLString, - resolve: parent => - getTracedSVG({ - ...parent, - cache, - reporter, - }), + resolve: parent => { + if (!didShowTraceSVGRemovalWarningFluid) { + console.warn( + `"tracedSVG" placeholder field is no longer supported (used in ImageSharp.fluid processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningFluid = true + } + return parent.base64 + }, }, aspectRatio: { type: new GraphQLNonNull(GraphQLFloat) }, src: { type: new GraphQLNonNull(GraphQLString) }, @@ -400,6 +398,7 @@ const fluidNodeType = ({ } } +let didShowTraceSVGRemovalWarningGatsbyImageData = false const imageNodeType = ({ pathPrefix, getNodeAndSavePathDependency, @@ -444,9 +443,9 @@ const imageNodeType = ({ type: ImagePlaceholderType, description: stripIndent` Format of generated placeholder image, displayed while the main image loads. - BLURRED: a blurred, low resolution image, encoded as a base64 data URI (default) - DOMINANT_COLOR: a solid color, calculated from the dominant color of the image. - TRACED_SVG: a low-resolution traced SVG of the image. + BLURRED: a blurred, low resolution image, encoded as a base64 data URI + DOMINANT_COLOR: a solid color, calculated from the dominant color of the image (default). + TRACED_SVG: deprecated. Will use DOMINANT_COLOR. NONE: no placeholder. Set "background" to use a fixed background color.`, }, blurredOptions: { @@ -526,6 +525,17 @@ const imageNodeType = ({ reporter.warn(`Please upgrade gatsby-plugin-sharp`) return null } + + if (fieldArgs?.placeholder === `tracedSVG`) { + if (!didShowTraceSVGRemovalWarningGatsbyImageData) { + console.warn( + `"TRACED_SVG" placeholder argument value is no longer supported (used in ImageSharp.gatsbyImageData processing), falling back to "DOMINANT_COLOR". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningGatsbyImageData = true + } + fieldArgs.placeholder = `dominantColor` + } + const imageData = await generateImageData({ file, args: fieldArgs, @@ -545,6 +555,8 @@ const imageNodeType = ({ */ const inProgressCopy = new Set() +let didShowTraceSVGRemovalWarningResize = false + const createFields = ({ pathPrefix, getNodeAndSavePathDependency, @@ -629,12 +641,19 @@ const createFields = ({ src: { type: GraphQLString }, tracedSVG: { type: GraphQLString, - resolve: parent => - getTracedSVG({ - ...parent, + resolve: async parent => { + if (!didShowTraceSVGRemovalWarningResize) { + console.warn( + `"tracedSVG" placeholder field is no longer supported (used in ImageSharp.resize processing), falling back to "base64". See https://gatsby.dev/tracesvg-removal/` + ) + didShowTraceSVGRemovalWarningResize = true + } + const { src } = await base64({ + file: parent.file, cache, - reporter, - }), + }) + return src + }, }, width: { type: GraphQLInt }, height: { type: GraphQLInt }, diff --git a/packages/gatsby-transformer-sharp/src/types.ts b/packages/gatsby-transformer-sharp/src/types.ts index 22174df504a40..a3f1310ea9473 100644 --- a/packages/gatsby-transformer-sharp/src/types.ts +++ b/packages/gatsby-transformer-sharp/src/types.ts @@ -8,7 +8,6 @@ import { GraphQLNonNull, GraphQLInputFieldConfigMap, } from "gatsby/graphql" -import { Potrace } from "potrace" import type Sharp from "sharp" const sharp: typeof Sharp = require(`./safe-sharp`) @@ -161,12 +160,12 @@ export const DuotoneGradientType = new GraphQLInputObjectType({ export const PotraceTurnPolicyType = new GraphQLEnumType({ name: `PotraceTurnPolicy`, values: { - TURNPOLICY_BLACK: { value: Potrace.TURNPOLICY_BLACK }, - TURNPOLICY_WHITE: { value: Potrace.TURNPOLICY_WHITE }, - TURNPOLICY_LEFT: { value: Potrace.TURNPOLICY_LEFT }, - TURNPOLICY_RIGHT: { value: Potrace.TURNPOLICY_RIGHT }, - TURNPOLICY_MINORITY: { value: Potrace.TURNPOLICY_MINORITY }, - TURNPOLICY_MAJORITY: { value: Potrace.TURNPOLICY_MAJORITY }, + TURNPOLICY_BLACK: { value: `black` }, + TURNPOLICY_WHITE: { value: `white` }, + TURNPOLICY_LEFT: { value: `left` }, + TURNPOLICY_RIGHT: { value: `right` }, + TURNPOLICY_MINORITY: { value: `minority` }, + TURNPOLICY_MAJORITY: { value: `majority` }, }, }) diff --git a/packages/gatsby/cache-dir/__tests__/minimal-config.js b/packages/gatsby/cache-dir/__tests__/minimal-config.js index bb147b5b49f82..41c5c7fdf4f9c 100644 --- a/packages/gatsby/cache-dir/__tests__/minimal-config.js +++ b/packages/gatsby/cache-dir/__tests__/minimal-config.js @@ -25,6 +25,19 @@ it(`Builds cache-dir with minimal config`, done => { }) spawn.on(`close`, function () { + // warning we want to filter out: + // Browserslist: caniuse-lite is outdated. Please run: + // npx browserslist@latest --update-db + // Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating + stderr = stderr + .replace(`Browserslist: caniuse-lite is outdated. Please run:`, ``) + .replace(`npx browserslist@latest --update-db`, ``) + .replace( + `Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating`, + `` + ) + .trim() + expect(stderr).toEqual(``) expect(stdout).not.toEqual(``) done() diff --git a/yarn.lock b/yarn.lock index d6048c7afc564..f8a89d2d50b33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2475,296 +2475,6 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jimp/bmp@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/bmp/-/bmp-0.14.0.tgz#6df246026554f276f7b354047c6fff9f5b2b5182" - integrity sha512-5RkX6tSS7K3K3xNEb2ygPuvyL9whjanhoaB/WmmXlJS6ub4DjTqrapu8j4qnIWmO4YYtFeTbDTXV6v9P1yMA5A== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - bmp-js "^0.1.0" - -"@jimp/core@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/core/-/core-0.14.0.tgz#870c9ca25b40be353ebda1d2abb48723d9010055" - integrity sha512-S62FcKdtLtj3yWsGfJRdFXSutjvHg7aQNiFogMbwq19RP4XJWqS2nOphu7ScB8KrSlyy5nPF2hkWNhLRLyD82w== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - any-base "^1.1.0" - buffer "^5.2.0" - exif-parser "^0.1.12" - file-type "^9.0.0" - load-bmfont "^1.3.1" - mkdirp "^0.5.1" - phin "^2.9.1" - pixelmatch "^4.0.2" - tinycolor2 "^1.4.1" - -"@jimp/custom@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/custom/-/custom-0.14.0.tgz#1dbbf0094df7403f4e03bc984ed92e7458842f74" - integrity sha512-kQJMeH87+kWJdVw8F9GQhtsageqqxrvzg7yyOw3Tx/s7v5RToe8RnKyMM+kVtBJtNAG+Xyv/z01uYQ2jiZ3GwA== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/core" "^0.14.0" - -"@jimp/gif@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/gif/-/gif-0.14.0.tgz#db159f57c3cfd1566bbe8b124958791998614960" - integrity sha512-DHjoOSfCaCz72+oGGEh8qH0zE6pUBaBxPxxmpYJjkNyDZP7RkbBkZJScIYeQ7BmJxmGN4/dZn+MxamoQlr+UYg== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - gifwrap "^0.9.2" - omggif "^1.0.9" - -"@jimp/jpeg@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/jpeg/-/jpeg-0.14.0.tgz#8a687a6a653bbbae38c522edef8f84bb418d9461" - integrity sha512-561neGbr+87S/YVQYnZSTyjWTHBm9F6F1obYHiyU3wVmF+1CLbxY3FQzt4YolwyQHIBv36Bo0PY2KkkU8BEeeQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - jpeg-js "^0.4.0" - -"@jimp/plugin-blit@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-blit/-/plugin-blit-0.14.0.tgz#5eb374be1201313b2113899fb842232d8fcfd345" - integrity sha512-YoYOrnVHeX3InfgbJawAU601iTZMwEBZkyqcP1V/S33Qnz9uzH1Uj1NtC6fNgWzvX6I4XbCWwtr4RrGFb5CFrw== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-blur@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-blur/-/plugin-blur-0.14.0.tgz#fe07e4932d5a2f5d8c9831e245561553224bfc60" - integrity sha512-9WhZcofLrT0hgI7t0chf7iBQZib//0gJh9WcQMUt5+Q1Bk04dWs8vTgLNj61GBqZXgHSPzE4OpCrrLDBG8zlhQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-circle@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-circle/-/plugin-circle-0.14.0.tgz#82c0e904a34e90fa672fb9c286bc892e92088ddf" - integrity sha512-o5L+wf6QA44tvTum5HeLyLSc5eVfIUd5ZDVi5iRfO4o6GT/zux9AxuTSkKwnjhsG8bn1dDmywAOQGAx7BjrQVA== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-color@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-color/-/plugin-color-0.14.0.tgz#772bd2d80a88bc66ea1331d010207870f169a74b" - integrity sha512-JJz512SAILYV0M5LzBb9sbOm/XEj2fGElMiHAxb7aLI6jx+n0agxtHpfpV/AePTLm1vzzDxx6AJxXbKv355hBQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - tinycolor2 "^1.4.1" - -"@jimp/plugin-contain@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-contain/-/plugin-contain-0.14.0.tgz#c68115420d182e696f81bbe76fb5e704909b2b6a" - integrity sha512-RX2q233lGyaxiMY6kAgnm9ScmEkNSof0hdlaJAVDS1OgXphGAYAeSIAwzESZN4x3ORaWvkFefeVH9O9/698Evg== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-cover@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-cover/-/plugin-cover-0.14.0.tgz#4755322589c5885e44e14e31b86b542e907297ce" - integrity sha512-0P/5XhzWES4uMdvbi3beUgfvhn4YuQ/ny8ijs5kkYIw6K8mHcl820HahuGpwWMx56DJLHRl1hFhJwo9CeTRJtQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-crop@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-crop/-/plugin-crop-0.14.0.tgz#4cbd856ca84ffc37230fad2534906f2f75aa3057" - integrity sha512-Ojtih+XIe6/XSGtpWtbAXBozhCdsDMmy+THUJAGu2x7ZgKrMS0JotN+vN2YC3nwDpYkM+yOJImQeptSfZb2Sug== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-displace@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-displace/-/plugin-displace-0.14.0.tgz#b0e6a57d00cb1f893f541413fe9d737d23c3b70c" - integrity sha512-c75uQUzMgrHa8vegkgUvgRL/PRvD7paFbFJvzW0Ugs8Wl+CDMGIPYQ3j7IVaQkIS+cAxv+NJ3TIRBQyBrfVEOg== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-dither@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-dither/-/plugin-dither-0.14.0.tgz#9185ec4c38e02edc9e5831f5d709f6ba891e1b93" - integrity sha512-g8SJqFLyYexXQQsoh4dc1VP87TwyOgeTElBcxSXX2LaaMZezypmxQfLTzOFzZoK8m39NuaoH21Ou1Ftsq7LzVQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-fisheye@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-fisheye/-/plugin-fisheye-0.14.0.tgz#9f26346cf2fbc660cc2008cd7fd30a83b5029e78" - integrity sha512-BFfUZ64EikCaABhCA6mR3bsltWhPpS321jpeIQfJyrILdpFsZ/OccNwCgpW1XlbldDHIoNtXTDGn3E+vCE7vDg== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-flip@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-flip/-/plugin-flip-0.14.0.tgz#7966d6aa3b5fe1aa4d2d561ff12b8ef5ccb9b071" - integrity sha512-WtL1hj6ryqHhApih+9qZQYA6Ye8a4HAmdTzLbYdTMrrrSUgIzFdiZsD0WeDHpgS/+QMsWwF+NFmTZmxNWqKfXw== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-gaussian@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-gaussian/-/plugin-gaussian-0.14.0.tgz#452bc1971a4467ad9b984aa67f4c200bf941bb65" - integrity sha512-uaLwQ0XAQoydDlF9tlfc7iD9drYPriFe+jgYnWm8fbw5cN+eOIcnneEX9XCOOzwgLPkNCxGox6Kxjn8zY6GxtQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-invert@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-invert/-/plugin-invert-0.14.0.tgz#cd31a555860e9f821394936d15af161c09c42921" - integrity sha512-UaQW9X9vx8orQXYSjT5VcITkJPwDaHwrBbxxPoDG+F/Zgv4oV9fP+udDD6qmkgI9taU+44Fy+zm/J/gGcMWrdg== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-mask@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-mask/-/plugin-mask-0.14.0.tgz#52619643ac6222f85e6b27dee33c771ca3a6a4c9" - integrity sha512-tdiGM69OBaKtSPfYSQeflzFhEpoRZ+BvKfDEoivyTjauynbjpRiwB1CaiS8En1INTDwzLXTT0Be9SpI3LkJoEA== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-normalize@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-normalize/-/plugin-normalize-0.14.0.tgz#bf39e356b6d473f582ce95633ad49c9cdb82492b" - integrity sha512-AfY8sqlsbbdVwFGcyIPy5JH/7fnBzlmuweb+Qtx2vn29okq6+HelLjw2b+VT2btgGUmWWHGEHd86oRGSoWGyEQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-print@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-print/-/plugin-print-0.14.0.tgz#1c43c2a92a7adc05b464863882cb89ce486d63e6" - integrity sha512-MwP3sH+VS5AhhSTXk7pui+tEJFsxnTKFY3TraFJb8WFbA2Vo2qsRCZseEGwpTLhENB7p/JSsLvWoSSbpmxhFAQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - load-bmfont "^1.4.0" - -"@jimp/plugin-resize@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-resize/-/plugin-resize-0.14.0.tgz#ef7fc6c2e45f8bcab62456baf8fd3bc415b02b64" - integrity sha512-qFeMOyXE/Bk6QXN0GQo89+CB2dQcXqoxUcDb2Ah8wdYlKqpi53skABkgVy5pW3EpiprDnzNDboMltdvDslNgLQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-rotate@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-rotate/-/plugin-rotate-0.14.0.tgz#3632bc159bf1c3b9ec9f459d9c05d02a11781ee7" - integrity sha512-aGaicts44bvpTcq5Dtf93/8TZFu5pMo/61lWWnYmwJJU1RqtQlxbCLEQpMyRhKDNSfPbuP8nyGmaqXlM/82J0Q== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-scale@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-scale/-/plugin-scale-0.14.0.tgz#d30f0cd1365b8e68f43fa423300ae7f124e9bf10" - integrity sha512-ZcJk0hxY5ZKZDDwflqQNHEGRblgaR+piePZm7dPwPUOSeYEH31P0AwZ1ziceR74zd8N80M0TMft+e3Td6KGBHw== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-shadow@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-shadow/-/plugin-shadow-0.14.0.tgz#471fdb9f109ff2d9e20d533d45e1e18e0b48c749" - integrity sha512-p2igcEr/iGrLiTu0YePNHyby0WYAXM14c5cECZIVnq/UTOOIQ7xIcWZJ1lRbAEPxVVXPN1UibhZAbr3HAb5BjQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugin-threshold@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugin-threshold/-/plugin-threshold-0.14.0.tgz#ebd72721c7d1d518c5bb6e494e55d97ac3351d3b" - integrity sha512-N4BlDgm/FoOMV/DQM2rSpzsgqAzkP0DXkWZoqaQrlRxQBo4zizQLzhEL00T/YCCMKnddzgEhnByaocgaaa0fKw== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - -"@jimp/plugins@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/plugins/-/plugins-0.14.0.tgz#41dba85f15ab8dadb4162100eb54e5f27b93ee2c" - integrity sha512-vDO3XT/YQlFlFLq5TqNjQkISqjBHT8VMhpWhAfJVwuXIpilxz5Glu4IDLK6jp4IjPR6Yg2WO8TmRY/HI8vLrOw== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/plugin-blit" "^0.14.0" - "@jimp/plugin-blur" "^0.14.0" - "@jimp/plugin-circle" "^0.14.0" - "@jimp/plugin-color" "^0.14.0" - "@jimp/plugin-contain" "^0.14.0" - "@jimp/plugin-cover" "^0.14.0" - "@jimp/plugin-crop" "^0.14.0" - "@jimp/plugin-displace" "^0.14.0" - "@jimp/plugin-dither" "^0.14.0" - "@jimp/plugin-fisheye" "^0.14.0" - "@jimp/plugin-flip" "^0.14.0" - "@jimp/plugin-gaussian" "^0.14.0" - "@jimp/plugin-invert" "^0.14.0" - "@jimp/plugin-mask" "^0.14.0" - "@jimp/plugin-normalize" "^0.14.0" - "@jimp/plugin-print" "^0.14.0" - "@jimp/plugin-resize" "^0.14.0" - "@jimp/plugin-rotate" "^0.14.0" - "@jimp/plugin-scale" "^0.14.0" - "@jimp/plugin-shadow" "^0.14.0" - "@jimp/plugin-threshold" "^0.14.0" - timm "^1.6.1" - -"@jimp/png@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/png/-/png-0.14.0.tgz#0f2dddb5125c0795ca7e67c771204c5437fcda4b" - integrity sha512-0RV/mEIDOrPCcNfXSPmPBqqSZYwGADNRVUTyMt47RuZh7sugbYdv/uvKmQSiqRdR0L1sfbCBMWUEa5G/8MSbdA== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/utils" "^0.14.0" - pngjs "^3.3.3" - -"@jimp/tiff@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/tiff/-/tiff-0.14.0.tgz#a5b25bbe7c43fc3b07bad4e2ab90e0e164c1967f" - integrity sha512-zBYDTlutc7j88G/7FBCn3kmQwWr0rmm1e0FKB4C3uJ5oYfT8645lftUsvosKVUEfkdmOaMAnhrf4ekaHcb5gQw== - dependencies: - "@babel/runtime" "^7.7.2" - utif "^2.0.1" - -"@jimp/types@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/types/-/types-0.14.0.tgz#ef681ff702883c5f105b5e4e30d49abf39ee9e34" - integrity sha512-hx3cXAW1KZm+b+XCrY3LXtdWy2U+hNtq0rPyJ7NuXCjU7lZR3vIkpz1DLJ3yDdS70hTi5QDXY3Cd9kd6DtloHQ== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/bmp" "^0.14.0" - "@jimp/gif" "^0.14.0" - "@jimp/jpeg" "^0.14.0" - "@jimp/png" "^0.14.0" - "@jimp/tiff" "^0.14.0" - timm "^1.6.1" - -"@jimp/utils@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@jimp/utils/-/utils-0.14.0.tgz#296254e63118554c62c31c19ac6b8c4bfe6490e5" - integrity sha512-MY5KFYUru0y74IsgM/9asDwb3ERxWxXEu3CRCZEvE7DtT86y1bR1XgtlSliMrptjz4qbivNGMQSvUBpEFJDp1A== - dependencies: - "@babel/runtime" "^7.7.2" - regenerator-runtime "^0.13.3" - "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -5850,11 +5560,6 @@ ansi-wrap@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" -any-base@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/any-base/-/any-base-1.1.0.tgz#ae101a62bc08a597b4c9ab5b7089d456630549fe" - integrity sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg== - any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -6991,11 +6696,6 @@ bluebird@^3.0.5, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5, bluebird@^3. resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bmp-js@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.1.0.tgz#e05a63f796a6c1ff25f4771ec7adadc148c07233" - integrity sha1-4Fpj95amwf8l9Hcex62twUjAcjM= - body-parser@1.19.0, body-parser@^1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -7208,7 +6908,7 @@ buffer-shims@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" -buffer@^5.2.0, buffer@^5.2.1, buffer@^5.5.0: +buffer@^5.2.1, buffer@^5.5.0: version "5.6.0" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== @@ -11140,11 +10840,6 @@ execall@^2.0.0: dependencies: clone-regexp "^2.1.0" -exif-parser@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/exif-parser/-/exif-parser-0.1.12.tgz#58a9d2d72c02c1f6f02a0ef4a9166272b7760922" - integrity sha1-WKnS1ywCwfbwKg70qRZicrd2CSI= - exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -11553,11 +11248,6 @@ file-type@^16.5.3: strtok3 "^6.2.4" token-types "^4.1.1" -file-type@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-9.0.0.tgz#a68d5ad07f486414dfb2c8866f73161946714a18" - integrity sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw== - filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -11833,12 +11523,6 @@ fontverter@^2.0.0: wawoff2 "^2.0.0" woff2sfnt-sfnt2woff "^1.0.0" -for-each@^0.3.2: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - dependencies: - is-callable "^1.1.3" - for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -12324,14 +12008,6 @@ gettemporaryfilepath@^1.0.0, gettemporaryfilepath@^1.0.1: resolved "https://registry.yarnpkg.com/gettemporaryfilepath/-/gettemporaryfilepath-1.0.1.tgz#53ace15f931fb3def8abed740c0a092762910391" integrity sha512-MVCSgF1blIZuIV3KYhMKOwU1OSxPF1s+ZcyqWMSGR5Fzl6fN7EjIXDFGu9PmWAAwyGjMjmkS2ruqPaj13J3SXA== -gifwrap@^0.9.2: - version "0.9.2" - resolved "https://registry.yarnpkg.com/gifwrap/-/gifwrap-0.9.2.tgz#348e286e67d7cf57942172e1e6f05a71cee78489" - integrity sha512-fcIswrPaiCDAyO8xnWvHSZdWChjKXUanKKpAiWWJ/UTkEi/aYKn5+90e7DE820zbEaVR9CE2y4z9bzhQijZ0BA== - dependencies: - image-q "^1.1.1" - omggif "^1.0.10" - git-config-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/git-config-path/-/git-config-path-1.0.1.tgz#6d33f7ed63db0d0e118131503bab3aca47d54664" @@ -12581,13 +12257,6 @@ global@^4.3.0, global@^4.3.2: min-document "^2.19.0" process "^0.11.10" -global@~4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - dependencies: - min-document "^2.19.0" - process "~0.5.1" - globals-docs@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/globals-docs/-/globals-docs-2.4.0.tgz#f2c647544eb6161c7c38452808e16e693c2dafbb" @@ -13720,11 +13389,6 @@ ignore@^5.0.0, ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== -image-q@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/image-q/-/image-q-1.1.1.tgz#fc84099664460b90ca862d9300b6bfbbbfbf8056" - integrity sha1-/IQJlmRGC5DKhi2TALa/u7+/gFY= - image-size@^0.6.1: version "0.6.3" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.6.3.tgz#e7e5c65bb534bd7cdcedd6cb5166272a85f75fb2" @@ -14139,7 +13803,7 @@ is-buffer@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: +is-callable@^1.1.4, is-callable@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== @@ -14274,10 +13938,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-function@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" @@ -15752,17 +15412,6 @@ jest@^26.6.3: import-local "^3.0.2" jest-cli "^26.6.3" -jimp@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/jimp/-/jimp-0.14.0.tgz#fde55f69bdb918c1b01ac633d89a25853af85625" - integrity sha512-8BXU+J8+SPmwwyq9ELihpSV4dWPTiOKBWCEgtkbnxxAVMjXdf3yGmyaLSshBfXc8sP/JQ9OZj5R8nZzz2wPXgA== - dependencies: - "@babel/runtime" "^7.7.2" - "@jimp/custom" "^0.14.0" - "@jimp/plugins" "^0.14.0" - "@jimp/types" "^0.14.0" - regenerator-runtime "^0.13.3" - joi@^14.3.1: version "14.3.1" resolved "https://registry.yarnpkg.com/joi/-/joi-14.3.1.tgz#164a262ec0b855466e0c35eea2a885ae8b6c703c" @@ -15783,11 +15432,6 @@ joi@^17.2.1, joi@^17.4.0, joi@^17.4.2: "@sideway/formula" "^3.0.0" "@sideway/pinpoint" "^2.0.0" -jpeg-js@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.1.tgz#937a3ae911eb6427f151760f8123f04c8bfe6ef7" - integrity sha512-jA55yJiB5tCXEddos8JBbvW+IMrqY0y1tjjx9KNVtA+QPmu7ND5j0zkKopClpUTsaETL135uOM2XfcYG4XRjmw== - js-base64@^2.1.9: version "2.5.1" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" @@ -16561,20 +16205,6 @@ lmdb-store@~1.5.5: optionalDependencies: msgpackr "^1.3.2" -load-bmfont@^1.3.1, load-bmfont@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/load-bmfont/-/load-bmfont-1.4.0.tgz#75f17070b14a8c785fe7f5bee2e6fd4f98093b6b" - integrity sha512-kT63aTAlNhZARowaNYcY29Fn/QYkc52M3l6V1ifRcPewg2lvUZDAj7R6dXjOL9D0sict76op3T5+odumDSF81g== - dependencies: - buffer-equal "0.0.1" - mime "^1.3.4" - parse-bmfont-ascii "^1.0.3" - parse-bmfont-binary "^1.0.5" - parse-bmfont-xml "^1.1.4" - phin "^2.9.1" - xhr "^2.0.1" - xtend "^4.0.0" - load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -17957,7 +17587,7 @@ mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.28, mime-types@~2.1.19, dependencies: mime-db "1.45.0" -mime@1.6.0, mime@^1.3.4, mime@^1.4.1: +mime@1.6.0, mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -19034,11 +18664,6 @@ octokit-pagination-methods@^1.1.0: resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== -omggif@^1.0.10, omggif@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.10.tgz#ddaaf90d4a42f532e9e7cb3a95ecdd47f17c7b19" - integrity sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw== - on-finished@^2.3.0, on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -19414,7 +19039,7 @@ pako@^0.2.5: version "0.2.9" resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" -pako@^1.0.5, pako@^1.0.7: +pako@^1.0.7: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -19447,21 +19072,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-bmfont-ascii@^1.0.3: - version "1.0.6" - resolved "https://registry.yarnpkg.com/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz#11ac3c3ff58f7c2020ab22769079108d4dfa0285" - -parse-bmfont-binary@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz#d038b476d3e9dd9db1e11a0b0e53a22792b69006" - -parse-bmfont-xml@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/parse-bmfont-xml/-/parse-bmfont-xml-1.1.4.tgz#015319797e3e12f9e739c4d513872cd2fa35f389" - dependencies: - xml-parse-from-string "^1.0.0" - xml2js "^0.4.5" - parse-diff@^0.7.0: version "0.7.1" resolved "https://registry.yarnpkg.com/parse-diff/-/parse-diff-0.7.1.tgz#9b7a2451c3725baf2c87c831ba192d40ee2237d4" @@ -19534,13 +19144,6 @@ parse-glob@^3.0.4: is-extglob "^1.0.0" is-glob "^2.0.0" -parse-headers@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.1.tgz#6ae83a7aa25a9d9b700acc28698cd1f1ed7e9536" - dependencies: - for-each "^0.3.2" - trim "0.0.1" - parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -19826,10 +19429,6 @@ performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" -phin@^2.9.1: - version "2.9.2" - resolved "https://registry.yarnpkg.com/phin/-/phin-2.9.2.tgz#0a82d5b6dd75552b665f371f8060689c1af7336e" - physical-cpu-count@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz#18de2f97e4bf7a9551ad7511942b5496f7aba660" @@ -19882,13 +19481,6 @@ pirates@^4.0.0, pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" -pixelmatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-4.0.2.tgz#8f47dcec5011b477b67db03c243bc1f3085e8854" - integrity sha1-j0fc7FARtHe2fbA8JDvB8wheiFQ= - dependencies: - pngjs "^3.0.0" - pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" @@ -19959,11 +19551,6 @@ pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" -pngjs@^3.0.0, pngjs@^3.3.3: - version "3.4.0" - resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" - integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -20644,13 +20231,6 @@ postcss@^8.1.6, postcss@^8.2.1, postcss@^8.2.15, postcss@^8.2.2, postcss@^8.2.8, nanoid "^3.1.23" source-map-js "^0.6.2" -potrace@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/potrace/-/potrace-2.1.8.tgz#50f6fba92e1e39ddef6f979b0a0f841809e0acf2" - integrity sha512-V9hI7UMJyEhNZjM8CbZaP/804ZRLgzWkCS9OOYnEZkszzj3zKR/erRdj0uFMcN3pp6x4B+AIZebmkQgGRinG/g== - dependencies: - jimp "^0.14.0" - prebuild-install@^6.1.4: version "6.1.4" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" @@ -20847,10 +20427,6 @@ process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - progress@^2.0.0, progress@^2.0.1, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -21787,7 +21363,7 @@ regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" -regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.3, regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: +regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== @@ -23611,7 +23187,7 @@ sass-loader@^10.1.1: schema-utils "^3.0.0" semver "^7.3.2" -sax@>=0.6.0, sax@^1.2.4, sax@~1.2.1, sax@~1.2.4: +sax@^1.2.4, sax@~1.2.1, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -25448,11 +25024,6 @@ timers-ext@^0.1.7: es5-ext "~0.10.46" next-tick "1" -timm@^1.6.1: - version "1.6.2" - resolved "https://registry.yarnpkg.com/timm/-/timm-1.6.2.tgz#dfd8c6719f7ba1fcfc6295a32670a1c6d166c0bd" - integrity sha512-IH3DYDL1wMUwmIlVmMrmesw5lZD6N+ZOAFWEyLrtpoL9Bcrs9u7M/vyOnHzDD2SMs4irLkVjqxZbHrXStS/Nmw== - timsort@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" @@ -25507,11 +25078,6 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tinycolor2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" - integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g= - title-case@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" @@ -26690,13 +26256,6 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "~3.7.0" -utif@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/utif/-/utif-2.0.1.tgz#9e1582d9bbd20011a6588548ed3266298e711759" - integrity sha512-Z/S1fNKCicQTf375lIP9G8Sa1H/phcysstNrrSdZKj1f9g58J4NMgb5IgiEZN9/nLMPDwF0W7hdOe9Qq2IYoLg== - dependencies: - pako "^1.0.5" - util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -27684,15 +27243,6 @@ xhr-mock@^2.5.1: global "^4.3.0" url "^0.11.0" -xhr@^2.0.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" - dependencies: - global "~4.3.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - xlsx@^0.17.0: version "0.17.0" resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.17.0.tgz#028176a0140967dcee1817d221678461e47481c8" @@ -27713,31 +27263,16 @@ xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" -xml-parse-from-string@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz#a9029e929d3dbcded169f3c6e28238d95a5d5a28" - xml-parser@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/xml-parser/-/xml-parser-1.2.1.tgz#c31f4c34f2975db82ad013222120592736156fcd" dependencies: debug "^2.2.0" -xml2js@^0.4.5: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - dependencies: - sax ">=0.6.0" - xmlbuilder "~9.0.1" - xml@1.0.1, xml@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - xmlchars@^2.1.1, xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"