From aa08dad1f57ade99b09bcdca2d294c0e2ee366c0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:33:46 +0200 Subject: [PATCH] chore(deps): update dependency eslint-plugin-unicorn to v72 (#30092) Co-authored-by: Daniel Dietzler --- e2e/eslint.config.mjs | 1 + e2e/package.json | 2 +- .../asset-viewer/asset-viewer.e2e-spec.ts | 2 +- .../ui/specs/timeline/timeline.e2e-spec.ts | 2 +- e2e/src/ui/specs/timeline/utils.ts | 2 +- packages/cli/eslint.config.mjs | 1 + packages/cli/package.json | 2 +- pnpm-lock.yaml | 235 +++++++++--------- server/eslint.config.mjs | 1 + server/package.json | 2 +- .../src/controllers/asset-media.controller.ts | 4 +- server/src/repositories/media.repository.ts | 2 +- server/src/services/auth.service.ts | 2 +- .../src/services/database-backup.service.ts | 1 - server/src/services/library.service.spec.ts | 1 + server/src/services/system-config.service.ts | 2 +- server/src/utils/mime-types.ts | 2 +- server/src/utils/sync.ts | 2 +- web/eslint.config.js | 1 + web/package.json | 2 +- .../components/ApiKeyPermissionsPicker.svelte | 2 +- web/src/lib/components/Image.svelte | 2 +- .../transform-tool/TransformTool.svelte | 2 +- .../elements/__test__/FormatMessage.spec.ts | 2 +- web/src/lib/managers/auth-manager.svelte.ts | 2 +- .../managers/edit/transform-manager.svelte.ts | 2 +- .../[[assetId=id]]/MemoryViewer.svelte | 12 +- 27 files changed, 144 insertions(+), 149 deletions(-) diff --git a/e2e/eslint.config.mjs b/e2e/eslint.config.mjs index 744af3627a..d5da8f8445 100644 --- a/e2e/eslint.config.mjs +++ b/e2e/eslint.config.mjs @@ -49,6 +49,7 @@ export default typescriptEslint.config([ 'unicorn/isolated-functions': 'off', 'unicorn/prefer-promise-with-resolvers': 'off', 'unicorn/no-declarations-before-early-exit': 'off', + 'unicorn/prefer-simple-condition-first': 'off', curly: 2, 'prettier/prettier': 0, 'unicorn/name-replacements': 'off', diff --git a/e2e/package.json b/e2e/package.json index cce0c435c0..7f9d9b9c29 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -40,7 +40,7 @@ "eslint": "^10.0.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-unicorn": "^70.0.0", + "eslint-plugin-unicorn": "^72.0.0", "exiftool-vendored": "^35.0.0", "globals": "^17.0.0", "luxon": "^3.4.4", diff --git a/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts b/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts index 082ff1f7a1..85798f6be3 100644 --- a/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts +++ b/e2e/src/ui/specs/asset-viewer/asset-viewer.e2e-spec.ts @@ -38,7 +38,7 @@ test.describe('asset-viewer', () => { assets.push(...timeBucket); } for (const yearMonth of timelineRestData.buckets.keys()) { - const [year, month] = yearMonth.split('-'); + const [year, month] = yearMonth.split('-', 2); yearMonths.push(`${year}-${Number(month)}`); } }); diff --git a/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts b/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts index 6f986df84f..adbff0d3b8 100644 --- a/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts +++ b/e2e/src/ui/specs/timeline/timeline.e2e-spec.ts @@ -49,7 +49,7 @@ test.describe('Timeline', () => { assets.push(...timeBucket); } for (const yearMonth of timelineRestData.buckets.keys()) { - const [year, month] = yearMonth.split('-'); + const [year, month] = yearMonth.split('-', 2); yearMonths.push(`${year}-${Number(month)}`); } }); diff --git a/e2e/src/ui/specs/timeline/utils.ts b/e2e/src/ui/specs/timeline/utils.ts index e6af7fe3b5..f629ec92b3 100644 --- a/e2e/src/ui/specs/timeline/utils.ts +++ b/e2e/src/ui/specs/timeline/utils.ts @@ -7,7 +7,7 @@ export const sleep = (ms: number) => { }; export const padYearMonth = (yearMonth: string) => { - const [year, month] = yearMonth.split('-'); + const [year, month] = yearMonth.split('-', 2); return `${year}-${month.padStart(2, '0')}`; }; diff --git a/packages/cli/eslint.config.mjs b/packages/cli/eslint.config.mjs index 83e356320f..bcc74c654d 100644 --- a/packages/cli/eslint.config.mjs +++ b/packages/cli/eslint.config.mjs @@ -46,6 +46,7 @@ export default typescriptEslint.config([ 'unicorn/no-process-exit': 'off', 'unicorn/import-style': 'off', 'unicorn/consistent-class-member-order': 'off', + 'unicorn/prefer-simple-condition-first': 'off', curly: 2, // prefer the typescript-eslint type-aware version 'unicorn/require-array-sort-compare': 'off', diff --git a/packages/cli/package.json b/packages/cli/package.json index 47b43922ed..1bc988f877 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -33,7 +33,7 @@ "eslint": "^10.0.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-unicorn": "^70.0.0", + "eslint-plugin-unicorn": "^72.0.0", "globals": "^17.0.0", "mock-fs": "^5.2.0", "prettier": "^3.7.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4658f12e2c..d4d3e4246a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -157,8 +157,8 @@ importers: specifier: ^5.1.3 version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))(prettier@3.9.5) eslint-plugin-unicorn: - specifier: ^70.0.0 - version: 70.0.0(eslint@10.7.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) exiftool-vendored: specifier: ^35.0.0 version: 35.21.0 @@ -269,8 +269,8 @@ importers: specifier: ^5.1.3 version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))(prettier@3.9.5) eslint-plugin-unicorn: - specifier: ^70.0.0 - version: 70.0.0(eslint@10.7.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) globals: specifier: ^17.0.0 version: 17.7.0 @@ -741,8 +741,8 @@ importers: specifier: ^5.1.3 version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))(prettier@3.9.5) eslint-plugin-unicorn: - specifier: ^70.0.0 - version: 70.0.0(eslint@10.7.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) globals: specifier: ^17.0.0 version: 17.7.0 @@ -1006,8 +1006,8 @@ importers: specifier: ^3.12.4 version: 3.20.0(eslint@10.7.0(jiti@2.7.0))(svelte@5.56.5(@typescript-eslint/types@8.64.0)) eslint-plugin-unicorn: - specifier: ^70.0.0 - version: 70.0.0(eslint@10.7.0(jiti@2.7.0)) + specifier: ^72.0.0 + version: 72.0.0(eslint@10.7.0(jiti@2.7.0)) factory.ts: specifier: ^1.4.1 version: 1.4.2 @@ -5520,45 +5520,22 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/project-service@8.63.0': - resolution: {integrity: sha512-e5dh0/UI0ok53AlZ5wRkXCB32z/f2jUZqPR/ygAw5WYaSw8j9EoJWlS7wQjr/dmOaqWjnPIn2m+HhVPCMWGZVQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/project-service@8.64.0': resolution: {integrity: sha512-tk4WpOJ6IEbGrVHaNmM0YRrwAD3exZlIK3iadQNAxh4YKk6jvUQ4ecq18n+v7+meh+cJ3j+D8nbk8sRKhlwLQg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/scope-manager@8.63.0': - resolution: {integrity: sha512-uUyfMWCnDSN8bCpcrY8nGP2BLkQ9Xn0GsipcONcpIDWhwhO4ZSyHvyS14U3X75mzxWxL3I2UZIrenTzdzcJO8A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.64.0': resolution: {integrity: sha512-CXEaFdYXjSTgKhisNkwCcJwTP8Pl+fmRrEQrri4nm3vU743bALrxzLmq7fHG/7e6a5xO0lDYeURpZmBuhHk54w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.63.0': - resolution: {integrity: sha512-sUAbkulqBAsncKnbRP3+7CtQFRKicexnj7ZwNC6ddCR7EmrXvjvdCYMJbUIqMd6lwoEriZjwLo08aS5tSjVMHg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/tsconfig-utils@8.64.0': resolution: {integrity: sha512-2yo8rRNKuzbVWQp5kslhANqZ2uDAeROQHBRZNPu8JDsHmeFNj/XJJhX/FhNUWmkHHvoNsKa6+tHJiig87EzsQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/type-utils@8.63.0': - resolution: {integrity: sha512-Nzzh/OGxVCOjObjaj1CQF2RUasyYy2Jfuh+zZ3PjLzG2fYRriAiZLib9UKtO+CpQAS3YHiAS+ckZDclwqI1TPA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/type-utils@8.64.0': resolution: {integrity: sha512-XWG4Fmmv/6SvyS9nH8jWrKs6terwJvE8cyRt1CzYYqzp9OrPhCT4cMc/f7C6RZCwG+qMmiffJS1/qJP8G1URtg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5566,33 +5543,16 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.63.0': - resolution: {integrity: sha512-xyLtl9DUBBFrcJS4x2pIqGLH68/tC2uOa4Z7pUteW09D3bXnnXUom4dyPikzWgB7llmIc1zoeI3aoUdC4rPK/Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.64.0': resolution: {integrity: sha512-qjhfuTfLXjA4IOzXvz0rTjT01BqEiIgPoUeMwiEjnaHKJMTNo8rH5pYW1a2L/0Dnux2fPC85AeyJoWaGa8WxTA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.63.0': - resolution: {integrity: sha512-ygBkU+B7ex5UI/gKhaqexWev79uISfIv7XQCRNYO/jmD8rGLPyWLAb3KMRT6nd8Gt9bmUBi9+iX6tBdYfOY81Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/typescript-estree@8.64.0': resolution: {integrity: sha512-Pztpsn1aCE1oWDvDEfUk31nngvvF7vUB5SwHFEaZIFpvw7WJtqUHHL4plBZDA9HfWJJjL13BdG0YrJInTUvoVA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/utils@8.63.0': - resolution: {integrity: sha512-fUKaeAvrTuQg/Tgt3nliAUSZHJM6DlCcfyEmxCvlX8kieWSStBX+5O5Fnidtc3i2JrH+9c/GL4RY2iasd/GPTA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 - typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/utils@8.64.0': resolution: {integrity: sha512-aJUGVB3+U0htrrCjoA8qukw8cm8fNCGAxK/tVoS70k8aeb7DETKeFozRiVFIwEeN9WJLsjaP3ph8I60tY2XZoQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5600,10 +5560,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/visitor-keys@8.63.0': - resolution: {integrity: sha512-UexrHGnGTpbuQHct2ExOc2ZcFbGUS9FOesCxxqdBGcpI1BxYu/LZ6U8Aq6/72XtF/qRBk9nhuGHFJIXXMhPMdw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.64.0': resolution: {integrity: sha512-mrtuL8Nsn6gi2H4mo5KMTp823M+3Q19Ew/i+Zlikq20tIMm99C3Ez0dCmkWWnxut20esQvTg8aUSEhMcAOXhEw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6752,6 +6708,10 @@ packages: resolution: {integrity: sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==} engines: {node: '>=18'} + convert-hrtime@5.0.0: + resolution: {integrity: sha512-lOETlkIeYSJWcbbcvjRKGxVMXJR+8+OQb/mTPbA4ObPMytYIsUbuOE0Jzy60hjARYszq1id0j8KgVhC+WGZVTg==} + engines: {node: '>=12'} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -7643,8 +7603,8 @@ packages: svelte: optional: true - eslint-plugin-unicorn@70.0.0: - resolution: {integrity: sha512-uAF9xMcVvvhTfvusCgogJ1wh4To3q2KhVMw3i1Apf/ILTbxsCjscvraAZACsEurb7no2fdXblD3whcbVnjw5zg==} + eslint-plugin-unicorn@72.0.0: + resolution: {integrity: sha512-hqO6ksoOHO+ZhdseTuKRVQbx9U7PRO/cv8qAR1mctwzdVO2hYud8uS9luAhp43RJgziYgHAph8eHyipT8GL0ng==} engines: {node: '>=22'} peerDependencies: eslint: '>=10.4' @@ -8053,6 +8013,10 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + function-timeout@1.0.2: + resolution: {integrity: sha512-939eZS4gJ3htTHAldmyyuzlrD58P03fHG49v2JfFXbV6OhvZKRC9j2yAtdHw/zrp2zXHuv05zMIy40F0ge7spA==} + engines: {node: '>=18'} + gauge@3.0.2: resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} engines: {node: '>=10'} @@ -8457,6 +8421,10 @@ packages: peerDependencies: postcss: ^8.1.0 + identifier-regex@1.1.0: + resolution: {integrity: sha512-SLX4H/vtcYlYnL7XqnuJKHU7Z8517TgsW9nmQiGOgMCjQ8V/deLYu6bEmbGoXe7WMMhc9+EUGyFFneHja8KabA==} + engines: {node: '>=18'} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -8627,6 +8595,10 @@ packages: is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + is-identifier@1.1.0: + resolution: {integrity: sha512-NhOds0mDx9lJu+1lBRO0xbwFo5nobA7GCk/0e5xjr6+6XugX985+0OyGX35BNrTkPAsdLcIKg02HUQJOK8D8kw==} + engines: {node: '>=18'} + is-in-ssh@1.0.0: resolution: {integrity: sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==} engines: {node: '>=20'} @@ -9280,6 +9252,10 @@ packages: magicast@0.5.3: resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} + make-asynchronous@1.1.0: + resolution: {integrity: sha512-ayF7iT+44LXdxJLTrTd3TLQpFDDvPCBxXxbv+pMUSuHA5Q8zyAfwkRP6aHHwNVFBUFWtxAHqwNJxF8vMZLAbVg==} + engines: {node: '>=18'} + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -10067,6 +10043,10 @@ packages: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} + p-event@6.0.1: + resolution: {integrity: sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==} + engines: {node: '>=16.17'} + p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} @@ -10111,6 +10091,10 @@ packages: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} engines: {node: '>=8'} + p-timeout@6.1.4: + resolution: {integrity: sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==} + engines: {node: '>=14.16'} + p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -10980,6 +10964,10 @@ packages: quickselect@3.0.0: resolution: {integrity: sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==} + quote-js-string@0.1.0: + resolution: {integrity: sha512-Y3NoRtprEEZQD8RfxMCfS0ZTqc4e+i18OrXEXAvpM6TfC/3y+0L5rNbZiSnbBBEkDfFzbpd8o+cE8q3/anjMGA==} + engines: {node: '>=22'} + railroad-diagrams@1.0.0: resolution: {integrity: sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==} @@ -11222,6 +11210,10 @@ packages: requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + reserved-identifiers@1.2.0: + resolution: {integrity: sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==} + engines: {node: '>=18'} + resolve-alpn@1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} @@ -11762,6 +11754,10 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true + super-regex@1.1.0: + resolution: {integrity: sha512-WHkws2ZflZe41zj6AolvvmaTrWds/VuyeYr9iPVv/oQeaIoVxMKaushfFWpOGDT+GuBrM/sVqF8KUCYQlSSTdQ==} + engines: {node: '>=18'} + superagent@10.3.0: resolution: {integrity: sha512-B+4Ik7ROgVKrQsXTV0Jwp2u+PXYLSlqtDAhYnkkD+zn3yg8s/zjA2MeGayPoY/KICrbitwneDHrjSotxKL+0XQ==} engines: {node: '>=14.18.0'} @@ -12064,6 +12060,10 @@ packages: thunky@1.1.0: resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} + time-span@5.1.0: + resolution: {integrity: sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==} + engines: {node: '>=12'} + timers-ext@0.1.8: resolution: {integrity: sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==} engines: {node: '>=0.12'} @@ -12250,6 +12250,10 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + type-fest@5.7.0: resolution: {integrity: sha512-1URUxUqfHFM1c+zfSPsa3gnkO7Aq21qyH75SIduNYz4SzY964rn1X2vCMQaHSHhktiw+0kPa2iyb6PUpXqB6Vg==} engines: {node: '>=20'} @@ -12717,6 +12721,9 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + web-worker@1.5.0: + resolution: {integrity: sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -16373,8 +16380,8 @@ snapshots: '@koddsson/eslint-plugin-tscompat@0.2.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': dependencies: '@mdn/browser-compat-data': 6.1.5 - '@typescript-eslint/type-utils': 8.63.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/utils': 8.63.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + '@typescript-eslint/type-utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) + '@typescript-eslint/utils': 8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) browserslist: 4.28.6 transitivePeerDependencies: - eslint @@ -18531,15 +18538,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.63.0(@typescript/typescript6@6.0.2)': - dependencies: - '@typescript-eslint/tsconfig-utils': 8.64.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.64.0 - debug: 4.4.3 - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - '@typescript-eslint/project-service@8.64.0(@typescript/typescript6@6.0.2)': dependencies: '@typescript-eslint/tsconfig-utils': 8.64.0(@typescript/typescript6@6.0.2) @@ -18549,36 +18547,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.63.0': - dependencies: - '@typescript-eslint/types': 8.63.0 - '@typescript-eslint/visitor-keys': 8.63.0 - '@typescript-eslint/scope-manager@8.64.0': dependencies: '@typescript-eslint/types': 8.64.0 '@typescript-eslint/visitor-keys': 8.64.0 - '@typescript-eslint/tsconfig-utils@8.63.0(@typescript/typescript6@6.0.2)': - dependencies: - typescript: '@typescript/typescript6@6.0.2' - '@typescript-eslint/tsconfig-utils@8.64.0(@typescript/typescript6@6.0.2)': dependencies: typescript: '@typescript/typescript6@6.0.2' - '@typescript-eslint/type-utils@8.63.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': - dependencies: - '@typescript-eslint/types': 8.63.0 - '@typescript-eslint/typescript-estree': 8.63.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/utils': 8.63.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0)) - debug: 4.4.3 - eslint: 10.7.0(jiti@2.7.0) - ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': dependencies: '@typescript-eslint/types': 8.64.0 @@ -18591,25 +18568,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.63.0': {} - '@typescript-eslint/types@8.64.0': {} - '@typescript-eslint/typescript-estree@8.63.0(@typescript/typescript6@6.0.2)': - dependencies: - '@typescript-eslint/project-service': 8.63.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/tsconfig-utils': 8.63.0(@typescript/typescript6@6.0.2) - '@typescript-eslint/types': 8.63.0 - '@typescript-eslint/visitor-keys': 8.63.0 - debug: 4.4.3 - minimatch: 10.2.5 - semver: 7.8.5 - tinyglobby: 0.2.17 - ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.64.0(@typescript/typescript6@6.0.2)': dependencies: '@typescript-eslint/project-service': 8.64.0(@typescript/typescript6@6.0.2) @@ -18625,17 +18585,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.63.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0(jiti@2.7.0)) - '@typescript-eslint/scope-manager': 8.63.0 - '@typescript-eslint/types': 8.63.0 - '@typescript-eslint/typescript-estree': 8.63.0(@typescript/typescript6@6.0.2) - eslint: 10.7.0(jiti@2.7.0) - typescript: '@typescript/typescript6@6.0.2' - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.64.0(@typescript/typescript6@6.0.2)(eslint@10.7.0(jiti@2.7.0))': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0(jiti@2.7.0)) @@ -18647,11 +18596,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.63.0': - dependencies: - '@typescript-eslint/types': 8.63.0 - eslint-visitor-keys: 5.0.1 - '@typescript-eslint/visitor-keys@8.64.0': dependencies: '@typescript-eslint/types': 8.64.0 @@ -19818,6 +19762,8 @@ snapshots: content-type@2.0.0: {} + convert-hrtime@5.0.0: {} + convert-source-map@2.0.0: {} cookie-parser@1.4.7: @@ -20828,25 +20774,29 @@ snapshots: transitivePeerDependencies: - ts-node - eslint-plugin-unicorn@70.0.0(eslint@10.7.0(jiti@2.7.0)): + eslint-plugin-unicorn@72.0.0(eslint@10.7.0(jiti@2.7.0)): dependencies: - '@babel/helper-validator-identifier': 7.29.7 '@eslint-community/eslint-utils': 4.9.1(eslint@10.7.0(jiti@2.7.0)) + '@eslint/css-tree': 4.0.4 browserslist: 4.28.6 change-case: 5.4.4 ci-info: 4.4.0 core-js-compat: 3.49.0 detect-indent: 7.0.2 + entities: 4.5.0 eslint: 10.7.0(jiti@2.7.0) find-up-simple: 1.0.1 globals: 17.7.0 indent-string: 5.0.0 is-builtin-module: 5.0.0 - jsesc: 3.1.0 + is-identifier: 1.1.0 pluralize: 8.0.0 + quote-js-string: 0.1.0 regjsparser: 0.13.2 + reserved-identifiers: 1.2.0 semver: 7.8.5 strip-indent: 4.1.1 + yaml: 2.9.0 eslint-scope@5.1.1: dependencies: @@ -21362,6 +21312,8 @@ snapshots: function-bind@1.1.2: {} + function-timeout@1.0.2: {} + gauge@3.0.2: dependencies: aproba: 2.1.0 @@ -21924,6 +21876,10 @@ snapshots: dependencies: postcss: 8.5.19 + identifier-regex@1.1.0: + dependencies: + reserved-identifiers: 1.2.0 + ieee754@1.2.1: {} ignore@5.3.2: {} @@ -22078,6 +22034,11 @@ snapshots: is-hexadecimal@2.0.1: {} + is-identifier@1.1.0: + dependencies: + identifier-regex: 1.1.0 + super-regex: 1.1.0 + is-in-ssh@1.0.0: {} is-inside-container@1.0.0: @@ -22631,6 +22592,12 @@ snapshots: '@babel/types': 7.29.7 source-map-js: 1.2.1 + make-asynchronous@1.1.0: + dependencies: + p-event: 6.0.1 + type-fest: 4.41.0 + web-worker: 1.5.0 + make-dir@3.1.0: dependencies: semver: 6.3.1 @@ -23723,6 +23690,10 @@ snapshots: p-cancelable@3.0.0: {} + p-event@6.0.1: + dependencies: + p-timeout: 6.1.4 + p-finally@1.0.0: {} p-limit@2.3.0: @@ -23768,6 +23739,8 @@ snapshots: dependencies: p-finally: 1.0.0 + p-timeout@6.1.4: {} + p-try@2.2.0: {} package-json-from-dist@1.0.1: {} @@ -24652,6 +24625,8 @@ snapshots: quickselect@3.0.0: {} + quote-js-string@0.1.0: {} + railroad-diagrams@1.0.0: {} randexp@0.4.6: @@ -24999,6 +24974,8 @@ snapshots: requires-port@1.0.0: {} + reserved-identifiers@1.2.0: {} + resolve-alpn@1.2.1: {} resolve-from@4.0.0: {} @@ -25706,6 +25683,12 @@ snapshots: tinyglobby: 0.2.17 ts-interface-checker: 0.1.13 + super-regex@1.1.0: + dependencies: + function-timeout: 1.0.2 + make-asynchronous: 1.1.0 + time-span: 5.1.0 + superagent@10.3.0: dependencies: component-emitter: 1.3.1 @@ -26106,6 +26089,10 @@ snapshots: thunky@1.1.0: {} + time-span@5.1.0: + dependencies: + convert-hrtime: 5.0.0 + timers-ext@0.1.8: dependencies: es5-ext: 0.10.64 @@ -26266,6 +26253,8 @@ snapshots: type-fest@2.19.0: {} + type-fest@4.41.0: {} + type-fest@5.7.0: dependencies: tagged-tag: 1.0.0 @@ -26749,6 +26738,8 @@ snapshots: web-namespaces@2.0.1: {} + web-worker@1.5.0: {} + webidl-conversions@3.0.1: {} webidl-conversions@7.0.0: diff --git a/server/eslint.config.mjs b/server/eslint.config.mjs index 579993aec5..2cca2cab6d 100644 --- a/server/eslint.config.mjs +++ b/server/eslint.config.mjs @@ -64,6 +64,7 @@ export default typescriptEslint.config([ 'unicorn/consistent-boolean-name': 'off', 'unicorn/no-computed-property-existence-check': 'off', 'unicorn/no-non-function-verb-prefix': 'off', + 'unicorn/prefer-simple-condition-first': 'off', // prefer the typescript-eslint type-aware version 'unicorn/require-array-sort-compare': 'off', '@typescript-eslint/require-array-sort-compare': 'error', diff --git a/server/package.json b/server/package.json index 67b4ca72a9..23cbe12e5c 100644 --- a/server/package.json +++ b/server/package.json @@ -151,7 +151,7 @@ "eslint": "^10.0.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-unicorn": "^70.0.0", + "eslint-plugin-unicorn": "^72.0.0", "globals": "^17.0.0", "mock-fs": "^5.2.0", "pngjs": "^7.0.0", diff --git a/server/src/controllers/asset-media.controller.ts b/server/src/controllers/asset-media.controller.ts index e551fc840f..c357c13430 100644 --- a/server/src/controllers/asset-media.controller.ts +++ b/server/src/controllers/asset-media.controller.ts @@ -128,7 +128,7 @@ export class AssetMediaController { this.logger.deprecate( 'Calling the thumbnail endpoint with size=original is deprecated. Use the :id/original endpoint instead', ); - const [_, reqSearch] = req.url.split('?'); + const [_, reqSearch] = req.url.split('?', 2); const redirSearchParams = new URLSearchParams(reqSearch); redirSearchParams.delete('size'); return res.redirect('original?' + redirSearchParams.toString()); @@ -142,7 +142,7 @@ export class AssetMediaController { // viewThumbnailRes is a AssetMediaRedirectResponse // which redirects to the original asset or a specific size to make better use of caching const { targetSize } = viewThumbnailRes; - const [reqPath, reqSearch] = req.url.split('?'); + const [reqPath, reqSearch] = req.url.split('?', 2); let redirPath: string; const redirSearchParams = new URLSearchParams(reqSearch); if (targetSize === 'original') { diff --git a/server/src/repositories/media.repository.ts b/server/src/repositories/media.repository.ts index 181b1eada9..f0856487c5 100644 --- a/server/src/repositories/media.repository.ts +++ b/server/src/repositories/media.repository.ts @@ -313,7 +313,7 @@ export class MediaRepository { if (!line) { return; } - const [ptsStr, durationStr, flags] = line.split(','); + const [ptsStr, durationStr, flags] = line.split(',', 3); const pts = Number.parseInt(ptsStr); const duration = Number.parseInt(durationStr); if (Number.isNaN(pts) || Number.isNaN(duration) || !flags) { diff --git a/server/src/services/auth.service.ts b/server/src/services/auth.service.ts index 288ef092c7..133eef2cf2 100644 --- a/server/src/services/auth.service.ts +++ b/server/src/services/auth.service.ts @@ -461,7 +461,7 @@ export class AuthService extends BaseService { } private getBearerToken(headers: IncomingHttpHeaders): string | null { - const [type, token] = (headers.authorization || '').split(' '); + const [type, token] = (headers.authorization || '').split(' ', 2); if (type.toLowerCase() === 'bearer') { return token; } diff --git a/server/src/services/database-backup.service.ts b/server/src/services/database-backup.service.ts index 99a3c5bf1f..a277b028a5 100644 --- a/server/src/services/database-backup.service.ts +++ b/server/src/services/database-backup.service.ts @@ -214,7 +214,6 @@ export class DatabaseBackupService { bin: `/usr/lib/postgresql/${databaseMajorVersion}/bin/${bin}`, args, databaseUsername, - // eslint-disable-next-line unicorn/prefer-minimal-ternary databasePassword: isUrlConnection ? new URL(databaseConfig.url).password : databaseConfig.password, databaseVersion, databaseMajorVersion, diff --git a/server/src/services/library.service.spec.ts b/server/src/services/library.service.spec.ts index 751806f266..ae06232605 100644 --- a/server/src/services/library.service.spec.ts +++ b/server/src/services/library.service.spec.ts @@ -15,6 +15,7 @@ import { makeStream, newTestService, ServiceMocks } from 'test/utils'; import { vitest } from 'vitest'; async function* mockWalk() { + // eslint-disable-next-line unicorn/no-useless-promise-resolve-reject yield await Promise.resolve(['/data/user1/photo.jpg']); } diff --git a/server/src/services/system-config.service.ts b/server/src/services/system-config.service.ts index 2762b9e754..faa4f8d423 100644 --- a/server/src/services/system-config.service.ts +++ b/server/src/services/system-config.service.ts @@ -51,7 +51,7 @@ export class SystemConfigService extends BaseService { @OnEvent({ name: 'ConfigValidate' }) onConfigValidate({ newConfig, oldConfig }: ArgOf<'ConfigValidate'>) { const { logLevel } = this.configRepository.getEnv(); - if (!_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging) && logLevel) { + if (logLevel && !_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging)) { throw new Error('Logging cannot be changed while the environment variable IMMICH_LOG_LEVEL is set.'); } } diff --git a/server/src/utils/mime-types.ts b/server/src/utils/mime-types.ts index 327cf5d73c..bb5e7be95b 100644 --- a/server/src/utils/mime-types.ts +++ b/server/src/utils/mime-types.ts @@ -172,7 +172,7 @@ export const mimeTypes = { return AssetType.Image; } - if (contentType.startsWith('video/') || contentType === 'application/mxf') { + if (contentType === 'application/mxf' || contentType.startsWith('video/')) { return AssetType.Video; } diff --git a/server/src/utils/sync.ts b/server/src/utils/sync.ts index 82222708af..51c62862eb 100644 --- a/server/src/utils/sync.ts +++ b/server/src/utils/sync.ts @@ -9,7 +9,7 @@ type Impossible = { type Exact = U & Impossible>; export const fromAck = (ack: string): SyncAck => { - const [type, updateId, extraId] = ack.split('|'); + const [type, updateId, extraId] = ack.split('|', 3); return { type: type as SyncEntityType, updateId, extraId }; }; diff --git a/web/eslint.config.js b/web/eslint.config.js index 012a74b4fa..de378d11c7 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -146,6 +146,7 @@ export default typescriptEslint.config( 'unicorn/no-non-function-verb-prefix': 'off', 'unicorn/prefer-minimal-ternary': 'off', 'unicorn/no-empty-file': 'off', + 'unicorn/prefer-simple-condition-first': 'off', // prefer the typescript-eslint type-aware version 'unicorn/require-array-sort-compare': 'off', '@typescript-eslint/require-array-sort-compare': 'error', diff --git a/web/package.json b/web/package.json index c4d80b5098..4e3140085e 100644 --- a/web/package.json +++ b/web/package.json @@ -97,7 +97,7 @@ "eslint-plugin-better-tailwindcss": "^4.5.0", "eslint-plugin-compat": "^7.0.0", "eslint-plugin-svelte": "^3.12.4", - "eslint-plugin-unicorn": "^70.0.0", + "eslint-plugin-unicorn": "^72.0.0", "factory.ts": "^1.4.1", "globals": "^17.0.0", "happy-dom": "^20.0.0", diff --git a/web/src/lib/components/ApiKeyPermissionsPicker.svelte b/web/src/lib/components/ApiKeyPermissionsPicker.svelte index 9f5ddc74d4..6eb2ca7cf1 100644 --- a/web/src/lib/components/ApiKeyPermissionsPicker.svelte +++ b/web/src/lib/components/ApiKeyPermissionsPicker.svelte @@ -17,7 +17,7 @@ continue; } - const [group] = permission.split('.'); + const [group] = permission.split('.', 1); if (!Object.hasOwn(permissions, group)) { permissions[group] = []; } diff --git a/web/src/lib/components/Image.svelte b/web/src/lib/components/Image.svelte index 7a42cf33bb..bec5908177 100644 --- a/web/src/lib/components/Image.svelte +++ b/web/src/lib/components/Image.svelte @@ -50,7 +50,7 @@ } if (isFirefox && ref) { - ref.decode().then(completeLoad, completeLoad); + ref.decode().then(completeLoad).catch(completeLoad); return; } diff --git a/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte b/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte index 5bc50f9431..b86f5b7edf 100644 --- a/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte +++ b/web/src/lib/components/asset-viewer/editor/transform-tool/TransformTool.svelte @@ -35,7 +35,7 @@ } if (isRotated) { - let [width, height] = ratio.value.split(':'); + let [width, height] = ratio.value.split(':', 2); return `${height}:${width}`; } return ratio.value; diff --git a/web/src/lib/elements/__test__/FormatMessage.spec.ts b/web/src/lib/elements/__test__/FormatMessage.spec.ts index af51b66f45..dc12680392 100644 --- a/web/src/lib/elements/__test__/FormatMessage.spec.ts +++ b/web/src/lib/elements/__test__/FormatMessage.spec.ts @@ -5,7 +5,7 @@ import { describe } from 'vitest'; import FormatMessage from '$lib/elements/FormatMessage.svelte'; import FormatTagB from '$lib/elements/__test__/FormatTagB.svelte'; -const getSanitizedHTML = (container: HTMLElement) => container.innerHTML.replaceAll('', ''); +const getSanitizedHTML = (container: HTMLElement) => container.getHTML().replaceAll('', ''); describe('FormatMessage component', () => { beforeAll(async () => { diff --git a/web/src/lib/managers/auth-manager.svelte.ts b/web/src/lib/managers/auth-manager.svelte.ts index 4b1743b9d2..a34deb3b58 100644 --- a/web/src/lib/managers/auth-manager.svelte.ts +++ b/web/src/lib/managers/auth-manager.svelte.ts @@ -124,7 +124,7 @@ class AuthManager { } for (const cookie of document.cookie.split('; ')) { - const [name] = cookie.split('='); + const [name] = cookie.split('=', 1); if (name === 'immich_is_authenticated') { return true; } diff --git a/web/src/lib/managers/edit/transform-manager.svelte.ts b/web/src/lib/managers/edit/transform-manager.svelte.ts index 9379138a1b..9704af420b 100644 --- a/web/src/lib/managers/edit/transform-manager.svelte.ts +++ b/web/src/lib/managers/edit/transform-manager.svelte.ts @@ -834,7 +834,7 @@ class TransformManager implements EditToolManager { return; } - const [widthRatio, heightRatio] = aspectRatio.split(':'); + const [widthRatio, heightRatio] = aspectRatio.split(':', 2); this.setAspectRatio(`${heightRatio}:${widthRatio}`); } diff --git a/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/MemoryViewer.svelte b/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/MemoryViewer.svelte index ef671c399a..df484fba81 100644 --- a/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/MemoryViewer.svelte +++ b/web/src/routes/(user)/memory/[[photos=photos]]/[[assetId=id]]/MemoryViewer.svelte @@ -281,8 +281,9 @@ }; afterNavigate(({ from, to }) => { - memoryManager.ready().then( - () => { + memoryManager + .ready() + .then(() => { let target; if (to?.params?.assetId) { target = to; @@ -294,11 +295,10 @@ init(target); initPlayer(); - }, - (error) => { + }) + .catch((error) => { console.error(`Error loading memories: ${error}`); - }, - ); + }); }); $effect(() => {