[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

chore(deps): update dependency @antfu/eslint-config to v3 (#6435)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>

authored by

renovate[bot]
renovate[bot]
Vladimir Sheremet
and committed by
GitHub
(Sep 2, 2024, 10:16 AM +0200) 84a066af c3cc4978

+735 -878
+8
eslint.config.js
··· 118 118 }, 119 119 }, 120 120 { 121 + files: [ 122 + `test/${GLOB_SRC}`, 123 + ], 124 + rules: { 125 + 'unicorn/consistent-function-scoping': 'off', 126 + }, 127 + }, 128 + { 121 129 files: [`packages/vite-node/${GLOB_SRC}`], 122 130 rules: { 123 131 // false positive on "exports" variable
+1 -1
package.json
··· 36 36 "test:browser:playwright": "pnpm -C test/browser run test:playwright" 37 37 }, 38 38 "devDependencies": { 39 - "@antfu/eslint-config": "^2.25.1", 39 + "@antfu/eslint-config": "^3.0.0", 40 40 "@antfu/ni": "^0.22.1", 41 41 "@playwright/test": "^1.46.0", 42 42 "@rollup/plugin-commonjs": "^26.0.1",
+149 -326
pnpm-lock.yaml
··· 36 36 .: 37 37 devDependencies: 38 38 '@antfu/eslint-config': 39 - specifier: ^2.25.1 40 - version: 2.25.1(@typescript-eslint/utils@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(@vue/compiler-sfc@3.4.37)(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vitest@packages+vitest) 39 + specifier: ^3.0.0 40 + version: 3.0.0(@typescript-eslint/utils@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(@vue/compiler-sfc@3.4.37)(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vitest@packages+vitest) 41 41 '@antfu/ni': 42 42 specifier: ^0.22.1 43 43 version: 0.22.1 ··· 1580 1580 resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} 1581 1581 engines: {node: '>=6.0.0'} 1582 1582 1583 - '@antfu/eslint-config@2.25.1': 1584 - resolution: {integrity: sha512-aWnq8kNL4MM3RjXJtMvCGhzzXiukbNn4oXT3RFVgQ2KkBmryrlCos8HW7zfF27gggSqrMX8p75wHk8zM/Mo9+Q==} 1583 + '@antfu/eslint-config@3.0.0': 1584 + resolution: {integrity: sha512-3HC35LrsW5kvHyVY2U6yat3Uz20/9Re5137LAKqAtl2tKictef2CmdYk5z+qK4UsaY32MMfg98MhuBbvAvZF1w==} 1585 1585 hasBin: true 1586 1586 peerDependencies: 1587 1587 '@eslint-react/eslint-plugin': ^1.5.8 1588 1588 '@prettier/plugin-xml': ^3.4.1 1589 1589 '@unocss/eslint-plugin': '>=0.50.0' 1590 1590 astro-eslint-parser: ^1.0.2 1591 - eslint: '>=8.40.0' 1591 + eslint: ^9.5.0 1592 1592 eslint-plugin-astro: ^1.2.0 1593 1593 eslint-plugin-format: '>=0.1.0' 1594 1594 eslint-plugin-react-hooks: ^4.6.0 ··· 1628 1628 1629 1629 '@antfu/install-pkg@0.1.1': 1630 1630 resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==} 1631 - 1632 - '@antfu/install-pkg@0.3.4': 1633 - resolution: {integrity: sha512-xmYFuDsaS5hlqVSJYVIzBGnUBhZR6NpwelQx/qr9wHTenqMF14YhsexWADcFyMCKwf/vApnvLTfEEnaOBvo5SA==} 1634 1631 1635 1632 '@antfu/install-pkg@0.4.1': 1636 1633 resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==} ··· 2487 2484 resolution: {integrity: sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==} 2488 2485 engines: {node: '>=16'} 2489 2486 2490 - '@es-joy/jsdoccomment@0.46.0': 2491 - resolution: {integrity: sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==} 2487 + '@es-joy/jsdoccomment@0.48.0': 2488 + resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==} 2492 2489 engines: {node: '>=16'} 2493 2490 2494 2491 '@esbuild/aix-ppc64@0.19.11': ··· 2911 2908 cpu: [x64] 2912 2909 os: [win32] 2913 2910 2911 + '@eslint-community/eslint-plugin-eslint-comments@4.4.0': 2912 + resolution: {integrity: sha512-yljsWl5Qv3IkIRmJ38h3NrHXFCm4EUl55M8doGTF6hvzvFF8kRpextgSrg2dwHev9lzBZyafCr9RelGIyQm6fw==} 2913 + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} 2914 + peerDependencies: 2915 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 2916 + 2914 2917 '@eslint-community/eslint-utils@4.4.0': 2915 2918 resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} 2916 2919 engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} ··· 2920 2923 '@eslint-community/regexpp@4.11.0': 2921 2924 resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} 2922 2925 engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} 2926 + 2927 + '@eslint/compat@1.1.1': 2928 + resolution: {integrity: sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA==} 2929 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 2923 2930 2924 2931 '@eslint/config-array@0.17.1': 2925 2932 resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} ··· 3366 3373 '@solidjs/router': '>=0.6.0' 3367 3374 solid-js: '>=1.0.0' 3368 3375 3369 - '@stylistic/eslint-plugin-js@2.6.2': 3370 - resolution: {integrity: sha512-wCr/kVctAPayMU3pcOI1MKR7MoKIh6VKZU89lPklAqtJoxT+Em6RueiiARbpznUYG5eg3LymiU+aMD+aIZXdqA==} 3371 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3372 - peerDependencies: 3373 - eslint: '>=8.40.0' 3374 - 3375 - '@stylistic/eslint-plugin-jsx@2.6.2': 3376 - resolution: {integrity: sha512-dSXK/fSPA938J1fBi10QmhzLKtZ/2TuyVNHQMk8jUhWfKJDleAogaSqcWNAbN8fwcoe9UWmt/3StiIf2oYC1aQ==} 3377 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3378 - peerDependencies: 3379 - eslint: '>=8.40.0' 3380 - 3381 - '@stylistic/eslint-plugin-plus@2.6.2': 3382 - resolution: {integrity: sha512-cANcPASfRvq3VTbbQCrSIXq+2AI0IW68PNYaZoXXS0ENlp7HDB8dmrsJnOgWCcoEvdCB8z/eWcG/eq/v5Qcl+Q==} 3383 - peerDependencies: 3384 - eslint: '*' 3385 - 3386 - '@stylistic/eslint-plugin-ts@2.6.2': 3387 - resolution: {integrity: sha512-6OEN3VtUNxjgOvWPavnC10MByr1H4zsgwNND3rQXr5lDFv93MLUnTsH+/SH15OkuqdyJgrQILI6b9lYecb1vIg==} 3388 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3389 - peerDependencies: 3390 - eslint: '>=8.40.0' 3391 - 3392 - '@stylistic/eslint-plugin@2.6.2': 3393 - resolution: {integrity: sha512-Ic5oFNM/25iuagob6LiIBkSI/A2y45TsyKtDtODXHRZDy52WfPfeexI6r+OH5+aWN9QGob2Bw+4JRM9/4areWw==} 3376 + '@stylistic/eslint-plugin@2.7.2': 3377 + resolution: {integrity: sha512-3DVLU5HEuk2pQoBmXJlzvrxbKNpu2mJ0SRqz5O/CJjyNCr12ZiPcYMEtuArTyPOk5i7bsAU44nywh1rGfe3gKQ==} 3394 3378 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3395 3379 peerDependencies: 3396 3380 eslint: '>=8.40.0' ··· 3636 3620 '@types/eslint@9.6.0': 3637 3621 resolution: {integrity: sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==} 3638 3622 3623 + '@types/eslint@9.6.1': 3624 + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} 3625 + 3639 3626 '@types/estree@0.0.39': 3640 3627 resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} 3641 3628 ··· 3810 3797 '@types/yauzl@2.10.3': 3811 3798 resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} 3812 3799 3813 - '@typescript-eslint/eslint-plugin@8.0.1': 3814 - resolution: {integrity: sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==} 3800 + '@typescript-eslint/eslint-plugin@8.3.0': 3801 + resolution: {integrity: sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==} 3815 3802 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3816 3803 peerDependencies: 3817 3804 '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 ··· 3821 3808 typescript: 3822 3809 optional: true 3823 3810 3824 - '@typescript-eslint/parser@8.0.1': 3825 - resolution: {integrity: sha512-5IgYJ9EO/12pOUwiBKFkpU7rS3IU21mtXzB81TNwq2xEybcmAZrE9qwDtsb5uQd9aVO9o0fdabFyAmKveXyujg==} 3811 + '@typescript-eslint/parser@8.3.0': 3812 + resolution: {integrity: sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==} 3826 3813 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3827 3814 peerDependencies: 3828 3815 eslint: ^8.57.0 || ^9.0.0 ··· 3831 3818 typescript: 3832 3819 optional: true 3833 3820 3834 - '@typescript-eslint/scope-manager@7.18.0': 3835 - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} 3836 - engines: {node: ^18.18.0 || >=20.0.0} 3837 - 3838 - '@typescript-eslint/scope-manager@8.0.0': 3839 - resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==} 3821 + '@typescript-eslint/scope-manager@8.3.0': 3822 + resolution: {integrity: sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==} 3840 3823 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3841 3824 3842 - '@typescript-eslint/scope-manager@8.0.1': 3843 - resolution: {integrity: sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==} 3844 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3845 - 3846 - '@typescript-eslint/type-utils@8.0.1': 3847 - resolution: {integrity: sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==} 3825 + '@typescript-eslint/type-utils@8.3.0': 3826 + resolution: {integrity: sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==} 3848 3827 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3849 3828 peerDependencies: 3850 3829 typescript: '*' ··· 3856 3835 resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} 3857 3836 engines: {node: ^18.18.0 || >=20.0.0} 3858 3837 3859 - '@typescript-eslint/types@8.0.0': 3860 - resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==} 3838 + '@typescript-eslint/types@8.3.0': 3839 + resolution: {integrity: sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==} 3861 3840 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3862 3841 3863 - '@typescript-eslint/types@8.0.1': 3864 - resolution: {integrity: sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==} 3865 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3866 - 3867 - '@typescript-eslint/typescript-estree@7.18.0': 3868 - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} 3869 - engines: {node: ^18.18.0 || >=20.0.0} 3870 - peerDependencies: 3871 - typescript: '*' 3872 - peerDependenciesMeta: 3873 - typescript: 3874 - optional: true 3875 - 3876 - '@typescript-eslint/typescript-estree@8.0.0': 3877 - resolution: {integrity: sha512-5b97WpKMX+Y43YKi4zVcCVLtK5F98dFls3Oxui8LbnmRsseKenbbDinmvxrWegKDMmlkIq/XHuyy0UGLtpCDKg==} 3842 + '@typescript-eslint/typescript-estree@8.3.0': 3843 + resolution: {integrity: sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==} 3878 3844 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3879 3845 peerDependencies: 3880 3846 typescript: '*' ··· 3882 3848 typescript: 3883 3849 optional: true 3884 3850 3885 - '@typescript-eslint/typescript-estree@8.0.1': 3886 - resolution: {integrity: sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==} 3887 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3888 - peerDependencies: 3889 - typescript: '*' 3890 - peerDependenciesMeta: 3891 - typescript: 3892 - optional: true 3893 - 3894 - '@typescript-eslint/utils@7.18.0': 3895 - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} 3896 - engines: {node: ^18.18.0 || >=20.0.0} 3897 - peerDependencies: 3898 - eslint: ^8.56.0 3899 - 3900 - '@typescript-eslint/utils@8.0.0': 3901 - resolution: {integrity: sha512-k/oS/A/3QeGLRvOWCg6/9rATJL5rec7/5s1YmdS0ZU6LHveJyGFwBvLhSRBv6i9xaj7etmosp+l+ViN1I9Aj/Q==} 3851 + '@typescript-eslint/utils@8.3.0': 3852 + resolution: {integrity: sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==} 3902 3853 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3903 3854 peerDependencies: 3904 3855 eslint: ^8.57.0 || ^9.0.0 3905 3856 3906 - '@typescript-eslint/utils@8.0.1': 3907 - resolution: {integrity: sha512-CBFR0G0sCt0+fzfnKaciu9IBsKvEKYwN9UZ+eeogK1fYHg4Qxk1yf/wLQkLXlq8wbU2dFlgAesxt8Gi76E8RTA==} 3908 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3909 - peerDependencies: 3910 - eslint: ^8.57.0 || ^9.0.0 3911 - 3912 - '@typescript-eslint/visitor-keys@7.18.0': 3913 - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} 3914 - engines: {node: ^18.18.0 || >=20.0.0} 3915 - 3916 - '@typescript-eslint/visitor-keys@8.0.0': 3917 - resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==} 3918 - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3919 - 3920 - '@typescript-eslint/visitor-keys@8.0.1': 3921 - resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==} 3857 + '@typescript-eslint/visitor-keys@8.3.0': 3858 + resolution: {integrity: sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==} 3922 3859 engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 3923 3860 3924 3861 '@typescript/vfs@1.5.0': ··· 4068 4005 webdriverio: 4069 4006 optional: true 4070 4007 4071 - '@vitest/eslint-plugin@1.0.1': 4072 - resolution: {integrity: sha512-albpL56cL9XMwHJWCWZqjDxkuDkBXBF3WpPGOv6q2WA3cipCP41cKEwfSGktoRNGmPN77wuX452O8pM+z+ApNw==} 4008 + '@vitest/eslint-plugin@1.1.0': 4009 + resolution: {integrity: sha512-Ur80Y27Wbw8gFHJ3cv6vypcjXmrx6QHfw+q435h6Q2L+tf+h4Xf5pJTCL4YU/Jps9EVeggQxS85OcUZU7sdXRw==} 4073 4010 peerDependencies: 4074 4011 '@typescript-eslint/utils': '>= 8.0' 4075 4012 eslint: '>= 8.57.0' ··· 5562 5499 peerDependencies: 5563 5500 eslint: '>=6.0.0' 5564 5501 5565 - eslint-config-flat-gitignore@0.1.8: 5566 - resolution: {integrity: sha512-OEUbS2wzzYtUfshjOqzFo4Bl4lHykXUdM08TCnYNl7ki+niW4Q1R0j0FDFDr0vjVsI5ZFOz5LvluxOP+Ew+dYw==} 5502 + eslint-config-flat-gitignore@0.3.0: 5503 + resolution: {integrity: sha512-0Ndxo4qGhcewjTzw52TK06Mc00aDtHNTdeeW2JfONgDcLkRO/n/BteMRzNVpLQYxdCC/dFEilfM9fjjpGIJ9Og==} 5504 + peerDependencies: 5505 + eslint: ^9.5.0 5567 5506 5568 - eslint-flat-config-utils@0.3.0: 5569 - resolution: {integrity: sha512-FaFQLUunAl6YK7aU/pT23DXYVWg/cEHbSfxwAxpCGT6Su8H9RfkmzKLh1G2bba46p6dTlQeA4VTiV5//0SeToQ==} 5507 + eslint-flat-config-utils@0.3.1: 5508 + resolution: {integrity: sha512-eFT3EaoJN1hlN97xw4FIEX//h0TiFUobgl2l5uLkIwhVN9ahGq95Pbs+i1/B5UACA78LO3rco3JzuvxLdTUOPA==} 5570 5509 5571 5510 eslint-import-resolver-node@0.3.9: 5572 5511 resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} ··· 5576 5515 peerDependencies: 5577 5516 eslint: '*' 5578 5517 5579 - eslint-plugin-antfu@2.3.4: 5580 - resolution: {integrity: sha512-5RIjJpBK1tuNHuLyFyZ90/iW9s439dP1u2cxA4dH70djx9sKq1CqI+O6Q95aVjgFNTDtQzSC9uYdAD5uEEKciQ==} 5518 + eslint-plugin-antfu@2.3.6: 5519 + resolution: {integrity: sha512-31VwbU1Yd4BFNUUPQEazKyP79f3c+ohJtq5iZIuw38JjkRQdQAcF/31Kjr0DOKZXVDkeeNPrttKidrr3xhnhOA==} 5581 5520 peerDependencies: 5582 5521 eslint: '*' 5583 5522 ··· 5592 5531 peerDependencies: 5593 5532 eslint: '>=8' 5594 5533 5595 - eslint-plugin-eslint-comments@3.2.0: 5596 - resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} 5597 - engines: {node: '>=6.5.0'} 5534 + eslint-plugin-import-x@4.1.1: 5535 + resolution: {integrity: sha512-dBEM8fACIFNt4H7GoOaRmnH6evJW6JSTJTYYgmRd3vI4geBTjgDM/JyUDKUwIw0HDSyI+u7Vs3vFRXUo/BOAtA==} 5536 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 5598 5537 peerDependencies: 5599 - eslint: '>=4.19.1' 5538 + eslint: ^8.57.0 || ^9.0.0 5600 5539 5601 - eslint-plugin-import-x@3.1.0: 5602 - resolution: {integrity: sha512-/UbPA+bYY7nIxcjL3kpcDY3UNdoLHFhyBFzHox2M0ypcUoueTn6woZUUmzzi5et/dXChksasYYFeKE2wshOrhg==} 5603 - engines: {node: '>=16'} 5604 - peerDependencies: 5605 - eslint: ^8.56.0 || ^9.0.0-0 5606 - 5607 - eslint-plugin-jsdoc@50.0.1: 5608 - resolution: {integrity: sha512-UayhAysIk1Du8InV27WMbV4AMSJSu60+bekmeuGK2OUy4QJSFPr1srYT6AInykGkmMdRuHfDX6Q0tJEr8BtDtg==} 5540 + eslint-plugin-jsdoc@50.2.2: 5541 + resolution: {integrity: sha512-i0ZMWA199DG7sjxlzXn5AeYZxpRfMJjDPUl7lL9eJJX8TPRoIaxJU4ys/joP5faM5AXE1eqW/dslCj3uj4Nqpg==} 5609 5542 engines: {node: '>=18'} 5610 5543 peerDependencies: 5611 5544 eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 ··· 5628 5561 peerDependencies: 5629 5562 eslint: '>=8.23.0' 5630 5563 5631 - eslint-plugin-no-only-tests@3.1.0: 5632 - resolution: {integrity: sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==} 5564 + eslint-plugin-no-only-tests@3.3.0: 5565 + resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==} 5633 5566 engines: {node: '>=5.0.0'} 5634 5567 5635 - eslint-plugin-perfectionist@3.1.3: 5636 - resolution: {integrity: sha512-eFRkBvMnnHjle5MuqTzoTIukWIr7Gm2wXvhTj3HyT/ku2J5oj7quBRbvZ8iYkjPyUFBpir3ZBnVQ5vFYswvpQg==} 5568 + eslint-plugin-perfectionist@3.3.0: 5569 + resolution: {integrity: sha512-sGgShkEqDBqIZ3WlenGHwLe1cl3vHKTfeh9b1XXAamaxSC7AY4Os0jdNCXnGJW4l0TlpismT5t2r7CXY7sfKlw==} 5637 5570 engines: {node: ^18.0.0 || >=20.0.0} 5638 5571 peerDependencies: 5639 5572 astro-eslint-parser: ^1.0.2 ··· 6169 6102 globby@10.0.1: 6170 6103 resolution: {integrity: sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==} 6171 6104 engines: {node: '>=8'} 6172 - 6173 - globby@11.1.0: 6174 - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} 6175 - engines: {node: '>=10'} 6176 6105 6177 6106 globrex@0.1.2: 6178 6107 resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} ··· 6720 6649 6721 6650 jsdoc-type-pratt-parser@4.0.0: 6722 6651 resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} 6652 + engines: {node: '>=12.0.0'} 6653 + 6654 + jsdoc-type-pratt-parser@4.1.0: 6655 + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} 6723 6656 engines: {node: '>=12.0.0'} 6724 6657 6725 6658 jsdom@24.0.0: ··· 8633 8566 tinybench@2.9.0: 8634 8567 resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} 8635 8568 8636 - tinyexec@0.1.4: 8637 - resolution: {integrity: sha512-Ba2ELcNnnWkgqnAJBouhcsDsYitbD9LIAVNSz3746u50f+tlF3wO0uB3uqyz8NHFSTpv23qtT47XGDw8pXW5DA==} 8638 - 8639 8569 tinyexec@0.3.0: 8640 8570 resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} 8641 8571 ··· 8742 8672 8743 8673 tslib@2.6.2: 8744 8674 resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} 8675 + 8676 + tslib@2.7.0: 8677 + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} 8745 8678 8746 8679 tsx@4.17.0: 8747 8680 resolution: {integrity: sha512-eN4mnDA5UMKDt4YZixo9tBioibaMBpoxBkD+rIPAjVmYERSG0/dWEY1CEFuV89CgASlKL499q8AhmkMnnjtOJg==} ··· 9717 9650 '@jridgewell/gen-mapping': 0.3.5 9718 9651 '@jridgewell/trace-mapping': 0.3.25 9719 9652 9720 - '@antfu/eslint-config@2.25.1(@typescript-eslint/utils@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(@vue/compiler-sfc@3.4.37)(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vitest@packages+vitest)': 9653 + '@antfu/eslint-config@3.0.0(@typescript-eslint/utils@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(@vue/compiler-sfc@3.4.37)(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vitest@packages+vitest)': 9721 9654 dependencies: 9722 - '@antfu/install-pkg': 0.3.4 9655 + '@antfu/install-pkg': 0.4.1 9723 9656 '@clack/prompts': 0.7.0 9724 - '@stylistic/eslint-plugin': 2.6.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9725 - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9726 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9727 - '@vitest/eslint-plugin': 1.0.1(@typescript-eslint/utils@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vitest@packages+vitest) 9657 + '@eslint-community/eslint-plugin-eslint-comments': 4.4.0(eslint@9.9.0(jiti@1.21.6)) 9658 + '@stylistic/eslint-plugin': 2.7.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9659 + '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9660 + '@typescript-eslint/parser': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9661 + '@vitest/eslint-plugin': 1.1.0(@typescript-eslint/utils@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vitest@packages+vitest) 9728 9662 eslint: 9.9.0(jiti@1.21.6) 9729 - eslint-config-flat-gitignore: 0.1.8 9730 - eslint-flat-config-utils: 0.3.0 9663 + eslint-config-flat-gitignore: 0.3.0(eslint@9.9.0(jiti@1.21.6)) 9664 + eslint-flat-config-utils: 0.3.1 9731 9665 eslint-merge-processors: 0.1.0(eslint@9.9.0(jiti@1.21.6)) 9732 - eslint-plugin-antfu: 2.3.4(eslint@9.9.0(jiti@1.21.6)) 9666 + eslint-plugin-antfu: 2.3.6(eslint@9.9.0(jiti@1.21.6)) 9733 9667 eslint-plugin-command: 0.2.3(eslint@9.9.0(jiti@1.21.6)) 9734 - eslint-plugin-eslint-comments: 3.2.0(eslint@9.9.0(jiti@1.21.6)) 9735 - eslint-plugin-import-x: 3.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9736 - eslint-plugin-jsdoc: 50.0.1(eslint@9.9.0(jiti@1.21.6)) 9668 + eslint-plugin-import-x: 4.1.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 9669 + eslint-plugin-jsdoc: 50.2.2(eslint@9.9.0(jiti@1.21.6)) 9737 9670 eslint-plugin-jsonc: 2.16.0(eslint@9.9.0(jiti@1.21.6)) 9738 9671 eslint-plugin-markdown: 5.1.0(eslint@9.9.0(jiti@1.21.6)) 9739 9672 eslint-plugin-n: 17.10.2(eslint@9.9.0(jiti@1.21.6)) 9740 - eslint-plugin-no-only-tests: 3.1.0 9741 - eslint-plugin-perfectionist: 3.1.3(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))) 9673 + eslint-plugin-no-only-tests: 3.3.0 9674 + eslint-plugin-perfectionist: 3.3.0(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))) 9742 9675 eslint-plugin-regexp: 2.6.0(eslint@9.9.0(jiti@1.21.6)) 9743 9676 eslint-plugin-toml: 0.11.1(eslint@9.9.0(jiti@1.21.6)) 9744 9677 eslint-plugin-unicorn: 55.0.0(eslint@9.9.0(jiti@1.21.6)) 9745 - eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6)) 9678 + eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6)) 9746 9679 eslint-plugin-vue: 9.27.0(eslint@9.9.0(jiti@1.21.6)) 9747 9680 eslint-plugin-yml: 1.14.0(eslint@9.9.0(jiti@1.21.6)) 9748 9681 eslint-processor-vue-blocks: 0.1.2(@vue/compiler-sfc@3.4.37)(eslint@9.9.0(jiti@1.21.6)) ··· 9767 9700 dependencies: 9768 9701 execa: 5.1.1 9769 9702 find-up: 5.0.0 9770 - 9771 - '@antfu/install-pkg@0.3.4': 9772 - dependencies: 9773 - tinyexec: 0.1.4 9774 9703 9775 9704 '@antfu/install-pkg@0.4.1': 9776 9705 dependencies: ··· 11024 10953 esquery: 1.6.0 11025 10954 jsdoc-type-pratt-parser: 4.0.0 11026 10955 11027 - '@es-joy/jsdoccomment@0.46.0': 10956 + '@es-joy/jsdoccomment@0.48.0': 11028 10957 dependencies: 11029 10958 comment-parser: 1.4.1 11030 10959 esquery: 1.6.0 11031 - jsdoc-type-pratt-parser: 4.0.0 10960 + jsdoc-type-pratt-parser: 4.1.0 11032 10961 11033 10962 '@esbuild/aix-ppc64@0.19.11': 11034 10963 optional: true ··· 11240 11169 '@esbuild/win32-x64@0.23.0': 11241 11170 optional: true 11242 11171 11172 + '@eslint-community/eslint-plugin-eslint-comments@4.4.0(eslint@9.9.0(jiti@1.21.6))': 11173 + dependencies: 11174 + escape-string-regexp: 4.0.0 11175 + eslint: 9.9.0(jiti@1.21.6) 11176 + ignore: 5.3.1 11177 + 11243 11178 '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0(jiti@1.21.6))': 11244 11179 dependencies: 11245 11180 eslint: 9.9.0(jiti@1.21.6) 11246 11181 eslint-visitor-keys: 3.4.3 11247 11182 11248 11183 '@eslint-community/regexpp@4.11.0': {} 11184 + 11185 + '@eslint/compat@1.1.1': {} 11249 11186 11250 11187 '@eslint/config-array@0.17.1': 11251 11188 dependencies: ··· 11757 11694 '@testing-library/dom': 9.3.4 11758 11695 solid-js: 1.8.3 11759 11696 11760 - '@stylistic/eslint-plugin-js@2.6.2(eslint@9.9.0(jiti@1.21.6))': 11697 + '@stylistic/eslint-plugin@2.7.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 11761 11698 dependencies: 11762 - '@types/eslint': 9.6.0 11763 - acorn: 8.11.3(patch_hash=no36qihqjrd3chyjw73dk5xfkm) 11699 + '@types/eslint': 9.6.1 11700 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 11764 11701 eslint: 9.9.0(jiti@1.21.6) 11765 11702 eslint-visitor-keys: 4.0.0 11766 11703 espree: 10.1.0 11767 - 11768 - '@stylistic/eslint-plugin-jsx@2.6.2(eslint@9.9.0(jiti@1.21.6))': 11769 - dependencies: 11770 - '@stylistic/eslint-plugin-js': 2.6.2(eslint@9.9.0(jiti@1.21.6)) 11771 - '@types/eslint': 9.6.0 11772 - eslint: 9.9.0(jiti@1.21.6) 11773 11704 estraverse: 5.3.0 11774 11705 picomatch: 4.0.2 11775 - 11776 - '@stylistic/eslint-plugin-plus@2.6.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 11777 - dependencies: 11778 - '@types/eslint': 9.6.0 11779 - '@typescript-eslint/utils': 8.0.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 11780 - eslint: 9.9.0(jiti@1.21.6) 11781 - transitivePeerDependencies: 11782 - - supports-color 11783 - - typescript 11784 - 11785 - '@stylistic/eslint-plugin-ts@2.6.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 11786 - dependencies: 11787 - '@stylistic/eslint-plugin-js': 2.6.2(eslint@9.9.0(jiti@1.21.6)) 11788 - '@types/eslint': 9.6.0 11789 - '@typescript-eslint/utils': 8.0.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 11790 - eslint: 9.9.0(jiti@1.21.6) 11791 - transitivePeerDependencies: 11792 - - supports-color 11793 - - typescript 11794 - 11795 - '@stylistic/eslint-plugin@2.6.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 11796 - dependencies: 11797 - '@stylistic/eslint-plugin-js': 2.6.2(eslint@9.9.0(jiti@1.21.6)) 11798 - '@stylistic/eslint-plugin-jsx': 2.6.2(eslint@9.9.0(jiti@1.21.6)) 11799 - '@stylistic/eslint-plugin-plus': 2.6.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 11800 - '@stylistic/eslint-plugin-ts': 2.6.2(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 11801 - '@types/eslint': 9.6.0 11802 - eslint: 9.9.0(jiti@1.21.6) 11803 11706 transitivePeerDependencies: 11804 11707 - supports-color 11805 11708 - typescript ··· 12095 11998 '@types/estree': 1.0.5 12096 11999 '@types/json-schema': 7.0.15 12097 12000 12001 + '@types/eslint@9.6.1': 12002 + dependencies: 12003 + '@types/estree': 1.0.5 12004 + '@types/json-schema': 7.0.15 12005 + 12098 12006 '@types/estree@0.0.39': {} 12099 12007 12100 12008 '@types/estree@1.0.5': {} ··· 12288 12196 '@types/node': 20.14.15 12289 12197 optional: true 12290 12198 12291 - '@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12199 + '@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12292 12200 dependencies: 12293 12201 '@eslint-community/regexpp': 4.11.0 12294 - '@typescript-eslint/parser': 8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12295 - '@typescript-eslint/scope-manager': 8.0.1 12296 - '@typescript-eslint/type-utils': 8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12297 - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12298 - '@typescript-eslint/visitor-keys': 8.0.1 12202 + '@typescript-eslint/parser': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12203 + '@typescript-eslint/scope-manager': 8.3.0 12204 + '@typescript-eslint/type-utils': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12205 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12206 + '@typescript-eslint/visitor-keys': 8.3.0 12299 12207 eslint: 9.9.0(jiti@1.21.6) 12300 12208 graphemer: 1.4.0 12301 12209 ignore: 5.3.1 ··· 12306 12214 transitivePeerDependencies: 12307 12215 - supports-color 12308 12216 12309 - '@typescript-eslint/parser@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12217 + '@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12310 12218 dependencies: 12311 - '@typescript-eslint/scope-manager': 8.0.1 12312 - '@typescript-eslint/types': 8.0.1 12313 - '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) 12314 - '@typescript-eslint/visitor-keys': 8.0.1 12219 + '@typescript-eslint/scope-manager': 8.3.0 12220 + '@typescript-eslint/types': 8.3.0 12221 + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) 12222 + '@typescript-eslint/visitor-keys': 8.3.0 12315 12223 debug: 4.3.6 12316 12224 eslint: 9.9.0(jiti@1.21.6) 12317 12225 optionalDependencies: ··· 12319 12227 transitivePeerDependencies: 12320 12228 - supports-color 12321 12229 12322 - '@typescript-eslint/scope-manager@7.18.0': 12230 + '@typescript-eslint/scope-manager@8.3.0': 12323 12231 dependencies: 12324 - '@typescript-eslint/types': 7.18.0 12325 - '@typescript-eslint/visitor-keys': 7.18.0 12232 + '@typescript-eslint/types': 8.3.0 12233 + '@typescript-eslint/visitor-keys': 8.3.0 12326 12234 12327 - '@typescript-eslint/scope-manager@8.0.0': 12235 + '@typescript-eslint/type-utils@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12328 12236 dependencies: 12329 - '@typescript-eslint/types': 8.0.0 12330 - '@typescript-eslint/visitor-keys': 8.0.0 12331 - 12332 - '@typescript-eslint/scope-manager@8.0.1': 12333 - dependencies: 12334 - '@typescript-eslint/types': 8.0.1 12335 - '@typescript-eslint/visitor-keys': 8.0.1 12336 - 12337 - '@typescript-eslint/type-utils@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12338 - dependencies: 12339 - '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) 12340 - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12237 + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) 12238 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12341 12239 debug: 4.3.6 12342 12240 ts-api-utils: 1.3.0(typescript@5.5.4) 12343 12241 optionalDependencies: ··· 12348 12246 12349 12247 '@typescript-eslint/types@7.18.0': {} 12350 12248 12351 - '@typescript-eslint/types@8.0.0': {} 12249 + '@typescript-eslint/types@8.3.0': {} 12352 12250 12353 - '@typescript-eslint/types@8.0.1': {} 12354 - 12355 - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)': 12251 + '@typescript-eslint/typescript-estree@8.3.0(typescript@5.5.4)': 12356 12252 dependencies: 12357 - '@typescript-eslint/types': 7.18.0 12358 - '@typescript-eslint/visitor-keys': 7.18.0 12253 + '@typescript-eslint/types': 8.3.0 12254 + '@typescript-eslint/visitor-keys': 8.3.0 12359 12255 debug: 4.3.6 12360 - globby: 11.1.0 12256 + fast-glob: 3.3.2 12361 12257 is-glob: 4.0.3 12362 12258 minimatch: 9.0.5 12363 12259 semver: 7.6.3 ··· 12367 12263 transitivePeerDependencies: 12368 12264 - supports-color 12369 12265 12370 - '@typescript-eslint/typescript-estree@8.0.0(typescript@5.5.4)': 12371 - dependencies: 12372 - '@typescript-eslint/types': 8.0.0 12373 - '@typescript-eslint/visitor-keys': 8.0.0 12374 - debug: 4.3.6 12375 - globby: 11.1.0 12376 - is-glob: 4.0.3 12377 - minimatch: 9.0.5 12378 - semver: 7.6.3 12379 - ts-api-utils: 1.3.0(typescript@5.5.4) 12380 - optionalDependencies: 12381 - typescript: 5.5.4 12382 - transitivePeerDependencies: 12383 - - supports-color 12384 - 12385 - '@typescript-eslint/typescript-estree@8.0.1(typescript@5.5.4)': 12386 - dependencies: 12387 - '@typescript-eslint/types': 8.0.1 12388 - '@typescript-eslint/visitor-keys': 8.0.1 12389 - debug: 4.3.6 12390 - globby: 11.1.0 12391 - is-glob: 4.0.3 12392 - minimatch: 9.0.5 12393 - semver: 7.6.3 12394 - ts-api-utils: 1.3.0(typescript@5.5.4) 12395 - optionalDependencies: 12396 - typescript: 5.5.4 12397 - transitivePeerDependencies: 12398 - - supports-color 12399 - 12400 - '@typescript-eslint/utils@7.18.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12266 + '@typescript-eslint/utils@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12401 12267 dependencies: 12402 12268 '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.6)) 12403 - '@typescript-eslint/scope-manager': 7.18.0 12404 - '@typescript-eslint/types': 7.18.0 12405 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) 12269 + '@typescript-eslint/scope-manager': 8.3.0 12270 + '@typescript-eslint/types': 8.3.0 12271 + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) 12406 12272 eslint: 9.9.0(jiti@1.21.6) 12407 12273 transitivePeerDependencies: 12408 12274 - supports-color 12409 12275 - typescript 12410 12276 12411 - '@typescript-eslint/utils@8.0.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12277 + '@typescript-eslint/visitor-keys@8.3.0': 12412 12278 dependencies: 12413 - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.6)) 12414 - '@typescript-eslint/scope-manager': 8.0.0 12415 - '@typescript-eslint/types': 8.0.0 12416 - '@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.4) 12417 - eslint: 9.9.0(jiti@1.21.6) 12418 - transitivePeerDependencies: 12419 - - supports-color 12420 - - typescript 12421 - 12422 - '@typescript-eslint/utils@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)': 12423 - dependencies: 12424 - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0(jiti@1.21.6)) 12425 - '@typescript-eslint/scope-manager': 8.0.1 12426 - '@typescript-eslint/types': 8.0.1 12427 - '@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4) 12428 - eslint: 9.9.0(jiti@1.21.6) 12429 - transitivePeerDependencies: 12430 - - supports-color 12431 - - typescript 12432 - 12433 - '@typescript-eslint/visitor-keys@7.18.0': 12434 - dependencies: 12435 - '@typescript-eslint/types': 7.18.0 12436 - eslint-visitor-keys: 3.4.3 12437 - 12438 - '@typescript-eslint/visitor-keys@8.0.0': 12439 - dependencies: 12440 - '@typescript-eslint/types': 8.0.0 12441 - eslint-visitor-keys: 3.4.3 12442 - 12443 - '@typescript-eslint/visitor-keys@8.0.1': 12444 - dependencies: 12445 - '@typescript-eslint/types': 8.0.1 12279 + '@typescript-eslint/types': 8.3.0 12446 12280 eslint-visitor-keys: 3.4.3 12447 12281 12448 12282 '@typescript/vfs@1.5.0': ··· 12671 12505 - typescript 12672 12506 - utf-8-validate 12673 12507 12674 - '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vitest@packages+vitest)': 12508 + '@vitest/eslint-plugin@1.1.0(@typescript-eslint/utils@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4)(vitest@packages+vitest)': 12675 12509 dependencies: 12676 12510 eslint: 9.9.0(jiti@1.21.6) 12677 12511 optionalDependencies: 12678 - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12512 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 12679 12513 typescript: 5.5.4 12680 12514 vitest: link:packages/vitest 12681 12515 ··· 14447 14281 eslint: 9.9.0(jiti@1.21.6) 14448 14282 semver: 7.6.3 14449 14283 14450 - eslint-config-flat-gitignore@0.1.8: 14284 + eslint-config-flat-gitignore@0.3.0(eslint@9.9.0(jiti@1.21.6)): 14451 14285 dependencies: 14286 + '@eslint/compat': 1.1.1 14287 + eslint: 9.9.0(jiti@1.21.6) 14452 14288 find-up-simple: 1.0.0 14453 - parse-gitignore: 2.0.0 14454 14289 14455 - eslint-flat-config-utils@0.3.0: 14290 + eslint-flat-config-utils@0.3.1: 14456 14291 dependencies: 14457 14292 '@types/eslint': 9.6.0 14458 14293 pathe: 1.1.2 ··· 14469 14304 dependencies: 14470 14305 eslint: 9.9.0(jiti@1.21.6) 14471 14306 14472 - eslint-plugin-antfu@2.3.4(eslint@9.9.0(jiti@1.21.6)): 14307 + eslint-plugin-antfu@2.3.6(eslint@9.9.0(jiti@1.21.6)): 14473 14308 dependencies: 14474 14309 '@antfu/utils': 0.7.10 14475 14310 eslint: 9.9.0(jiti@1.21.6) ··· 14486 14321 eslint: 9.9.0(jiti@1.21.6) 14487 14322 eslint-compat-utils: 0.1.2(eslint@9.9.0(jiti@1.21.6)) 14488 14323 14489 - eslint-plugin-eslint-comments@3.2.0(eslint@9.9.0(jiti@1.21.6)): 14324 + eslint-plugin-import-x@4.1.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4): 14490 14325 dependencies: 14491 - escape-string-regexp: 1.0.5 14492 - eslint: 9.9.0(jiti@1.21.6) 14493 - ignore: 5.3.1 14494 - 14495 - eslint-plugin-import-x@3.1.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4): 14496 - dependencies: 14497 - '@typescript-eslint/utils': 7.18.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 14326 + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) 14327 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 14498 14328 debug: 4.3.6 14499 14329 doctrine: 3.0.0 14500 14330 eslint: 9.9.0(jiti@1.21.6) ··· 14504 14334 minimatch: 9.0.5 14505 14335 semver: 7.6.3 14506 14336 stable-hash: 0.0.4 14507 - tslib: 2.6.2 14337 + tslib: 2.7.0 14508 14338 transitivePeerDependencies: 14509 14339 - supports-color 14510 14340 - typescript 14511 14341 14512 - eslint-plugin-jsdoc@50.0.1(eslint@9.9.0(jiti@1.21.6)): 14342 + eslint-plugin-jsdoc@50.2.2(eslint@9.9.0(jiti@1.21.6)): 14513 14343 dependencies: 14514 - '@es-joy/jsdoccomment': 0.46.0 14344 + '@es-joy/jsdoccomment': 0.48.0 14515 14345 are-docs-informative: 0.0.2 14516 14346 comment-parser: 1.4.1 14517 14347 debug: 4.3.6 ··· 14556 14386 minimatch: 9.0.5 14557 14387 semver: 7.6.3 14558 14388 14559 - eslint-plugin-no-only-tests@3.1.0: {} 14389 + eslint-plugin-no-only-tests@3.3.0: {} 14560 14390 14561 - eslint-plugin-perfectionist@3.1.3(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))): 14391 + eslint-plugin-perfectionist@3.3.0(eslint@9.9.0(jiti@1.21.6))(svelte@3.59.1)(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0(jiti@1.21.6))): 14562 14392 dependencies: 14563 - '@typescript-eslint/types': 8.0.1 14564 - '@typescript-eslint/utils': 8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 14393 + '@typescript-eslint/types': 8.3.0 14394 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 14565 14395 eslint: 9.9.0(jiti@1.21.6) 14566 14396 minimatch: 10.0.1 14567 14397 natural-compare-lite: 1.4.0 ··· 14613 14443 semver: 7.6.3 14614 14444 strip-indent: 3.0.0 14615 14445 14616 - eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6)): 14446 + eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6)): 14617 14447 dependencies: 14618 14448 eslint: 9.9.0(jiti@1.21.6) 14619 14449 optionalDependencies: 14620 - '@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 14450 + '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4))(eslint@9.9.0(jiti@1.21.6))(typescript@5.5.4) 14621 14451 14622 14452 eslint-plugin-vue@9.27.0(eslint@9.9.0(jiti@1.21.6)): 14623 14453 dependencies: ··· 15271 15101 merge2: 1.4.1 15272 15102 slash: 3.0.0 15273 15103 15274 - globby@11.1.0: 15275 - dependencies: 15276 - array-union: 2.1.0 15277 - dir-glob: 3.0.1 15278 - fast-glob: 3.3.2 15279 - ignore: 5.3.1 15280 - merge2: 1.4.1 15281 - slash: 3.0.0 15282 - 15283 15104 globrex@0.1.2: {} 15284 15105 15285 15106 google-auth-library@9.2.0: ··· 15853 15674 argparse: 2.0.1 15854 15675 15855 15676 jsdoc-type-pratt-parser@4.0.0: {} 15677 + 15678 + jsdoc-type-pratt-parser@4.1.0: {} 15856 15679 15857 15680 jsdom@24.0.0: 15858 15681 dependencies: ··· 18085 17908 18086 17909 tinybench@2.9.0: {} 18087 17910 18088 - tinyexec@0.1.4: {} 18089 - 18090 17911 tinyexec@0.3.0: {} 18091 17912 18092 17913 tinyglobby@0.2.0: ··· 18172 17993 tslib@2.5.3: {} 18173 17994 18174 17995 tslib@2.6.2: {} 17996 + 17997 + tslib@2.7.0: {} 18175 17998 18176 17999 tsx@4.17.0: 18177 18000 dependencies:
+3 -2
docs/api/expect.md
··· 1141 1141 1142 1142 ```ts 1143 1143 import { describe, expect, it } from 'vitest' 1144 - describe('toSatisfy()', () => { 1145 - const isOdd = (value: number) => value % 2 !== 0 1146 1144 1145 + const isOdd = (value: number) => value % 2 !== 0 1146 + 1147 + describe('toSatisfy()', () => { 1147 1148 it('pass with 0', () => { 1148 1149 expect(1).toSatisfy(isOdd) 1149 1150 })
+16 -15
packages/vitest/rollup.config.js
··· 152 152 // https://github.com/rollup/rollup/blob/master/build-plugins/generate-license-file.js 153 153 // MIT Licensed https://github.com/rollup/rollup/blob/master/LICENSE-CORE.md 154 154 const coreLicense = fs.readFileSync(resolve(dir, '../../LICENSE')) 155 - function sortLicenses(licenses) { 156 - let withParenthesis = [] 157 - let noParenthesis = [] 158 - licenses.forEach((license) => { 159 - if (/^\(/.test(license)) { 160 - withParenthesis.push(license) 161 - } 162 - else { 163 - noParenthesis.push(license) 164 - } 165 - }) 166 - withParenthesis = withParenthesis.sort() 167 - noParenthesis = noParenthesis.sort() 168 - return [...noParenthesis, ...withParenthesis] 169 - } 170 155 const licenses = new Set() 171 156 const dependencyLicenseTexts = dependencies 172 157 .filter(({ name }) => !name?.startsWith('@vitest/')) ··· 259 244 return 260 245 } 261 246 console.error(message) 247 + } 248 + 249 + function sortLicenses(licenses) { 250 + let withParenthesis = [] 251 + let noParenthesis = [] 252 + licenses.forEach((license) => { 253 + if (/^\(/.test(license)) { 254 + withParenthesis.push(license) 255 + } 256 + else { 257 + noParenthesis.push(license) 258 + } 259 + }) 260 + withParenthesis = withParenthesis.sort() 261 + noParenthesis = noParenthesis.sort() 262 + return [...noParenthesis, ...withParenthesis] 262 263 }
+4 -4
examples/lit/test/basic.test.ts
··· 3 3 import '../src/my-button.js' 4 4 5 5 describe('Button with increment', async () => { 6 - function getInsideButton(): HTMLElement | null | undefined { 7 - return document.body.querySelector('my-button')?.shadowRoot?.querySelector('button') 8 - } 9 - 10 6 beforeEach(() => { 11 7 document.body.innerHTML = '<my-button name="World"></my-button>' 12 8 }) ··· 31 27 expect(spyClick).toHaveBeenCalled() 32 28 }) 33 29 }) 30 + 31 + function getInsideButton(): HTMLElement | null | undefined { 32 + return document.body.querySelector('my-button')?.shadowRoot?.querySelector('button') 33 + }
+91 -90
packages/expect/src/jest-expect.ts
··· 209 209 = stripped === 0 210 210 ? msg 211 211 : `${msg}\n(${stripped} matching ${ 212 - stripped === 1 ? 'property' : 'properties' 213 - } omitted from actual)` 212 + stripped === 1 ? 'property' : 'properties' 213 + } omitted from actual)` 214 214 throw new AssertionError(message, { 215 215 showDiff: true, 216 216 expected, ··· 495 495 ) 496 496 }) 497 497 498 - const assertIsMock = (assertion: any) => { 498 + function assertIsMock(assertion: any) { 499 499 if (!isMockFunction(assertion._obj)) { 500 500 throw new TypeError( 501 501 `${utils.inspect(assertion._obj)} is not a spy or a call to a spy!`, 502 502 ) 503 503 } 504 504 } 505 - const getSpy = (assertion: any) => { 505 + 506 + function getSpy(assertion: any) { 506 507 assertIsMock(assertion) 507 508 return assertion._obj as MockInstance 508 509 } 509 - const ordinalOf = (i: number) => { 510 - const j = i % 10 511 - const k = i % 100 512 510 513 - if (j === 1 && k !== 11) { 514 - return `${i}st` 515 - } 516 - 517 - if (j === 2 && k !== 12) { 518 - return `${i}nd` 519 - } 520 - 521 - if (j === 3 && k !== 13) { 522 - return `${i}rd` 523 - } 524 - 525 - return `${i}th` 526 - } 527 - const formatCalls = ( 528 - spy: MockInstance, 529 - msg: string, 530 - showActualCall?: any, 531 - ) => { 532 - if (spy.mock.calls) { 533 - msg += c.gray( 534 - `\n\nReceived: \n\n${spy.mock.calls 535 - .map((callArg, i) => { 536 - let methodCall = c.bold( 537 - ` ${ordinalOf(i + 1)} ${spy.getMockName()} call:\n\n`, 538 - ) 539 - if (showActualCall) { 540 - methodCall += diff(showActualCall, callArg, { 541 - omitAnnotationLines: true, 542 - }) 543 - } 544 - else { 545 - methodCall += stringify(callArg) 546 - .split('\n') 547 - .map(line => ` ${line}`) 548 - .join('\n') 549 - } 550 - 551 - methodCall += '\n' 552 - return methodCall 553 - }) 554 - .join('\n')}`, 555 - ) 556 - } 557 - msg += c.gray( 558 - `\n\nNumber of calls: ${c.bold(spy.mock.calls.length)}\n`, 559 - ) 560 - return msg 561 - } 562 - const formatReturns = ( 563 - spy: MockInstance, 564 - results: MockResult<any>[] | MockSettledResult<any>[], 565 - msg: string, 566 - showActualReturn?: any, 567 - ) => { 568 - msg += c.gray( 569 - `\n\nReceived: \n\n${results 570 - .map((callReturn, i) => { 571 - let methodCall = c.bold( 572 - ` ${ordinalOf(i + 1)} ${spy.getMockName()} call return:\n\n`, 573 - ) 574 - if (showActualReturn) { 575 - methodCall += diff(showActualReturn, callReturn.value, { 576 - omitAnnotationLines: true, 577 - }) 578 - } 579 - else { 580 - methodCall += stringify(callReturn) 581 - .split('\n') 582 - .map(line => ` ${line}`) 583 - .join('\n') 584 - } 585 - 586 - methodCall += '\n' 587 - return methodCall 588 - }) 589 - .join('\n')}`, 590 - ) 591 - msg += c.gray( 592 - `\n\nNumber of calls: ${c.bold(spy.mock.calls.length)}\n`, 593 - ) 594 - return msg 595 - } 596 511 def(['toHaveBeenCalledTimes', 'toBeCalledTimes'], function (number: number) { 597 512 const spy = getSpy(this) 598 513 const spyName = spy.getMockName() ··· 1140 1055 return proxy 1141 1056 }, 1142 1057 ) 1058 + } 1059 + 1060 + function ordinalOf(i: number) { 1061 + const j = i % 10 1062 + const k = i % 100 1063 + 1064 + if (j === 1 && k !== 11) { 1065 + return `${i}st` 1066 + } 1067 + 1068 + if (j === 2 && k !== 12) { 1069 + return `${i}nd` 1070 + } 1071 + 1072 + if (j === 3 && k !== 13) { 1073 + return `${i}rd` 1074 + } 1075 + 1076 + return `${i}th` 1077 + } 1078 + 1079 + function formatCalls(spy: MockInstance, msg: string, showActualCall?: any) { 1080 + if (spy.mock.calls) { 1081 + msg += c.gray( 1082 + `\n\nReceived: \n\n${spy.mock.calls 1083 + .map((callArg, i) => { 1084 + let methodCall = c.bold( 1085 + ` ${ordinalOf(i + 1)} ${spy.getMockName()} call:\n\n`, 1086 + ) 1087 + if (showActualCall) { 1088 + methodCall += diff(showActualCall, callArg, { 1089 + omitAnnotationLines: true, 1090 + }) 1091 + } 1092 + else { 1093 + methodCall += stringify(callArg) 1094 + .split('\n') 1095 + .map(line => ` ${line}`) 1096 + .join('\n') 1097 + } 1098 + 1099 + methodCall += '\n' 1100 + return methodCall 1101 + }) 1102 + .join('\n')}`, 1103 + ) 1104 + } 1105 + msg += c.gray( 1106 + `\n\nNumber of calls: ${c.bold(spy.mock.calls.length)}\n`, 1107 + ) 1108 + return msg 1109 + } 1110 + 1111 + function formatReturns( 1112 + spy: MockInstance, 1113 + results: MockResult<any>[] | MockSettledResult<any>[], 1114 + msg: string, 1115 + showActualReturn?: any, 1116 + ) { 1117 + msg += c.gray( 1118 + `\n\nReceived: \n\n${results 1119 + .map((callReturn, i) => { 1120 + let methodCall = c.bold( 1121 + ` ${ordinalOf(i + 1)} ${spy.getMockName()} call return:\n\n`, 1122 + ) 1123 + if (showActualReturn) { 1124 + methodCall += diff(showActualReturn, callReturn.value, { 1125 + omitAnnotationLines: true, 1126 + }) 1127 + } 1128 + else { 1129 + methodCall += stringify(callReturn) 1130 + .split('\n') 1131 + .map(line => ` ${line}`) 1132 + .join('\n') 1133 + } 1134 + 1135 + methodCall += '\n' 1136 + return methodCall 1137 + }) 1138 + .join('\n')}`, 1139 + ) 1140 + msg += c.gray( 1141 + `\n\nNumber of calls: ${c.bold(spy.mock.calls.length)}\n`, 1142 + ) 1143 + return msg 1143 1144 }
+37 -37
packages/pretty-format/src/index.ts
··· 231 231 return hitMaxDepth 232 232 ? '[Arguments]' 233 233 : `${min ? '' : 'Arguments '}[${printListItems( 234 - val, 235 - config, 236 - indentation, 237 - depth, 238 - refs, 239 - printer, 240 - )}]` 234 + val, 235 + config, 236 + indentation, 237 + depth, 238 + refs, 239 + printer, 240 + )}]` 241 241 } 242 242 if (isToStringedArrayType(toStringed)) { 243 243 return hitMaxDepth 244 244 ? `[${val.constructor.name}]` 245 245 : `${ 246 - min 247 - ? '' 248 - : !config.printBasicPrototype && val.constructor.name === 'Array' 246 + min 247 + ? '' 248 + : !config.printBasicPrototype && val.constructor.name === 'Array' 249 249 ? '' 250 250 : `${val.constructor.name} ` 251 - }[${printListItems(val, config, indentation, depth, refs, printer)}]` 251 + }[${printListItems(val, config, indentation, depth, refs, printer)}]` 252 252 } 253 253 if (toStringed === '[object Map]') { 254 254 return hitMaxDepth 255 255 ? '[Map]' 256 256 : `Map {${printIteratorEntries( 257 - val.entries(), 258 - config, 259 - indentation, 260 - depth, 261 - refs, 262 - printer, 263 - ' => ', 264 - )}}` 257 + val.entries(), 258 + config, 259 + indentation, 260 + depth, 261 + refs, 262 + printer, 263 + ' => ', 264 + )}}` 265 265 } 266 266 if (toStringed === '[object Set]') { 267 267 return hitMaxDepth 268 268 ? '[Set]' 269 269 : `Set {${printIteratorValues( 270 - val.values(), 271 - config, 272 - indentation, 273 - depth, 274 - refs, 275 - printer, 276 - )}}` 270 + val.values(), 271 + config, 272 + indentation, 273 + depth, 274 + refs, 275 + printer, 276 + )}}` 277 277 } 278 278 279 279 // Avoid failure to serialize global window object in jsdom test environment. ··· 281 281 return hitMaxDepth || isWindow(val) 282 282 ? `[${getConstructorName(val)}]` 283 283 : `${ 284 - min 285 - ? '' 286 - : !config.printBasicPrototype && getConstructorName(val) === 'Object' 284 + min 285 + ? '' 286 + : !config.printBasicPrototype && getConstructorName(val) === 'Object' 287 287 ? '' 288 288 : `${getConstructorName(val)} ` 289 - }{${printObjectProperties( 290 - val, 291 - config, 292 - indentation, 293 - depth, 294 - refs, 295 - printer, 296 - )}}` 289 + }{${printObjectProperties( 290 + val, 291 + config, 292 + indentation, 293 + depth, 294 + refs, 295 + printer, 296 + )}}` 297 297 } 298 298 299 299 function isNewPlugin(plugin: Plugin): plugin is NewPlugin {
+1
packages/runner/src/suite.ts
··· 482 482 } 483 483 484 484 function createSuite() { 485 + // eslint-disable-next-line unicorn/consistent-function-scoping 485 486 function suiteFn( 486 487 this: Record<string, boolean | undefined>, 487 488 name: string | Function,
+3 -3
packages/utils/src/helpers.ts
··· 70 70 // Invalid flags 71 71 // eslint-disable-next-line regexp/optimal-quantifier-concatenation 72 72 if (m[3] && !/^(?!.*?(.).*?\1)[gmixXsuUAJ]+$/.test(m[3])) { 73 - return RegExp(input) 73 + return new RegExp(input) 74 74 } 75 75 76 76 // Create the regular expression ··· 146 146 return seen.get(val) 147 147 } 148 148 if (Array.isArray(val)) { 149 - out = Array((k = val.length)) 149 + out = Array.from({ length: (k = val.length) }) 150 150 seen.set(val, out) 151 151 while (k--) { 152 152 out[k] = clone(val[k], seen, options) ··· 205 205 const paths = path.replace(/\[(\d+)\]/g, '.$1').split('.') 206 206 let result = source 207 207 for (const p of paths) { 208 - result = Object(result)[p] 208 + result = (new Object(result) as any)[p] 209 209 if (result === undefined) { 210 210 return defaultValue 211 211 }
+6 -5
packages/web-worker/src/runner.ts
··· 8 8 prepareContext(context: Record<string, any>) { 9 9 const ctx = super.prepareContext(context) 10 10 // not supported for now, we can't synchronously load modules 11 - const importScripts = () => { 12 - throw new Error( 13 - '[vitest] `importScripts` is not supported in Vite workers. Please, consider using `import` instead.', 14 - ) 15 - } 16 11 return Object.assign(ctx, this.context, { 17 12 importScripts, 18 13 }) 19 14 } 15 + } 16 + 17 + function importScripts() { 18 + throw new Error( 19 + '[vitest] `importScripts` is not supported in Vite workers. Please, consider using `import` instead.', 20 + ) 20 21 }
+2 -2
test/config/test/failures.test.ts
··· 85 85 }) 86 86 87 87 expect(stderr).toMatch( 88 - `Error: @vitest/coverage-v8 does not work with 88 + `Error: @vitest/coverage-v8 does not work with 89 89 { 90 90 "browser": { 91 91 "provider": "${provider}", ··· 116 116 test('v8 coverage provider cannot be used in workspace without playwright + chromium', async () => { 117 117 const { stderr } = await runVitest({ coverage: { enabled: true }, workspace: './fixtures/workspace/browser/workspace-with-browser.ts' }) 118 118 expect(stderr).toMatch( 119 - `Error: @vitest/coverage-v8 does not work with 119 + `Error: @vitest/coverage-v8 does not work with 120 120 { 121 121 "browser": { 122 122 "provider": "webdriverio",
+2 -2
test/core/test/diff.test.ts
··· 128 128 }) 129 129 130 130 test('display truncated multiple items array diff', () => { 131 - const array1 = Array(45000).fill('foo') 132 - const array2 = Array(45000).fill('bar') 131 + const array1 = Array.from({ length: 45000 }).fill('foo') 132 + const array2 = Array.from({ length: 45000 }).fill('bar') 133 133 const console = { log: vi.fn(), error: vi.fn() } 134 134 displayDiff(diff(array1, array2, { truncateThreshold: 3 }), console as any) 135 135 expect(stripAnsi(console.error.mock.calls[0][0])).toMatchInlineSnapshot(`
+44 -44
test/core/test/injector-mock.test.ts
··· 193 193 test('named import', async () => { 194 194 expect( 195 195 await hoistSimpleCodeWithoutMocks( 196 - `import { ref } from 'vue';function foo() { return ref(0) }`, 196 + `import { ref } from 'vue';function foo() { return ref(0) }`, 197 197 ), 198 198 ).toMatchInlineSnapshot(` 199 199 "vi.mock('faker'); ··· 206 206 test('namespace import', async () => { 207 207 expect( 208 208 await hoistSimpleCodeWithoutMocks( 209 - `import * as vue from 'vue';function foo() { return vue.ref(0) }`, 209 + `import * as vue from 'vue';function foo() { return vue.ref(0) }`, 210 210 ), 211 211 ).toMatchInlineSnapshot(` 212 212 "vi.mock('faker'); ··· 266 266 test('named exports of imported binding', async () => { 267 267 expect( 268 268 await hoistSimpleCodeWithoutMocks( 269 - `import {createApp} from 'vue';export {createApp}`, 269 + `import {createApp} from 'vue';export {createApp}`, 270 270 ), 271 271 ).toMatchInlineSnapshot(` 272 272 "vi.mock('faker'); ··· 279 279 test('export * from', async () => { 280 280 expect( 281 281 await hoistSimpleCodeWithoutMocks( 282 - `export * from 'vue'\n` + `export * from 'react'`, 282 + `export * from 'vue'\n` + `export * from 'react'`, 283 283 ), 284 284 ).toMatchInlineSnapshot(` 285 285 "vi.mock('faker'); ··· 311 311 test('export then import minified', async () => { 312 312 expect( 313 313 await hoistSimpleCodeWithoutMocks( 314 - `export * from 'vue';import {createApp} from 'vue';`, 314 + `export * from 'vue';import {createApp} from 'vue';`, 315 315 ), 316 316 ).toMatchInlineSnapshot(` 317 317 "vi.mock('faker'); ··· 324 324 test('hoist import to top', async () => { 325 325 expect( 326 326 await hoistSimpleCodeWithoutMocks( 327 - `path.resolve('server.js');import path from 'node:path';`, 327 + `path.resolve('server.js');import path from 'node:path';`, 328 328 ), 329 329 ).toMatchInlineSnapshot(` 330 330 "vi.mock('faker'); ··· 346 346 347 347 test('dynamic import', async () => { 348 348 const result = await hoistSimpleCodeWithoutMocks( 349 - `export const i = () => import('./foo')`, 349 + `export const i = () => import('./foo')`, 350 350 ) 351 351 expect(result).toMatchInlineSnapshot(` 352 352 "vi.mock('faker'); ··· 357 357 358 358 test('do not rewrite method definition', async () => { 359 359 const result = await hoistSimpleCodeWithoutMocks( 360 - `import { fn } from 'vue';class A { fn() { fn() } }`, 360 + `import { fn } from 'vue';class A { fn() { fn() } }`, 361 361 ) 362 362 expect(result).toMatchInlineSnapshot(` 363 363 "vi.mock('faker'); ··· 369 369 370 370 test('do not rewrite when variable is in scope', async () => { 371 371 const result = await hoistSimpleCodeWithoutMocks( 372 - `import { fn } from 'vue';function A(){ const fn = () => {}; return { fn }; }`, 372 + `import { fn } from 'vue';function A(){ const fn = () => {}; return { fn }; }`, 373 373 ) 374 374 expect(result).toMatchInlineSnapshot(` 375 375 "vi.mock('faker'); ··· 382 382 // #5472 383 383 test('do not rewrite when variable is in scope with object destructuring', async () => { 384 384 const result = await hoistSimpleCodeWithoutMocks( 385 - `import { fn } from 'vue';function A(){ let {fn, test} = {fn: 'foo', test: 'bar'}; return { fn }; }`, 385 + `import { fn } from 'vue';function A(){ let {fn, test} = {fn: 'foo', test: 'bar'}; return { fn }; }`, 386 386 ) 387 387 expect(result).toMatchInlineSnapshot(` 388 388 "vi.mock('faker'); ··· 395 395 // #5472 396 396 test('do not rewrite when variable is in scope with array destructuring', async () => { 397 397 const result = await hoistSimpleCodeWithoutMocks( 398 - `import { fn } from 'vue';function A(){ let [fn, test] = ['foo', 'bar']; return { fn }; }`, 398 + `import { fn } from 'vue';function A(){ let [fn, test] = ['foo', 'bar']; return { fn }; }`, 399 399 ) 400 400 expect(result).toMatchInlineSnapshot(` 401 401 "vi.mock('faker'); ··· 408 408 // #5727 409 409 test('rewrite variable in string interpolation in function nested arguments', async () => { 410 410 const result = await hoistSimpleCodeWithoutMocks( 411 - `import { fn } from 'vue';function A({foo = \`test\${fn}\`} = {}){ return {}; }`, 411 + `import { fn } from 'vue';function A({foo = \`test\${fn}\`} = {}){ return {}; }`, 412 412 ) 413 413 expect(result).toMatchInlineSnapshot(` 414 414 "vi.mock('faker'); ··· 421 421 // #6520 422 422 test('rewrite variables in default value of destructuring params', async () => { 423 423 const result = await hoistSimpleCodeWithoutMocks( 424 - `import { fn } from 'vue';function A({foo = fn}){ return {}; }`, 424 + `import { fn } from 'vue';function A({foo = fn}){ return {}; }`, 425 425 ) 426 426 expect(result).toMatchInlineSnapshot(` 427 427 "vi.mock('faker'); ··· 433 433 434 434 test('do not rewrite when function declaration is in scope', async () => { 435 435 const result = await hoistSimpleCodeWithoutMocks( 436 - `import { fn } from 'vue';function A(){ function fn() {}; return { fn }; }`, 436 + `import { fn } from 'vue';function A(){ function fn() {}; return { fn }; }`, 437 437 ) 438 438 expect(result).toMatchInlineSnapshot(` 439 439 "vi.mock('faker'); ··· 445 445 446 446 test('do not rewrite catch clause', async () => { 447 447 const result = await hoistSimpleCodeWithoutMocks( 448 - `import {error} from './dependency';try {} catch(error) {}`, 448 + `import {error} from './dependency';try {} catch(error) {}`, 449 449 ) 450 450 expect(result).toMatchInlineSnapshot(` 451 451 "vi.mock('faker'); ··· 459 459 test('should declare variable for imported super class', async () => { 460 460 expect( 461 461 await hoistSimpleCodeWithoutMocks( 462 - `import { Foo } from './dependency';` + `class A extends Foo {}`, 462 + `import { Foo } from './dependency';` + `class A extends Foo {}`, 463 463 ), 464 464 ).toMatchInlineSnapshot(` 465 465 "vi.mock('faker'); ··· 473 473 // first class that uses the binding 474 474 expect( 475 475 await hoistSimpleCodeWithoutMocks( 476 - `import { Foo } from './dependency';` 477 - + `export default class A extends Foo {}\n` 478 - + `export class B extends Foo {}`, 476 + `import { Foo } from './dependency';` 477 + + `export default class A extends Foo {}\n` 478 + + `export class B extends Foo {}`, 479 479 ), 480 480 ).toMatchInlineSnapshot(` 481 481 "vi.mock('faker'); ··· 506 506 // default named functions 507 507 expect( 508 508 await hoistSimpleCodeWithoutMocks( 509 - `export default function foo() {}\n` 510 - + `foo.prototype = Object.prototype;`, 509 + `export default function foo() {}\n` 510 + + `foo.prototype = Object.prototype;`, 511 511 ), 512 512 ).toMatchInlineSnapshot(` 513 513 "vi.mock('faker'); ··· 518 518 // default named classes 519 519 expect( 520 520 await hoistSimpleCodeWithoutMocks( 521 - `export default class A {}\n` + `export class B extends A {}`, 521 + `export default class A {}\n` + `export class B extends A {}`, 522 522 ), 523 523 ).toMatchInlineSnapshot(` 524 524 "vi.mock('faker'); ··· 531 531 test('sourcemap source', async () => { 532 532 const map = ( 533 533 (await hoistSimple( 534 - `vi.mock(any); 534 + `vi.mock(any); 535 535 export const a = 1`, 536 - 'input.js', 536 + 'input.js', 537 537 ))?.map 538 538 ) 539 539 expect(map?.sources).toStrictEqual(['input.js']) ··· 542 542 test('overwrite bindings', async () => { 543 543 expect( 544 544 await hoistSimpleCodeWithoutMocks( 545 - `import { inject } from 'vue';` 546 - + `const a = { inject }\n` 547 - + `const b = { test: inject }\n` 548 - + `function c() { const { test: inject } = { test: true }; console.log(inject) }\n` 549 - + `const d = inject\n` 550 - + `function f() { console.log(inject) }\n` 551 - + `function e() { const { inject } = { inject: true } }\n` 552 - + `function g() { const f = () => { const inject = true }; console.log(inject) }\n`, 545 + `import { inject } from 'vue';` 546 + + `const a = { inject }\n` 547 + + `const b = { test: inject }\n` 548 + + `function c() { const { test: inject } = { test: true }; console.log(inject) }\n` 549 + + `const d = inject\n` 550 + + `function f() { console.log(inject) }\n` 551 + + `function e() { const { inject } = { inject: true } }\n` 552 + + `function g() { const f = () => { const inject = true }; console.log(inject) }\n`, 553 553 ), 554 554 ).toMatchInlineSnapshot(` 555 555 "vi.mock('faker'); ··· 578 578 test('function argument destructure', async () => { 579 579 expect( 580 580 await hoistSimpleCodeWithoutMocks( 581 - ` 581 + ` 582 582 import { foo, bar } from 'foo' 583 583 const a = ({ _ = foo() }) => {} 584 584 function b({ _ = bar() }) {} ··· 600 600 test('object destructure alias', async () => { 601 601 expect( 602 602 await hoistSimpleCodeWithoutMocks( 603 - ` 603 + ` 604 604 import { n } from 'foo' 605 605 const a = () => { 606 606 const { type: n = 'bar' } = {} ··· 623 623 // #9585 624 624 expect( 625 625 await hoistSimpleCodeWithoutMocks( 626 - ` 626 + ` 627 627 import { n, m } from 'foo' 628 628 const foo = {} 629 629 ··· 649 649 test('nested object destructure alias', async () => { 650 650 expect( 651 651 await hoistSimpleCodeWithoutMocks( 652 - ` 652 + ` 653 653 import { remove, add, get, set, rest, objRest } from 'vue' 654 654 655 655 function a() { ··· 710 710 test('object props and methods', async () => { 711 711 expect( 712 712 await hoistSimpleCodeWithoutMocks( 713 - ` 713 + ` 714 714 import foo from 'foo' 715 715 716 716 const bar = 'bar' ··· 749 749 test('class props', async () => { 750 750 expect( 751 751 await hoistSimpleCodeWithoutMocks( 752 - ` 752 + ` 753 753 import { remove, add } from 'vue' 754 754 755 755 class A { ··· 776 776 test('class methods', async () => { 777 777 expect( 778 778 await hoistSimpleCodeWithoutMocks( 779 - ` 779 + ` 780 780 import foo from 'foo' 781 781 782 782 const bar = 'bar' ··· 811 811 test('declare scope', async () => { 812 812 expect( 813 813 await hoistSimpleCodeWithoutMocks( 814 - ` 814 + ` 815 815 import { aaa, bbb, ccc, ddd } from 'vue' 816 816 817 817 function foobar() { ··· 868 868 test('continuous exports', async () => { 869 869 expect( 870 870 await hoistSimpleCodeWithoutMocks( 871 - ` 871 + ` 872 872 export function fn1() { 873 873 }export function fn2() { 874 874 } ··· 917 917 test('with hashbang', async () => { 918 918 expect( 919 919 await hoistSimpleCodeWithoutMocks( 920 - `#!/usr/bin/env node 920 + `#!/usr/bin/env node 921 921 console.log("it can parse the hashbang")`, 922 922 ), 923 923 ).toMatchInlineSnapshot(`undefined`) ··· 926 926 test('import hoisted after hashbang', async () => { 927 927 expect( 928 928 await hoistSimpleCodeWithoutMocks( 929 - `#!/usr/bin/env node 929 + `#!/usr/bin/env node 930 930 console.log(foo); 931 931 import foo from "foo"`, 932 932 ), ··· 1090 1090 1091 1091 test('avoid binding ClassExpression', async () => { 1092 1092 const result = await hoistSimpleCodeWithoutMocks( 1093 - ` 1093 + ` 1094 1094 import Foo, { Bar } from './foo'; 1095 1095 1096 1096 console.log(Foo, Bar);
+1 -1
test/coverage-test/test/empty-lines.v8.test.ts
··· 180 180 } 181 181 182 182 function range(count: number, options: { base: number } = { base: 1 }) { 183 - return Array(count).fill(0).map((_, i) => options.base + i) 183 + return Array.from({ length: count }).fill(0).map((_, i) => options.base + i) 184 184 }
+3 -3
test/reporters/tests/console.test.ts
··· 25 25 expect(stderr).toBeTruthy() 26 26 27 27 expect(stdout).toContain( 28 - `stdout | console.test.ts 28 + `stdout | console.test.ts 29 29 global stdin beforeAll 30 30 31 31 stdout | console.test.ts > suite ··· 36 36 ) 37 37 38 38 expect(stdout).toContain( 39 - `stdout | console.test.ts > suite > nested suite 39 + `stdout | console.test.ts > suite > nested suite 40 40 nested suite stdin afterAll 41 41 42 42 stdout | console.test.ts > suite ··· 47 47 ) 48 48 49 49 expect(stderr).toContain( 50 - `stderr | console.test.ts 50 + `stderr | console.test.ts 51 51 global stderr beforeAll 52 52 53 53 stderr | console.test.ts > suite
+10 -10
packages/browser/src/node/pool.ts
··· 6 6 7 7 const debug = createDebugger('vitest:browser:pool') 8 8 9 + async function waitForTests( 10 + method: 'run' | 'collect', 11 + contextId: string, 12 + project: WorkspaceProject, 13 + files: string[], 14 + ) { 15 + const context = project.browser!.state.createAsyncContext(method, contextId, files) 16 + return await context 17 + } 18 + 9 19 export function createBrowserPool(ctx: Vitest): ProcessPool { 10 20 const providers = new Set<BrowserProvider>() 11 - 12 - const waitForTests = async ( 13 - method: 'run' | 'collect', 14 - contextId: string, 15 - project: WorkspaceProject, 16 - files: string[], 17 - ) => { 18 - const context = project.browser!.state.createAsyncContext(method, contextId, files) 19 - return await context 20 - } 21 21 22 22 const executeTests = async (method: 'run' | 'collect', project: WorkspaceProject, files: string[]) => { 23 23 ctx.state.clearFiles(project, files)
+11 -11
packages/mocker/src/browser/hints.ts
··· 49 49 ) 50 50 } 51 51 52 - const getImporter = (name: string) => { 53 - const stackTrace = /* @__PURE__ */ createSimpleStackTrace({ stackTraceLimit: 5 }) 54 - const stackArray = stackTrace.split('\n') 55 - // if there is no message in a stack trace, use the item - 1 56 - const importerStackIndex = stackArray.findIndex((stack) => { 57 - return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`) 58 - }) 59 - const stack = /* @__PURE__ */ parseSingleStack(stackArray[importerStackIndex + 1]) 60 - return stack?.file || '' 61 - } 62 - 63 52 return { 64 53 hoisted<T>(factory: () => T): T { 65 54 if (typeof factory !== 'function') { ··· 143 132 return _mocker().importMock(path, getImporter('importMock')) 144 133 }, 145 134 } 135 + } 136 + 137 + function getImporter(name: string) { 138 + const stackTrace = /* @__PURE__ */ createSimpleStackTrace({ stackTraceLimit: 5 }) 139 + const stackArray = stackTrace.split('\n') 140 + // if there is no message in a stack trace, use the item - 1 141 + const importerStackIndex = stackArray.findIndex((stack) => { 142 + return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`) 143 + }) 144 + const stack = /* @__PURE__ */ parseSingleStack(stackArray[importerStackIndex + 1]) 145 + return stack?.file || '' 146 146 }
+22 -22
packages/pretty-format/src/plugins/DOMCollection.ts
··· 44 44 (config.min ? '' : name + SPACE) 45 45 + (OBJECT_NAMES.has(name) 46 46 ? `{${printObjectProperties( 47 - isNamedNodeMap(collection) 48 - ? [...collection].reduce<Record<string, string>>( 49 - (props, attribute) => { 50 - props[attribute.name] = attribute.value 51 - return props 52 - }, 53 - {}, 54 - ) 55 - : { ...collection }, 56 - config, 57 - indentation, 58 - depth, 59 - refs, 60 - printer, 61 - )}}` 47 + isNamedNodeMap(collection) 48 + ? [...collection].reduce<Record<string, string>>( 49 + (props, attribute) => { 50 + props[attribute.name] = attribute.value 51 + return props 52 + }, 53 + {}, 54 + ) 55 + : { ...collection }, 56 + config, 57 + indentation, 58 + depth, 59 + refs, 60 + printer, 61 + )}}` 62 62 : `[${printListItems( 63 - [...collection], 64 - config, 65 - indentation, 66 - depth, 67 - refs, 68 - printer, 69 - )}]`) 63 + [...collection], 64 + config, 65 + indentation, 66 + depth, 67 + refs, 68 + printer, 69 + )}]`) 70 70 ) 71 71 } 72 72
+35 -35
packages/pretty-format/src/plugins/Immutable.ts
··· 36 36 return ++depth > config.maxDepth 37 37 ? printAsLeaf(getImmutableName(type)) 38 38 : `${getImmutableName(type) + SPACE}{${printIteratorEntries( 39 - val.entries(), 40 - config, 41 - indentation, 42 - depth, 43 - refs, 44 - printer, 45 - )}}` 39 + val.entries(), 40 + config, 41 + indentation, 42 + depth, 43 + refs, 44 + printer, 45 + )}}` 46 46 } 47 47 48 48 // Record has an entries method because it is a collection in immutable v3. ··· 67 67 return ++depth > config.maxDepth 68 68 ? printAsLeaf(name) 69 69 : `${name + SPACE}{${printIteratorEntries( 70 - getRecordEntries(val), 71 - config, 72 - indentation, 73 - depth, 74 - refs, 75 - printer, 76 - )}}` 70 + getRecordEntries(val), 71 + config, 72 + indentation, 73 + depth, 74 + refs, 75 + printer, 76 + )}}` 77 77 } 78 78 79 79 function printImmutableSeq(val: any, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer): string { ··· 88 88 // from Immutable collection of entries or from ECMAScript object 89 89 val._iter || val._object 90 90 ? printIteratorEntries( 91 - val.entries(), 92 - config, 93 - indentation, 94 - depth, 95 - refs, 96 - printer, 97 - ) 91 + val.entries(), 92 + config, 93 + indentation, 94 + depth, 95 + refs, 96 + printer, 97 + ) 98 98 : LAZY 99 99 }}` 100 100 } ··· 105 105 || val._collection // from ECMAScript collection in immutable v4 106 106 || val._iterable // from ECMAScript collection in immutable v3 107 107 ? printIteratorValues( 108 - val.values(), 109 - config, 110 - indentation, 111 - depth, 112 - refs, 113 - printer, 114 - ) 108 + val.values(), 109 + config, 110 + indentation, 111 + depth, 112 + refs, 113 + printer, 114 + ) 115 115 : LAZY 116 116 }]` 117 117 } ··· 120 120 return ++depth > config.maxDepth 121 121 ? printAsLeaf(getImmutableName(type)) 122 122 : `${getImmutableName(type) + SPACE}[${printIteratorValues( 123 - val.values(), 124 - config, 125 - indentation, 126 - depth, 127 - refs, 128 - printer, 129 - )}]` 123 + val.values(), 124 + config, 125 + indentation, 126 + depth, 127 + refs, 128 + printer, 129 + )}]` 130 130 } 131 131 132 132 export const serialize: NewPlugin['serialize'] = (
+2 -2
packages/ui/client/composables/navigation.ts
··· 50 50 const htmlReporterSubdir = coverage.value!.htmlReporter?.subdir 51 51 return htmlReporterSubdir 52 52 ? `/${coverage.value!.reportsDirectory.slice(idx + 1)}/${ 53 - htmlReporterSubdir 54 - }/index.html` 53 + htmlReporterSubdir 54 + }/index.html` 55 55 : `/${coverage.value!.reportsDirectory.slice(idx + 1)}/index.html` 56 56 } 57 57
+55 -55
packages/utils/src/diff/cleanupSemantic.ts
··· 338 338 * @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples. 339 339 */ 340 340 function diff_cleanupSemanticLossless(diffs: Array<Diff>) { 341 - /** 342 - * Given two strings, compute a score representing whether the internal 343 - * boundary falls on logical boundaries. 344 - * Scores range from 6 (best) to 0 (worst). 345 - * Closure, but does not reference any external variables. 346 - * @param {string} one First string. 347 - * @param {string} two Second string. 348 - * @return {number} The score. 349 - * @private 350 - */ 351 - function diff_cleanupSemanticScore_(one: string, two: string): number { 352 - if (!one || !two) { 353 - // Edges are the best. 354 - return 6 355 - } 356 - 357 - // Each port of this function behaves slightly differently due to 358 - // subtle differences in each language's definition of things like 359 - // 'whitespace'. Since this function's purpose is largely cosmetic, 360 - // the choice has been made to use each language's native features 361 - // rather than force total conformity. 362 - const char1 = one.charAt(one.length - 1) 363 - const char2 = two.charAt(0) 364 - const nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_) 365 - const nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_) 366 - const whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_) 367 - const whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_) 368 - const lineBreak1 = whitespace1 && char1.match(linebreakRegex_) 369 - const lineBreak2 = whitespace2 && char2.match(linebreakRegex_) 370 - const blankLine1 = lineBreak1 && one.match(blanklineEndRegex_) 371 - const blankLine2 = lineBreak2 && two.match(blanklineStartRegex_) 372 - 373 - if (blankLine1 || blankLine2) { 374 - // Five points for blank lines. 375 - return 5 376 - } 377 - else if (lineBreak1 || lineBreak2) { 378 - // Four points for line breaks. 379 - return 4 380 - } 381 - else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) { 382 - // Three points for end of sentences. 383 - return 3 384 - } 385 - else if (whitespace1 || whitespace2) { 386 - // Two points for whitespace. 387 - return 2 388 - } 389 - else if (nonAlphaNumeric1 || nonAlphaNumeric2) { 390 - // One point for non-alphanumeric. 391 - return 1 392 - } 393 - return 0 394 - } 395 - 396 341 let pointer = 1 397 342 // Intentionally ignore the first and last element (don't need checking). 398 343 while (pointer < diffs.length - 1) { ··· 607 552 if (changes) { 608 553 diff_cleanupMerge(diffs) 609 554 } 555 + } 556 + 557 + /** 558 + * Given two strings, compute a score representing whether the internal 559 + * boundary falls on logical boundaries. 560 + * Scores range from 6 (best) to 0 (worst). 561 + * Closure, but does not reference any external variables. 562 + * @param {string} one First string. 563 + * @param {string} two Second string. 564 + * @return {number} The score. 565 + * @private 566 + */ 567 + function diff_cleanupSemanticScore_(one: string, two: string): number { 568 + if (!one || !two) { 569 + // Edges are the best. 570 + return 6 571 + } 572 + 573 + // Each port of this function behaves slightly differently due to 574 + // subtle differences in each language's definition of things like 575 + // 'whitespace'. Since this function's purpose is largely cosmetic, 576 + // the choice has been made to use each language's native features 577 + // rather than force total conformity. 578 + const char1 = one.charAt(one.length - 1) 579 + const char2 = two.charAt(0) 580 + const nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_) 581 + const nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_) 582 + const whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_) 583 + const whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_) 584 + const lineBreak1 = whitespace1 && char1.match(linebreakRegex_) 585 + const lineBreak2 = whitespace2 && char2.match(linebreakRegex_) 586 + const blankLine1 = lineBreak1 && one.match(blanklineEndRegex_) 587 + const blankLine2 = lineBreak2 && two.match(blanklineStartRegex_) 588 + 589 + if (blankLine1 || blankLine2) { 590 + // Five points for blank lines. 591 + return 5 592 + } 593 + else if (lineBreak1 || lineBreak2) { 594 + // Four points for line breaks. 595 + return 4 596 + } 597 + else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) { 598 + // Three points for end of sentences. 599 + return 3 600 + } 601 + else if (whitespace1 || whitespace2) { 602 + // Two points for whitespace. 603 + return 2 604 + } 605 + else if (nonAlphaNumeric1 || nonAlphaNumeric2) { 606 + // One point for non-alphanumeric. 607 + return 1 608 + } 609 + return 0 610 610 } 611 611 612 612 export {
+1 -1
packages/utils/src/diff/joinAlignedDiffs.ts
··· 26 26 ): string { 27 27 return line.length !== 0 28 28 ? color( 29 - `${indicator} ${formatTrailingSpaces(line, trailingSpaceFormatter)}`, 29 + `${indicator} ${formatTrailingSpaces(line, trailingSpaceFormatter)}`, 30 30 ) 31 31 : indicator !== ' ' 32 32 ? color(indicator)
+29 -29
packages/vitest/src/integrations/vi.ts
··· 389 389 let _mockedDate: Date | null = null 390 390 let _config: null | SerializedConfig = null 391 391 392 - function _mocker(): VitestMocker { 393 - // @ts-expect-error injected by vite-nide 394 - return typeof __vitest_mocker__ !== 'undefined' 395 - // @ts-expect-error injected by vite-nide 396 - ? __vitest_mocker__ 397 - : new Proxy( 398 - {}, 399 - { 400 - get(_, name) { 401 - throw new Error( 402 - 'Vitest mocker was not initialized in this environment. ' 403 - + `vi.${String(name)}() is forbidden.`, 404 - ) 405 - }, 406 - }, 407 - ) 408 - } 409 - 410 392 const workerState = getWorkerState() 411 393 412 394 let _timers: FakeTimers ··· 424 406 const _stubsEnv = new Map() 425 407 426 408 const _envBooleans = ['PROD', 'DEV', 'SSR'] 427 - 428 - const getImporter = (name: string) => { 429 - const stackTrace = createSimpleStackTrace({ stackTraceLimit: 5 }) 430 - const stackArray = stackTrace.split('\n') 431 - // if there is no message in a stack trace, use the item - 1 432 - const importerStackIndex = stackArray.findIndex((stack) => { 433 - return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`) 434 - }) 435 - const stack = parseSingleStack(stackArray[importerStackIndex + 1]) 436 - return stack?.file || '' 437 - } 438 409 439 410 const utils: VitestUtils = { 440 411 useFakeTimers(config?: FakeTimerInstallOpts) { ··· 738 709 739 710 export const vitest = createVitest() 740 711 export const vi = vitest 712 + 713 + function _mocker(): VitestMocker { 714 + // @ts-expect-error injected by vite-nide 715 + return typeof __vitest_mocker__ !== 'undefined' 716 + // @ts-expect-error injected by vite-nide 717 + ? __vitest_mocker__ 718 + : new Proxy( 719 + {}, 720 + { 721 + get(_, name) { 722 + throw new Error( 723 + 'Vitest mocker was not initialized in this environment. ' 724 + + `vi.${String(name)}() is forbidden.`, 725 + ) 726 + }, 727 + }, 728 + ) 729 + } 730 + 731 + function getImporter(name: string) { 732 + const stackTrace = createSimpleStackTrace({ stackTraceLimit: 5 }) 733 + const stackArray = stackTrace.split('\n') 734 + // if there is no message in a stack trace, use the item - 1 735 + const importerStackIndex = stackArray.findIndex((stack) => { 736 + return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`) 737 + }) 738 + const stack = parseSingleStack(stackArray[importerStackIndex + 1]) 739 + return stack?.file || '' 740 + }
+61 -58
packages/vitest/src/node/core.ts
··· 844 844 ) 845 845 } 846 846 847 - private unregisterWatcher = noop 848 - private registerWatcher() { 849 - const updateLastChanged = (filepath: string) => { 850 - const projects = this.getModuleProjects(filepath) 851 - projects.forEach(({ server, browser }) => { 852 - const serverMods = server.moduleGraph.getModulesByFile(filepath) 853 - serverMods?.forEach(mod => server.moduleGraph.invalidateModule(mod)) 847 + private updateLastChanged(filepath: string) { 848 + const projects = this.getModuleProjects(filepath) 849 + projects.forEach(({ server, browser }) => { 850 + const serverMods = server.moduleGraph.getModulesByFile(filepath) 851 + serverMods?.forEach(mod => server.moduleGraph.invalidateModule(mod)) 854 852 855 - if (browser) { 856 - const browserMods = browser.vite.moduleGraph.getModulesByFile(filepath) 857 - browserMods?.forEach(mod => browser.vite.moduleGraph.invalidateModule(mod)) 858 - } 859 - }) 853 + if (browser) { 854 + const browserMods = browser.vite.moduleGraph.getModulesByFile(filepath) 855 + browserMods?.forEach(mod => browser.vite.moduleGraph.invalidateModule(mod)) 856 + } 857 + }) 858 + } 859 + 860 + onChange = (id: string) => { 861 + id = slash(id) 862 + this.logger.clearHighlightCache(id) 863 + this.updateLastChanged(id) 864 + const needsRerun = this.handleFileChanged(id) 865 + if (needsRerun.length) { 866 + this.scheduleRerun(needsRerun) 860 867 } 868 + } 861 869 862 - const onChange = (id: string) => { 863 - id = slash(id) 864 - this.logger.clearHighlightCache(id) 865 - updateLastChanged(id) 870 + onUnlink = (id: string) => { 871 + id = slash(id) 872 + this.logger.clearHighlightCache(id) 873 + this.invalidates.add(id) 874 + 875 + if (this.state.filesMap.has(id)) { 876 + this.state.filesMap.delete(id) 877 + this.cache.results.removeFromCache(id) 878 + this.cache.stats.removeStats(id) 879 + this.changedTests.delete(id) 880 + this.report('onTestRemoved', id) 881 + } 882 + } 883 + 884 + onAdd = async (id: string) => { 885 + id = slash(id) 886 + this.updateLastChanged(id) 887 + 888 + const matchingProjects: WorkspaceProject[] = [] 889 + await Promise.all(this.projects.map(async (project) => { 890 + if (await project.isTargetFile(id)) { 891 + matchingProjects.push(project) 892 + project.testFilesList?.push(id) 893 + } 894 + })) 895 + 896 + if (matchingProjects.length > 0) { 897 + this.changedTests.add(id) 898 + this.scheduleRerun([id]) 899 + } 900 + else { 901 + // it's possible that file was already there but watcher triggered "add" event instead 866 902 const needsRerun = this.handleFileChanged(id) 867 903 if (needsRerun.length) { 868 904 this.scheduleRerun(needsRerun) 869 905 } 870 906 } 871 - const onUnlink = (id: string) => { 872 - id = slash(id) 873 - this.logger.clearHighlightCache(id) 874 - this.invalidates.add(id) 907 + } 875 908 876 - if (this.state.filesMap.has(id)) { 877 - this.state.filesMap.delete(id) 878 - this.cache.results.removeFromCache(id) 879 - this.cache.stats.removeStats(id) 880 - this.changedTests.delete(id) 881 - this.report('onTestRemoved', id) 882 - } 883 - } 884 - const onAdd = async (id: string) => { 885 - id = slash(id) 886 - updateLastChanged(id) 887 - 888 - const matchingProjects: WorkspaceProject[] = [] 889 - await Promise.all(this.projects.map(async (project) => { 890 - if (await project.isTargetFile(id)) { 891 - matchingProjects.push(project) 892 - project.testFilesList?.push(id) 893 - } 894 - })) 895 - 896 - if (matchingProjects.length > 0) { 897 - this.changedTests.add(id) 898 - this.scheduleRerun([id]) 899 - } 900 - else { 901 - // it's possible that file was already there but watcher triggered "add" event instead 902 - const needsRerun = this.handleFileChanged(id) 903 - if (needsRerun.length) { 904 - this.scheduleRerun(needsRerun) 905 - } 906 - } 907 - } 909 + private unregisterWatcher = noop 910 + private registerWatcher() { 908 911 const watcher = this.server.watcher 909 912 910 913 if (this.config.forceRerunTriggers.length) { 911 914 watcher.add(this.config.forceRerunTriggers) 912 915 } 913 916 914 - watcher.on('change', onChange) 915 - watcher.on('unlink', onUnlink) 916 - watcher.on('add', onAdd) 917 + watcher.on('change', this.onChange) 918 + watcher.on('unlink', this.onUnlink) 919 + watcher.on('add', this.onAdd) 917 920 918 921 this.unregisterWatcher = () => { 919 - watcher.off('change', onChange) 920 - watcher.off('unlink', onUnlink) 921 - watcher.off('add', onAdd) 922 + watcher.off('change', this.onChange) 923 + watcher.off('unlink', this.onUnlink) 924 + watcher.off('add', this.onAdd) 922 925 this.unregisterWatcher = noop 923 926 } 924 927 }
+13 -13
packages/vitest/src/node/error.ts
··· 274 274 c.yellow( 275 275 `Module ${path} seems to be an ES Module but shipped in a CommonJS package. ` 276 276 + `You might want to create an issue to the package ${c.bold( 277 - `"${name}"`, 278 - )} asking ` 279 - + 'them to ship the file in .mjs extension or add "type": "module" in their package.json.' 280 - + '\n\n' 281 - + 'As a temporary workaround you can try to inline the package by updating your config:' 282 - + '\n\n' 283 - + c.gray(c.dim('// vitest.config.js')) 284 - + '\n' 285 - + c.green(`export default { 277 + `"${name}"`, 278 + )} asking ` 279 + + 'them to ship the file in .mjs extension or add "type": "module" in their package.json.' 280 + + '\n\n' 281 + + 'As a temporary workaround you can try to inline the package by updating your config:' 282 + + '\n\n' 283 + + c.gray(c.dim('// vitest.config.js')) 284 + + '\n' 285 + + c.green(`export default { 286 286 test: { 287 287 server: { 288 288 deps: { ··· 387 387 388 388 const columns = process.stdout?.columns || 80 389 389 390 - function lineNo(no: number | string = '') { 391 - return c.gray(`${String(no).padStart(3, ' ')}| `) 392 - } 393 - 394 390 for (let i = 0; i < lines.length; i++) { 395 391 count += lines[i].length + nl 396 392 if (count >= start) { ··· 437 433 } 438 434 439 435 return res.join('\n') 436 + } 437 + 438 + function lineNo(no: number | string = '') { 439 + return c.gray(`${String(no).padStart(3, ' ')}| `) 440 440 }
+7 -7
packages/vitest/src/node/stdin.ts
··· 25 25 ` 26 26 ${c.bold(' Watch Usage')} 27 27 ${keys 28 - .map( 29 - i => 30 - c.dim(' press ') 31 - + c.reset([i[0]].flat().map(c.bold).join(', ')) 32 - + c.dim(` to ${i[1]}`), 33 - ) 34 - .join('\n')} 28 + .map( 29 + i => 30 + c.dim(' press ') 31 + + c.reset([i[0]].flat().map(c.bold).join(', ')) 32 + + c.dim(` to ${i[1]}`), 33 + ) 34 + .join('\n')} 35 35 `, 36 36 ) 37 37 }
+4 -3
packages/vitest/src/utils/graph.ts
··· 14 14 15 15 const project = ctx.getProjectByName(projectName) 16 16 17 - function clearId(id?: string | null) { 18 - return id?.replace(/\?v=\w+$/, '') || '' 19 - } 20 17 async function get(mod?: ModuleNode, seen = new Map<ModuleNode, string>()) { 21 18 if (!mod || !mod.id) { 22 19 return ··· 62 59 externalized: Array.from(externalized), 63 60 inlined: Array.from(inlined), 64 61 } 62 + } 63 + 64 + function clearId(id?: string | null) { 65 + return id?.replace(/\?v=\w+$/, '') || '' 65 66 }
+4 -1
packages/vitest/src/utils/index.ts
··· 35 35 return obj 36 36 } 37 37 38 + /** 39 + * @deprecated import from `@vitest/utils` instead 40 + */ 38 41 export function objectAttr( 39 42 source: any, 40 43 path: string, ··· 44 47 const paths = path.replace(/\[(\d+)\]/g, '.$1').split('.') 45 48 let result = source 46 49 for (const p of paths) { 47 - result = Object(result)[p] 50 + result = (new Object(result) as any)[p] 48 51 if (result === undefined) { 49 52 return defaultValue 50 53 }
+2 -2
packages/browser/src/client/tester/dialog.ts
··· 9 9 import { expect, vi } from "vitest" 10 10 11 11 vi.spyOn(window, "${name}")${ 12 - defaultValue ? `.mockReturnValue(${JSON.stringify(defaultValue)})` : '' 13 - } 12 + defaultValue ? `.mockReturnValue(${JSON.stringify(defaultValue)})` : '' 13 + } 14 14 ${name}(${formatedParams}) 15 15 expect(${name}).toHaveBeenCalledWith(${formatedParams}) 16 16 \`\`\``)
+53 -43
packages/browser/src/client/tester/logger.ts
··· 20 20 count, 21 21 countReset, 22 22 } = console 23 - const formatInput = (input: unknown) => { 24 - if (typeof input === 'object') { 25 - return stringify(input, undefined, { 26 - printBasicPrototype: false, 27 - escapeString: false, 28 - }) 29 - } 30 - return format(input) 31 - } 32 - const processLog = (args: unknown[]) => args.map(formatInput).join(' ') 33 - const sendLog = ( 34 - type: 'stdout' | 'stderr', 35 - content: string, 36 - disableStack?: boolean, 37 - ) => { 38 - if (content.startsWith('[vite]')) { 39 - return 40 - } 41 - const unknownTestId = '__vitest__unknown_test__' 42 - // @ts-expect-error untyped global 43 - const taskId = globalThis.__vitest_worker__?.current?.id ?? unknownTestId 44 - const origin 45 - = getConfig().printConsoleTrace && !disableStack 46 - ? new Error('STACK_TRACE').stack?.split('\n').slice(1).join('\n') 47 - : undefined 48 - rpc().sendLog({ 49 - origin, 50 - content, 51 - browser: true, 52 - time: Date.now(), 53 - taskId, 54 - type, 55 - size: content.length, 56 - }) 57 - } 58 - const stdout = (base: (...args: unknown[]) => void) => (...args: unknown[]) => { 59 - base(...args) 60 - sendLog('stdout', processLog(args)) 61 - } 62 - const stderr = (base: (...args: unknown[]) => void) => (...args: unknown[]) => { 63 - base(...args) 64 - sendLog('stderr', processLog(args)) 65 - } 66 23 console.log = stdout(log) 67 24 console.debug = stdout(debug) 68 25 console.info = stdout(info) ··· 135 92 countReset(label) 136 93 countLabels[label] = 0 137 94 } 95 + } 96 + 97 + function stdout(base: (...args: unknown[]) => void) { 98 + return (...args: unknown[]) => { 99 + base(...args) 100 + sendLog('stdout', processLog(args)) 101 + } 102 + } 103 + function stderr(base: (...args: unknown[]) => void) { 104 + return (...args: unknown[]) => { 105 + base(...args) 106 + sendLog('stderr', processLog(args)) 107 + } 108 + } 109 + 110 + function formatInput(input: unknown) { 111 + if (typeof input === 'object') { 112 + return stringify(input, undefined, { 113 + printBasicPrototype: false, 114 + escapeString: false, 115 + }) 116 + } 117 + return format(input) 118 + } 119 + 120 + function processLog(args: unknown[]) { 121 + return args.map(formatInput).join(' ') 122 + } 123 + 124 + function sendLog( 125 + type: 'stdout' | 'stderr', 126 + content: string, 127 + disableStack?: boolean, 128 + ) { 129 + if (content.startsWith('[vite]')) { 130 + return 131 + } 132 + const unknownTestId = '__vitest__unknown_test__' 133 + // @ts-expect-error untyped global 134 + const taskId = globalThis.__vitest_worker__?.current?.id ?? unknownTestId 135 + const origin 136 + = getConfig().printConsoleTrace && !disableStack 137 + ? new Error('STACK_TRACE').stack?.split('\n').slice(1).join('\n') 138 + : undefined 139 + rpc().sendLog({ 140 + origin, 141 + content, 142 + browser: true, 143 + time: Date.now(), 144 + taskId, 145 + type, 146 + size: content.length, 147 + }) 138 148 }
+4 -4
packages/browser/src/client/tester/state.ts
··· 63 63 64 64 const listeners: Record<string, Function[]> = {} 65 65 66 - const error = (err: unknown) => { 67 - window.dispatchEvent(new ErrorEvent('error', { error: err })) 68 - } 69 - 70 66 const cdp = { 71 67 send(method: string, params?: Record<string, any>) { 72 68 return rpc().sendCdpEvent(contextId, method, params) ··· 112 108 } 113 109 114 110 return cdp 111 + } 112 + 113 + function error(err: unknown) { 114 + window.dispatchEvent(new ErrorEvent('error', { error: err })) 115 115 }
+17 -16
packages/browser/src/node/commands/keyboard.ts
··· 14 14 text, 15 15 state, 16 16 ) => { 17 - function focusIframe() { 18 - if ( 19 - !document.activeElement 20 - || document.activeElement.ownerDocument !== document 21 - || document.activeElement === document.body 22 - ) { 23 - window.focus() 24 - } 25 - } 26 - 27 17 if (context.provider instanceof PlaywrightBrowserProvider) { 28 18 const frame = await context.frame() 29 19 await frame.evaluate(focusIframe) ··· 40 30 context.contextId, 41 31 text, 42 32 async () => { 43 - function selectAll() { 44 - const element = document.activeElement as HTMLInputElement 45 - if (element && element.select) { 46 - element.select() 47 - } 48 - } 49 33 if (context.provider instanceof PlaywrightBrowserProvider) { 50 34 const frame = await context.frame() 51 35 await frame.evaluate(selectAll) ··· 163 147 164 148 return { 165 149 pressed, 150 + } 151 + } 152 + 153 + function focusIframe() { 154 + if ( 155 + !document.activeElement 156 + || document.activeElement.ownerDocument !== document 157 + || document.activeElement === document.body 158 + ) { 159 + window.focus() 160 + } 161 + } 162 + 163 + function selectAll() { 164 + const element = document.activeElement as HTMLInputElement 165 + if (element && element.select) { 166 + element.select() 166 167 } 167 168 }
+2 -2
packages/ui/client/components/views/ViewModuleGraph.vue
··· 106 106 ) 107 107 } 108 108 109 + const isValidClick = (event: PointerEvent) => event.button === 0 110 + 109 111 function bindOnClick( 110 112 selection: Selection<SVGCircleElement, ModuleNode, SVGGElement, undefined>, 111 113 ) { ··· 113 115 return 114 116 } 115 117 // Only trigger on left-click and primary touch 116 - const isValidClick = (event: PointerEvent) => event.button === 0 117 - 118 118 let px = 0 119 119 let py = 0 120 120 let pt = 0
+9 -9
packages/vitest/src/integrations/snapshot/chai.ts
··· 44 44 throw new Error('snapshot function didn\'t throw') 45 45 } 46 46 47 - export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { 48 - const getTestNames = (test?: Test) => { 49 - if (!test) { 50 - return {} 51 - } 52 - return { 53 - filepath: test.file.filepath, 54 - name: getNames(test).slice(1).join(' > '), 55 - } 47 + function getTestNames(test?: Test) { 48 + if (!test) { 49 + return {} 56 50 } 51 + return { 52 + filepath: test.file.filepath, 53 + name: getNames(test).slice(1).join(' > '), 54 + } 55 + } 57 56 57 + export const SnapshotPlugin: ChaiPlugin = (chai, utils) => { 58 58 for (const key of ['matchSnapshot', 'toMatchSnapshot']) { 59 59 utils.addMethod( 60 60 chai.Assertion.prototype,
+22 -19
packages/vitest/src/node/reporters/base.ts
··· 248 248 const TRIGGER = trigger ? c.dim(` ${this.relative(trigger)}`) : '' 249 249 const FILENAME_PATTERN = this.ctx.filenamePattern 250 250 ? `${BADGE_PADDING} ${c.dim('Filename pattern: ')}${c.blue( 251 - this.ctx.filenamePattern, 252 - )}\n` 251 + this.ctx.filenamePattern, 252 + )}\n` 253 253 : '' 254 254 const TESTNAME_PATTERN = this.ctx.configOverride.testNamePattern 255 255 ? `${BADGE_PADDING} ${c.dim('Test name pattern: ')}${c.blue( 256 - String(this.ctx.configOverride.testNamePattern), 257 - )}\n` 256 + String(this.ctx.configOverride.testNamePattern), 257 + )}\n` 258 258 : '' 259 259 const PROJECT_FILTER = this.ctx.configOverride.project 260 260 ? `${BADGE_PADDING} ${c.dim('Project name: ')}${c.blue( 261 - toArray(this.ctx.configOverride.project).join(', '), 262 - )}\n` 261 + toArray(this.ctx.configOverride.project).join(', '), 262 + )}\n` 263 263 : '' 264 264 265 265 if (files.length > 1 || !files.length) { ··· 297 297 const header = c.gray( 298 298 log.type 299 299 + c.dim( 300 - ` | ${ 301 - task 302 - ? getFullName(task, c.dim(' > ')) 303 - : log.taskId !== '__vitest__unknown_test__' 300 + ` | ${ 301 + task 302 + ? getFullName(task, c.dim(' > ')) 303 + : log.taskId !== '__vitest__unknown_test__' 304 304 ? log.taskId 305 305 : 'unknown test' 306 - }`, 306 + }`, 307 307 ), 308 308 ) 309 309 ··· 418 418 0, 419 419 ) 420 420 const threadTime = collectTime + testsTime + setupTime 421 - 422 - const padTitle = (str: string) => c.dim(`${str.padStart(11)} `) 423 - const time = (time: number) => { 424 - if (time > 1000) { 425 - return `${(time / 1000).toFixed(2)}s` 426 - } 427 - return `${Math.round(time)}ms` 428 - } 429 421 430 422 // show top 10 costly transform module 431 423 // console.log(Array.from(this.ctx.vitenode.fetchCache.entries()).filter(i => i[1].duration) ··· 647 639 process.off('unhandledRejection', onUnhandledRejection) 648 640 } 649 641 } 642 + } 643 + 644 + function padTitle(str: string) { 645 + return c.dim(`${str.padStart(11)} `) 646 + } 647 + 648 + function time(time: number) { 649 + if (time > 1000) { 650 + return `${(time / 1000).toFixed(2)}s` 651 + } 652 + return `${Math.round(time)}ms` 650 653 }
+1 -1
packages/vitest/src/node/reporters/benchmark/table/tableRender.ts
··· 126 126 if (baseline) { 127 127 benchMap[t.id].baseline = { 128 128 ...baseline, 129 - samples: Array(baseline.sampleCount), 129 + samples: Array.from({ length: baseline.sampleCount }), 130 130 } 131 131 } 132 132 }