diff --git a/package.json b/package.json index e48f74baa..2fc4669ed 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "devDependencies": { "@4tw/cypress-drag-drop": "2.2.5", "@cypress/vite-dev-server": "5.0.6", - "@cypress/vue": "5.0.5", + "@cypress/vue": "6.0.0", "@faker-js/faker": "8.2.0", "@histoire/plugin-screenshot": "0.17.0", "@histoire/plugin-vue": "0.17.1", @@ -110,7 +110,7 @@ "@typescript-eslint/parser": "6.8.0", "@vitejs/plugin-legacy": "4.1.1", "@vitejs/plugin-vue": "4.4.0", - "@vue/eslint-config-typescript": "11.0.3", + "@vue/eslint-config-typescript": "12.0.0", "@vue/test-utils": "2.4.1", "@vue/tsconfig": "0.4.0", "autoprefixer": "10.4.16", @@ -118,18 +118,18 @@ "caniuse-lite": "1.0.30001551", "css-has-pseudo": "6.0.0", "csstype": "3.1.2", - "cypress": "12.17.4", + "cypress": "13.3.2", "esbuild": "0.19.5", "eslint": "8.51.0", "eslint-plugin-vue": "9.17.0", - "happy-dom": "10.11.2", + "happy-dom": "12.9.1", "histoire": "0.17.2", "postcss": "8.4.31", "postcss-easing-gradients": "3.0.1", "postcss-easings": "4.0.0", "postcss-focus-within": "8.0.0", "postcss-preset-env": "9.2.0", - "rollup": "3.29.4", + "rollup": "4.1.4", "rollup-plugin-visualizer": "5.9.2", "sass": "1.69.4", "start-server-and-test": "2.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c54e6d2c..d2753277b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,7 +30,7 @@ dependencies: version: 2.2.0(dayjs@1.11.10)(vue@3.3.6) '@intlify/unplugin-vue-i18n': specifier: 1.4.0 - version: 1.4.0(rollup@3.29.4)(vue-i18n@9.5.0) + version: 1.4.0(rollup@4.1.4)(vue-i18n@9.5.0) '@kyvg/vue3-notification': specifier: 3.0.2 version: 3.0.2(vue@3.3.6) @@ -140,13 +140,13 @@ dependencies: devDependencies: '@4tw/cypress-drag-drop': specifier: 2.2.5 - version: 2.2.5(cypress@12.17.4) + version: 2.2.5(cypress@13.3.2) '@cypress/vite-dev-server': specifier: 5.0.6 version: 5.0.6 '@cypress/vue': - specifier: 5.0.5 - version: 5.0.5(cypress@12.17.4)(vue@3.3.6) + specifier: 6.0.0 + version: 6.0.0(cypress@13.3.2)(vue@3.3.6) '@faker-js/faker': specifier: 8.2.0 version: 8.2.0 @@ -202,8 +202,8 @@ devDependencies: specifier: 4.4.0 version: 4.4.0(vite@4.5.0)(vue@3.3.6) '@vue/eslint-config-typescript': - specifier: 11.0.3 - version: 11.0.3(eslint-plugin-vue@9.17.0)(eslint@8.51.0)(typescript@5.2.2) + specifier: 12.0.0 + version: 12.0.0(eslint-plugin-vue@9.17.0)(eslint@8.51.0)(typescript@5.2.2) '@vue/test-utils': specifier: 2.4.1 version: 2.4.1(vue@3.3.6) @@ -226,8 +226,8 @@ devDependencies: specifier: 3.1.2 version: 3.1.2 cypress: - specifier: 12.17.4 - version: 12.17.4 + specifier: 13.3.2 + version: 13.3.2 esbuild: specifier: 0.19.5 version: 0.19.5 @@ -238,8 +238,8 @@ devDependencies: specifier: 9.17.0 version: 9.17.0(eslint@8.51.0) happy-dom: - specifier: 10.11.2 - version: 10.11.2 + specifier: 12.9.1 + version: 12.9.1 histoire: specifier: 0.17.2 version: 0.17.2(@types/node@18.18.6)(sass@1.69.4)(terser@5.10.0)(vite@4.5.0) @@ -259,11 +259,11 @@ devDependencies: specifier: 9.2.0 version: 9.2.0(postcss@8.4.31) rollup: - specifier: 3.29.4 - version: 3.29.4 + specifier: 4.1.4 + version: 4.1.4 rollup-plugin-visualizer: specifier: 5.9.2 - version: 5.9.2(rollup@3.29.4) + version: 5.9.2(rollup@4.1.4) sass: specifier: 1.69.4 version: 1.69.4 @@ -290,7 +290,7 @@ devDependencies: version: 4.0.0 vitest: specifier: 0.34.6 - version: 0.34.6(happy-dom@10.11.2)(sass@1.69.4)(terser@5.10.0) + version: 0.34.6(happy-dom@12.9.1)(sass@1.69.4)(terser@5.10.0) vue-tsc: specifier: 1.8.19 version: 1.8.19(typescript@5.2.2) @@ -303,12 +303,12 @@ devDependencies: packages: - /@4tw/cypress-drag-drop@2.2.5(cypress@12.17.4): + /@4tw/cypress-drag-drop@2.2.5(cypress@13.3.2): resolution: {integrity: sha512-3ghTmzhOmUqeN6U3QmUnKRUxI7OMLbJA4hHUY/eS/FhWJgxbiGgcaELbolWnBAOpajPXcsNQGYEj9brd59WH6A==} peerDependencies: cypress: 2 - 13 dependencies: - cypress: 12.17.4 + cypress: 13.3.2 dev: true /@aashutoshrathi/word-wrap@1.2.6: @@ -3016,8 +3016,8 @@ packages: postcss-selector-parser: 6.0.13 dev: true - /@cypress/request@2.88.12: - resolution: {integrity: sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==} + /@cypress/request@3.0.1: + resolution: {integrity: sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==} engines: {node: '>= 6'} dependencies: aws-sign2: 0.7.0 @@ -3051,8 +3051,8 @@ packages: - supports-color dev: true - /@cypress/vue@5.0.5(cypress@12.17.4)(vue@3.3.6): - resolution: {integrity: sha512-gjE0LKixK6XT4lPDFaEc8G6qNzm8YELgmbOiMVDxbVMuTtjYjorWQcIgzQ62uBX90/s7JrldXJ0W23gskoH4Ng==} + /@cypress/vue@6.0.0(cypress@13.3.2)(vue@3.3.6): + resolution: {integrity: sha512-KMfRw8y/kXn/RJqaDdFnYnW7YLk47313UE3Yip+sLDjILJ2kA0WEiEa6MYKe58v8TNRtwcRpUH5xAYVNs1N6/A==} engines: {node: '>=8'} peerDependencies: '@cypress/webpack-dev-server': '*' @@ -3062,7 +3062,7 @@ packages: '@cypress/webpack-dev-server': optional: true dependencies: - cypress: 12.17.4 + cypress: 13.3.2 vue: 3.3.6(typescript@5.2.2) dev: true @@ -3739,7 +3739,7 @@ packages: engines: {node: '>= 16'} dev: false - /@intlify/unplugin-vue-i18n@1.4.0(rollup@3.29.4)(vue-i18n@9.5.0): + /@intlify/unplugin-vue-i18n@1.4.0(rollup@4.1.4)(vue-i18n@9.5.0): resolution: {integrity: sha512-RGDchCRBlDTyVVFgPA1C1XC1uD4xYN81Ma+3EnU6GQ8pBEreraX/PWdPXXzOB6k9GWCQHuqii3atYXhcH3rpSg==} engines: {node: '>= 14.16'} peerDependencies: @@ -3756,7 +3756,7 @@ packages: dependencies: '@intlify/bundle-utils': 7.4.0(vue-i18n@9.5.0) '@intlify/shared': 9.5.0 - '@rollup/pluginutils': 5.0.2(rollup@3.29.4) + '@rollup/pluginutils': 5.0.2(rollup@4.1.4) '@vue/compiler-sfc': 3.3.4 debug: 4.3.4(supports-color@8.1.1) fast-glob: 3.3.1 @@ -3965,7 +3965,7 @@ packages: rollup: 2.79.1 dev: true - /@rollup/pluginutils@5.0.2(rollup@3.29.4): + /@rollup/pluginutils@5.0.2(rollup@4.1.4): resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -3977,9 +3977,93 @@ packages: '@types/estree': 1.0.0 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.29.4 + rollup: 4.1.4 dev: false + /@rollup/rollup-android-arm-eabi@4.1.4: + resolution: {integrity: sha512-WlzkuFvpKl6CLFdc3V6ESPt7gq5Vrimd2Yv9IzKXdOpgbH4cdDSS1JLiACX8toygihtH5OlxyQzhXOph7Ovlpw==} + cpu: [arm] + os: [android] + requiresBuild: true + optional: true + + /@rollup/rollup-android-arm64@4.1.4: + resolution: {integrity: sha512-D1e+ABe56T9Pq2fD+R3ybe1ylCDzu3tY4Qm2Mj24R9wXNCq35+JbFbOpc2yrroO2/tGhTobmEl2Bm5xfE/n8RA==} + cpu: [arm64] + os: [android] + requiresBuild: true + optional: true + + /@rollup/rollup-darwin-arm64@4.1.4: + resolution: {integrity: sha512-7vTYrgEiOrjxnjsgdPB+4i7EMxbVp7XXtS+50GJYj695xYTTEMn3HZVEvgtwjOUkAP/Q4HDejm4fIAjLeAfhtg==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + optional: true + + /@rollup/rollup-darwin-x64@4.1.4: + resolution: {integrity: sha512-eGJVZScKSLZkYjhTAESCtbyTBq9SXeW9+TX36ki5gVhDqJtnQ5k0f9F44jNK5RhAMgIj0Ht9+n6HAgH0gUUyWQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.1.4: + resolution: {integrity: sha512-HnigYSEg2hOdX1meROecbk++z1nVJDpEofw9V2oWKqOWzTJlJf1UXVbDE6Hg30CapJxZu5ga4fdAQc/gODDkKg==} + cpu: [arm] + os: [linux] + requiresBuild: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.1.4: + resolution: {integrity: sha512-TzJ+N2EoTLWkaClV2CUhBlj6ljXofaYzF/R9HXqQ3JCMnCHQZmQnbnZllw7yTDp0OG5whP4gIPozR4QiX+00MQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.1.4: + resolution: {integrity: sha512-aVPmNMdp6Dlo2tWkAduAD/5TL/NT5uor290YvjvFvCv0Q3L7tVdlD8MOGDL+oRSw5XKXKAsDzHhUOPUNPRHVTQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.1.4: + resolution: {integrity: sha512-77Fb79ayiDad0grvVsz4/OB55wJRyw9Ao+GdOBA9XywtHpuq5iRbVyHToGxWquYWlEf6WHFQQnFEttsAzboyKg==} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.1.4: + resolution: {integrity: sha512-/t6C6niEQTqmQTVTD9TDwUzxG91Mlk69/v0qodIPUnjjB3wR4UA3klg+orR2SU3Ux2Cgf2pWPL9utK80/1ek8g==} + cpu: [x64] + os: [linux] + requiresBuild: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.1.4: + resolution: {integrity: sha512-ZY5BHHrOPkMbCuGWFNpJH0t18D2LU6GMYKGaqaWTQ3CQOL57Fem4zE941/Ek5pIsVt70HyDXssVEFQXlITI5Gg==} + cpu: [arm64] + os: [win32] + requiresBuild: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.1.4: + resolution: {integrity: sha512-XG2mcRfFrJvYyYaQmvCIvgfkaGinfXrpkBuIbJrTl9SaIQ8HumheWTIwkNz2mktCKwZfXHQNpO7RgXLIGQ7HXA==} + cpu: [ia32] + os: [win32] + requiresBuild: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.1.4: + resolution: {integrity: sha512-ANFqWYPwkhIqPmXw8vm0GpBEHiPpqcm99jiiAp71DbCSqLDhrtr019C5vhD0Bw4My+LmMvciZq6IsWHqQpl2ZQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + optional: true + /@rushstack/eslint-patch@1.5.1: resolution: {integrity: sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==} dev: true @@ -4241,10 +4325,6 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node@16.18.41: - resolution: {integrity: sha512-YZJjn+Aaw0xihnpdImxI22jqGbp0DCgTFKRycygjGx/Y27NnWFJa5FJ7P+MRT3u07dogEeMVh70pWpbIQollTA==} - dev: true - /@types/node@18.18.6: resolution: {integrity: sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==} dev: true @@ -4313,34 +4393,6 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@5.61.0(@typescript-eslint/parser@5.61.0)(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 5.61.0(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 5.61.0 - '@typescript-eslint/type-utils': 5.61.0(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/utils': 5.61.0(eslint@8.51.0)(typescript@5.2.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.51.0 - graphemer: 1.4.0 - ignore: 5.2.4 - natural-compare-lite: 1.4.0 - semver: 7.5.4 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4370,26 +4422,6 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.61.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.61.0 - '@typescript-eslint/types': 5.61.0 - '@typescript-eslint/typescript-estree': 5.61.0(typescript@5.2.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.51.0 - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/parser@6.8.0(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4411,14 +4443,6 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@5.61.0: - resolution: {integrity: sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.61.0 - '@typescript-eslint/visitor-keys': 5.61.0 - dev: true - /@typescript-eslint/scope-manager@6.8.0: resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4427,26 +4451,6 @@ packages: '@typescript-eslint/visitor-keys': 6.8.0 dev: true - /@typescript-eslint/type-utils@5.61.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.61.0(typescript@5.2.2) - '@typescript-eslint/utils': 5.61.0(eslint@8.51.0)(typescript@5.2.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.51.0 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/type-utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4467,37 +4471,11 @@ packages: - supports-color dev: true - /@typescript-eslint/types@5.61.0: - resolution: {integrity: sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /@typescript-eslint/types@6.8.0: resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@5.61.0(typescript@5.2.2): - resolution: {integrity: sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.61.0 - '@typescript-eslint/visitor-keys': 5.61.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/typescript-estree@6.8.0(typescript@5.2.2): resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4519,26 +4497,6 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.61.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.61.0 - '@typescript-eslint/types': 5.61.0 - '@typescript-eslint/typescript-estree': 5.61.0(typescript@5.2.2) - eslint: 8.51.0 - eslint-scope: 5.1.1 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4558,14 +4516,6 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@5.61.0: - resolution: {integrity: sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.61.0 - eslint-visitor-keys: 3.4.3 - dev: true - /@typescript-eslint/visitor-keys@6.8.0: resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4773,8 +4723,8 @@ packages: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} dev: false - /@vue/eslint-config-typescript@11.0.3(eslint-plugin-vue@9.17.0)(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-dkt6W0PX6H/4Xuxg/BlFj5xHvksjpSlVjtkQCpaYJBIEuKj2hOVU7r+TIe+ysCwRYFz/lGqvklntRkCAibsbPw==} + /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.17.0)(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 @@ -4784,12 +4734,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.61.0(@typescript-eslint/parser@5.61.0)(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/parser': 5.61.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) eslint: 8.51.0 eslint-plugin-vue: 9.17.0(eslint@8.51.0) typescript: 5.2.2 - vue-eslint-parser: 9.1.1(eslint@8.51.0) + vue-eslint-parser: 9.3.1(eslint@8.51.0) transitivePeerDependencies: - supports-color dev: true @@ -5917,15 +5867,15 @@ packages: /csstype@3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} - /cypress@12.17.4: - resolution: {integrity: sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==} - engines: {node: ^14.0.0 || ^16.0.0 || >=18.0.0} + /cypress@13.3.2: + resolution: {integrity: sha512-ArLmZObcLC+xxCp7zJZZbhby9FUf5CueLej9dUM4+5j37FTS4iMSgHxQLDu01PydFUvDXcNoIVRCYrHHxD7Ybg==} + engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true requiresBuild: true dependencies: - '@cypress/request': 2.88.12 + '@cypress/request': 3.0.1 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) - '@types/node': 16.18.41 + '@types/node': 18.18.6 '@types/sinonjs__fake-timers': 8.1.1 '@types/sizzle': 2.3.3 arch: 2.2.0 @@ -6467,14 +6417,6 @@ packages: - supports-color dev: true - /eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: true - /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6560,11 +6502,6 @@ packages: estraverse: 5.3.0 dev: true - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true - /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -7091,8 +7028,8 @@ packages: strip-bom-string: 1.0.0 dev: true - /happy-dom@10.11.2: - resolution: {integrity: sha512-rzgmLjLkhyaOdFEyU8CWXzbgyCyM7wJHLqhaoeEVSTyur1fjcUaiNTHx+D4CPaLvx16tGy+SBPd9TVnP/kzL3w==} + /happy-dom@12.9.1: + resolution: {integrity: sha512-UvQ3IwKn1G3iiNCdTrhijdLGqf8Vj7d3OpmYcPwlKakjFy83oYbW6TmOKDLMTVLO9whmOC1HIpS09wf/14k7cA==} dependencies: css.escape: 1.5.1 entities: 4.5.0 @@ -8212,10 +8149,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: true - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -9335,7 +9268,7 @@ packages: - acorn dev: true - /rollup-plugin-visualizer@5.9.2(rollup@3.29.4): + /rollup-plugin-visualizer@5.9.2(rollup@4.1.4): resolution: {integrity: sha512-waHktD5mlWrYFrhOLbti4YgQCn1uR24nYsNuXxg7LkPH8KdTXVWR9DNY1WU0QqokyMixVXJS4J04HNrVTMP01A==} engines: {node: '>=14'} hasBin: true @@ -9347,7 +9280,7 @@ packages: dependencies: open: 8.4.0 picomatch: 2.3.1 - rollup: 3.29.4 + rollup: 4.1.4 source-map: 0.7.4 yargs: 17.6.0 dev: true @@ -9366,6 +9299,26 @@ packages: hasBin: true optionalDependencies: fsevents: 2.3.2 + dev: true + + /rollup@4.1.4: + resolution: {integrity: sha512-U8Yk1lQRKqCkDBip/pMYT+IKaN7b7UesK3fLSTuHBoBJacCE+oBqo/dfG/gkUdQNNB2OBmRP98cn2C2bkYZkyw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.1.4 + '@rollup/rollup-android-arm64': 4.1.4 + '@rollup/rollup-darwin-arm64': 4.1.4 + '@rollup/rollup-darwin-x64': 4.1.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.1.4 + '@rollup/rollup-linux-arm64-gnu': 4.1.4 + '@rollup/rollup-linux-arm64-musl': 4.1.4 + '@rollup/rollup-linux-x64-gnu': 4.1.4 + '@rollup/rollup-linux-x64-musl': 4.1.4 + '@rollup/rollup-win32-arm64-msvc': 4.1.4 + '@rollup/rollup-win32-ia32-msvc': 4.1.4 + '@rollup/rollup-win32-x64-msvc': 4.1.4 + fsevents: 2.3.2 /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -9994,16 +9947,6 @@ packages: /tslib@2.3.1: resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} - /tsutils@3.21.0(typescript@5.2.2): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.2.2 - dev: true - /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: @@ -10386,7 +10329,7 @@ packages: fsevents: 2.3.2 dev: true - /vitest@0.34.6(happy-dom@10.11.2)(sass@1.69.4)(terser@5.10.0): + /vitest@0.34.6(happy-dom@12.9.1)(sass@1.69.4)(terser@5.10.0): resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} hasBin: true @@ -10430,7 +10373,7 @@ packages: cac: 6.7.14 chai: 4.3.10 debug: 4.3.4(supports-color@8.1.1) - happy-dom: 10.11.2 + happy-dom: 12.9.1 local-pkg: 0.4.3 magic-string: 0.30.1 pathe: 1.1.1 @@ -10483,24 +10426,6 @@ packages: vue: 3.3.6(typescript@5.2.2) dev: false - /vue-eslint-parser@9.1.1(eslint@8.51.0): - resolution: {integrity: sha512-C2aI/r85Q6tYcz4dpgvrs4wH/MqVrRAVIdpYedrxnATDHHkb+TroeRcDpKWGZCx/OcECMWfz7tVwQ8e+Opy6rA==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - dependencies: - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.51.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.4.2 - lodash: 4.17.21 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - dev: true - /vue-eslint-parser@9.3.1(eslint@8.51.0): resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==} engines: {node: ^14.17.0 || >=16.0.0} diff --git a/src/components/input/multiselect.vue b/src/components/input/multiselect.vue index b61e898ae..bf7003d1e 100644 --- a/src/components/input/multiselect.vue +++ b/src/components/input/multiselect.vue @@ -107,6 +107,7 @@ import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside' import BaseButton from '@/components/base/BaseButton.vue' import CustomTransition from '@/components/misc/CustomTransition.vue' +// eslint-disable-next-line @typescript-eslint/no-explicit-any function elementInResults(elem: string | any, label: string, query: string): boolean { // Don't make create available if we have an exact match in our search results. if (label !== '') { @@ -135,7 +136,8 @@ const props = defineProps({ * The search results where the @search listener needs to put the results into */ searchResults: { - type: Array as PropType<{[id: string]: any}>, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + type: Array as PropType<{ [id: string]: any }>, default: () => [], }, /** @@ -150,7 +152,8 @@ const props = defineProps({ * The object with the value, updated every time an entry is selected. */ modelValue: { - type: [Object] as PropType<{[key: string]: any}>, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + type: [Object] as PropType<{ [key: string]: any }>, default: null, }, /** @@ -230,7 +233,8 @@ const emit = defineEmits<{ /** * Triggered every time an option from the search results is selected. Also triggers a change in v-model. */ - (e: 'select', value: {[key: string]: any}): void + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (e: 'select', value: { [key: string]: any }): void /** * If nothing or no exact match was found and `creatable` is true, this event is triggered with the current value of the search query. */ @@ -241,11 +245,13 @@ const emit = defineEmits<{ (e: 'remove', value: null): void }>() -const query = ref('') +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const query = ref('') const searchTimeout = ref | null>(null) const localLoading = ref(false) const showSearchResults = ref(false) -const internalValue = ref(null) +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const internalValue = ref(null) onMounted(() => document.addEventListener('click', hideSearchResultsHandler)) onBeforeUnmount(() => document.removeEventListener('click', hideSearchResultsHandler)) @@ -273,6 +279,7 @@ const searchResultsVisible = computed(() => { }) const creatableAvailable = computed(() => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const hasResult = filteredSearchResults.value.some((elem: any) => elementInResults(elem, props.label, query.value)) const hasQueryAlreadyAdded = Array.isArray(internalValue.value) && internalValue.value.some(elem => elementInResults(elem, props.label, query.value)) @@ -284,6 +291,7 @@ const creatableAvailable = computed(() => { const filteredSearchResults = computed(() => { const currentInternal = internalValue.value if (props.multiple && currentInternal !== null && Array.isArray(currentInternal)) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any return searchResults.value.filter((item: any) => !currentInternal.some(e => e === item)) } @@ -342,12 +350,14 @@ function handleFocus() { }, 10) } -function select(object: {[key: string]: any} | null) { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function select(object: { [key: string]: any } | null) { if (props.multiple) { if (internalValue.value === null) { internalValue.value = [] } + // eslint-disable-next-line @typescript-eslint/no-explicit-any (internalValue.value as any[]).push(object) } else { internalValue.value = object @@ -361,7 +371,8 @@ function select(object: {[key: string]: any} | null) { } } -function setSelectedObject(object: string | {[id: string]: any} | null, resetOnly = false) { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setSelectedObject(object: string | { [id: string]: any } | null, resetOnly = false) { internalValue.value = object // We assume we're getting an array when multiple is enabled and can therefore leave the query @@ -430,6 +441,7 @@ function createOrSelectOnEnter() { if (!creatableAvailable.value) { // Check if there's an exact match for our search term + // eslint-disable-next-line @typescript-eslint/no-explicit-any const exactMatch = filteredSearchResults.value.find((elem: any) => elementInResults(elem, props.label, query.value)) if (exactMatch) { select(exactMatch) @@ -441,6 +453,7 @@ function createOrSelectOnEnter() { create() } +// eslint-disable-next-line @typescript-eslint/no-explicit-any function remove(item: any) { for (const ind in internalValue.value) { if (internalValue.value[ind] === item) { diff --git a/src/components/quick-actions/quick-actions.vue b/src/components/quick-actions/quick-actions.vue index 18b24963e..53e6cfa95 100644 --- a/src/components/quick-actions/quick-actions.vue +++ b/src/components/quick-actions/quick-actions.vue @@ -93,6 +93,7 @@ import {success} from '@/message' import type {ITeam} from '@/modelTypes/ITeam' import type {ITask} from '@/modelTypes/ITask' import type {IProject} from '@/modelTypes/IProject' +import type {IAbstract} from '@/modelTypes/IAbstract' const {t} = useI18n({useScope: 'global'}) const router = useRouter() @@ -103,7 +104,7 @@ const labelStore = useLabelStore() const taskStore = useTaskStore() const authStore = useAuthStore() -type DoAction = { type: ACTION_TYPE } & Type +type DoAction = { type: ACTION_TYPE } & Type enum ACTION_TYPE { CMD = 'cmd', @@ -190,7 +191,7 @@ const foundCommands = computed(() => availableCmds.value.filter((a) => interface Result { type: ACTION_TYPE title: string - items: DoAction + items: DoAction } const results = computed(() => { diff --git a/src/components/tasks/add-task.vue b/src/components/tasks/add-task.vue index d377b20e8..dcaf90884 100644 --- a/src/components/tasks/add-task.vue +++ b/src/components/tasks/add-task.vue @@ -178,7 +178,7 @@ async function addTask() { return rel }) await Promise.all(relations) - } catch (e: any) { + } catch (e) { newTaskTitle.value = taskTitleBackup if (e?.message === 'NO_PROJECT') { errorMessage.value = t('project.create.addProjectRequired') diff --git a/src/components/tasks/partials/assigneeList.vue b/src/components/tasks/partials/assigneeList.vue index 384436494..7f406dea3 100644 --- a/src/components/tasks/partials/assigneeList.vue +++ b/src/components/tasks/partials/assigneeList.vue @@ -4,8 +4,6 @@ import BaseButton from '@/components/base/BaseButton.vue' import User from '@/components/misc/user.vue' import {computed} from 'vue' -type removeFunction = (item: any) => void - const { assignees, remove, @@ -14,7 +12,7 @@ const { inline = false, } = defineProps<{ assignees: IUser[], - remove?: removeFunction, + remove?: (user: IUser) => void, disabled?: boolean, avatarSize?: number, inline?: boolean, diff --git a/src/composables/useRouteFilters.ts b/src/composables/useRouteFilters.ts index 29b812d84..53dabaef5 100644 --- a/src/composables/useRouteFilters.ts +++ b/src/composables/useRouteFilters.ts @@ -2,6 +2,7 @@ import {computed, ref, watch, type Ref} from 'vue' import {useRouter, type RouteLocationNormalized, type RouteLocationRaw, type RouteRecordName} from 'vue-router' import equal from 'fast-deep-equal/es6' +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type Filters = Record export function useRouteFilters( diff --git a/src/helpers/case.ts b/src/helpers/case.ts index 81933d361..25980aaaf 100644 --- a/src/helpers/case.ts +++ b/src/helpers/case.ts @@ -4,6 +4,7 @@ import {snakeCase} from 'snake-case' /** * Transforms field names to camel case. */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function objectToCamelCase(object: Record) { // When calling recursively, this can be called without being and object or array in which case we just return the value @@ -11,6 +12,7 @@ export function objectToCamelCase(object: Record) { return object } + // eslint-disable-next-line @typescript-eslint/no-explicit-any const parsedObject: Record = {} for (const m in object) { parsedObject[camelCase(m)] = object[m] @@ -23,6 +25,7 @@ export function objectToCamelCase(object: Record) { // Call it again for arrays if (Array.isArray(object[m])) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any parsedObject[camelCase(m)] = object[m].map((o: Record) => objectToCamelCase(o)) // Because typeof [] === 'object' is true for arrays, we leave the loop here to prevent converting arrays to objects. continue @@ -39,6 +42,7 @@ export function objectToCamelCase(object: Record) { /** * Transforms field names to snake case - used before making an api request. */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function objectToSnakeCase(object: Record) { // When calling recursively, this can be called without being and object or array in which case we just return the value @@ -46,6 +50,7 @@ export function objectToSnakeCase(object: Record) { return object } + // eslint-disable-next-line @typescript-eslint/no-explicit-any const parsedObject: Record = {} for (const m in object) { parsedObject[snakeCase(m)] = object[m] @@ -61,6 +66,7 @@ export function objectToSnakeCase(object: Record) { // Call it again for arrays if (Array.isArray(object[m])) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any parsedObject[snakeCase(m)] = object[m].map((o: Record) => objectToSnakeCase(o)) // Because typeof [] === 'object' is true for arrays, we leave the loop here to prevent converting arrays to objects. continue diff --git a/src/helpers/utils.ts b/src/helpers/utils.ts index 4778a27d0..b9b14bc5e 100644 --- a/src/helpers/utils.ts +++ b/src/helpers/utils.ts @@ -6,7 +6,11 @@ export function findById(array : T[], id : stri return array.find(({id: currentId}) => currentId === id) } -export function includesById(array: any[], id: string | number) { +interface ObjectWithId { + id: number +} + +export function includesById(array: ObjectWithId[], id: string | number) { return array.some(({id: currentId}) => currentId === id) } diff --git a/src/i18n/index.ts b/src/i18n/index.ts index ce83ea4bc..77547a8bc 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -34,6 +34,7 @@ export const i18n = createI18n({ legacy: false, messages: { [DEFAULT_LANGUAGE]: langEN, + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as Record, }) diff --git a/src/modelTypes/IUserSettings.ts b/src/modelTypes/IUserSettings.ts index 18430439c..3358acab9 100644 --- a/src/modelTypes/IUserSettings.ts +++ b/src/modelTypes/IUserSettings.ts @@ -18,7 +18,7 @@ export interface IUserSettings extends IAbstract { discoverableByName: boolean discoverableByEmail: boolean overdueTasksRemindersEnabled: boolean - overdueTasksRemindersTime: any + overdueTasksRemindersTime: string | Date defaultProjectId: undefined | IProject['id'] weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6 timezone: string diff --git a/src/views/project/helpers/useGanttTaskList.ts b/src/views/project/helpers/useGanttTaskList.ts index cf77cd03b..a7a13e706 100644 --- a/src/views/project/helpers/useGanttTaskList.ts +++ b/src/views/project/helpers/useGanttTaskList.ts @@ -82,7 +82,7 @@ export function useGanttTaskList( // update the task with possible changes from server tasks.value.set(updatedTask.id, updatedTask) success('Saved') - } catch (e: any) { + } catch (e) { error('Something went wrong saving the task') // roll back changes tasks.value.set(task.id, oldTask) diff --git a/src/views/sharing/LinkSharingAuth.vue b/src/views/sharing/LinkSharingAuth.vue index b48b437d8..c19bb29c9 100644 --- a/src/views/sharing/LinkSharingAuth.vue +++ b/src/views/sharing/LinkSharingAuth.vue @@ -105,18 +105,18 @@ function useAuth() { params: {projectId}, hash, }) - } catch (e: any) { - if (e.response?.data?.code === 13001) { + } catch (e) { + if (e?.response?.data?.code === 13001) { authenticateWithPassword.value = true return } // TODO: Put this logic in a global errorMessage handler method which checks all auth codes let err = t('sharing.error') - if (e.response?.data?.message) { + if (e?.response?.data?.message) { err = e.response.data.message } - if (e.response?.data?.code === 13002) { + if (e?.response?.data?.code === 13002) { err = t('sharing.invalidPassword') } errorMessage.value = err diff --git a/src/views/user/Register.vue b/src/views/user/Register.vue index 5faab1181..61dc88c47 100644 --- a/src/views/user/Register.vue +++ b/src/views/user/Register.vue @@ -143,7 +143,7 @@ async function submit() { try { await authStore.register(toRaw(credentials)) - } catch (e: any) { + } catch (e) { errorMessage.value = e?.message } }