From 96f489c1f4af88f91ad0ba0d0551e5295a3b5c27 Mon Sep 17 00:00:00 2001 From: tony chen Date: Fri, 2 Feb 2024 17:05:34 +0800 Subject: [PATCH] feat: add image snap test --- .github/workflows/ci.yml | 10 +- .github/workflows/publish.yml | 5 +- .gitignore | 3 + example/package.json | 2 +- example/yarn.lock | 2 +- jest.config.js | 10 +- jestSetup.js | 7 +- package.json | 4 +- src/SVGRenderer.ts | 2 +- ...a-chart-chart-renders-correctly-2-snap.png | Bin 0 -> 5013 bytes ...g-chart-chart-renders-correctly-2-snap.png | Bin 0 -> 5013 bytes src/__tests__/chart.test.tsx | 46 +++- src/components/PanResponderHandler.tsx | 8 +- src/skiaChart.tsx | 26 +- yarn.lock | 243 +++++++++++++++++- 15 files changed, 333 insertions(+), 35 deletions(-) create mode 100644 src/__tests__/__image_snapshots__/chart-test-tsx-skia-chart-chart-renders-correctly-2-snap.png create mode 100644 src/__tests__/__image_snapshots__/chart-test-tsx-svg-chart-chart-renders-correctly-2-snap.png diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82df70b16..93adb561b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,13 @@ on: jobs: lint: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v3 - + - uses: actions/setup-node@v4 + with: + node-version: latest - name: Setup uses: ./.github/actions/setup @@ -19,7 +21,7 @@ jobs: run: yarn typescript test: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v3 @@ -31,7 +33,7 @@ jobs: run: yarn test --maxWorkers=2 --coverage build: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ac9a4fb2..46df24360 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ env: jobs: publish: name: publish - runs-on: ubuntu-latest + runs-on: macos-latest strategy: fail-fast: false matrix: @@ -21,6 +21,9 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/setup-node@v4 + with: + node-version: latest - name : GITHUB CONTEXT env: GITHUB_CONTEXT: ${{ toJson(github) }} diff --git a/.gitignore b/.gitignore index 19d0fb364..e659139fc 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,6 @@ lib/ # Docusaurus (when switching from docs branches to code branches) .docusaurus/ + +# jest +coverage/ \ No newline at end of file diff --git a/example/package.json b/example/package.json index 13352a389..07e3a92f3 100644 --- a/example/package.json +++ b/example/package.json @@ -11,7 +11,7 @@ "dependencies": { "@expo/webpack-config": "~19.0.1", "@shopify/react-native-skia": "0.1.221", - "echarts": "^5.5.0", + "echarts": "5.5.0-rc.1", "expo": "^50.0.0", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/example/yarn.lock b/example/yarn.lock index 02edb3619..9bd98ea9f 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -4042,7 +4042,7 @@ dotenv@~16.0.3: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== -echarts@^5.5.0: +echarts@5.5.0-rc.1: version "5.5.0-rc.1" resolved "https://registry.yarnpkg.com/echarts/-/echarts-5.5.0-rc.1.tgz#31ee2c4e09da24fe8149bb011c1fbd271a2bf10f" integrity sha512-Fnfls+zDAg9HLuWK27JakdjLjpkEZsKTk+eeSA6eOqphBNA9iXCI1CvQJZ5xD8WJY40bqdh4zCaE4AxSDjJslw== diff --git a/jest.config.js b/jest.config.js index 3572e96ef..52ec856e0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,8 @@ module.exports = { - preset: "react-native", + preset: 'react-native', modulePathIgnorePatterns: [ - "/example/node_modules", - "/lib/" + '/example/node_modules', + '/lib/', ], transformIgnorePatterns: [ 'node_modules/(?!(react-native|react-native.*|@react-native.*|@?react-navigation.*|@shopify/react-native-skia|zrender|echarts)/)', @@ -10,7 +10,7 @@ module.exports = { setupFiles: [ '@shopify/react-native-skia/jestSetup.js', 'react-native-gesture-handler/jestSetup.js', - './jestSetup.js' + './jestSetup.js', ], testTimeout: 30000, -}; \ No newline at end of file +}; diff --git a/jestSetup.js b/jestSetup.js index 63877215b..bb618a032 100644 --- a/jestSetup.js +++ b/jestSetup.js @@ -1,6 +1,7 @@ -const { Skia } = require("@shopify/react-native-skia"); +const { Skia } = require('@shopify/react-native-skia'); Skia.SVG.MakeFromString = (svg) => svg; +// eslint-disable-next-line no-undef globalThis.navigator = { - product: "ReactNative", - userAgent: "Node.js", + product: 'ReactNative', + userAgent: 'Node.js', }; diff --git a/package.json b/package.json index b3de0885f..7087a3b21 100644 --- a/package.json +++ b/package.json @@ -64,11 +64,12 @@ "@types/react": "~18.2.14", "commitlint": "^17.0.2", "del-cli": "^5.0.0", - "echarts": "^5.5.0", + "echarts": "5.5.0-rc.1", "eslint": "^8.4.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "jest": "^29.7.0", + "jest-image-snapshot": "^6.4.0", "pod-install": "^0.1.0", "prettier": "^2.0.5", "react": "18.2.0", @@ -78,6 +79,7 @@ "react-native-svg": "14.1.0", "react-test-renderer": "^18.2.0", "release-it": "^15.0.0", + "sharp": "^0.33.2", "typescript": "^5.0.4", "zrender": "^5.5.0" }, diff --git a/src/SVGRenderer.ts b/src/SVGRenderer.ts index 74b2a5d71..70d781bde 100644 --- a/src/SVGRenderer.ts +++ b/src/SVGRenderer.ts @@ -70,7 +70,7 @@ class CustomSVGPainter extends SVGPainter { super.refresh(); } } - toDataURL(base64?: boolean):string { + toDataURL(base64?: boolean): string { // @ts-ignore if (isRn && this._svgDom.makeImageSnapshot) { // @ts-ignore diff --git a/src/__tests__/__image_snapshots__/chart-test-tsx-skia-chart-chart-renders-correctly-2-snap.png b/src/__tests__/__image_snapshots__/chart-test-tsx-skia-chart-chart-renders-correctly-2-snap.png new file mode 100644 index 0000000000000000000000000000000000000000..1dc3dfb8d4b9f47caf7ba12d6ce3c0ceb12dbddf GIT binary patch literal 5013 zcmds5c~sK*+W(c6-rSnof~7^wOj&9gHMyjqX}8QAr$JgAaY;ta*A$b<9kj{vcvGQL z(X{Qj4cTakrG(p5in)MgN-9cjkRmvufPmopqub0qI`f|MzJJ_v?tM95mhzhR56wqX1x~82qi&TLXS-nx994Uw?^m_rU{z{(9|u1#qj- z1OV0_J$CpII<8POn3z!#dT7nB6NZ<6u6}an@T0DjuTIRo$vm{hEgfZ(ekJwM9`f45 zt>4G;>nOA|Ry;3%r>;TrCi*Juh9WCTnoH)1%X&w`!isj}uGvFA6-Le8U_M&NhQ^(-BJfkorV|NZ@ z53=Uq?K@ke>-UXKShkGL+=SdcKGAWoFM>k=DV{P8-1#nM~B+p*^Eb2HTbji>BI|2R?XexJDBK5z55OK45cwoi2^zX zmqo85+97oTz$AMnZgw+_QxNn3dQOhDPQzLy^4TO*{MW70UK8OsjALWdfNPa1zwNIJ zu|tBfWRlu-|vO70GhQ zDga=_?f#l&3Lzcwg&<}0m`zAQ=kflg^WJN9l?bBNOpQsSdDp zuXgKTlrC^EP`i~eYy|w!^siT_Lq^5VC=(oT#N_Fr`m)UE_`Z=nEz0WYI?eA)s33F! zW-tC>%k3SMS$;S6K|p}naMA1DE3h713kEkpZ%&9$v@VH0*&+Rf+zzhWu$)-&q&d)J z`^f>hXFR2&upAr{L$WfG+rDwDNS;9qjc4Zx2{4@hYw=WpCyPXPG8>)y(R@xv_dVm2 zYiKV|m37nP(>8(@bmLQduG<5Zn?)lunsCyLa~f(N^`1IFN>l!5`!>Ddp$2 z3uA?N;Qg*oC$HJgPxz3xUrcX66iZHcO6%d2#teGW7lO=dP{jJh@n*Rp-QU@xfHT#m zYt&@)+b(-9huICuVvf^iRicA3vM>#GtKqBS1UY=V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| z?f1Hct(g9fZ*zTVG7o&c8^b3$n1wK&7`UgHcN} z<&@r8p#wYz*BL@H7dhp&g$g)zHeW1DhHzKw*iYjrn)qSbS*{ufa8kF=tD5XstiCt*2TyyMwJ z^@-p3CM6M^2xmQ|Bvk)G=Ah~WkhKv{NNg{izUb?BTm4fd1UPP4DgjSk%#zHVCdE5( zVyl^8T4BgvuQ0PL>EtwHPJv|Ks@?+)eoAnr^fV_wS_kAt*QQ~ddswGBp#_~GWi6QL zYgBHnJr}Az+9b<-!^iy$j-zk3`QG+oXFXnc1C9qaU~Atx&e8VR45R_Q;?T3CLP(p{7mdtjuY@ z%T7x);~Z<1UW0RLp4^9`)MrfR!Q{RrT1}EE^V%404`OQ;#WKNa16(Z=V+Z-hH5L7o zAHShRT9tbe&WUZtXm*w+B&uRjF~U*Zlu^W}<^fsQIVBU=sIFi%#p*!e>;2+!mSVJMW==2=Y|D_m z0xr*7Hjsm3X*K66Mq@FiykArk9qK;*%ulrncpsOh>M!6e+=TV$_8*vp=lEtJV}Gcv zfnp5l3+-B^l{jZJ*@vh`tfqF@Xo??YOkbGs@+wj4M%3aKt-MUdqX~U7_T&_|6f!@s z@*ZQDI44rdMOJ7ApKzg;#H2wT7@au`l@;E(?erRYxm literal 0 HcmV?d00001 diff --git a/src/__tests__/__image_snapshots__/chart-test-tsx-svg-chart-chart-renders-correctly-2-snap.png b/src/__tests__/__image_snapshots__/chart-test-tsx-svg-chart-chart-renders-correctly-2-snap.png new file mode 100644 index 0000000000000000000000000000000000000000..1dc3dfb8d4b9f47caf7ba12d6ce3c0ceb12dbddf GIT binary patch literal 5013 zcmds5c~sK*+W(c6-rSnof~7^wOj&9gHMyjqX}8QAr$JgAaY;ta*A$b<9kj{vcvGQL z(X{Qj4cTakrG(p5in)MgN-9cjkRmvufPmopqub0qI`f|MzJJ_v?tM95mhzhR56wqX1x~82qi&TLXS-nx994Uw?^m_rU{z{(9|u1#qj- z1OV0_J$CpII<8POn3z!#dT7nB6NZ<6u6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Z<1UW0RLp4^9`)MrfR!Q{RrT1}EE^V%404`OQ;#WKNa16(Z=V+Z-hH5L7o zAHShRT9tbe&WUZtXm*w+B&uRjF~U*Zlu^W}<^fsQIVBU=sIFi%#p*!e>;2+!mSVJMW==2=Y|D_m z0xr*7Hjsm3X*K66Mq@FiykArk9qK;*%ulrncpsOh>M!6e+=TV$_8*vp=lEtJV}Gcv zfnp5l3+-B^l{jZJ*@vh`tfqF@Xo??YOkbGs@+wj4M%3aKt-MUdqX~U7_T&_|6f!@s z@*ZQDI44rdMOJ7ApKzg;#H2wT7@au`l@;E(?erRYxm literal 0 HcmV?d00001 diff --git a/src/__tests__/chart.test.tsx b/src/__tests__/chart.test.tsx index 24da94bc4..6220e9d81 100644 --- a/src/__tests__/chart.test.tsx +++ b/src/__tests__/chart.test.tsx @@ -1,6 +1,13 @@ /** * @jest-environment @shopify/react-native-skia/jestEnv.mjs */ +declare global { + namespace jest { + interface Matchers { + toMatchImageSnapshot(): R; + } + } +} import React, { useEffect, useRef } from 'react'; import { Dimensions } from 'react-native'; import { render } from '@testing-library/react-native'; @@ -9,6 +16,19 @@ import SVGComponent from '../svgChart'; import { SVGRenderer } from '../SVGRenderer'; import * as echarts from 'echarts/core'; import { BarChart } from 'echarts/charts'; +const sharp = require('sharp'); + +const { toMatchImageSnapshot } = require('jest-image-snapshot'); + +function getSVGImage(svg: string) { + const svgString = decodeURIComponent( + svg.replace('data:image/svg+xml;charset=UTF-8,', '') + ); + return sharp(Buffer.from(svgString)).png().toBuffer(); +} + +expect.extend({ toMatchImageSnapshot }); + import { TitleComponent, TooltipComponent, @@ -21,10 +41,11 @@ echarts.use([ SVGRenderer, BarChart, ]); + const Components = [SkiaComponent, SVGComponent]; const E_HEIGHT = 250; -const E_WIDTH = Dimensions.get('screen').width;//750 -const option = { +const E_WIDTH = Dimensions.get('screen').width; //750 +const OPTION = { xAxis: { type: 'category', data: ['Mon', 'Tue'], @@ -39,7 +60,8 @@ const option = { }, ], }; -function Chart({ option, Component }: any) { + +function Chart({ option, Component, getDataURL }: any) { const ref = useRef(null); useEffect(() => { let chart: any; @@ -51,17 +73,29 @@ function Chart({ option, Component }: any) { height: E_HEIGHT, }); chart.setOption(option); + getDataURL?.(chart.getDataURL()); } return () => chart?.dispose(); - }, [option]); + }, [option, getDataURL]); return ; } + Components.forEach((Component) => { describe(`${Component.displayName} Chart` || 'unknown', () => { - it('renders correctly', () => { + it('renders correctly', (done) => { const { toJSON } = render( - + { + expect(data).toBeDefined(); + getSVGImage(data).then((d: Buffer) => { + expect(d).toMatchImageSnapshot(); + done(); + }); + }} + /> ); expect(toJSON()).toMatchSnapshot(); }); diff --git a/src/components/PanResponderHandler.tsx b/src/components/PanResponderHandler.tsx index c01df88e8..8752759e6 100644 --- a/src/components/PanResponderHandler.tsx +++ b/src/components/PanResponderHandler.tsx @@ -33,7 +33,13 @@ export function PanResponderHandler({ dispatchEvents, }: PanResponderHandlerProps) { const [panResponder] = usePanResponder(dispatchEvents); - return ; + return ( + + ); } export function usePanResponder( diff --git a/src/skiaChart.tsx b/src/skiaChart.tsx index a7607526b..84f6bc459 100644 --- a/src/skiaChart.tsx +++ b/src/skiaChart.tsx @@ -8,7 +8,13 @@ import React, { useRef, } from 'react'; -import { Canvas, ImageSVG, Skia, SkSVG, useCanvasRef } from '@shopify/react-native-skia'; +import { + Canvas, + ImageSVG, + Skia, + SkSVG, + useCanvasRef, +} from '@shopify/react-native-skia'; import { View } from 'react-native'; @@ -55,7 +61,7 @@ function SkiaComponent( const [width, setWidth] = useState(initialWidth ?? 0); const [height, setHeight] = useState(initialHeight ?? 0); const zrenderId = useRef(); - const canvasRef = useCanvasRef(); + const canvasRef = useCanvasRef?.(); const dispatchEvents = useCallback( (types, nativeEvent, eventArgs) => { @@ -88,9 +94,11 @@ function SkiaComponent( zrenderId.current = id; }, makeImageSnapshot: () => { - const image = canvasRef.current?.makeImageSnapshot(); - return image ? `data:image/png;base64,${image.encodeToBase64()}` : null; - } + const image = canvasRef?.current?.makeImageSnapshot(); + return image + ? `data:image/png;base64,${image.encodeToBase64()}` + : null; + }, }, viewprot: {}, dispatchEvents, @@ -101,12 +109,16 @@ function SkiaComponent( }; }, }), - [dispatchEvents, initialWidth, initialHeight] + [dispatchEvents, initialWidth, initialHeight, canvasRef] ); return svgString ? ( - + {handleGesture ? ( diff --git a/yarn.lock b/yarn.lock index 2573236a0..06ab94875 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1366,6 +1366,13 @@ dependencies: "@types/hammerjs" "^2.0.36" +"@emnapi/runtime@^0.45.0": + version "0.45.0" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-0.45.0.tgz#e754de04c683263f34fd0c7f32adfe718bbe4ddd" + integrity sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w== + dependencies: + tslib "^2.4.0" + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -1439,6 +1446,119 @@ resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== +"@img/sharp-darwin-arm64@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.2.tgz#0a52a82c2169112794dac2c71bfba9e90f7c5bd1" + integrity sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w== + optionalDependencies: + "@img/sharp-libvips-darwin-arm64" "1.0.1" + +"@img/sharp-darwin-x64@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.2.tgz#982e26bb9d38a81f75915c4032539aed621d1c21" + integrity sha512-/rK/69Rrp9x5kaWBjVN07KixZanRr+W1OiyKdXcbjQD6KbW+obaTeBBtLUAtbBsnlTTmWthw99xqoOS7SsySDg== + optionalDependencies: + "@img/sharp-libvips-darwin-x64" "1.0.1" + +"@img/sharp-libvips-darwin-arm64@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.1.tgz#81e83ffc2c497b3100e2f253766490f8fad479cd" + integrity sha512-kQyrSNd6lmBV7O0BUiyu/OEw9yeNGFbQhbxswS1i6rMDwBBSX+e+rPzu3S+MwAiGU3HdLze3PanQ4Xkfemgzcw== + +"@img/sharp-libvips-darwin-x64@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.1.tgz#fc1fcd9d78a178819eefe2c1a1662067a83ab1d6" + integrity sha512-eVU/JYLPVjhhrd8Tk6gosl5pVlvsqiFlt50wotCvdkFGf+mDNBJxMh+bvav+Wt3EBnNZWq8Sp2I7XfSjm8siog== + +"@img/sharp-libvips-linux-arm64@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.1.tgz#26eb8c556a9b0db95f343fc444abc3effb67ebcf" + integrity sha512-bnGG+MJjdX70mAQcSLxgeJco11G+MxTz+ebxlz8Y3dxyeb3Nkl7LgLI0mXupoO+u1wRNx/iRj5yHtzA4sde1yA== + +"@img/sharp-libvips-linux-arm@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.1.tgz#2a377b959ff7dd6528deee486c25461296a4fa8b" + integrity sha512-FtdMvR4R99FTsD53IA3LxYGghQ82t3yt0ZQ93WMZ2xV3dqrb0E8zq4VHaTOuLEAuA83oDawHV3fd+BsAPadHIQ== + +"@img/sharp-libvips-linux-s390x@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.1.tgz#af28ac9ba929204467ecdf843330d791e9421e10" + integrity sha512-3+rzfAR1YpMOeA2zZNp+aYEzGNWK4zF3+sdMxuCS3ey9HhDbJ66w6hDSHDMoap32DueFwhhs3vwooAB2MaK4XQ== + +"@img/sharp-libvips-linux-x64@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.1.tgz#4273d182aa51912e655e1214ea47983d7c1f7f8d" + integrity sha512-3NR1mxFsaSgMMzz1bAnnKbSAI+lHXVTqAHgc1bgzjHuXjo4hlscpUxc0vFSAPKI3yuzdzcZOkq7nDPrP2F8Jgw== + +"@img/sharp-libvips-linuxmusl-arm64@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.1.tgz#d150c92151cea2e8d120ad168b9c358d09c77ce8" + integrity sha512-5aBRcjHDG/T6jwC3Edl3lP8nl9U2Yo8+oTl5drd1dh9Z1EBfzUKAJFUDTDisDjUwc7N4AjnPGfCA3jl3hY8uDg== + +"@img/sharp-libvips-linuxmusl-x64@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.1.tgz#e297c1a4252c670d93b0f9e51fca40a7a5b6acfd" + integrity sha512-dcT7inI9DBFK6ovfeWRe3hG30h51cBAP5JXlZfx6pzc/Mnf9HFCQDLtYf4MCBjxaaTfjCCjkBxcy3XzOAo5txw== + +"@img/sharp-linux-arm64@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.2.tgz#af3409f801a9bee1d11d0c7e971dcd6180f80022" + integrity sha512-pz0NNo882vVfqJ0yNInuG9YH71smP4gRSdeL09ukC2YLE6ZyZePAlWKEHgAzJGTiOh8Qkaov6mMIMlEhmLdKew== + optionalDependencies: + "@img/sharp-libvips-linux-arm64" "1.0.1" + +"@img/sharp-linux-arm@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.2.tgz#181f7466e6ac074042a38bfb679eb82505e17083" + integrity sha512-Fndk/4Zq3vAc4G/qyfXASbS3HBZbKrlnKZLEJzPLrXoJuipFNNwTes71+Ki1hwYW5lch26niRYoZFAtZVf3EGA== + optionalDependencies: + "@img/sharp-libvips-linux-arm" "1.0.1" + +"@img/sharp-linux-s390x@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.2.tgz#9c171f49211f96fba84410b3e237b301286fa00f" + integrity sha512-MBoInDXDppMfhSzbMmOQtGfloVAflS2rP1qPcUIiITMi36Mm5YR7r0ASND99razjQUpHTzjrU1flO76hKvP5RA== + optionalDependencies: + "@img/sharp-libvips-linux-s390x" "1.0.1" + +"@img/sharp-linux-x64@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.2.tgz#b956dfc092adc58c2bf0fae2077e6f01a8b2d5d7" + integrity sha512-xUT82H5IbXewKkeF5aiooajoO1tQV4PnKfS/OZtb5DDdxS/FCI/uXTVZ35GQ97RZXsycojz/AJ0asoz6p2/H/A== + optionalDependencies: + "@img/sharp-libvips-linux-x64" "1.0.1" + +"@img/sharp-linuxmusl-arm64@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.2.tgz#10e0ec5a79d1234c6a71df44c9f3b0bef0bc0f15" + integrity sha512-F+0z8JCu/UnMzg8IYW1TMeiViIWBVg7IWP6nE0p5S5EPQxlLd76c8jYemG21X99UzFwgkRo5yz2DS+zbrnxZeA== + optionalDependencies: + "@img/sharp-libvips-linuxmusl-arm64" "1.0.1" + +"@img/sharp-linuxmusl-x64@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.2.tgz#29e0030c24aa27c38201b1fc84e3d172899fcbe0" + integrity sha512-+ZLE3SQmSL+Fn1gmSaM8uFusW5Y3J9VOf+wMGNnTtJUMUxFhv+P4UPaYEYT8tqnyYVaOVGgMN/zsOxn9pSsO2A== + optionalDependencies: + "@img/sharp-libvips-linuxmusl-x64" "1.0.1" + +"@img/sharp-wasm32@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-wasm32/-/sharp-wasm32-0.33.2.tgz#38d7c740a22de83a60ad1e6bcfce17462b0d4230" + integrity sha512-fLbTaESVKuQcpm8ffgBD7jLb/CQLcATju/jxtTXR1XCLwbOQt+OL5zPHSDMmp2JZIeq82e18yE0Vv7zh6+6BfQ== + dependencies: + "@emnapi/runtime" "^0.45.0" + +"@img/sharp-win32-ia32@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.2.tgz#09456314e223f68e5417c283b45c399635c16202" + integrity sha512-okBpql96hIGuZ4lN3+nsAjGeggxKm7hIRu9zyec0lnfB8E7Z6p95BuRZzDDXZOl2e8UmR4RhYt631i7mfmKU8g== + +"@img/sharp-win32-x64@0.33.2": + version "0.33.2" + resolved "https://registry.yarnpkg.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.2.tgz#148e96dfd6e68747da41a311b9ee4559bb1b1471" + integrity sha512-E4magOks77DK47FwHUIGH0RYWSgRBfGdK56kIHSVeB9uIS4pPFr4N2kIVsXdQQo4LzOsENKV5KAhRlRL7eMAdg== + "@isaacs/ttlcache@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" @@ -3389,11 +3509,27 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== -color-name@~1.1.4: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" + colorette@^1.0.7: version "1.4.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" @@ -4024,6 +4160,11 @@ destroy@1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +detect-libc@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -4109,7 +4250,7 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -echarts@^5.5.0: +echarts@5.5.0-rc.1: version "5.5.0-rc.1" resolved "https://registry.yarnpkg.com/echarts/-/echarts-5.5.0-rc.1.tgz#31ee2c4e09da24fe8149bb011c1fbd271a2bf10f" integrity sha512-Fnfls+zDAg9HLuWK27JakdjLjpkEZsKTk+eeSA6eOqphBNA9iXCI1CvQJZ5xD8WJY40bqdh4zCaE4AxSDjJslw== @@ -4904,6 +5045,11 @@ get-pkg-repo@^4.0.0: through2 "^2.0.0" yargs "^16.2.0" +get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + integrity sha512-jZV7n6jGE3Gt7fgSTJoz91Ak5MuTLwMwkoYdjxuJ/AmjIsE1UC03y/IWkZCQGEvVNS9qoRNwy5BCqxImv0FVeA== + get-stream@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -5087,6 +5233,11 @@ globby@^13.1.2: merge2 "^1.4.1" slash "^4.0.0" +glur@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/glur/-/glur-1.1.2.tgz#f20ea36db103bfc292343921f1f91e83c3467689" + integrity sha512-l+8esYHTKOx2G/Aao4lEQ0bnHWg4fWtJbVoZZT9Knxi01pB8C80BR85nONLFwkkQoFRCmXY+BUcGZN3yZ2QsRA== + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -5477,6 +5628,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + is-async-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" @@ -6079,6 +6235,20 @@ jest-haste-map@^29.7.0: optionalDependencies: fsevents "^2.3.2" +jest-image-snapshot@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/jest-image-snapshot/-/jest-image-snapshot-6.4.0.tgz#65831d13beb1680f3bba9fb28230fa53d76939be" + integrity sha512-IWGtSOnelwaVPd09STbJuLmnAwlBC/roJtTLGLb8M3TA0vfku3MRNEXmljTa1EMXqdRbA0oIWiqHFB1ttTGazQ== + dependencies: + chalk "^4.0.0" + get-stdin "^5.0.1" + glur "^1.1.2" + lodash "^4.17.4" + pixelmatch "^5.1.0" + pngjs "^3.4.0" + rimraf "^2.6.2" + ssim.js "^3.1.1" + jest-leak-detector@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" @@ -6633,7 +6803,7 @@ lodash.upperfirst@^4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== -lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.21: +lodash@4.17.21, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7664,6 +7834,13 @@ pirates@^4.0.4, pirates@^4.0.6: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== +pixelmatch@^5.1.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@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -7678,6 +7855,16 @@ 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@^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== + pod-install@^0.1.0: version "0.1.39" resolved "https://registry.yarnpkg.com/pod-install/-/pod-install-0.1.39.tgz#853a0585bafbd332c2ca6543854fd4919958cfb3" @@ -8346,6 +8533,13 @@ 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.2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -8550,6 +8744,35 @@ shallow-clone@^3.0.0: dependencies: kind-of "^6.0.2" +sharp@^0.33.2: + version "0.33.2" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.33.2.tgz#fcd52f2c70effa8a02160b1bfd989a3de55f2dfb" + integrity sha512-WlYOPyyPDiiM07j/UO+E720ju6gtNtHjEGg5vovUk1Lgxyjm2LFO+37Nt/UI3MMh2l6hxTWQWi7qk3cXJTutcQ== + dependencies: + color "^4.2.3" + detect-libc "^2.0.2" + semver "^7.5.4" + optionalDependencies: + "@img/sharp-darwin-arm64" "0.33.2" + "@img/sharp-darwin-x64" "0.33.2" + "@img/sharp-libvips-darwin-arm64" "1.0.1" + "@img/sharp-libvips-darwin-x64" "1.0.1" + "@img/sharp-libvips-linux-arm" "1.0.1" + "@img/sharp-libvips-linux-arm64" "1.0.1" + "@img/sharp-libvips-linux-s390x" "1.0.1" + "@img/sharp-libvips-linux-x64" "1.0.1" + "@img/sharp-libvips-linuxmusl-arm64" "1.0.1" + "@img/sharp-libvips-linuxmusl-x64" "1.0.1" + "@img/sharp-linux-arm" "0.33.2" + "@img/sharp-linux-arm64" "0.33.2" + "@img/sharp-linux-s390x" "0.33.2" + "@img/sharp-linux-x64" "0.33.2" + "@img/sharp-linuxmusl-arm64" "0.33.2" + "@img/sharp-linuxmusl-x64" "0.33.2" + "@img/sharp-wasm32" "0.33.2" + "@img/sharp-win32-ia32" "0.33.2" + "@img/sharp-win32-x64" "0.33.2" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -8590,6 +8813,13 @@ signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== + dependencies: + is-arrayish "^0.3.1" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -8712,6 +8942,11 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +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== + stack-utils@^2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" @@ -9087,7 +9322,7 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.1.0: +tslib@^2.0.1, tslib@^2.1.0, tslib@^2.4.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==