From 2f86b20209dde0bc1c54556b1fc7f4ed04d31431 Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Wed, 12 Mar 2025 10:04:59 +0100 Subject: [PATCH 1/3] [INT-1] visual-snapshots: fix lib directory output --- visual-js/package-lock.json | 679 ++++++++++++++++-- visual-js/visual-snapshots/.gitignore | 1 + visual-js/visual-snapshots/README.md | 4 +- visual-js/visual-snapshots/package.json | 9 +- visual-js/visual-snapshots/tsconfig.json | 27 +- visual-js/visual-snapshots/tsconfig.src.json | 21 + visual-js/visual-snapshots/tsconfig.test.json | 8 + 7 files changed, 685 insertions(+), 64 deletions(-) create mode 100644 visual-js/visual-snapshots/tsconfig.src.json create mode 100644 visual-js/visual-snapshots/tsconfig.test.json diff --git a/visual-js/package-lock.json b/visual-js/package-lock.json index aefe116f..dc3f0913 100644 --- a/visual-js/package-lock.json +++ b/visual-js/package-lock.json @@ -11,6 +11,7 @@ "visual-cypress", "visual-nightwatch", "visual-playwright", + "visual-snapshots", "visual-storybook" ], "dependencies": { @@ -2903,7 +2904,6 @@ "version": "1.0.11", "license": "BSD-3-Clause", "optional": true, - "peer": true, "dependencies": { "detect-libc": "^2.0.0", "https-proxy-agent": "^5.0.0", @@ -2922,14 +2922,12 @@ "node_modules/@mapbox/node-pre-gyp/node_modules/abbrev": { "version": "1.1.1", "license": "ISC", - "optional": true, - "peer": true + "optional": true }, "node_modules/@mapbox/node-pre-gyp/node_modules/agent-base": { "version": "6.0.2", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "debug": "4" }, @@ -2941,7 +2939,6 @@ "version": "2.0.3", "license": "Apache-2.0", "optional": true, - "peer": true, "engines": { "node": ">=8" } @@ -2950,7 +2947,6 @@ "version": "5.0.1", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -2963,7 +2959,6 @@ "version": "2.7.0", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -2983,7 +2978,6 @@ "version": "5.0.0", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "abbrev": "1" }, @@ -2997,14 +2991,12 @@ "node_modules/@mapbox/node-pre-gyp/node_modules/webidl-conversions": { "version": "3.0.1", "license": "BSD-2-Clause", - "optional": true, - "peer": true + "optional": true }, "node_modules/@mapbox/node-pre-gyp/node_modules/whatwg-url": { "version": "5.0.0", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -3341,6 +3333,10 @@ "resolved": "visual-playwright", "link": true }, + "node_modules/@saucelabs/visual-snapshots": { + "resolved": "visual-snapshots", + "link": true + }, "node_modules/@saucelabs/visual-storybook": { "resolved": "visual-storybook", "link": true @@ -4797,8 +4793,7 @@ "node_modules/aproba": { "version": "2.0.0", "license": "ISC", - "optional": true, - "peer": true + "optional": true }, "node_modules/arch": { "version": "2.2.0", @@ -5017,7 +5012,6 @@ "version": "2.0.0", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" @@ -5773,7 +5767,6 @@ "hasInstallScript": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.0", "nan": "^2.17.0", @@ -5919,7 +5912,6 @@ "version": "2.0.0", "license": "ISC", "optional": true, - "peer": true, "engines": { "node": ">=10" } @@ -6099,7 +6091,6 @@ "version": "1.1.3", "license": "ISC", "optional": true, - "peer": true, "bin": { "color-support": "bin.js" } @@ -6182,8 +6173,7 @@ "node_modules/console-control-strings": { "version": "1.1.0", "license": "ISC", - "optional": true, - "peer": true + "optional": true }, "node_modules/constant-case": { "version": "3.0.4", @@ -6731,6 +6721,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "dev": true, @@ -6839,8 +6838,7 @@ "node_modules/delegates": { "version": "1.0.0", "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/depd": { "version": "2.0.0", @@ -7732,6 +7730,15 @@ "node": ">= 0.8.0" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, "node_modules/expand-tilde": { "version": "1.2.2", "license": "MIT", @@ -8896,7 +8903,6 @@ "version": "3.0.2", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.2", @@ -9134,6 +9140,12 @@ "assert-plus": "^1.0.0" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT" + }, "node_modules/glob": { "version": "7.2.3", "license": "ISC", @@ -9473,8 +9485,7 @@ "node_modules/has-unicode": { "version": "2.0.1", "license": "ISC", - "optional": true, - "peer": true + "optional": true }, "node_modules/hasha": { "version": "5.2.2", @@ -12086,7 +12097,6 @@ "version": "2.1.2", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -12099,7 +12109,6 @@ "version": "3.3.6", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -12362,8 +12371,13 @@ "node_modules/nan": { "version": "2.22.2", "license": "MIT", - "optional": true, - "peer": true + "optional": true + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -12529,9 +12543,20 @@ "tslib": "^2.0.3" } }, + "node_modules/node-abi": { + "version": "3.74.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.74.0.tgz", + "integrity": "sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==", + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-addon-api": { "version": "7.1.1", - "dev": true, "license": "MIT" }, "node_modules/node-cleanup": { @@ -12641,7 +12666,6 @@ "version": "5.0.1", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "are-we-there-yet": "^2.0.0", "console-control-strings": "^1.1.0", @@ -13289,6 +13313,16 @@ "node": ">=8" } }, + "node_modules/path2d": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/path2d/-/path2d-0.2.2.tgz", + "integrity": "sha512-+vnG6S4dYcYxZd+CZxzXCNKdELYZSKfohrk98yajCo1PtRoDgCTrrwOvK1GT0UoAdVszagDVllQc0U1vaX4NUQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, "node_modules/pathe": { "version": "1.1.2", "license": "MIT", @@ -13312,6 +13346,49 @@ "through": "~2.3" } }, + "node_modules/pdf-to-img": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/pdf-to-img/-/pdf-to-img-4.4.0.tgz", + "integrity": "sha512-IRhRpx7dFZNwsao6yV+emUXC9Iz7CaBLUwEbCcGpHEI/frFJUYZ1SriKJNYrFCy4UbWH92anXWTatItKNSZ7hA==", + "license": "MIT", + "dependencies": { + "canvas": "3.1.0", + "pdfjs-dist": "4.2.67" + }, + "bin": { + "pdf2img": "bin/cli.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/pdf-to-img/node_modules/canvas": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-3.1.0.tgz", + "integrity": "sha512-tTj3CqqukVJ9NgSahykNwtGda7V33VLObwrHfzT0vqJXu7J4d4C/7kQQW3fOEGDfZZoILPut5H00gOjyttPGyg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^7.0.0", + "prebuild-install": "^7.1.1" + }, + "engines": { + "node": "^18.12.0 || >= 20.9.0" + } + }, + "node_modules/pdfjs-dist": { + "version": "4.2.67", + "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-4.2.67.tgz", + "integrity": "sha512-rJmuBDFpD7cqC8WIkQUEClyB4UAH05K4AsyewToMTp2gSy3Rrx8c1ydAVqlJlGv3yZSOrhEERQU/4ScQQFlLHA==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "canvas": "^2.11.2", + "path2d": "^0.2.0" + } + }, "node_modules/pend": { "version": "1.2.0", "license": "MIT" @@ -13454,6 +13531,100 @@ "node": ">= 14" } }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prebuild-install/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, + "node_modules/prebuild-install/node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/prebuild-install/node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/prebuild-install/node_modules/tar-fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz", + "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/prebuild-install/node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "dev": true, @@ -14014,6 +14185,36 @@ "node": ">= 0.8" } }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/react-is": { "version": "16.13.1", "license": "MIT" @@ -14745,15 +14946,12 @@ "url": "https://feross.org/support" } ], - "license": "MIT", - "optional": true, - "peer": true + "license": "MIT" }, "node_modules/simple-get": { "version": "3.1.1", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "decompress-response": "^4.2.0", "once": "^1.3.1", @@ -14764,7 +14962,6 @@ "version": "4.2.1", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "mimic-response": "^2.0.0" }, @@ -14776,7 +14973,6 @@ "version": "2.1.0", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=8" }, @@ -15359,7 +15555,6 @@ "version": "6.2.1", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -15396,7 +15591,6 @@ "version": "2.1.0", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -15408,7 +15602,6 @@ "version": "3.3.6", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -15420,7 +15613,6 @@ "version": "5.0.0", "license": "ISC", "optional": true, - "peer": true, "engines": { "node": ">=8" } @@ -15897,6 +16089,251 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.24.0.tgz", + "integrity": "sha512-/lmv4366en/qbB32Vz5+kCNZEMf6xYHwh1z48suBwZvAtnXKbP+YhGe8OLE2BqC67LMqKkCNLtjejdwsdW6uOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.24.0", + "@typescript-eslint/parser": "8.24.0", + "@typescript-eslint/utils": "8.24.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.24.0.tgz", + "integrity": "sha512-aFcXEJJCI4gUdXgoo/j9udUYIHgF23MFkg09LFz2dzEmU0+1Plk4rQWv/IYKvPHAtlkkGoB3m5e6oUp+JPsNaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.24.0", + "@typescript-eslint/type-utils": "8.24.0", + "@typescript-eslint/utils": "8.24.0", + "@typescript-eslint/visitor-keys": "8.24.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.24.0.tgz", + "integrity": "sha512-MFDaO9CYiard9j9VepMNa9MTcqVvSny2N4hkY6roquzj8pdCBRENhErrteaQuu7Yjn1ppk0v1/ZF9CG3KIlrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.24.0", + "@typescript-eslint/types": "8.24.0", + "@typescript-eslint/typescript-estree": "8.24.0", + "@typescript-eslint/visitor-keys": "8.24.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.0.tgz", + "integrity": "sha512-HZIX0UByphEtdVBKaQBgTDdn9z16l4aTUz8e8zPQnyxwHBtf5vtl1L+OhH+m1FGV9DrRmoDuYKqzVrvWDcDozw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.24.0", + "@typescript-eslint/visitor-keys": "8.24.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/type-utils": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.24.0.tgz", + "integrity": "sha512-8fitJudrnY8aq0F1wMiPM1UUgiXQRJ5i8tFjq9kGfRajU+dbPyOuHbl0qRopLEidy0MwqgTHDt6CnSeXanNIwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.24.0", + "@typescript-eslint/utils": "8.24.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.0.tgz", + "integrity": "sha512-VacJCBTyje7HGAw7xp11q439A+zeGG0p0/p2zsZwpnMzjPB5WteaWqt4g2iysgGFafrqvyLWqq6ZPZAOCoefCw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.24.0.tgz", + "integrity": "sha512-ITjYcP0+8kbsvT9bysygfIfb+hBj6koDsu37JZG7xrCiy3fPJyNmfVtaGsgTUSEuTzcvME5YI5uyL5LD1EV5ZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.24.0", + "@typescript-eslint/visitor-keys": "8.24.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.24.0.tgz", + "integrity": "sha512-07rLuUBElvvEb1ICnafYWr4hk8/U7X9RDCOqd9JcAMtjh/9oRmcfN4yGzbPVirgMR0+HLVHehmu19CWeh7fsmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.24.0", + "@typescript-eslint/types": "8.24.0", + "@typescript-eslint/typescript-estree": "8.24.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.0.tgz", + "integrity": "sha512-kArLq83QxGLbuHrTMoOEWO+l2MwsNS2TGISEdx8xgqpkbytB07XmlQyQdNDrCc1ecSqx0cnmhGvpX+VBwqqSkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.24.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/typescript-eslint/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typescript-eslint/node_modules/ts-api-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", + "integrity": "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/ua-parser-js": { "version": "1.0.39", "funding": [ @@ -16738,7 +17175,6 @@ "version": "1.1.5", "license": "ISC", "optional": true, - "peer": true, "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } @@ -17298,6 +17734,167 @@ "dev": true, "license": "MIT" }, + "visual-snapshots": { + "name": "@saucelabs/visual-snapshots", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@saucelabs/visual": "^0.13.0", + "commander": "^12.0.0", + "pdf-to-img": "~4.4.0" + }, + "bin": { + "visual-snapshots": "lib/index.js" + }, + "devDependencies": { + "@types/jest": "29.5.14", + "eslint": "^8.0.1", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^4.0.0", + "jest": "29.7.0", + "prettier": "^2.8.8", + "rimraf": "^6.0.1", + "ts-jest": "29.2.5", + "typescript": "^5.0.4", + "typescript-eslint": "8.24.0" + }, + "engines": { + "node": ">=18" + } + }, + "visual-snapshots/node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "visual-snapshots/node_modules/glob": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz", + "integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "visual-snapshots/node_modules/jackspeak": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.0.tgz", + "integrity": "sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "visual-snapshots/node_modules/lru-cache": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", + "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "visual-snapshots/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "visual-snapshots/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "visual-snapshots/node_modules/rimraf": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "visual-snapshots/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "visual-storybook": { "name": "@saucelabs/visual-storybook", "version": "0.10.2", diff --git a/visual-js/visual-snapshots/.gitignore b/visual-js/visual-snapshots/.gitignore index c44a2ccd..151ac14b 100644 --- a/visual-js/visual-snapshots/.gitignore +++ b/visual-js/visual-snapshots/.gitignore @@ -3,3 +3,4 @@ build/ lib/ coverage/ .parent/ +*.tsbuildinfo diff --git a/visual-js/visual-snapshots/README.md b/visual-js/visual-snapshots/README.md index bccf013e..cc516551 100644 --- a/visual-js/visual-snapshots/README.md +++ b/visual-js/visual-snapshots/README.md @@ -25,7 +25,7 @@ yarn run build Execute: ```sh -node lib/src/index.js pdf [params] +node lib/index.js pdf [params] ``` Run tests: @@ -36,5 +36,5 @@ yarn run test ## Reusing pdf conversion code -While it is possible to use `VisualSnapshotsApi` outside this package, please bear in mind it can only be used with ESM modules. +While it is possible to use `VisualSnapshotsApi` outside this package, please bear in mind it can only be used with ESM modules. CommonJS modules are not supported. diff --git a/visual-js/visual-snapshots/package.json b/visual-js/visual-snapshots/package.json index ca2c1390..75c3e604 100644 --- a/visual-js/visual-snapshots/package.json +++ b/visual-js/visual-snapshots/package.json @@ -2,9 +2,9 @@ "name": "@saucelabs/visual-snapshots", "description": "CLI which generates Visual snapshots from a data source such as pdf", "version": "0.1.0", - "main": "./lib/src/index.js", + "main": "./lib/index.js", "license": "MIT", - "bin": "./lib/src/index.js", + "bin": "./lib/index.js", "files": [ "lib", "README.md" @@ -20,8 +20,8 @@ "pdf" ], "scripts": { - "build": "tsc", - "watch": "tsc-watch --declaration -p .", + "build": "rimraf *.tsbuildinfo && tsc -b tsconfig.json", + "watch": "rimraf *.tsbuildinfo && tsc -b tsconfig.json -w", "lint": "eslint \"{src,test}/**/*.ts\"", "lint-fix": "eslint \"{src,test}/**/*.ts\" --fix", "test": "jest", @@ -40,6 +40,7 @@ "eslint-plugin-prettier": "^4.0.0", "jest": "29.7.0", "prettier": "^2.8.8", + "rimraf": "^6.0.1", "ts-jest": "29.2.5", "typescript": "^5.0.4", "typescript-eslint": "8.24.0" diff --git a/visual-js/visual-snapshots/tsconfig.json b/visual-js/visual-snapshots/tsconfig.json index 7c5700e8..7f8872a6 100644 --- a/visual-js/visual-snapshots/tsconfig.json +++ b/visual-js/visual-snapshots/tsconfig.json @@ -1,19 +1,12 @@ +// Builds source files and typechecks test files. { - "compilerOptions": { - "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - "module": "NodeNext", /* Specify what module code is generated. */ - "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */ - "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - "outDir": "./lib", /* Specify an output folder for all emitted files. */ - "removeComments": true, /* Disable emitting comments. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - "strict": true, /* Enable all strict type-checking options. */ - "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } + "files": [], + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./tsconfig.test.json" + } + ] } diff --git a/visual-js/visual-snapshots/tsconfig.src.json b/visual-js/visual-snapshots/tsconfig.src.json new file mode 100644 index 00000000..dcf5ddd9 --- /dev/null +++ b/visual-js/visual-snapshots/tsconfig.src.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + "module": "NodeNext", /* Specify what module code is generated. */ + "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + "outDir": "./lib", /* Specify an output folder for all emitted files. */ + "removeComments": true, /* Disable emitting comments. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "strict": true, /* Enable all strict type-checking options. */ + "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */, + "tsBuildInfoFile": "./tsconfig.src.tsbuildinfo" + }, + "include": ["./src"] +} diff --git a/visual-js/visual-snapshots/tsconfig.test.json b/visual-js/visual-snapshots/tsconfig.test.json new file mode 100644 index 00000000..61fc1172 --- /dev/null +++ b/visual-js/visual-snapshots/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.src.json", + "compilerOptions": { + "noEmit": true, // Do not emit built test files, only typecheck them + "composite": true // Required for reference in tsconfig.build.json + }, + "include": ["./src", "./test"] +} From 94ccc49a5230c1312af445a6e47eaa7da6bedea9 Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Wed, 12 Mar 2025 12:12:20 +0100 Subject: [PATCH 2/3] [INT-1] visual-snapshots: update .eslintrc.cjs --- visual-js/visual-snapshots/.eslintrc.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visual-js/visual-snapshots/.eslintrc.cjs b/visual-js/visual-snapshots/.eslintrc.cjs index 11bcbed2..d0ccd7d8 100644 --- a/visual-js/visual-snapshots/.eslintrc.cjs +++ b/visual-js/visual-snapshots/.eslintrc.cjs @@ -2,7 +2,7 @@ module.exports = { extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], parser: '@typescript-eslint/parser', parserOptions: { - project: './tsconfig.json', + project: './tsconfig.test.json', tsconfigRootDir: __dirname, sourceType: 'module', }, From 6bb511effe09532e5e870d5dc329b84d91c0312e Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Wed, 12 Mar 2025 12:17:32 +0100 Subject: [PATCH 3/3] [INT-1] visual-snapshots: update jest.config.cjs --- visual-js/visual-snapshots/jest.config.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/visual-js/visual-snapshots/jest.config.cjs b/visual-js/visual-snapshots/jest.config.cjs index 714e5af1..54f691bf 100644 --- a/visual-js/visual-snapshots/jest.config.cjs +++ b/visual-js/visual-snapshots/jest.config.cjs @@ -13,6 +13,7 @@ module.exports = { 'ts-jest', { useESM: true, + tsconfig: 'tsconfig.test.json' }, ], },