diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 049a620..ea64f8a 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -29,7 +29,7 @@ jobs: name: react version: ${{ matrix.version }} node: 18 - + vue: strategy: fail-fast: false @@ -41,7 +41,7 @@ jobs: name: vue version: ${{ matrix.version }} node: 18 - + svelte: strategy: fail-fast: false @@ -53,3 +53,15 @@ jobs: name: svelte version: ${{ matrix.version }} node: 18 + + lit: + strategy: + fail-fast: false + max-parallel: 1 + matrix: + version: [3] + uses: ./.github/workflows/regression.yml + with: + name: lit-vite + version: ${{ matrix.version }} + node: 20 diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 7ad565b..eaea98f 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -32,6 +32,7 @@ on: - vue - angular - svelte + - lit-vite version: required: true type: number @@ -71,7 +72,7 @@ jobs: name: Initialize ${{ inputs.name }} v${{ inputs.version }} app runs-on: ubuntu-latest timeout-minutes: 5 - needs: [tools,deps] + needs: [tools,deps] if: | always() && !contains(needs.*.result, 'failure') && diff --git a/.github/workflows/update-all-snapshots.yml b/.github/workflows/update-all-snapshots.yml index c89d03a..301a678 100644 --- a/.github/workflows/update-all-snapshots.yml +++ b/.github/workflows/update-all-snapshots.yml @@ -64,7 +64,7 @@ jobs: skip-tools: true qa-path: ${{ needs.tools.outputs.qa-path }} kit-path: ${{ needs.tools.outputs.kit-path }} - + vue: needs: tools strategy: @@ -84,7 +84,7 @@ jobs: skip-tools: true qa-path: ${{ needs.tools.outputs.qa-path }} kit-path: ${{ needs.tools.outputs.kit-path }} - + svelte: needs: tools strategy: @@ -104,3 +104,23 @@ jobs: skip-tools: true qa-path: ${{ needs.tools.outputs.qa-path }} kit-path: ${{ needs.tools.outputs.kit-path }} + + lit: + needs: tools + strategy: + fail-fast: false + max-parallel: 1 + matrix: + version: [3] + uses: ./.github/workflows/update-snapshots.yml + secrets: inherit + with: + name: lit-vite + version: ${{ matrix.version }} + node: 20 + branch: ${{ inputs.branch }} + qa: ${{ needs.tools.outputs.qa-artifact }} + kit: ${{ needs.tools.outputs.kit-artifact }} + skip-tools: true + qa-path: ${{ needs.tools.outputs.qa-path }} + kit-path: ${{ needs.tools.outputs.kit-path }} \ No newline at end of file diff --git a/.github/workflows/update-snapshots.yml b/.github/workflows/update-snapshots.yml index 85a4d1b..73ebf24 100644 --- a/.github/workflows/update-snapshots.yml +++ b/.github/workflows/update-snapshots.yml @@ -45,6 +45,7 @@ on: - vue - angular - svelte + - lit-vite version: required: true type: number @@ -131,7 +132,7 @@ jobs: name: snapshots-${{ inputs.name }}-v${{ inputs.version }} path: ${{ steps.get_snapshots.outputs.path }} retention-days: 7 - + send: runs-on: ubuntu-latest needs: update @@ -155,15 +156,15 @@ jobs: - name: Get path to snapshots id: snapshots_folder run: echo "path=./snapshots/${{ inputs.name }}${{ inputs.version }}" >> $GITHUB_OUTPUT - + - name: Clear old snapshots run: rm -rf ${{ steps.snapshots_folder.outputs.path }} - + - uses: actions/download-artifact@v3 with: name: snapshots-${{ inputs.name }}-v${{ inputs.version }} path: ${{ steps.snapshots_folder.outputs.path }} - + - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: @@ -175,5 +176,5 @@ jobs: branch: update-snapshots-${{ inputs.name }}-v${{ inputs.version }}-${{ inputs.branch }} body: "Snapshots update for ${{ inputs.name }} v${{ inputs.version }}" reviewers: Ni55aN - - + + diff --git a/.gitignore b/.gitignore index ff54274..dff5673 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules/ /playwright/.cache/ /.rete-qa /dist +/coverage \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 09c0540..f67f1d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,11 +24,8 @@ "devDependencies": { "@types/tinycolor2": "^1.4.3", "nodemon": "^2.0.20", - "rete-kit": "^1.7.0", + "rete-kit": "^1.8.3", "typescript": "^4.9.5" - }, - "peerDependencies": { - "rete-kit": "^1.7.0" } }, "node_modules/@ampproject/remapping": { @@ -3612,42 +3609,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/builtins/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/builtins/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -4729,9 +4690,9 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -6483,26 +6444,11 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/npm-package-arg/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/npm-package-arg/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -7328,9 +7274,9 @@ } }, "node_modules/rete-kit": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/rete-kit/-/rete-kit-1.7.0.tgz", - "integrity": "sha512-IrdRbz3NexBVTEtV6M1S3fK6lINOzPWViQD1y6HXseY8ue6Id4ZtsXaMxZr64g5Yt2eJw78C9IQHUluMj986aQ==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/rete-kit/-/rete-kit-1.8.3.tgz", + "integrity": "sha512-1kc7NwoxT12O7Xq8DU2Fe2jooAkSe2KDM354PiG6ScrMUwpwm3vhhhGlW5BoCS8TOBwpla8ZX/ZGPxgPXUVU/Q==", "dev": true, "dependencies": { "case": "^1.6.3", @@ -7363,6 +7309,7 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" @@ -8198,9 +8145,9 @@ } }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "engines": { "node": ">= 10.0.0" @@ -8271,13 +8218,10 @@ } }, "node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", "dev": true, - "dependencies": { - "builtins": "^5.0.0" - }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } diff --git a/package.json b/package.json index 3b942a2..9d7a47b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "scripts": { "build": "tsc", "dev": "tsc --watch", - "lint": "rete lint" + "lint": "rete lint", + "test": "rete test" }, "author": "Vitaliy Stoliarov", "license": "MIT", @@ -29,11 +30,11 @@ "devDependencies": { "@types/tinycolor2": "^1.4.3", "nodemon": "^2.0.20", - "rete-kit": "^1.7.0", + "rete-kit": "^1.8.3", "typescript": "^4.9.5" }, "peerDependencies": { - "rete-kit": "^1.7.0" + "rete-kit": "^1.8.3" }, "dependencies": { "@playwright/test": "^1.37.1", diff --git a/snapshots/lit-vite3/chromium/added-pin-node-translate.png b/snapshots/lit-vite3/chromium/added-pin-node-translate.png new file mode 100644 index 0000000..4e814fe Binary files /dev/null and b/snapshots/lit-vite3/chromium/added-pin-node-translate.png differ diff --git a/snapshots/lit-vite3/chromium/added-pin.png b/snapshots/lit-vite3/chromium/added-pin.png new file mode 100644 index 0000000..4756a37 Binary files /dev/null and b/snapshots/lit-vite3/chromium/added-pin.png differ diff --git a/snapshots/lit-vite3/chromium/customization.png b/snapshots/lit-vite3/chromium/customization.png new file mode 100644 index 0000000..6daffac Binary files /dev/null and b/snapshots/lit-vite3/chromium/customization.png differ diff --git a/snapshots/lit-vite3/chromium/disconnected.png b/snapshots/lit-vite3/chromium/disconnected.png new file mode 100644 index 0000000..fc4bac8 Binary files /dev/null and b/snapshots/lit-vite3/chromium/disconnected.png differ diff --git a/snapshots/lit-vite3/chromium/disconnecting-click.png b/snapshots/lit-vite3/chromium/disconnecting-click.png new file mode 100644 index 0000000..2f4b693 Binary files /dev/null and b/snapshots/lit-vite3/chromium/disconnecting-click.png differ diff --git a/snapshots/lit-vite3/chromium/disconnecting.png b/snapshots/lit-vite3/chromium/disconnecting.png new file mode 100644 index 0000000..a0077f8 Binary files /dev/null and b/snapshots/lit-vite3/chromium/disconnecting.png differ diff --git a/snapshots/lit-vite3/chromium/initial.png b/snapshots/lit-vite3/chromium/initial.png new file mode 100644 index 0000000..03e4172 Binary files /dev/null and b/snapshots/lit-vite3/chromium/initial.png differ diff --git a/snapshots/lit-vite3/chromium/minimap-dblclick-viewport.png b/snapshots/lit-vite3/chromium/minimap-dblclick-viewport.png new file mode 100644 index 0000000..d3c1b69 Binary files /dev/null and b/snapshots/lit-vite3/chromium/minimap-dblclick-viewport.png differ diff --git a/snapshots/lit-vite3/chromium/minimap-translate-area.png b/snapshots/lit-vite3/chromium/minimap-translate-area.png new file mode 100644 index 0000000..6341a36 Binary files /dev/null and b/snapshots/lit-vite3/chromium/minimap-translate-area.png differ diff --git a/snapshots/lit-vite3/chromium/minimap-translate-node.png b/snapshots/lit-vite3/chromium/minimap-translate-node.png new file mode 100644 index 0000000..62713fe Binary files /dev/null and b/snapshots/lit-vite3/chromium/minimap-translate-node.png differ diff --git a/snapshots/lit-vite3/chromium/minimap-translate-viewport.png b/snapshots/lit-vite3/chromium/minimap-translate-viewport.png new file mode 100644 index 0000000..d549400 Binary files /dev/null and b/snapshots/lit-vite3/chromium/minimap-translate-viewport.png differ diff --git a/snapshots/lit-vite3/chromium/moved-pin.png b/snapshots/lit-vite3/chromium/moved-pin.png new file mode 100644 index 0000000..c44481b Binary files /dev/null and b/snapshots/lit-vite3/chromium/moved-pin.png differ diff --git a/snapshots/lit-vite3/chromium/perf.png b/snapshots/lit-vite3/chromium/perf.png new file mode 100644 index 0000000..418853e Binary files /dev/null and b/snapshots/lit-vite3/chromium/perf.png differ diff --git a/snapshots/lit-vite3/chromium/removed-pin.png b/snapshots/lit-vite3/chromium/removed-pin.png new file mode 100644 index 0000000..325b35a Binary files /dev/null and b/snapshots/lit-vite3/chromium/removed-pin.png differ diff --git a/snapshots/lit-vite3/chromium/scopes-changed-relation.png b/snapshots/lit-vite3/chromium/scopes-changed-relation.png new file mode 100644 index 0000000..b111cea Binary files /dev/null and b/snapshots/lit-vite3/chromium/scopes-changed-relation.png differ diff --git a/snapshots/lit-vite3/chromium/scopes-nested-translated.png b/snapshots/lit-vite3/chromium/scopes-nested-translated.png new file mode 100644 index 0000000..fb9abd4 Binary files /dev/null and b/snapshots/lit-vite3/chromium/scopes-nested-translated.png differ diff --git a/snapshots/lit-vite3/chromium/scopes-parent-translated.png b/snapshots/lit-vite3/chromium/scopes-parent-translated.png new file mode 100644 index 0000000..ae46272 Binary files /dev/null and b/snapshots/lit-vite3/chromium/scopes-parent-translated.png differ diff --git a/snapshots/lit-vite3/chromium/scopes.png b/snapshots/lit-vite3/chromium/scopes.png new file mode 100644 index 0000000..bdf1893 Binary files /dev/null and b/snapshots/lit-vite3/chromium/scopes.png differ diff --git a/snapshots/lit-vite3/chromium/selected.png b/snapshots/lit-vite3/chromium/selected.png new file mode 100644 index 0000000..c44b212 Binary files /dev/null and b/snapshots/lit-vite3/chromium/selected.png differ diff --git a/snapshots/lit-vite3/chromium/translate.png b/snapshots/lit-vite3/chromium/translate.png new file mode 100644 index 0000000..b5a03c8 Binary files /dev/null and b/snapshots/lit-vite3/chromium/translate.png differ diff --git a/snapshots/lit-vite3/firefox/added-pin-node-translate.png b/snapshots/lit-vite3/firefox/added-pin-node-translate.png new file mode 100644 index 0000000..45420cd Binary files /dev/null and b/snapshots/lit-vite3/firefox/added-pin-node-translate.png differ diff --git a/snapshots/lit-vite3/firefox/added-pin.png b/snapshots/lit-vite3/firefox/added-pin.png new file mode 100644 index 0000000..2de3591 Binary files /dev/null and b/snapshots/lit-vite3/firefox/added-pin.png differ diff --git a/snapshots/lit-vite3/firefox/customization.png b/snapshots/lit-vite3/firefox/customization.png new file mode 100644 index 0000000..036e853 Binary files /dev/null and b/snapshots/lit-vite3/firefox/customization.png differ diff --git a/snapshots/lit-vite3/firefox/disconnected.png b/snapshots/lit-vite3/firefox/disconnected.png new file mode 100644 index 0000000..6f8f6e1 Binary files /dev/null and b/snapshots/lit-vite3/firefox/disconnected.png differ diff --git a/snapshots/lit-vite3/firefox/disconnecting-click.png b/snapshots/lit-vite3/firefox/disconnecting-click.png new file mode 100644 index 0000000..06de717 Binary files /dev/null and b/snapshots/lit-vite3/firefox/disconnecting-click.png differ diff --git a/snapshots/lit-vite3/firefox/disconnecting.png b/snapshots/lit-vite3/firefox/disconnecting.png new file mode 100644 index 0000000..a1dde28 Binary files /dev/null and b/snapshots/lit-vite3/firefox/disconnecting.png differ diff --git a/snapshots/lit-vite3/firefox/initial.png b/snapshots/lit-vite3/firefox/initial.png new file mode 100644 index 0000000..a48d5e6 Binary files /dev/null and b/snapshots/lit-vite3/firefox/initial.png differ diff --git a/snapshots/lit-vite3/firefox/minimap-dblclick-viewport.png b/snapshots/lit-vite3/firefox/minimap-dblclick-viewport.png new file mode 100644 index 0000000..5cbbc16 Binary files /dev/null and b/snapshots/lit-vite3/firefox/minimap-dblclick-viewport.png differ diff --git a/snapshots/lit-vite3/firefox/minimap-translate-area.png b/snapshots/lit-vite3/firefox/minimap-translate-area.png new file mode 100644 index 0000000..715f875 Binary files /dev/null and b/snapshots/lit-vite3/firefox/minimap-translate-area.png differ diff --git a/snapshots/lit-vite3/firefox/minimap-translate-node.png b/snapshots/lit-vite3/firefox/minimap-translate-node.png new file mode 100644 index 0000000..c3b3434 Binary files /dev/null and b/snapshots/lit-vite3/firefox/minimap-translate-node.png differ diff --git a/snapshots/lit-vite3/firefox/minimap-translate-viewport.png b/snapshots/lit-vite3/firefox/minimap-translate-viewport.png new file mode 100644 index 0000000..2bf0e51 Binary files /dev/null and b/snapshots/lit-vite3/firefox/minimap-translate-viewport.png differ diff --git a/snapshots/lit-vite3/firefox/moved-pin.png b/snapshots/lit-vite3/firefox/moved-pin.png new file mode 100644 index 0000000..4073fb2 Binary files /dev/null and b/snapshots/lit-vite3/firefox/moved-pin.png differ diff --git a/snapshots/lit-vite3/firefox/perf.png b/snapshots/lit-vite3/firefox/perf.png new file mode 100644 index 0000000..9bc3b00 Binary files /dev/null and b/snapshots/lit-vite3/firefox/perf.png differ diff --git a/snapshots/lit-vite3/firefox/removed-pin.png b/snapshots/lit-vite3/firefox/removed-pin.png new file mode 100644 index 0000000..a48d5e6 Binary files /dev/null and b/snapshots/lit-vite3/firefox/removed-pin.png differ diff --git a/snapshots/lit-vite3/firefox/scopes-changed-relation.png b/snapshots/lit-vite3/firefox/scopes-changed-relation.png new file mode 100644 index 0000000..8c91ae8 Binary files /dev/null and b/snapshots/lit-vite3/firefox/scopes-changed-relation.png differ diff --git a/snapshots/lit-vite3/firefox/scopes-nested-translated.png b/snapshots/lit-vite3/firefox/scopes-nested-translated.png new file mode 100644 index 0000000..fd2e009 Binary files /dev/null and b/snapshots/lit-vite3/firefox/scopes-nested-translated.png differ diff --git a/snapshots/lit-vite3/firefox/scopes-parent-translated.png b/snapshots/lit-vite3/firefox/scopes-parent-translated.png new file mode 100644 index 0000000..70a061d Binary files /dev/null and b/snapshots/lit-vite3/firefox/scopes-parent-translated.png differ diff --git a/snapshots/lit-vite3/firefox/scopes.png b/snapshots/lit-vite3/firefox/scopes.png new file mode 100644 index 0000000..383e8de Binary files /dev/null and b/snapshots/lit-vite3/firefox/scopes.png differ diff --git a/snapshots/lit-vite3/firefox/selected.png b/snapshots/lit-vite3/firefox/selected.png new file mode 100644 index 0000000..cfa5c31 Binary files /dev/null and b/snapshots/lit-vite3/firefox/selected.png differ diff --git a/snapshots/lit-vite3/firefox/translate.png b/snapshots/lit-vite3/firefox/translate.png new file mode 100644 index 0000000..63feef2 Binary files /dev/null and b/snapshots/lit-vite3/firefox/translate.png differ diff --git a/snapshots/lit-vite3/webkit/added-pin-node-translate.png b/snapshots/lit-vite3/webkit/added-pin-node-translate.png new file mode 100644 index 0000000..9ad048a Binary files /dev/null and b/snapshots/lit-vite3/webkit/added-pin-node-translate.png differ diff --git a/snapshots/lit-vite3/webkit/added-pin.png b/snapshots/lit-vite3/webkit/added-pin.png new file mode 100644 index 0000000..2786f55 Binary files /dev/null and b/snapshots/lit-vite3/webkit/added-pin.png differ diff --git a/snapshots/lit-vite3/webkit/customization.png b/snapshots/lit-vite3/webkit/customization.png new file mode 100644 index 0000000..a10557c Binary files /dev/null and b/snapshots/lit-vite3/webkit/customization.png differ diff --git a/snapshots/lit-vite3/webkit/disconnected.png b/snapshots/lit-vite3/webkit/disconnected.png new file mode 100644 index 0000000..3cb8bb1 Binary files /dev/null and b/snapshots/lit-vite3/webkit/disconnected.png differ diff --git a/snapshots/lit-vite3/webkit/disconnecting-click.png b/snapshots/lit-vite3/webkit/disconnecting-click.png new file mode 100644 index 0000000..aac8a85 Binary files /dev/null and b/snapshots/lit-vite3/webkit/disconnecting-click.png differ diff --git a/snapshots/lit-vite3/webkit/disconnecting.png b/snapshots/lit-vite3/webkit/disconnecting.png new file mode 100644 index 0000000..c272a2a Binary files /dev/null and b/snapshots/lit-vite3/webkit/disconnecting.png differ diff --git a/snapshots/lit-vite3/webkit/initial.png b/snapshots/lit-vite3/webkit/initial.png new file mode 100644 index 0000000..aadee2e Binary files /dev/null and b/snapshots/lit-vite3/webkit/initial.png differ diff --git a/snapshots/lit-vite3/webkit/minimap-dblclick-viewport.png b/snapshots/lit-vite3/webkit/minimap-dblclick-viewport.png new file mode 100644 index 0000000..134d5e3 Binary files /dev/null and b/snapshots/lit-vite3/webkit/minimap-dblclick-viewport.png differ diff --git a/snapshots/lit-vite3/webkit/minimap-translate-area.png b/snapshots/lit-vite3/webkit/minimap-translate-area.png new file mode 100644 index 0000000..1f376d4 Binary files /dev/null and b/snapshots/lit-vite3/webkit/minimap-translate-area.png differ diff --git a/snapshots/lit-vite3/webkit/minimap-translate-node.png b/snapshots/lit-vite3/webkit/minimap-translate-node.png new file mode 100644 index 0000000..1cc6b1e Binary files /dev/null and b/snapshots/lit-vite3/webkit/minimap-translate-node.png differ diff --git a/snapshots/lit-vite3/webkit/minimap-translate-viewport.png b/snapshots/lit-vite3/webkit/minimap-translate-viewport.png new file mode 100644 index 0000000..36ad3ba Binary files /dev/null and b/snapshots/lit-vite3/webkit/minimap-translate-viewport.png differ diff --git a/snapshots/lit-vite3/webkit/moved-pin.png b/snapshots/lit-vite3/webkit/moved-pin.png new file mode 100644 index 0000000..64f6ea0 Binary files /dev/null and b/snapshots/lit-vite3/webkit/moved-pin.png differ diff --git a/snapshots/lit-vite3/webkit/perf.png b/snapshots/lit-vite3/webkit/perf.png new file mode 100644 index 0000000..cc25d3c Binary files /dev/null and b/snapshots/lit-vite3/webkit/perf.png differ diff --git a/snapshots/lit-vite3/webkit/removed-pin.png b/snapshots/lit-vite3/webkit/removed-pin.png new file mode 100644 index 0000000..aadee2e Binary files /dev/null and b/snapshots/lit-vite3/webkit/removed-pin.png differ diff --git a/snapshots/lit-vite3/webkit/scopes-changed-relation.png b/snapshots/lit-vite3/webkit/scopes-changed-relation.png new file mode 100644 index 0000000..4161f18 Binary files /dev/null and b/snapshots/lit-vite3/webkit/scopes-changed-relation.png differ diff --git a/snapshots/lit-vite3/webkit/scopes-nested-translated.png b/snapshots/lit-vite3/webkit/scopes-nested-translated.png new file mode 100644 index 0000000..274dd29 Binary files /dev/null and b/snapshots/lit-vite3/webkit/scopes-nested-translated.png differ diff --git a/snapshots/lit-vite3/webkit/scopes-parent-translated.png b/snapshots/lit-vite3/webkit/scopes-parent-translated.png new file mode 100644 index 0000000..801f573 Binary files /dev/null and b/snapshots/lit-vite3/webkit/scopes-parent-translated.png differ diff --git a/snapshots/lit-vite3/webkit/scopes.png b/snapshots/lit-vite3/webkit/scopes.png new file mode 100644 index 0000000..efd98c4 Binary files /dev/null and b/snapshots/lit-vite3/webkit/scopes.png differ diff --git a/snapshots/lit-vite3/webkit/selected.png b/snapshots/lit-vite3/webkit/selected.png new file mode 100644 index 0000000..764ddea Binary files /dev/null and b/snapshots/lit-vite3/webkit/selected.png differ diff --git a/snapshots/lit-vite3/webkit/translate.png b/snapshots/lit-vite3/webkit/translate.png new file mode 100644 index 0000000..f3c70e6 Binary files /dev/null and b/snapshots/lit-vite3/webkit/translate.png differ diff --git a/src/commands/init/index.test.ts b/src/commands/init/index.test.ts new file mode 100644 index 0000000..d8ce430 --- /dev/null +++ b/src/commands/init/index.test.ts @@ -0,0 +1,77 @@ +import { beforeEach, describe, expect, it } from '@jest/globals' +import { App } from 'rete-kit' + +import { fixtures, getFeatures, validate } from './index' + +describe('Features', () => { + fixtures.forEach(fixture => { + describe(`Stack: ${fixture.stack}, Version: ${fixture.version}`, () => { + let features: ReturnType = [] + + beforeEach(() => { + const next = false + + features = getFeatures(fixture, next).filter(Boolean) + }) + + it('has common features', () => { + expect(features).toContainEqual(expect.any(App.Features.ZoomAt)) + expect(features).toContainEqual(expect.any(App.Features.OrderNodes)) + expect(features).toContainEqual(expect.any(App.Features.Dataflow)) + expect(features).toContainEqual(expect.any(App.Features.Selectable)) + expect(features).toContainEqual(expect.any(App.Features.Minimap)) + expect(features).toContainEqual(expect.any(App.Features.Reroute)) + }) + + it('has stack specific features', () => { + if (fixture.stack === 'angular') { + expect(features).toContainEqual(expect.any(App.Features.Angular)) + } else if (fixture.stack === 'react') { + expect(features).toContainEqual(expect.any(App.Features.React)) + } else if (fixture.stack === 'vue') { + expect(features).toContainEqual(expect.any(App.Features.Vue)) + } else if (fixture.stack === 'svelte') { + expect(features).toContainEqual(expect.any(App.Features.Svelte)) + } + }) + }) + }) +}) + +describe('Validation', () => { + it('rejects unknown stack names', () => { + const stacks = ['react', 'angular', 'unknown'] + const stackVersions = null + + const result = validate(stacks, stackVersions) + + expect(result.error).toBe('Unknown stack names: unknown') + }) + + it('throws an error if versions are specified for multiple stacks', () => { + const stacks = ['react', 'angular'] + const stackVersions = ['16', '12'] + + const result = validate(stacks, stackVersions) + + expect(result.error).toBe(`You can't specify versions for multiple stacks`) + }) + + it('throws an error if unsupported versions are specified', () => { + const stacks = ['react'] + const stackVersions = ['unknown'] + + const result = validate(stacks, stackVersions) + + expect(result.error).toBe('Unknown stack versions: unknown') + }) + + it('should return null if no errors are found', () => { + const stacks = ['react'] + const stackVersions = ['16', '17'] + + const result = validate(stacks, stackVersions) + + expect(result.error).toBeNull() + }) +}) diff --git a/src/commands/init/index.ts b/src/commands/init/index.ts index ca336da..6bd140b 100644 --- a/src/commands/init/index.ts +++ b/src/commands/init/index.ts @@ -4,7 +4,8 @@ export const targets: { stack: App.AppStack, versions: number[] }[] = [ { stack: 'react', versions: [16, 17, 18] }, { stack: 'vue', versions: [2, 3] }, { stack: 'angular', versions: [12, 13, 14, 15, 16, 17] }, - { stack: 'svelte', versions: [3, 4] } + { stack: 'svelte', versions: [3, 4] }, + { stack: 'lit-vite', versions: [3] } ] export const stackNames = targets.map(t => t.stack) @@ -23,6 +24,7 @@ export function getFeatures({ stack, version }: Pick<(typeof fixtures)[0], 'stac stack === 'react' && new App.Features.React(version, stack, next), stack === 'vue' && new App.Features.Vue(version as 2 | 3, next), stack === 'svelte' && new App.Features.Svelte(version as 3 | 4, next), + stack === 'lit-vite' && new App.Features.Lit(version as 3, next), new App.Features.ZoomAt(), new App.Features.OrderNodes(), new App.Features.Dataflow(next),