diff --git a/fixture/react-native/e2e/utils/PixelDifference.ts b/fixture/react-native/e2e/utils/PixelDifference.ts index f51b915f8..3e5e75a4c 100644 --- a/fixture/react-native/e2e/utils/PixelDifference.ts +++ b/fixture/react-native/e2e/utils/PixelDifference.ts @@ -1,6 +1,6 @@ import * as fs from "fs"; -import pixelmatch from "pixelmatch"; +import blazediff from "@blazediff/core"; import { PNG } from "pngjs"; export const pixelDifference = ( @@ -12,7 +12,7 @@ export const pixelDifference = ( const { width, height } = reference; const diff = new PNG({ width, height }); - const numDiffPixels = pixelmatch( + const numDiffPixels = blazediff( reference.data, toMatch.data, diff.data, diff --git a/fixture/react-native/package.json b/fixture/react-native/package.json index 86efa576a..53bc8b526 100644 --- a/fixture/react-native/package.json +++ b/fixture/react-native/package.json @@ -30,6 +30,7 @@ "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.3", "@babel/runtime": "^7.25.0", + "@blazediff/core": "^1.4.1", "@react-native-community/cli": "18.0.0", "@react-native-community/cli-platform-android": "18.0.0", "@react-native-community/cli-platform-ios": "18.0.0", @@ -38,7 +39,6 @@ "@react-native/metro-config": "0.79.1", "@react-native/typescript-config": "0.79.1", "@types/jest": "^29.5.13", - "@types/pixelmatch": "^5.2.6", "@types/pngjs": "^6.0.5", "@types/react": "^19.0.0", "babel-jest": "^29.2.1", @@ -48,7 +48,6 @@ "jest": "^29.2.1", "metro-react-native-babel-preset": "^0.77.0", "patch-package": "^8.0.0", - "pixelmatch": "^5.3.0", "pngjs": "^7.0.0", "postinstall-postinstall": "^2.1.0", "typescript": "5.8.3" diff --git a/fixture/react-native/yarn.lock b/fixture/react-native/yarn.lock index 3a3093f51..19cad4da7 100644 --- a/fixture/react-native/yarn.lock +++ b/fixture/react-native/yarn.lock @@ -1532,6 +1532,18 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@blazediff/core@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@blazediff/core/-/core-1.4.1.tgz#c667b59102e00e6fe0489a28494e41382f421fa7" + integrity sha512-mNhxncafu6xHV1+6v4K7AvwOodnIFcmqERNbdcDCL7jb9mMXDy4DKcidbnQG5ExKsgBYUhOhJs2qrpdOS52qUA== + dependencies: + "@blazediff/types" "1.4.1" + +"@blazediff/types@1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@blazediff/types/-/types-1.4.1.tgz#a13c99bb311a0918ce314199f75ae6b792cba031" + integrity sha512-c5se1YZMvdJiF/M/kPOFkw/E1BbfV6U4KsE6QcJiM9dVL1ix4ze/EmLIYvHwOX54kzxi2iWL0BZgMOlfWQRJ2A== + "@colors/colors@1.6.0", "@colors/colors@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" @@ -2427,13 +2439,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.9.tgz#0b7f161afb5b1cc12518d29b2cdc7175d5490628" integrity sha512-5dNBXu/FOER+EXnyah7rn8xlNrfMOQb/qXnw4NQgLkCygKBKhdmF/CA5oXVOKZLBEahw8s2WP9LxIcN/oDDRgQ== -"@types/pixelmatch@^5.2.6": - version "5.2.6" - resolved "https://registry.yarnpkg.com/@types/pixelmatch/-/pixelmatch-5.2.6.tgz#fba6de304ac958495f27d85989f5c6bb7499a686" - integrity sha512-wC83uexE5KGuUODn6zkm9gMzTwdY5L0chiK+VrKcDfEjzxh1uadlWTvOmAbCpnM9zx/Ww3f8uKlYQVnO/TrqVg== - dependencies: - "@types/node" "*" - "@types/pngjs@^6.0.5": version "6.0.5" resolved "https://registry.yarnpkg.com/@types/pngjs/-/pngjs-6.0.5.tgz#6dec2f7eb8284543ca4e423f3c09b119fa939ea3" @@ -6517,13 +6522,6 @@ pirates@^4.0.4: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== -pixelmatch@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-5.3.0.tgz#5e5321a7abedfb7962d60dbf345deda87cb9560a" - integrity sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q== - dependencies: - pngjs "^6.0.0" - pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -6538,11 +6536,6 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -pngjs@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-6.0.0.tgz#ca9e5d2aa48db0228a52c419c3308e87720da821" - integrity sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg== - pngjs@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-7.0.0.tgz#a8b7446020ebbc6ac739db6c5415a65d17090e26" @@ -7702,11 +7695,6 @@ ts-api-utils@^1.3.0: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== -tslib@2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" - integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== - tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"