From 9ab8e4c0c98087fe2758380c194259aebcb3f765 Mon Sep 17 00:00:00 2001 From: daiwei Date: Tue, 1 Apr 2025 21:03:42 +0800 Subject: [PATCH 1/2] chore: update lockfile --- pnpm-lock.yaml | 582 +++++++++++++++++++++++++++---------------------- 1 file changed, 323 insertions(+), 259 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc4e5a164ba..c72eaa1ab19 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ catalogs: specifier: ^7.26.10 version: 7.26.10 '@vitejs/plugin-vue': - specifier: ^5.2.3 - version: 5.2.3 + specifier: https://pkg.pr.new/@vitejs/plugin-vue@c156992 + version: 5.2.1 estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -25,8 +25,8 @@ catalogs: specifier: ^1.2.1 version: 1.2.1 vite: - specifier: ^5.4.14 - version: 5.4.14 + specifier: ^6.1.0 + version: 6.2.4 importers: @@ -69,14 +69,14 @@ importers: specifier: ^6.1.4 version: 6.1.4 '@vitest/coverage-v8': - specifier: ^3.0.2 - version: 3.0.2(vitest@3.0.2) + specifier: ^3.0.9 + version: 3.0.9(vitest@3.0.9) '@vitest/eslint-plugin': - specifier: ^1.1.25 - version: 1.1.25(@typescript-eslint/utils@8.20.0(eslint@9.18.0)(typescript@5.6.2))(eslint@9.18.0)(typescript@5.6.2)(vitest@3.0.2) + specifier: ^1.1.38 + version: 1.1.38(@typescript-eslint/utils@8.27.0(eslint@9.23.0)(typescript@5.6.2))(eslint@9.23.0)(typescript@5.6.2)(vitest@3.0.9) '@vitest/ui': specifier: ^3.0.2 - version: 3.0.4(vitest@3.0.2) + version: 3.1.1(vitest@3.0.9) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -178,16 +178,16 @@ importers: version: 8.27.0(eslint@9.23.0)(typescript@5.6.2) vite: specifier: 'catalog:' - version: 6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1) + version: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) vitest: - specifier: ^3.0.2 - version: 3.0.2(@types/node@22.10.7)(@vitest/ui@3.0.4)(jsdom@26.0.0)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1) + specifier: ^3.0.9 + version: 3.0.9(@types/node@22.13.13)(@vitest/ui@3.1.1)(jsdom@26.0.0)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) packages-private/benchmark: dependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1))(vue@3.5.13(typescript@5.6.2)) + version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))(vue@3.5.13(typescript@5.6.2)) connect: specifier: ^3.7.0 version: 3.7.0 @@ -196,7 +196,7 @@ importers: version: 2.0.4 vite: specifier: 'catalog:' - version: 6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1) + version: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) devDependencies: '@types/connect': specifier: ^3.4.38 @@ -227,26 +227,26 @@ importers: dependencies: '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@packages+vue) + version: 11.3.0(vue@packages+vue) vue: specifier: workspace:* version: link:../../packages/vue devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1))(vue@packages+vue) + version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))(vue@packages+vue) '@vue/compiler-sfc': specifier: workspace:* version: link:../../packages/compiler-sfc vite: specifier: 'catalog:' - version: 6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1) + version: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) vite-hyper-config: specifier: ^0.4.0 - version: 0.4.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(vite@6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1)) + version: 0.4.1(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0)) vite-plugin-inspect: specifier: ^0.8.7 - version: 0.8.7(rollup@4.31.0)(vite@6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1)) + version: 0.8.7(rollup@4.37.0)(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0)) packages-private/sfc-playground: dependencies: @@ -265,10 +265,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1))(vue@packages+vue) + version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))(vue@packages+vue) vite: specifier: 'catalog:' - version: 6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1) + version: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) packages-private/template-explorer: dependencies: @@ -289,7 +289,7 @@ importers: version: 3.4.38 '@vitejs/plugin-vue': specifier: 'catalog:' - version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1))(vue@packages+vue) + version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))(vue@packages+vue) connect: specifier: ^3.7.0 version: 3.7.0 @@ -298,7 +298,7 @@ importers: version: 2.0.4 vite: specifier: 'catalog:' - version: 6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1) + version: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) vue: specifier: workspace:* version: link:../../packages/vue @@ -307,10 +307,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: 5.2.3(vite@5.4.14(@types/node@22.13.13)(sass@1.86.0))(vue@packages+vue) + version: https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))(vue@packages+vue) vite: specifier: 'catalog:' - version: 5.4.14(@types/node@22.13.13)(sass@1.86.0) + version: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) vue: specifier: workspace:* version: link:../../packages/vue @@ -1115,6 +1115,9 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + '@puppeteer/browsers@2.8.0': resolution: {integrity: sha512-yTwt2KWRmCQAfhvbCRjebaSX8pV1//I0Y3g+A7f/eS7gf0l4eRJoUCvcYdVtboeU4CTOZQuqYbZNS8aBYb8ROQ==} engines: {node: '>=18'} @@ -1183,100 +1186,53 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.34.2': - resolution: {integrity: sha512-6Fyg9yQbwJR+ykVdT9sid1oc2ewejS6h4wzQltmJfSW53N60G/ah9pngXGANdy9/aaE/TcUFpWosdm7JXS1WTQ==} - cpu: [arm] - os: [android] - '@rollup/rollup-android-arm-eabi@4.37.0': resolution: {integrity: sha512-l7StVw6WAa8l3vA1ov80jyetOAEo1FtHvZDbzXDO/02Sq/QVvqlHkYoFwDJPIMj0GKiistsBudfx5tGFnwYWDQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.34.2': - resolution: {integrity: sha512-K5GfWe+vtQ3kyEbihrimM38UgX57UqHp+oME7X/EX9Im6suwZfa7Hsr8AtzbJvukTpwMGs+4s29YMSO3rwWtsw==} - cpu: [arm64] - os: [android] - '@rollup/rollup-android-arm64@4.37.0': resolution: {integrity: sha512-6U3SlVyMxezt8Y+/iEBcbp945uZjJwjZimu76xoG7tO1av9VO691z8PkhzQ85ith2I8R2RddEPeSfcbyPfD4hA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.34.2': - resolution: {integrity: sha512-PSN58XG/V/tzqDb9kDGutUruycgylMlUE59f40ny6QIRNsTEIZsrNQTJKUN2keMMSmlzgunMFqyaGLmly39sug==} - cpu: [arm64] - os: [darwin] - '@rollup/rollup-darwin-arm64@4.37.0': resolution: {integrity: sha512-+iTQ5YHuGmPt10NTzEyMPbayiNTcOZDWsbxZYR1ZnmLnZxG17ivrPSWFO9j6GalY0+gV3Jtwrrs12DBscxnlYA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.34.2': - resolution: {integrity: sha512-gQhK788rQJm9pzmXyfBB84VHViDERhAhzGafw+E5mUpnGKuxZGkMVDa3wgDFKT6ukLC5V7QTifzsUKdNVxp5qQ==} - cpu: [x64] - os: [darwin] - '@rollup/rollup-darwin-x64@4.37.0': resolution: {integrity: sha512-m8W2UbxLDcmRKVjgl5J/k4B8d7qX2EcJve3Sut7YGrQoPtCIQGPH5AMzuFvYRWZi0FVS0zEY4c8uttPfX6bwYQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.34.2': - resolution: {integrity: sha512-eiaHgQwGPpxLC3+zTAcdKl4VsBl3r0AiJOd1Um/ArEzAjN/dbPK1nROHrVkdnoE6p7Svvn04w3f/jEZSTVHunA==} - cpu: [arm64] - os: [freebsd] - '@rollup/rollup-freebsd-arm64@4.37.0': resolution: {integrity: sha512-FOMXGmH15OmtQWEt174v9P1JqqhlgYge/bUjIbiVD1nI1NeJ30HYT9SJlZMqdo1uQFyt9cz748F1BHghWaDnVA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.34.2': - resolution: {integrity: sha512-lhdiwQ+jf8pewYOTG4bag0Qd68Jn1v2gO1i0mTuiD+Qkt5vNfHVK/jrT7uVvycV8ZchlzXp5HDVmhpzjC6mh0g==} - cpu: [x64] - os: [freebsd] - '@rollup/rollup-freebsd-x64@4.37.0': resolution: {integrity: sha512-SZMxNttjPKvV14Hjck5t70xS3l63sbVwl98g3FlVVx2YIDmfUIy29jQrsw06ewEYQ8lQSuY9mpAPlmgRD2iSsA==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.34.2': - resolution: {integrity: sha512-lfqTpWjSvbgQP1vqGTXdv+/kxIznKXZlI109WkIFPbud41bjigjNmOAAKoazmRGx+k9e3rtIdbq2pQZPV1pMig==} - cpu: [arm] - os: [linux] - '@rollup/rollup-linux-arm-gnueabihf@4.37.0': resolution: {integrity: sha512-hhAALKJPidCwZcj+g+iN+38SIOkhK2a9bqtJR+EtyxrKKSt1ynCBeqrQy31z0oWU6thRZzdx53hVgEbRkuI19w==} cpu: [arm] os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.34.2': - resolution: {integrity: sha512-RGjqULqIurqqv+NJTyuPgdZhka8ImMLB32YwUle2BPTDqDoXNgwFjdjQC59FbSk08z0IqlRJjrJ0AvDQ5W5lpw==} - cpu: [arm] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.37.0': resolution: {integrity: sha512-jUb/kmn/Gd8epbHKEqkRAxq5c2EwRt0DqhSGWjPFxLeFvldFdHQs/n8lQ9x85oAeVb6bHcS8irhTJX2FCOd8Ag==} cpu: [arm] os: [linux] - - '@rollup/rollup-linux-arm64-gnu@4.34.2': - resolution: {integrity: sha512-ZvkPiheyXtXlFqHpsdgscx+tZ7hoR59vOettvArinEspq5fxSDSgfF+L5wqqJ9R4t+n53nyn0sKxeXlik7AY9Q==} - cpu: [arm64] - os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.37.0': resolution: {integrity: sha512-oNrJxcQT9IcbcmKlkF+Yz2tmOxZgG9D9GRq+1OE6XCQwCVwxixYAa38Z8qqPzQvzt1FCfmrHX03E0pWoXm1DqA==} cpu: [arm64] os: [linux] - - '@rollup/rollup-linux-arm64-musl@4.34.2': - resolution: {integrity: sha512-UlFk+E46TZEoxD9ufLKDBzfSG7Ki03fo6hsNRRRHF+KuvNZ5vd1RRVQm8YZlGsjcJG8R252XFK0xNPay+4WV7w==} - cpu: [arm64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.37.0': resolution: {integrity: sha512-pfxLBMls+28Ey2enpX3JvjEjaJMBX5XlPCZNGxj4kdJyHduPBXtxYeb8alo0a7bqOoWZW2uKynhHxF/MWoHaGQ==} @@ -1284,96 +1240,58 @@ packages: os: [linux] libc: [musl] - '@rollup/rollup-linux-loongarch64-gnu@4.34.2': - resolution: {integrity: sha512-hJhfsD9ykx59jZuuoQgYT1GEcNNi3RCoEmbo5OGfG8RlHOiVS7iVNev9rhLKh7UBYq409f4uEw0cclTXx8nh8Q==} - cpu: [loong64] - os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.37.0': resolution: {integrity: sha512-yCE0NnutTC/7IGUq/PUHmoeZbIwq3KRh02e9SfFh7Vmc1Z7atuJRYWhRME5fKgT8aS20mwi1RyChA23qSyRGpA==} cpu: [loong64] os: [linux] - - '@rollup/rollup-linux-powerpc64le-gnu@4.34.2': - resolution: {integrity: sha512-g/O5IpgtrQqPegvqopvmdCF9vneLE7eqYfdPWW8yjPS8f63DNam3U4ARL1PNNB64XHZDHKpvO2Giftf43puB8Q==} - cpu: [ppc64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.37.0': resolution: {integrity: sha512-NxcICptHk06E2Lh3a4Pu+2PEdZ6ahNHuK7o6Np9zcWkrBMuv21j10SQDJW3C9Yf/A/P7cutWoC/DptNLVsZ0VQ==} cpu: [ppc64] os: [linux] - - '@rollup/rollup-linux-riscv64-gnu@4.34.2': - resolution: {integrity: sha512-bSQijDC96M6PuooOuXHpvXUYiIwsnDmqGU8+br2U7iPoykNi9JtMUpN7K6xml29e0evK0/g0D1qbAUzWZFHY5Q==} - cpu: [riscv64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.37.0': resolution: {integrity: sha512-PpWwHMPCVpFZLTfLq7EWJWvrmEuLdGn1GMYcm5MV7PaRgwCEYJAwiN94uBuZev0/J/hFIIJCsYw4nLmXA9J7Pw==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.37.0': resolution: {integrity: sha512-DTNwl6a3CfhGTAOYZ4KtYbdS8b+275LSLqJVJIrPa5/JuIufWWZ/QFvkxp52gpmguN95eujrM68ZG+zVxa8zHA==} cpu: [riscv64] os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.34.2': - resolution: {integrity: sha512-49TtdeVAsdRuiUHXPrFVucaP4SivazetGUVH8CIxVsNsaPHV4PFkpLmH9LeqU/R4Nbgky9lzX5Xe1NrzLyraVA==} - cpu: [s390x] - os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.37.0': resolution: {integrity: sha512-hZDDU5fgWvDdHFuExN1gBOhCuzo/8TMpidfOR+1cPZJflcEzXdCy1LjnklQdW8/Et9sryOPJAKAQRw8Jq7Tg+A==} cpu: [s390x] os: [linux] - - '@rollup/rollup-linux-x64-gnu@4.34.2': - resolution: {integrity: sha512-j+jFdfOycLIQ7FWKka9Zd3qvsIyugg5LeZuHF6kFlXo6MSOc6R1w37YUVy8VpAKd81LMWGi5g9J25P09M0SSIw==} - cpu: [x64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.37.0': resolution: {integrity: sha512-pKivGpgJM5g8dwj0ywBwe/HeVAUSuVVJhUTa/URXjxvoyTT/AxsLTAbkHkDHG7qQxLoW2s3apEIl26uUe08LVQ==} cpu: [x64] os: [linux] - - '@rollup/rollup-linux-x64-musl@4.34.2': - resolution: {integrity: sha512-aDPHyM/D2SpXfSNCVWCxyHmOqN9qb7SWkY1+vaXqMNMXslZYnwh9V/UCudl6psyG0v6Ukj7pXanIpfZwCOEMUg==} - cpu: [x64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.37.0': resolution: {integrity: sha512-E2lPrLKE8sQbY/2bEkVTGDEk4/49UYRVWgj90MY8yPjpnGBQ+Xi1Qnr7b7UIWw1NOggdFQFOLZ8+5CzCiz143w==} cpu: [x64] os: [linux] - - '@rollup/rollup-win32-arm64-msvc@4.34.2': - resolution: {integrity: sha512-LQRkCyUBnAo7r8dbEdtNU08EKLCJMgAk2oP5H3R7BnUlKLqgR3dUjrLBVirmc1RK6U6qhtDw29Dimeer8d5hzQ==} - cpu: [arm64] - os: [win32] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.37.0': resolution: {integrity: sha512-Jm7biMazjNzTU4PrQtr7VS8ibeys9Pn29/1bm4ph7CP2kf21950LgN+BaE2mJ1QujnvOc6p54eWWiVvn05SOBg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.34.2': - resolution: {integrity: sha512-wt8OhpQUi6JuPFkm1wbVi1BByeag87LDFzeKSXzIdGcX4bMLqORTtKxLoCbV57BHYNSUSOKlSL4BYYUghainYA==} - cpu: [ia32] - os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.37.0': resolution: {integrity: sha512-e3/1SFm1OjefWICB2Ucstg2dxYDkDTZGDYgwufcbsxTHyqQps1UQf33dFEChBNmeSsTOyrjw2JJq0zbG5GF6RA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.34.2': - resolution: {integrity: sha512-rUrqINax0TvrPBXrFKg0YbQx18NpPN3NNrgmaao9xRNbTwek7lOXObhx8tQy8gelmQ/gLaGy1WptpU2eKJZImg==} - cpu: [x64] - os: [win32] - '@rollup/rollup-win32-x64-msvc@4.37.0': resolution: {integrity: sha512-LWbXUBwn/bcLx2sSsqy7pK5o+Nr+VCoRoAohfJ5C/aBio9nfJmGQqHAhU6pwxV/RmyTk5AqdySma7uwWGlmeuA==} cpu: [x64] @@ -1464,6 +1382,9 @@ packages: '@tybys/wasm-util@0.9.0': resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} + '@types/connect@3.4.38': + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/doctrine@0.0.9': resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} @@ -1571,21 +1492,25 @@ packages: resolution: {integrity: sha512-fp4Azi8kHz6TX8SFmKfyScZrMLfp++uRm2srpqRjsRZIIBzH74NtSkdEUHImR4G7f7XJ+sVZjCc6KDDK04YEpQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@unrs/rspack-resolver-binding-linux-arm64-musl@1.2.2': resolution: {integrity: sha512-gMiG3DCFioJxdGBzhlL86KcFgt9HGz0iDhw0YVYPsShItpN5pqIkNrI+L/Q/0gfDiGrfcE0X3VANSYIPmqEAlQ==} cpu: [arm64] os: [linux] + libc: [musl] '@unrs/rspack-resolver-binding-linux-x64-gnu@1.2.2': resolution: {integrity: sha512-n/4n2CxaUF9tcaJxEaZm+lqvaw2gflfWQ1R9I7WQgYkKEKbRKbpG/R3hopYdUmLSRI4xaW1Cy0Bz40eS2Yi4Sw==} cpu: [x64] os: [linux] + libc: [glibc] '@unrs/rspack-resolver-binding-linux-x64-musl@1.2.2': resolution: {integrity: sha512-cHyhAr6rlYYbon1L2Ag449YCj3p6XMfcYTP0AQX+KkQo025d1y/VFtPWvjMhuEsE2lLvtHm7GdJozj6BOMtzVg==} cpu: [x64] os: [linux] + libc: [musl] '@unrs/rspack-resolver-binding-wasm32-wasi@1.2.2': resolution: {integrity: sha512-eogDKuICghDLGc32FtP+WniG38IB1RcGOGz0G3z8406dUdjJvxfHGuGs/dSlM9YEp/v0lEqhJ4mBu6X2nL9pog==} @@ -1602,8 +1527,9 @@ packages: cpu: [x64] os: [win32] - '@vitejs/plugin-vue@5.2.3': - resolution: {integrity: sha512-IYSLEQj4LgZZuoVpdSUCw3dIynTWQgPlaRP6iAvMle4My0HdYwr5g5wQAfwOeHQBmYwEkqF70nRpSilr6PoUDg==} + '@vitejs/plugin-vue@https://pkg.pr.new/@vitejs/plugin-vue@c156992': + resolution: {tarball: https://pkg.pr.new/@vitejs/plugin-vue@c156992} + version: 5.2.1 engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.0.0 || ^6.0.0 @@ -1648,6 +1574,9 @@ packages: '@vitest/pretty-format@3.0.9': resolution: {integrity: sha512-OW9F8t2J3AwFEwENg3yMyKWweF7oRJlMyHOMIhO5F3n0+cgQAJZBjNgrF8dLwFTEXl5jUqBLXd9QyyKv8zEcmA==} + '@vitest/pretty-format@3.1.1': + resolution: {integrity: sha512-dg0CIzNx+hMMYfNmSqJlLSXEmnNhMswcn3sXO7Tpldr0LiGmg3eXdLLhwkv2ZqgHb/d5xg5F7ezNFRA1fA13yA==} + '@vitest/runner@3.0.9': resolution: {integrity: sha512-NX9oUXgF9HPfJSwl8tUZCMP1oGx2+Sf+ru6d05QjzQz4OwWg0psEzwY6VexP2tTHWdOkhKHUIZH+fS6nA7jfOw==} @@ -1657,11 +1586,16 @@ packages: '@vitest/spy@3.0.9': resolution: {integrity: sha512-/CcK2UDl0aQ2wtkp3YVWldrpLRNCfVcIOFGlVGKO4R5eajsH393Z1yiXLVQ7vWsj26JOEjeZI0x5sm5P4OGUNQ==} + '@vitest/ui@3.1.1': + resolution: {integrity: sha512-2HpiRIYg3dlvAJBV9RtsVswFgUSJK4Sv7QhpxoP0eBGkYwzGIKP34PjaV00AULQi9Ovl6LGyZfsetxDWY5BQdQ==} + peerDependencies: + vitest: 3.1.1 + '@vitest/utils@3.0.9': resolution: {integrity: sha512-ilHM5fHhZ89MCp5aAaM9uhfl1c2JdxVxl3McqsdVyVNN6JffnEen8UMCdRTzOhGXNQGo5GNL9QugHrz727Wnng==} - '@vitest/utils@3.0.4': - resolution: {integrity: sha512-8BqC1ksYsHtbWH+DfpOAKrFw3jl3Uf9J7yeFh85Pz52IWuh1hBBtyfEbRNNZNjl8H8A5yMLH9/t+k7HIKzQcZQ==} + '@vitest/utils@3.1.1': + resolution: {integrity: sha512-1XIjflyaU2k3HMArJ50bwSh3wKWPD6Q47wz/NUSmRV0zNywPc4w79ARjg/i/aNINHwA+mIALhUVqD9/aUvZNgg==} '@vue/compiler-core@3.5.13': resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} @@ -1679,9 +1613,35 @@ packages: resolution: {integrity: sha512-oTyUE+QHIzLw2PpV14GD/c7EohDyP64xCniWTcqcEmTd699eFqTIwOmtDYjcO1j3QgdXoJEoWv1/cCdLrRoOfg==} engines: {node: '>= 0.12.0'} + '@vue/reactivity@3.5.13': + resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} + '@vue/repl@4.5.1': resolution: {integrity: sha512-YYXvFue2GOrZ6EWnoA8yQVKzdCIn45+tpwJHzMof1uwrgyYAVY9ynxCsDYeAuWcpaAeylg/nybhFuqiFy2uvYA==} + '@vue/runtime-core@3.5.13': + resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} + + '@vue/runtime-dom@3.5.13': + resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} + + '@vue/server-renderer@3.5.13': + resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} + peerDependencies: + vue: 3.5.13 + + '@vue/shared@3.5.13': + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + + '@vueuse/core@11.3.0': + resolution: {integrity: sha512-7OC4Rl1f9G8IT6rUfi9JrKiXy4bfmHhZ5x2Ceojy0jnd3mHNEvV4JaRygH362ror6/NZ+Nl+n13LPzGiPN8cKA==} + + '@vueuse/metadata@11.3.0': + resolution: {integrity: sha512-pwDnDspTqtTo2HwfLw4Rp6yywuuBdYnPYDq+mO38ZYKGebCUQC/nVj/PXSiK9HX5otxLz8Fn7ECPbjiRz2CC3g==} + + '@vueuse/shared@11.3.0': + resolution: {integrity: sha512-P8gSSWQeucH5821ek2mn/ciCk+MS/zoRKqdQIM3bHq6p7GXDAJLmnRRKmF5F65sAVJIfzQlwR3aDzwCn10s8hA==} + '@zeit/schemas@2.36.0': resolution: {integrity: sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg==} @@ -1825,6 +1785,13 @@ packages: buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + bundle-name@4.1.0: + resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} + engines: {node: '>=18'} + bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} engines: {node: '>= 0.8'} @@ -2396,8 +2363,8 @@ packages: flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - flatted@3.3.2: - resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + flatted@3.3.3: + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} foreground-child@3.3.0: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} @@ -3098,6 +3065,9 @@ packages: path-to-regexp@3.3.0: resolution: {integrity: sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -3167,10 +3137,6 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.5.1: - resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} - engines: {node: ^10 || ^12 || >=14} - postcss@8.5.3: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} @@ -3351,11 +3317,6 @@ packages: peerDependencies: rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 - rollup@4.34.2: - resolution: {integrity: sha512-sBDUoxZEaqLu9QeNalL8v3jw6WjPku4wfZGyTU7l7m1oC+rpRihXc/n/H+4148ZkGz5Xli8CHMns//fFGKvpIQ==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - rollup@4.37.0: resolution: {integrity: sha512-iAtQy/L4QFU+rTJ1YUjXqJOJzuwEghqWzCEYD2FEghT7Gsy1VdABntrO4CLopA5IkflTyqNiLNwPcOJ3S7UKLg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -3367,6 +3328,10 @@ packages: rspack-resolver@1.2.2: resolution: {integrity: sha512-Fwc19jMBA3g+fxDJH2B4WxwZjE0VaaOL7OX/A4Wn5Zv7bOD/vyPZhzXfaO73Xc2GAlfi96g5fGUa378WbIGfFw==} + run-applescript@7.0.0: + resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} + engines: {node: '>=18'} + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3437,8 +3402,8 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} - sirv@3.0.0: - resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + sirv@3.0.1: + resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==} engines: {node: '>=18'} slice-ansi@5.0.0: @@ -3596,8 +3561,8 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.10: - resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + tinyglobby@0.2.12: + resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} engines: {node: '>=12.0.0'} tinypool@1.0.2: @@ -3699,6 +3664,10 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + unplugin-utils@0.2.4: resolution: {integrity: sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==} engines: {node: '>=18.12.0'} @@ -3723,15 +3692,67 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + vite-hyper-config@0.4.1: + resolution: {integrity: sha512-w9D4g0+5Km8XCgkBY/BZrXZAl8FF2q1UpDXT/Fsm6VLEU5tkkzDCko8fjLPOaSbvirUJgbY5OsD5wuuZ6581Fg==} + engines: {node: '>=18.0.0'} + peerDependencies: + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 + + vite-node@2.1.9: + resolution: {integrity: sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite-node@3.0.9: resolution: {integrity: sha512-w3Gdx7jDcuT9cNn9jExXgOyKmf5UOTb6WMHz8LGAm54eS1Elf5OuBhCxl6zJxGhEeIkgsE1WbHuoL0mj/UXqXg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true + vite-plugin-inspect@0.8.7: + resolution: {integrity: sha512-/XXou3MVc13A5O9/2Nd6xczjrUwt7ZyI9h8pTnUMkr5SshLcb0PJUOVq2V+XVkdeU4njsqAtmK87THZuO2coGA==} + engines: {node: '>=14'} + peerDependencies: + '@nuxt/kit': '*' + vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + vite@5.4.14: resolution: {integrity: sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vite@6.2.4: + resolution: {integrity: sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true peerDependencies: '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 jiti: '>=1.21.0' @@ -4355,6 +4376,8 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@polka/url@1.0.0-next.28': {} + '@puppeteer/browsers@2.8.0': dependencies: debug: 4.4.0 @@ -4422,120 +4445,63 @@ snapshots: optionalDependencies: rollup: 4.37.0 - '@rollup/rollup-android-arm-eabi@4.34.2': - optional: true - '@rollup/rollup-android-arm-eabi@4.37.0': optional: true - '@rollup/rollup-android-arm64@4.34.2': - optional: true - '@rollup/rollup-android-arm64@4.37.0': optional: true - '@rollup/rollup-darwin-arm64@4.34.2': - optional: true - '@rollup/rollup-darwin-arm64@4.37.0': optional: true - '@rollup/rollup-darwin-x64@4.34.2': - optional: true - '@rollup/rollup-darwin-x64@4.37.0': optional: true - '@rollup/rollup-freebsd-arm64@4.34.2': - optional: true - '@rollup/rollup-freebsd-arm64@4.37.0': optional: true - '@rollup/rollup-freebsd-x64@4.34.2': - optional: true - '@rollup/rollup-freebsd-x64@4.37.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.34.2': - optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.37.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.34.2': - optional: true - '@rollup/rollup-linux-arm-musleabihf@4.37.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.34.2': - optional: true - '@rollup/rollup-linux-arm64-gnu@4.37.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.34.2': - optional: true - '@rollup/rollup-linux-arm64-musl@4.37.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.34.2': - optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.37.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.34.2': - optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.37.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.34.2': - optional: true - '@rollup/rollup-linux-riscv64-gnu@4.37.0': optional: true '@rollup/rollup-linux-riscv64-musl@4.37.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.34.2': - optional: true - '@rollup/rollup-linux-s390x-gnu@4.37.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.34.2': - optional: true - '@rollup/rollup-linux-x64-gnu@4.37.0': optional: true - '@rollup/rollup-linux-x64-musl@4.34.2': - optional: true - '@rollup/rollup-linux-x64-musl@4.37.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.34.2': - optional: true - '@rollup/rollup-win32-arm64-msvc@4.37.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.34.2': - optional: true - '@rollup/rollup-win32-ia32-msvc@4.37.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.34.2': - optional: true - '@rollup/rollup-win32-x64-msvc@4.37.0': optional: true @@ -4598,6 +4564,10 @@ snapshots: tslib: 2.8.1 optional: true + '@types/connect@3.4.38': + dependencies: + '@types/node': 22.13.13 + '@types/doctrine@0.0.9': {} '@types/estree@1.0.6': {} @@ -4741,12 +4711,17 @@ snapshots: '@unrs/rspack-resolver-binding-win32-x64-msvc@1.2.2': optional: true - '@vitejs/plugin-vue@5.2.3(vite@5.4.14(@types/node@22.13.13)(sass@1.86.0))(vue@packages+vue)': + '@vitejs/plugin-vue@https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))(vue@3.5.13(typescript@5.6.2))': dependencies: - vite: 5.4.14(@types/node@22.13.13)(sass@1.86.0) + vite: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) + vue: 3.5.13(typescript@5.6.2) + + '@vitejs/plugin-vue@https://pkg.pr.new/@vitejs/plugin-vue@c156992(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))(vue@packages+vue)': + dependencies: + vite: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) vue: link:packages/vue - '@vitest/coverage-v8@3.0.9(vitest@3.0.9(@types/node@22.13.13)(jsdom@26.0.0)(sass@1.86.0))': + '@vitest/coverage-v8@3.0.9(vitest@3.0.9)': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -4760,17 +4735,17 @@ snapshots: std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.0.9(@types/node@22.13.13)(jsdom@26.0.0)(sass@1.86.0) + vitest: 3.0.9(@types/node@22.13.13)(@vitest/ui@3.1.1)(jsdom@26.0.0)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.1.38(@typescript-eslint/utils@8.27.0(eslint@9.23.0)(typescript@5.6.2))(eslint@9.23.0)(typescript@5.6.2)(vitest@3.0.9(@types/node@22.13.13)(jsdom@26.0.0)(sass@1.86.0))': + '@vitest/eslint-plugin@1.1.38(@typescript-eslint/utils@8.27.0(eslint@9.23.0)(typescript@5.6.2))(eslint@9.23.0)(typescript@5.6.2)(vitest@3.0.9)': dependencies: '@typescript-eslint/utils': 8.27.0(eslint@9.23.0)(typescript@5.6.2) eslint: 9.23.0 optionalDependencies: typescript: 5.6.2 - vitest: 3.0.9(@types/node@22.13.13)(jsdom@26.0.0)(sass@1.86.0) + vitest: 3.0.9(@types/node@22.13.13)(@vitest/ui@3.1.1)(jsdom@26.0.0)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) '@vitest/expect@3.0.9': dependencies: @@ -4779,18 +4754,22 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.9(vite@5.4.14(@types/node@22.13.13)(sass@1.86.0))': + '@vitest/mocker@3.0.9(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0))': dependencies: '@vitest/spy': 3.0.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.14(@types/node@22.13.13)(sass@1.86.0) + vite: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) '@vitest/pretty-format@3.0.9': dependencies: tinyrainbow: 2.0.0 + '@vitest/pretty-format@3.1.1': + dependencies: + tinyrainbow: 2.0.0 + '@vitest/runner@3.0.9': dependencies: '@vitest/utils': 3.0.9 @@ -4806,21 +4785,32 @@ snapshots: dependencies: tinyspy: 3.0.2 + '@vitest/ui@3.1.1(vitest@3.0.9)': + dependencies: + '@vitest/utils': 3.1.1 + fflate: 0.8.2 + flatted: 3.3.3 + pathe: 2.0.3 + sirv: 3.0.1 + tinyglobby: 0.2.12 + tinyrainbow: 2.0.0 + vitest: 3.0.9(@types/node@22.13.13)(@vitest/ui@3.1.1)(jsdom@26.0.0)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) + '@vitest/utils@3.0.9': dependencies: '@vitest/pretty-format': 3.0.9 loupe: 3.1.3 tinyrainbow: 2.0.0 - '@vitest/utils@3.0.4': + '@vitest/utils@3.1.1': dependencies: - '@vitest/pretty-format': 3.0.4 - loupe: 3.1.2 + '@vitest/pretty-format': 3.1.1 + loupe: 3.1.3 tinyrainbow: 2.0.0 '@vue/compiler-core@3.5.13': dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.26.10 '@vue/shared': 3.5.13 entities: 4.5.0 estree-walker: 2.0.2 @@ -4833,14 +4823,14 @@ snapshots: '@vue/compiler-sfc@3.5.13': dependencies: - '@babel/parser': 7.26.2 + '@babel/parser': 7.26.10 '@vue/compiler-core': 3.5.13 '@vue/compiler-dom': 3.5.13 '@vue/compiler-ssr': 3.5.13 '@vue/shared': 3.5.13 estree-walker: 2.0.2 magic-string: 0.30.17 - postcss: 8.5.1 + postcss: 8.5.3 source-map-js: 1.2.1 '@vue/compiler-ssr@3.5.13': @@ -4850,8 +4840,51 @@ snapshots: '@vue/consolidate@1.0.0': {} + '@vue/reactivity@3.5.13': + dependencies: + '@vue/shared': 3.5.13 + '@vue/repl@4.5.1': {} + '@vue/runtime-core@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/shared': 3.5.13 + + '@vue/runtime-dom@3.5.13': + dependencies: + '@vue/reactivity': 3.5.13 + '@vue/runtime-core': 3.5.13 + '@vue/shared': 3.5.13 + csstype: 3.1.3 + + '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.6.2))': + dependencies: + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + vue: 3.5.13(typescript@5.6.2) + + '@vue/shared@3.5.13': {} + + '@vueuse/core@11.3.0(vue@packages+vue)': + dependencies: + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 11.3.0 + '@vueuse/shared': 11.3.0(vue@packages+vue) + vue-demi: 0.14.10(vue@packages+vue) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/metadata@11.3.0': {} + + '@vueuse/shared@11.3.0(vue@packages+vue)': + dependencies: + vue-demi: 0.14.10(vue@packages+vue) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + '@zeit/schemas@2.36.0': {} accepts@1.3.8: @@ -4988,6 +5021,13 @@ snapshots: buffer-crc32@0.2.13: {} + buffer-from@1.1.2: + optional: true + + bundle-name@4.1.0: + dependencies: + run-applescript: 7.0.0 + bytes@3.0.0: {} cac@6.7.14: {} @@ -5636,7 +5676,7 @@ snapshots: flatted@3.3.1: {} - flatted@3.3.2: {} + flatted@3.3.3: {} foreground-child@3.3.0: dependencies: @@ -6326,6 +6366,8 @@ snapshots: path-to-regexp@3.3.0: {} + pathe@1.1.2: {} + pathe@2.0.3: {} pathval@2.0.0: {} @@ -6387,12 +6429,6 @@ snapshots: postcss-value-parser@4.2.0: {} - postcss@8.5.1: - dependencies: - nanoid: 3.3.8 - picocolors: 1.1.1 - source-map-js: 1.2.1 - postcss@8.5.3: dependencies: nanoid: 3.3.8 @@ -6634,31 +6670,6 @@ snapshots: '@rollup/plugin-inject': 5.0.5(rollup@4.37.0) rollup: 4.37.0 - rollup@4.34.2: - dependencies: - '@types/estree': 1.0.6 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.34.2 - '@rollup/rollup-android-arm64': 4.34.2 - '@rollup/rollup-darwin-arm64': 4.34.2 - '@rollup/rollup-darwin-x64': 4.34.2 - '@rollup/rollup-freebsd-arm64': 4.34.2 - '@rollup/rollup-freebsd-x64': 4.34.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.34.2 - '@rollup/rollup-linux-arm-musleabihf': 4.34.2 - '@rollup/rollup-linux-arm64-gnu': 4.34.2 - '@rollup/rollup-linux-arm64-musl': 4.34.2 - '@rollup/rollup-linux-loongarch64-gnu': 4.34.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.34.2 - '@rollup/rollup-linux-riscv64-gnu': 4.34.2 - '@rollup/rollup-linux-s390x-gnu': 4.34.2 - '@rollup/rollup-linux-x64-gnu': 4.34.2 - '@rollup/rollup-linux-x64-musl': 4.34.2 - '@rollup/rollup-win32-arm64-msvc': 4.34.2 - '@rollup/rollup-win32-ia32-msvc': 4.34.2 - '@rollup/rollup-win32-x64-msvc': 4.34.2 - fsevents: 2.3.3 - rollup@4.37.0: dependencies: '@types/estree': 1.0.6 @@ -6701,6 +6712,8 @@ snapshots: '@unrs/rspack-resolver-binding-win32-arm64-msvc': 1.2.2 '@unrs/rspack-resolver-binding-win32-x64-msvc': 1.2.2 + run-applescript@7.0.0: {} + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -6780,13 +6793,13 @@ snapshots: sirv@2.0.4: dependencies: - '@polka/url': 1.0.0-next.25 + '@polka/url': 1.0.0-next.28 mrmime: 2.0.0 totalist: 3.0.1 - sirv@3.0.0: + sirv@3.0.1: dependencies: - '@polka/url': 1.0.0-next.25 + '@polka/url': 1.0.0-next.28 mrmime: 2.0.0 totalist: 3.0.1 @@ -6953,7 +6966,7 @@ snapshots: tinyexec@0.3.2: {} - tinyglobby@0.2.10: + tinyglobby@0.2.12: dependencies: fdir: 6.4.3(picomatch@4.0.2) picomatch: 4.0.2 @@ -7027,6 +7040,8 @@ snapshots: universalify@2.0.1: {} + unpipe@1.0.0: {} + unplugin-utils@0.2.4: dependencies: pathe: 2.0.3 @@ -7052,13 +7067,48 @@ snapshots: vary@1.1.2: {} - vite-node@3.0.9(@types/node@22.13.13)(sass@1.86.0): + vite-hyper-config@0.4.1(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0)): + dependencies: + cac: 6.7.14 + picocolors: 1.1.1 + vite: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) + vite-node: 2.1.9(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vite-node@2.1.9(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0): + dependencies: + cac: 6.7.14 + debug: 4.4.0 + es-module-lexer: 1.6.0 + pathe: 1.1.2 + vite: 5.4.14(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vite-node@3.0.9(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 2.0.3 - vite: 5.4.14(@types/node@22.13.13)(sass@1.86.0) + vite: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) transitivePeerDependencies: - '@types/node' - jiti @@ -7073,10 +7123,10 @@ snapshots: - tsx - yaml - vite-plugin-inspect@0.8.7(rollup@4.31.0)(vite@6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1)): + vite-plugin-inspect@0.8.7(rollup@4.37.0)(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0)): dependencies: '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.1.0(rollup@4.31.0) + '@rollup/pluginutils': 5.1.0(rollup@4.37.0) debug: 4.4.0 error-stack-parser-es: 0.1.5 fs-extra: 11.2.0 @@ -7084,25 +7134,38 @@ snapshots: perfect-debounce: 1.0.0 picocolors: 1.1.1 sirv: 2.0.4 - vite: 6.1.0(@types/node@22.10.7)(sass@1.83.4)(terser@5.33.0)(yaml@2.6.1) + vite: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) transitivePeerDependencies: - rollup - supports-color - vite@5.4.14(@types/node@22.13.13)(sass@1.86.0): + vite@5.4.14(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0): dependencies: - esbuild: 0.24.2 - postcss: 8.5.1 - rollup: 4.34.2 + esbuild: 0.21.5 + postcss: 8.5.3 + rollup: 4.37.0 optionalDependencies: '@types/node': 22.13.13 fsevents: 2.3.3 sass: 1.86.0 + terser: 5.33.0 + + vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0): + dependencies: + esbuild: 0.25.1 + postcss: 8.5.3 + rollup: 4.37.0 + optionalDependencies: + '@types/node': 22.13.13 + fsevents: 2.3.3 + sass: 1.86.0 + terser: 5.33.0 + yaml: 2.7.0 - vitest@3.0.9(@types/node@22.13.13)(jsdom@26.0.0)(sass@1.86.0): + vitest@3.0.9(@types/node@22.13.13)(@vitest/ui@3.1.1)(jsdom@26.0.0)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0): dependencies: '@vitest/expect': 3.0.9 - '@vitest/mocker': 3.0.9(vite@5.4.14(@types/node@22.13.13)(sass@1.86.0)) + '@vitest/mocker': 3.0.9(vite@6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0)) '@vitest/pretty-format': 3.0.9 '@vitest/runner': 3.0.9 '@vitest/snapshot': 3.0.9 @@ -7118,11 +7181,12 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 5.4.14(@types/node@22.13.13)(sass@1.86.0) - vite-node: 3.0.9(@types/node@22.13.13)(sass@1.86.0) + vite: 6.2.4(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) + vite-node: 3.0.9(@types/node@22.13.13)(sass@1.86.0)(terser@5.33.0)(yaml@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.13.13 + '@vitest/ui': 3.1.1(vitest@3.0.9) jsdom: 26.0.0 transitivePeerDependencies: - jiti From 5f8441dda22fa3bb5127757bcdd09d6727ac8328 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Mon, 5 May 2025 13:39:14 +0800 Subject: [PATCH 2/2] feat(vapor): generate more efficient runtime code for specific interpolation patterns --- .../__snapshots__/vFor.spec.ts.snap | 90 ++++++ .../__tests__/transforms/vFor.spec.ts | 67 ++++ .../compiler-vapor/src/generators/block.ts | 9 +- .../src/generators/expression.ts | 24 +- packages/compiler-vapor/src/generators/for.ts | 302 +++++++++++++++++- .../src/generators/operation.ts | 22 +- packages/runtime-vapor/__tests__/for.spec.ts | 2 +- packages/runtime-vapor/src/apiCreateFor.ts | 83 ++++- rollup.config.js | 1 + 9 files changed, 575 insertions(+), 25 deletions(-) diff --git a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap index cb14f56afdb..c87a37ba5d2 100644 --- a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap +++ b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap @@ -47,6 +47,27 @@ export function render(_ctx) { }" `; +exports[`compiler: v-for > key only binding pattern 1`] = ` +"import { child as _child, toDisplayString as _toDisplayString, setText as _setText, createFor as _createFor, template as _template } from 'vue'; +const t0 = _template(" ", true) + +export function render(_ctx) { + const n0 = _createFor(() => (_ctx.rows), (_for_item0) => { + const n2 = t0() + const x2 = _child(n2) + let _row, _row_id + { + _row = _for_item0.value + _row_id = _row.id + + } + _setText(x2, _toDisplayString(_row_id + _row_id)) + return n2 + }, (row) => (row.id)) + return n0 +}" +`; + exports[`compiler: v-for > multi effect 1`] = ` "import { setProp as _setProp, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue'; const t0 = _template("
", true) @@ -115,6 +136,75 @@ export function render(_ctx) { }" `; +exports[`compiler: v-for > selector pattern 1`] = ` +"import { child as _child, toDisplayString as _toDisplayString, setText as _setText, createFor as _createFor, template as _template } from 'vue'; +const t0 = _template(" ", true) + +export function render(_ctx) { + const n0 = _createFor(() => (_ctx.rows), (_for_item0) => { + const n2 = t0() + const x2 = _child(n2) + _selector0_0(() => { + _setText(x2, _toDisplayString(_ctx.selected === _for_item0.value.id ? 'danger' : '')) + }) + return n2 + }, (row) => (row.id)) + const _selector0_0 = n0.useSelector(() => _ctx.selected) + return n0 +}" +`; + +exports[`compiler: v-for > selector pattern 2`] = ` +"import { setClass as _setClass, createFor as _createFor, template as _template } from 'vue'; +const t0 = _template("", true) + +export function render(_ctx) { + const n0 = _createFor(() => (_ctx.rows), (_for_item0) => { + const n2 = t0() + _selector0_0(() => { + _setClass(n2, _ctx.selected === _for_item0.value.id ? 'danger' : '') + }) + return n2 + }, (row) => (row.id)) + const _selector0_0 = n0.useSelector(() => _ctx.selected) + return n0 +}" +`; + +exports[`compiler: v-for > selector pattern 3`] = ` +"import { setClass as _setClass, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue'; +const t0 = _template("", true) + +export function render(_ctx) { + const n0 = _createFor(() => (_ctx.rows), (_for_item0) => { + const n2 = t0() + _renderEffect(() => { + const _row = _for_item0.value + _setClass(n2, _row.label === _row.id ? 'danger' : '') + }) + return n2 + }, (row) => (row.id)) + return n0 +}" +`; + +exports[`compiler: v-for > selector pattern 4`] = ` +"import { setClass as _setClass, createFor as _createFor, template as _template } from 'vue'; +const t0 = _template("", true) + +export function render(_ctx) { + const n0 = _createFor(() => (_ctx.rows), (_for_item0) => { + const n2 = t0() + _selector0_0(() => { + _setClass(n2, { danger: _for_item0.value.id === _ctx.selected }) + }) + return n2 + }, (row) => (row.id)) + const _selector0_0 = n0.useSelector(() => _ctx.selected) + return n0 +}" +`; + exports[`compiler: v-for > v-for aliases w/ complex expressions 1`] = ` "import { getDefaultValue as _getDefaultValue, child as _child, toDisplayString as _toDisplayString, setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue'; const t0 = _template("
", true) diff --git a/packages/compiler-vapor/__tests__/transforms/vFor.spec.ts b/packages/compiler-vapor/__tests__/transforms/vFor.spec.ts index 0008df7f4c7..91b8526b329 100644 --- a/packages/compiler-vapor/__tests__/transforms/vFor.spec.ts +++ b/packages/compiler-vapor/__tests__/transforms/vFor.spec.ts @@ -67,6 +67,73 @@ describe('compiler: v-for', () => { ).lengthOf(1) }) + test('key only binding pattern', () => { + expect( + compileWithVFor( + ` + + {{ row.id + row.id }} + + `, + ).code, + ).matchSnapshot() + }) + + test('selector pattern', () => { + expect( + compileWithVFor( + ` + + {{ selected === row.id ? 'danger' : '' }} + + `, + ).code, + ).matchSnapshot() + + expect( + compileWithVFor( + ` + + `, + ).code, + ).matchSnapshot() + + // Should not be optimized because row.label is not from parent scope + expect( + compileWithVFor( + ` + + `, + ).code, + ).matchSnapshot() + + expect( + compileWithVFor( + ` + + `, + ).code, + ).matchSnapshot() + }) + test('multi effect', () => { const { code } = compileWithVFor( `
`, diff --git a/packages/compiler-vapor/src/generators/block.ts b/packages/compiler-vapor/src/generators/block.ts index b161b8f45d1..66b57c58378 100644 --- a/packages/compiler-vapor/src/generators/block.ts +++ b/packages/compiler-vapor/src/generators/block.ts @@ -19,14 +19,13 @@ export function genBlock( context: CodegenContext, args: CodeFragment[] = [], root?: boolean, - customReturns?: (returns: CodeFragment[]) => CodeFragment[], ): CodeFragment[] { return [ '(', ...args, ') => {', INDENT_START, - ...genBlockContent(oper, context, root, customReturns), + ...genBlockContent(oper, context, root), INDENT_END, NEWLINE, '}', @@ -37,7 +36,7 @@ export function genBlockContent( block: BlockIRNode, context: CodegenContext, root?: boolean, - customReturns?: (returns: CodeFragment[]) => CodeFragment[], + genEffectsExtraFrag?: () => CodeFragment[], ): CodeFragment[] { const [frag, push] = buildCodeFragment() const { dynamic, effect, operation, returns } = block @@ -56,7 +55,7 @@ export function genBlockContent( } push(...genOperations(operation, context)) - push(...genEffects(effect, context)) + push(...genEffects(effect, context, genEffectsExtraFrag)) push(NEWLINE, `return `) @@ -65,7 +64,7 @@ export function genBlockContent( returnNodes.length > 1 ? genMulti(DELIMITERS_ARRAY, ...returnNodes) : [returnNodes[0] || 'null'] - push(...(customReturns ? customReturns(returnsCode) : returnsCode)) + push(...returnsCode) resetBlock() return frag diff --git a/packages/compiler-vapor/src/generators/expression.ts b/packages/compiler-vapor/src/generators/expression.ts index eedaeeb380a..ab7254d6d79 100644 --- a/packages/compiler-vapor/src/generators/expression.ts +++ b/packages/compiler-vapor/src/generators/expression.ts @@ -230,6 +230,7 @@ function canPrefix(name: string) { type DeclarationResult = { ids: Record frag: CodeFragment[] + varNames: string[] } type DeclarationValue = { name: string @@ -243,6 +244,7 @@ type DeclarationValue = { export function processExpressions( context: CodegenContext, expressions: SimpleExpressionNode[], + shouldDeclare: boolean, ): DeclarationResult { // analyze variables const { seenVariable, variableToExpMap, expToVariableMap, seenIdentifier } = @@ -266,7 +268,11 @@ export function processExpressions( varDeclarations, ) - return genDeclarations([...varDeclarations, ...expDeclarations], context) + return genDeclarations( + [...varDeclarations, ...expDeclarations], + context, + shouldDeclare, + ) } function analyzeExpressions(expressions: SimpleExpressionNode[]) { @@ -507,15 +513,21 @@ function processRepeatedExpressions( function genDeclarations( declarations: DeclarationValue[], context: CodegenContext, + shouldDeclare: boolean, ): DeclarationResult { const [frag, push] = buildCodeFragment() const ids: Record = Object.create(null) + const varNames = new Set() // process identifiers first as expressions may rely on them declarations.forEach(({ name, isIdentifier, value }) => { if (isIdentifier) { const varName = (ids[name] = `_${name}`) - push(`const ${varName} = `, ...genExpression(value, context), NEWLINE) + varNames.add(varName) + if (shouldDeclare) { + push(`const `) + } + push(`${varName} = `, ...genExpression(value, context), NEWLINE) } }) @@ -523,15 +535,19 @@ function genDeclarations( declarations.forEach(({ name, isIdentifier, value }) => { if (!isIdentifier) { const varName = (ids[name] = `_${name}`) + varNames.add(varName) + if (shouldDeclare) { + push(`const `) + } push( - `const ${varName} = `, + `${varName} = `, ...context.withId(() => genExpression(value, context), ids), NEWLINE, ) } }) - return { ids, frag } + return { ids, frag, varNames: [...varNames] } } function escapeRegExp(string: string) { diff --git a/packages/compiler-vapor/src/generators/for.ts b/packages/compiler-vapor/src/generators/for.ts index fbb72c61d47..40f002a8536 100644 --- a/packages/compiler-vapor/src/generators/for.ts +++ b/packages/compiler-vapor/src/generators/for.ts @@ -1,16 +1,32 @@ import { type SimpleExpressionNode, createSimpleExpression, + isStaticNode, walkIdentifiers, } from '@vue/compiler-dom' -import { genBlock } from './block' +import { genBlockContent } from './block' import { genExpression } from './expression' import type { CodegenContext } from '../generate' -import type { ForIRNode } from '../ir' -import { type CodeFragment, NEWLINE, genCall, genMulti } from './utils' -import type { Identifier } from '@babel/types' +import type { BlockIRNode, ForIRNode, IREffect } from '../ir' +import { + type CodeFragment, + INDENT_END, + INDENT_START, + NEWLINE, + genCall, + genMulti, +} from './utils' +import { + type Expression, + type Identifier, + type Node, + isNodesEquivalent, +} from '@babel/types' import { parseExpression } from '@babel/parser' import { VaporVForFlags } from '../../../shared/src/vaporFlags' +import { walk } from 'estree-walker' +import { genOperation } from './operation' +import { extend, isGloballyAllowed } from '@vue/shared' export function genFor( oper: ForIRNode, @@ -78,7 +94,62 @@ export function genFor( idMap[indexVar] = null } - const blockFn = context.withId(() => genBlock(render, context, args), idMap) + const { selectorPatterns, keyOnlyBindingPatterns } = matchPatterns( + render, + keyProp, + idMap, + ) + const patternFrag: CodeFragment[] = [] + + for (let i = 0; i < selectorPatterns.length; i++) { + const { selector } = selectorPatterns[i] + const selectorName = `_selector${id}_${i}` + patternFrag.push( + NEWLINE, + `const ${selectorName} = `, + ...genCall(`n${id}.useSelector`, [ + `() => `, + ...genExpression(selector, context), + ]), + ) + } + + const blockFn = context.withId(() => { + const frag: CodeFragment[] = [] + frag.push('(', ...args, ') => {', INDENT_START) + if (selectorPatterns.length || keyOnlyBindingPatterns.length) { + frag.push( + ...genBlockContent(render, context, false, () => { + const patternFrag: CodeFragment[] = [] + + for (let i = 0; i < selectorPatterns.length; i++) { + const { effect } = selectorPatterns[i] + patternFrag.push( + NEWLINE, + `_selector${id}_${i}(() => {`, + INDENT_START, + ) + for (const oper of effect.operations) { + patternFrag.push(...genOperation(oper, context)) + } + patternFrag.push(INDENT_END, NEWLINE, `})`) + } + + for (const { effect } of keyOnlyBindingPatterns) { + for (const oper of effect.operations) { + patternFrag.push(...genOperation(oper, context)) + } + } + + return patternFrag + }), + ) + } else { + frag.push(...genBlockContent(render, context)) + } + frag.push(INDENT_END, NEWLINE, '}') + return frag + }, idMap) exitScope() let flags = 0 @@ -103,6 +174,7 @@ export function genFor( flags ? String(flags) : undefined, // todo: hydrationNode ), + ...patternFrag, ] // construct a id -> accessor path map. @@ -234,3 +306,223 @@ export function genFor( return idMap } } + +function matchPatterns( + render: BlockIRNode, + keyProp: SimpleExpressionNode | undefined, + idMap: Record, +) { + const selectorPatterns: NonNullable< + ReturnType + >[] = [] + const keyOnlyBindingPatterns: NonNullable< + ReturnType + >[] = [] + + render.effect = render.effect.filter(effect => { + if (keyProp !== undefined) { + const selector = matchSelectorPattern(effect, keyProp.ast, idMap) + if (selector) { + selectorPatterns.push(selector) + return false + } + const keyOnly = matchKeyOnlyBindingPattern(effect, keyProp.ast) + if (keyOnly) { + keyOnlyBindingPatterns.push(keyOnly) + return false + } + } + + return true + }) + + return { + keyOnlyBindingPatterns, + selectorPatterns, + } +} + +function matchKeyOnlyBindingPattern( + effect: IREffect, + keyAst: any, +): + | { + effect: IREffect + } + | undefined { + // TODO: expressions can be multiple? + if (effect.expressions.length === 1) { + const ast = effect.expressions[0].ast + if (typeof ast === 'object' && ast !== null) { + if (isKeyOnlyBinding(ast, keyAst)) { + return { effect } + } + } + } +} + +function matchSelectorPattern( + effect: IREffect, + keyAst: any, + idMap: Record, +): + | { + effect: IREffect + selector: SimpleExpressionNode + } + | undefined { + // TODO: expressions can be multiple? + if (effect.expressions.length === 1) { + const ast = effect.expressions[0].ast + if (typeof ast === 'object' && ast) { + const matcheds: [key: Expression, selector: Expression][] = [] + + walk(ast, { + enter(node) { + if ( + typeof node === 'object' && + node && + node.type === 'BinaryExpression' && + node.operator === '===' && + node.left.type !== 'PrivateName' + ) { + const { left, right } = node + for (const [a, b] of [ + [left, right], + [right, left], + ]) { + const aIsKey = isKeyOnlyBinding(a, keyAst) + const bIsKey = isKeyOnlyBinding(b, keyAst) + const bVars = analyzeVariableScopes(b, idMap) + if (aIsKey && !bIsKey && !bVars.locals.length) { + matcheds.push([a, b]) + } + } + } + }, + }) + + if (matcheds.length === 1) { + const [key, selector] = matcheds[0] + const content = effect.expressions[0].content + + let hasExtraId = false + const parentStackMap = new Map() + const parentStack: Node[] = [] + walkIdentifiers( + ast, + id => { + if (id.start !== key.start && id.start !== selector.start) { + hasExtraId = true + } + parentStackMap.set(id, parentStack.slice()) + }, + false, + parentStack, + ) + + if (!hasExtraId) { + const name = content.slice(selector.start! - 1, selector.end! - 1) + return { + effect, + // @ts-expect-error + selector: { + content: name, + ast: extend({}, selector, { + start: 1, + end: name.length + 1, + }), + loc: selector.loc as any, + isStatic: false, + }, + } + } + } + } + + const content = effect.expressions[0].content + if ( + typeof ast === 'object' && + ast && + ast.type === 'ConditionalExpression' && + ast.test.type === 'BinaryExpression' && + ast.test.operator === '===' && + ast.test.left.type !== 'PrivateName' && + isStaticNode(ast.consequent) && + isStaticNode(ast.alternate) + ) { + const left = ast.test.left + const right = ast.test.right + for (const [a, b] of [ + [left, right], + [right, left], + ]) { + const aIsKey = isKeyOnlyBinding(a, keyAst) + const bIsKey = isKeyOnlyBinding(b, keyAst) + const bVars = analyzeVariableScopes(b, idMap) + if (aIsKey && !bIsKey && !bVars.locals.length) { + return { + effect, + // @ts-expect-error + selector: { + content: content.slice(b.start! - 1, b.end! - 1), + ast: b, + loc: b.loc as any, + isStatic: false, + }, + } + } + } + } + } +} + +function analyzeVariableScopes( + ast: Node, + idMap: Record, +) { + let globals: string[] = [] + let locals: string[] = [] + + const ids: Identifier[] = [] + const parentStackMap = new Map() + const parentStack: Node[] = [] + walkIdentifiers( + ast, + id => { + ids.push(id) + parentStackMap.set(id, parentStack.slice()) + }, + false, + parentStack, + ) + + for (const id of ids) { + if (isGloballyAllowed(id.name)) { + continue + } + if (idMap[id.name]) { + locals.push(id.name) + } else { + globals.push(id.name) + } + } + + return { globals, locals } +} + +function isKeyOnlyBinding(expr: Node, keyAst: any) { + let only = true + walk(expr, { + enter(node) { + if (isNodesEquivalent(node, keyAst)) { + this.skip() + return + } + if (node.type === 'Identifier') { + only = false + } + }, + }) + return only +} diff --git a/packages/compiler-vapor/src/generators/operation.ts b/packages/compiler-vapor/src/generators/operation.ts index 4247bc6feca..c84d73b3164 100644 --- a/packages/compiler-vapor/src/generators/operation.ts +++ b/packages/compiler-vapor/src/generators/operation.ts @@ -98,17 +98,20 @@ export function genOperation( export function genEffects( effects: IREffect[], context: CodegenContext, + genExtraFrag?: () => CodeFragment[], ): CodeFragment[] { const { helper, block: { expressions }, } = context const [frag, push, unshift] = buildCodeFragment() + const shouldDeclare = genExtraFrag === undefined let operationsCount = 0 - const { ids, frag: declarationFrags } = processExpressions( - context, - expressions, - ) + const { + ids, + frag: declarationFrags, + varNames, + } = processExpressions(context, expressions, shouldDeclare) push(...declarationFrags) for (let i = 0; i < effects.length; i++) { const effect = effects[i] @@ -125,6 +128,9 @@ export function genEffects( if (newLineCount > 1 || operationsCount > 1 || declarationFrags.length > 0) { unshift(`{`, INDENT_START, NEWLINE) push(INDENT_END, NEWLINE, '}') + if (!effects.length) { + unshift(NEWLINE) + } } if (effects.length) { @@ -132,6 +138,14 @@ export function genEffects( push(`)`) } + if (!shouldDeclare && varNames.length) { + unshift(NEWLINE, `let `, varNames.join(', ')) + } + + if (genExtraFrag) { + push(...context.withId(genExtraFrag, ids)) + } + return frag } diff --git a/packages/runtime-vapor/__tests__/for.spec.ts b/packages/runtime-vapor/__tests__/for.spec.ts index 7ba6023b1e9..02120002607 100644 --- a/packages/runtime-vapor/__tests__/for.spec.ts +++ b/packages/runtime-vapor/__tests__/for.spec.ts @@ -94,7 +94,7 @@ describe('createFor', () => { }) return span }, - item => item.name, + item => item, ) return n1 }).render() diff --git a/packages/runtime-vapor/src/apiCreateFor.ts b/packages/runtime-vapor/src/apiCreateFor.ts index 0cd8317532f..9d55ad29e2f 100644 --- a/packages/runtime-vapor/src/apiCreateFor.ts +++ b/packages/runtime-vapor/src/apiCreateFor.ts @@ -8,6 +8,7 @@ import { shallowReadArray, shallowRef, toReactive, + watch, } from '@vue/reactivity' import { getSequence, isArray, isObject, isString } from '@vue/shared' import { createComment, createTextNode } from './dom/node' @@ -78,12 +79,18 @@ export const createFor = ( let oldBlocks: ForBlock[] = [] let newBlocks: ForBlock[] let parent: ParentNode | undefined | null + // useSelector only + let currentKey: any // TODO handle this in hydration const parentAnchor = __DEV__ ? createComment('for') : createTextNode() const frag = new VaporFragment(oldBlocks) const instance = currentInstance! - const canUseFastRemove = flags & VaporVForFlags.FAST_REMOVE - const isComponent = flags & VaporVForFlags.IS_COMPONENT + const canUseFastRemove = !!(flags & VaporVForFlags.FAST_REMOVE) + const isComponent = !!(flags & VaporVForFlags.IS_COMPONENT) + const selectors: { + deregister: (key: any) => void + cleanup: () => void + }[] = [] if (__DEV__ && !instance) { warn('createFor() can only be used inside setup()') @@ -111,9 +118,12 @@ export const createFor = ( } } else if (!newLength) { // fast path for clearing all + for (const selector of selectors) { + selector.cleanup() + } const doRemove = !canUseFastRemove for (let i = 0; i < oldLength; i++) { - unmount(oldBlocks[i], doRemove) + unmount(oldBlocks[i], doRemove, false) } if (canUseFastRemove) { parent!.textContent = '' @@ -353,9 +363,18 @@ export const createFor = ( } } - const unmount = ({ nodes, scope }: ForBlock, doRemove = true) => { - scope && scope.stop() - doRemove && removeBlock(nodes, parent!) + const unmount = (block: ForBlock, doRemove = true, doDeregister = true) => { + if (!isComponent) { + block.scope!.stop() + } + if (doRemove) { + removeBlock(block.nodes, parent!) + } + if (doDeregister) { + for (const selector of selectors) { + selector.deregister(block.key) + } + } } if (flags & VaporVForFlags.ONCE) { @@ -368,7 +387,59 @@ export const createFor = ( insert(frag, _insertionParent, _insertionAnchor) } + // @ts-expect-error + frag.useSelector = useSelector + return frag + + function useSelector(source: () => any): (key: any, cb: () => void) => void { + let operMap = new Map void)[]>() + let activeKey = source() + let activeOpers: (() => void)[] | undefined + + watch(source, newValue => { + if (activeOpers !== undefined) { + for (const oper of activeOpers) { + oper() + } + } + activeOpers = operMap.get(newValue) + if (activeOpers !== undefined) { + for (const oper of activeOpers) { + oper() + } + } + }) + + selectors.push({ deregister, cleanup }) + return register + + function cleanup() { + operMap = new Map() + activeOpers = undefined + } + + function register(oper: () => void) { + oper() + let opers = operMap.get(currentKey) + if (opers !== undefined) { + opers.push(oper) + } else { + opers = [oper] + operMap.set(currentKey, opers) + if (currentKey === activeKey) { + activeOpers = opers + } + } + } + + function deregister(key: any) { + operMap.delete(key) + if (key === activeKey) { + activeOpers = undefined + } + } + } } export function createForSlots( diff --git a/rollup.config.js b/rollup.config.js index 7f2ecb8c864..1fa345f87fc 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -314,6 +314,7 @@ function createConfig(format, output, plugins = []) { const treeShakenDeps = [ 'source-map-js', '@babel/parser', + '@babel/types', 'estree-walker', 'entities/lib/decode.js', ]