diff --git a/packages/rollup/package.json b/packages/rollup/package.json index 43620d50..70e5e8c6 100644 --- a/packages/rollup/package.json +++ b/packages/rollup/package.json @@ -37,9 +37,10 @@ "@babel/preset-env": "^7.13.12", "@babel/preset-typescript": "^7.13.0", "@types/jest": "^26.0.22", + "@types/jest-image-snapshot": "^4.3.0", "babel-jest": "^26.6.3", "jest": "^26.6.3", - "jest-file-snapshot": "^0.5.0", + "jest-image-snapshot": "^4.4.1", "rollup": "^2.44.0", "rollup-plugin-typescript2": "^0.30.0", "typescript": "^4.2.3" diff --git a/packages/rollup/src/__tests__/__file_snapshots__/rollup-plugin-imagetools-absolute-import-1 b/packages/rollup/src/__tests__/__file_snapshots__/rollup-plugin-imagetools-absolute-import-1 deleted file mode 100644 index 66df9803..00000000 --- a/packages/rollup/src/__tests__/__file_snapshots__/rollup-plugin-imagetools-absolute-import-1 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd15f7e14f638afa832879dff0045990e2ad7710d59964c06a4da115197a3027 -size 7282 diff --git a/packages/rollup/src/__tests__/__file_snapshots__/rollup-plugin-imagetools-relative-import-6 b/packages/rollup/src/__tests__/__file_snapshots__/rollup-plugin-imagetools-relative-import-6 deleted file mode 100644 index 66df9803..00000000 --- a/packages/rollup/src/__tests__/__file_snapshots__/rollup-plugin-imagetools-relative-import-6 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd15f7e14f638afa832879dff0045990e2ad7710d59964c06a4da115197a3027 -size 7282 diff --git a/packages/rollup/src/__tests__/__image_snapshots__/main-test-ts-rollup-plugin-imagetools-absolute-path-1-snap.png b/packages/rollup/src/__tests__/__image_snapshots__/main-test-ts-rollup-plugin-imagetools-absolute-path-1-snap.png new file mode 100644 index 00000000..32008305 Binary files /dev/null and b/packages/rollup/src/__tests__/__image_snapshots__/main-test-ts-rollup-plugin-imagetools-absolute-path-1-snap.png differ diff --git a/packages/rollup/src/__tests__/__image_snapshots__/main-test-ts-rollup-plugin-imagetools-relative-path-1-snap.png b/packages/rollup/src/__tests__/__image_snapshots__/main-test-ts-rollup-plugin-imagetools-relative-path-1-snap.png new file mode 100644 index 00000000..32008305 Binary files /dev/null and b/packages/rollup/src/__tests__/__image_snapshots__/main-test-ts-rollup-plugin-imagetools-relative-path-1-snap.png differ diff --git a/packages/rollup/src/__tests__/fixtures/pexels-allec-gomes-5195763.jpg b/packages/rollup/src/__tests__/fixtures/pexels-allec-gomes-5195763.jpg deleted file mode 100644 index c2e2b049..00000000 Binary files a/packages/rollup/src/__tests__/fixtures/pexels-allec-gomes-5195763.jpg and /dev/null differ diff --git a/packages/rollup/src/__tests__/fixtures/pexels-allec-gomes-5195763.png b/packages/rollup/src/__tests__/fixtures/pexels-allec-gomes-5195763.png new file mode 100644 index 00000000..3e6fb7b6 Binary files /dev/null and b/packages/rollup/src/__tests__/fixtures/pexels-allec-gomes-5195763.png differ diff --git a/packages/rollup/src/__tests__/main.test.ts b/packages/rollup/src/__tests__/main.test.ts index f7926d0b..bb31fc88 100644 --- a/packages/rollup/src/__tests__/main.test.ts +++ b/packages/rollup/src/__tests__/main.test.ts @@ -2,9 +2,9 @@ import { rollup } from 'rollup' import { imagetools } from '../index' import { join } from 'path' import { testEntry, getSource } from './util' -import { toMatchFile } from 'jest-file-snapshot' +import { toMatchImageSnapshot } from 'jest-image-snapshot' -expect.extend({ toMatchFile }) +expect.extend({ toMatchImageSnapshot }) process.chdir(join(__dirname, 'fixtures')) describe('rollup-plugin-imagetools', () => { @@ -13,46 +13,46 @@ describe('rollup-plugin-imagetools', () => { it('accepts a string', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ - include: '**/*.jpg?*' + include: '**/*.png?*' }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts a regex', () => { + it('accepts a regex', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ - include: /\w+\.jpg/ + include: /\w+\.png/ }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts an array', () => { + it('accepts an array', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ - include: ['**/*.jpg?*', /\w+\.jpg/] + include: ['**/*.png?*', /\w+\.png/] }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('errors on invalid input', () => { + it('errors on invalid input', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ //@ts-ignore include: 100 @@ -60,21 +60,21 @@ describe('rollup-plugin-imagetools', () => { ] }) - expect(p).rejects.toBeDefined() + await expect(p).rejects.toBeDefined() }) it('rejects on non matching import', async () => { // because rollup cant resolve images by itself const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ include: '' }) ] }) - expect(p).rejects.toBeDefined() + await expect(p).rejects.toBeDefined() }) }) @@ -82,46 +82,46 @@ describe('rollup-plugin-imagetools', () => { it('accepts a string', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ - exclude: '**/*.png' + exclude: '**/*.jpg' }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts a regex', () => { + it('accepts a regex', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ - exclude: /\w+\.png/ + exclude: /\w+\.jpg/ }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts an array', () => { + it('accepts an array', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ - exclude: ['**/*.png?*', /\w+\.png/] + exclude: ['**/*.jpg?*', /\w+\.jpg/] }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('errors on invalid input', () => { + it('errors on invalid input', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ //@ts-ignore exclude: 100 @@ -129,20 +129,20 @@ describe('rollup-plugin-imagetools', () => { ] }) - expect(p).rejects.toBeDefined() + await expect(p).rejects.toBeDefined() }) - it('resolves normal on non matching input', () => { + it('resolves normal on non matching input', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg?w=300"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png?w=300"`), imagetools({ exclude: '' }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) }) @@ -158,22 +158,23 @@ describe('rollup-plugin-imagetools', () => { }) }) - test('relative import', async () => { + test('relative path', async () => { const bundle = await rollup({ plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools() ] }) - const source = await getSource(bundle) - expect(source).toMatchFile() + const source = await getSource(bundle) + expect(source).toMatchImageSnapshot() }) - test('absolute import', async () => { - const imagePath = join(process.cwd(), 'pexels-allec-gomes-5195763.jpg') + + test('absolute path', async () => { + const imagePath = join(process.cwd(), 'pexels-allec-gomes-5195763.png') const bundle = await rollup({ plugins: [ @@ -186,28 +187,28 @@ describe('rollup-plugin-imagetools', () => { }) const source = await getSource(bundle) - expect(source).toMatchFile() + expect(source).toMatchImageSnapshot() }) - test('non existent file', () => { + test('non existent file', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./invalid.jpg?w=300"`), + testEntry(`import Image from "./invalid.png?w=300"`), imagetools() ] }) - expect(p).rejects.toBeDefined() + await expect(p).rejects.toBeDefined() }) - test('no directives', () => { + test('no directives', async () => { const p = rollup({ plugins: [ - testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg"`), + testEntry(`import Image from "./pexels-allec-gomes-5195763.png"`), imagetools() ] }) - expect(p).rejects.toBeDefined() + await expect(p).rejects.toBeDefined() }) }) \ No newline at end of file diff --git a/packages/vite/package.json b/packages/vite/package.json index 7ea5f8b1..694efcd0 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -43,6 +43,7 @@ "@types/jest": "^26.0.20", "babel-jest": "^26.6.3", "jest": "^26.6.3", + "jest-image-snapshot": "^4.4.1", "rollup": "^2.41.2", "rollup-plugin-typescript2": "^0.30.0", "ts-jest": "^26.5.3", diff --git a/packages/vite/rollup.config.js b/packages/vite/rollup.config.js index 5f3a468f..1ab7b331 100644 --- a/packages/vite/rollup.config.js +++ b/packages/vite/rollup.config.js @@ -7,7 +7,6 @@ export default { dir: 'dist', format: 'cjs', sourcemap: true, - exports: 'default', entryFileNames: '[name].cjs', chunkFileNames: '[name].cjs' }, diff --git a/packages/vite/src/__tests__/__file_snapshots__/vite-imagetools-absolute-import-6 b/packages/vite/src/__tests__/__file_snapshots__/vite-imagetools-absolute-import-6 deleted file mode 100644 index 66df9803..00000000 --- a/packages/vite/src/__tests__/__file_snapshots__/vite-imagetools-absolute-import-6 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd15f7e14f638afa832879dff0045990e2ad7710d59964c06a4da115197a3027 -size 7282 diff --git a/packages/vite/src/__tests__/__file_snapshots__/vite-imagetools-relative-import-3 b/packages/vite/src/__tests__/__file_snapshots__/vite-imagetools-relative-import-3 deleted file mode 100644 index 66df9803..00000000 --- a/packages/vite/src/__tests__/__file_snapshots__/vite-imagetools-relative-import-3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd15f7e14f638afa832879dff0045990e2ad7710d59964c06a4da115197a3027 -size 7282 diff --git a/packages/vite/src/__tests__/__image_snapshots__/main-test-ts-vite-imagetools-absolute-import-1-snap.png b/packages/vite/src/__tests__/__image_snapshots__/main-test-ts-vite-imagetools-absolute-import-1-snap.png new file mode 100644 index 00000000..32008305 Binary files /dev/null and b/packages/vite/src/__tests__/__image_snapshots__/main-test-ts-vite-imagetools-absolute-import-1-snap.png differ diff --git a/packages/vite/src/__tests__/__image_snapshots__/main-test-ts-vite-imagetools-relative-import-1-snap.png b/packages/vite/src/__tests__/__image_snapshots__/main-test-ts-vite-imagetools-relative-import-1-snap.png new file mode 100644 index 00000000..32008305 Binary files /dev/null and b/packages/vite/src/__tests__/__image_snapshots__/main-test-ts-vite-imagetools-relative-import-1-snap.png differ diff --git a/packages/vite/src/__tests__/fixtures/pexels-allec-gomes-5195763.jpg b/packages/vite/src/__tests__/fixtures/pexels-allec-gomes-5195763.jpg deleted file mode 100644 index c2e2b049..00000000 Binary files a/packages/vite/src/__tests__/fixtures/pexels-allec-gomes-5195763.jpg and /dev/null differ diff --git a/packages/vite/src/__tests__/fixtures/pexels-allec-gomes-5195763.png b/packages/vite/src/__tests__/fixtures/pexels-allec-gomes-5195763.png new file mode 100644 index 00000000..3e6fb7b6 Binary files /dev/null and b/packages/vite/src/__tests__/fixtures/pexels-allec-gomes-5195763.png differ diff --git a/packages/vite/src/__tests__/main.test.ts b/packages/vite/src/__tests__/main.test.ts index 3b821da9..ffff6bcb 100644 --- a/packages/vite/src/__tests__/main.test.ts +++ b/packages/vite/src/__tests__/main.test.ts @@ -2,9 +2,9 @@ import { build } from 'vite' import { imagetools } from '../index' import { join } from 'path' import { getSource, testEntry } from './util' -import { toMatchFile } from 'jest-file-snapshot' +import { toMatchImageSnapshot } from 'jest-image-snapshot' -expect.extend({ toMatchFile }) +expect.extend({ toMatchImageSnapshot }) process.chdir(join(__dirname, 'fixtures')) describe('vite-imagetools', () => { @@ -16,61 +16,61 @@ describe('vite-imagetools', () => { build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ - include: '**/*.jpg?*' + include: '**/*.png?*' }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts a regex', () => { + it('accepts a regex', async () => { const p = build({ logLevel: 'warn', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ - include: /\w+\.jpg/ + include: /\w+\.png/ }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts an array', () => { + it('accepts an array', async () => { const p = build({ logLevel: 'warn', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ - include: ['**/*.jpg?*', /\w+\.jpg/] + include: ['**/*.png?*', /\w+\.png/] }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('errors on invalid input', () => { + it('errors on invalid input', async () => { const p = build({ logLevel: 'silent', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ @@ -80,16 +80,16 @@ describe('vite-imagetools', () => { ] }) - expect(p).rejects.toBeDefined() + await expect(p).rejects.toBeDefined() }) - it('does nothing non matching import', () => { + it('does nothing non matching import', async () => { const p = build({ logLevel: 'warn', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ @@ -98,7 +98,7 @@ describe('vite-imagetools', () => { ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) }) @@ -109,61 +109,61 @@ describe('vite-imagetools', () => { build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ - exclude: '**/*.png' + exclude: '**/*.jpg' }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts a regex', () => { + it('accepts a regex', async () => { const p = build({ logLevel: 'warn', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ - exclude: /\w+\.png/ + exclude: /\w+\.jpg/ }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('accepts an array', () => { + it('accepts an array', async () => { const p = build({ logLevel: 'warn', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ - exclude: ['**/*.png?*', /\w+\.png/] + exclude: ['**/*.jpg?*', /\w+\.jpg/] }) ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) - it('errors on invalid input', () => { + it('errors on invalid input', async () => { const p = build({ logLevel: 'silent', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ @@ -173,16 +173,16 @@ describe('vite-imagetools', () => { ] }) - expect(p).rejects.toBeDefined() + await expect(p).rejects.toBeDefined() }) - it('resolves normal on non matching input', () => { + it('resolves normal on non matching input', async () => { const p = build({ logLevel: 'warn', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools({ @@ -191,7 +191,7 @@ describe('vite-imagetools', () => { ] }) - expect(p).resolves.toBeDefined() + await expect(p).resolves.toBeDefined() }) }) @@ -209,11 +209,12 @@ describe('vite-imagetools', () => { test('relative import', async () => { const bundle = await build({ + logLevel: 'warn', build: { write: false }, plugins: [ testEntry(` - import Image from "./pexels-allec-gomes-5195763.jpg?w=300" + import Image from "./pexels-allec-gomes-5195763.png?w=300" export default Image `), imagetools() @@ -221,13 +222,14 @@ describe('vite-imagetools', () => { }) const { source } = await getSource(bundle) - expect(source).toMatchFile() + expect(source).toMatchImageSnapshot() }) test('absolute import', async () => { - const imagePath = join(process.cwd(), 'pexels-allec-gomes-5195763.jpg') + const imagePath = join(process.cwd(), 'pexels-allec-gomes-5195763.png') const bundle = await build({ + logLevel: 'warn', build: { write: false }, plugins: [ @@ -240,13 +242,13 @@ describe('vite-imagetools', () => { }) const { source } = await getSource(bundle) - expect(source).toMatchFile() + expect(source).toMatchImageSnapshot() }) test('non existent file', () => { // const p = rollup({ // plugins: [ - // testEntry(`import Image from "./invalid.jpg?w=300"`), + // testEntry(`import Image from "./invalid.png?w=300"`), // imagetools() // ] // }) @@ -257,7 +259,7 @@ describe('vite-imagetools', () => { test('no directives', () => { // const p = rollup({ // plugins: [ - // testEntry(`import Image from "./pexels-allec-gomes-5195763.jpg"`), + // testEntry(`import Image from "./pexels-allec-gomes-5195763.png"`), // imagetools() // ] // }) diff --git a/yarn.lock b/yarn.lock index 28f94728..b3fa0e22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2353,15 +2353,16 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^26.0.20": - version "26.0.20" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" - integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== +"@types/jest-image-snapshot@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@types/jest-image-snapshot/-/jest-image-snapshot-4.3.0.tgz#d07d4278520ab0d3be0ad2d7825b282180c03cb4" + integrity sha512-gb6zF1ICfvzBsQYMTq2qFhhiI46Cab/t5PtLK4Z3mpbyQoyKI2HgCFDi71iE7rjs6TrIPnsf2GXw+mnGvZSgrA== dependencies: - jest-diff "^26.0.0" - pretty-format "^26.0.0" + "@types/jest" "*" + "@types/pixelmatch" "*" + ssim.js "^3.1.1" -"@types/jest@^26.0.22": +"@types/jest@*", "@types/jest@^26.0.22": version "26.0.22" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.22.tgz#8308a1debdf1b807aa47be2838acdcd91e88fbe6" integrity sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw== @@ -2369,6 +2370,14 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" +"@types/jest@^26.0.20": + version "26.0.20" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" + integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== + dependencies: + jest-diff "^26.0.0" + pretty-format "^26.0.0" + "@types/minimatch@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -2394,6 +2403,13 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== +"@types/pixelmatch@*": + version "5.2.3" + resolved "https://registry.yarnpkg.com/@types/pixelmatch/-/pixelmatch-5.2.3.tgz#aefcbfa7fb2861727af0ab7c097be7383bd584dd" + integrity sha512-p+nAQVYK/DUx7+s1Xyu9dqAg0gobf7VmJ+iDA4lljg1o4XRgQHr7R2h1NwFt3gdNOZiftxWB11+0TuZqXYf19w== + dependencies: + "@types/node" "*" + "@types/prettier@^2.0.0": version "2.2.2" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.2.tgz#e2280c89ddcbeef340099d6968d8c86ba155fdf6" @@ -2525,6 +2541,11 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -3007,6 +3028,17 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + chalk@^2.0.0: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -4204,6 +4236,11 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + integrity sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g= + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -4332,6 +4369,11 @@ globby@^11.0.2: merge2 "^1.3.0" slash "^3.0.0" +glur@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/glur/-/glur-1.1.2.tgz#f20ea36db103bfc292343921f1f91e83c3467689" + integrity sha1-8g6jbbEDv8KSNDkh8fkeg8NGdok= + graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.3, graceful-fs@^4.2.4: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" @@ -4372,6 +4414,13 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + has-bigints@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" @@ -5131,6 +5180,21 @@ jest-haste-map@^26.6.2: optionalDependencies: fsevents "^2.1.2" +jest-image-snapshot@^4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/jest-image-snapshot/-/jest-image-snapshot-4.4.1.tgz#1ecc83ce55de9a92661bc488b795300719992808" + integrity sha512-Qdx9mGXMgmbw74YofHWny3J7yh08z+Hl+yzNt67RafpvE3bqboVCHdUDgesD5Jq83lQe0znbG7TzB3iL5DOx2A== + dependencies: + chalk "^1.1.3" + get-stdin "^5.0.1" + glur "^1.1.2" + lodash "^4.17.4" + mkdirp "^0.5.1" + pixelmatch "^5.1.0" + pngjs "^3.4.0" + rimraf "^2.6.2" + ssim.js "^3.1.1" + jest-jasmine2@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" @@ -5676,7 +5740,7 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" -lodash@4.x, lodash@^4.17.15, lodash@^4.17.19: +lodash@4.x, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6739,6 +6803,13 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" +pixelmatch@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-5.2.1.tgz#9e4e4f4aa59648208a31310306a5bed5522b0d65" + integrity sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ== + dependencies: + pngjs "^4.0.1" + pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -6746,6 +6817,16 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pngjs@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" + integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== + +pngjs@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-4.0.1.tgz#f803869bb2fc1bfe1bf99aa4ec21c108117cfdbe" + integrity sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg== + 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" @@ -7254,7 +7335,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^2.6.3: +rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -7691,6 +7772,11 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssim.js@^3.1.1: + version "3.5.0" + resolved "https://registry.yarnpkg.com/ssim.js/-/ssim.js-3.5.0.tgz#d7276b9ee99b57a5ff0db34035f02f35197e62df" + integrity sha512-Aj6Jl2z6oDmgYFFbQqK7fght19bXdOxY7Tj03nF+03M9gCBAjeIiO8/PlEGMfKDwYpw4q6iBqVq2YuREorGg/g== + ssri@^8.0.0, ssri@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" @@ -7870,6 +7956,11 @@ strong-log-transformer@^2.1.0: minimist "^1.2.0" through "^2.3.4" +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"