From 3992119e32c936b1584463e8c71316fc6fabe2e2 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Mon, 27 Nov 2023 11:42:04 -0500 Subject: [PATCH] fix(deps): prettier 3 (#5336) --- web/.prettierrc | 3 +-- web/package-lock.json | 24 +++++++++---------- web/package.json | 4 ++-- web/src/app.html | 2 +- .../asset-viewer/album-list-item.svelte | 8 ++----- .../memory-page/memory-viewer.svelte | 4 +++- .../components/photos-page/memory-lane.svelte | 4 +++- .../album-selection-modal.svelte | 7 +++--- .../upload-asset-preview.svelte | 8 +++++-- web/src/lib/stores/assets.store.ts | 5 +++- .../routes/admin/user-management/+page.svelte | 8 +++---- 11 files changed, 42 insertions(+), 35 deletions(-) diff --git a/web/.prettierrc b/web/.prettierrc index fb0e0c92b..33325428a 100644 --- a/web/.prettierrc +++ b/web/.prettierrc @@ -3,7 +3,6 @@ "trailingComma": "all", "printWidth": 120, "semi": true, - "organizeImportsSkipDestructiveCodeActions": true, "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": false + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/web/package-lock.json b/web/package-lock.json index a6a984fa1..ac831e839 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -52,8 +52,8 @@ "jest": "^29.4.3", "jest-environment-jsdom": "^29.4.3", "postcss": "^8.4.21", - "prettier": "^2.8.4", - "prettier-plugin-svelte": "^2.10.1", + "prettier": "^3.1.0", + "prettier-plugin-svelte": "^3.1.2", "svelte": "^4.0.5", "svelte-check": "^3.4.3", "svelte-jester": "^3.0.0", @@ -10231,28 +10231,28 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-plugin-svelte": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-2.10.1.tgz", - "integrity": "sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.1.2.tgz", + "integrity": "sha512-7xfMZtwgAWHMT0iZc8jN4o65zgbAQ3+O32V6W7pXrqNvKnHnkoyQCGCbKeUyXKZLbYE0YhFRnamfxfkEGxm8qA==", "dev": true, "peerDependencies": { - "prettier": "^1.16.4 || ^2.0.0", - "svelte": "^3.2.0 || ^4.0.0-next.0" + "prettier": "^3.0.0", + "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" } }, "node_modules/pretty-format": { diff --git a/web/package.json b/web/package.json index 418a7da60..b3448ec6b 100644 --- a/web/package.json +++ b/web/package.json @@ -45,8 +45,8 @@ "jest": "^29.4.3", "jest-environment-jsdom": "^29.4.3", "postcss": "^8.4.21", - "prettier": "^2.8.4", - "prettier-plugin-svelte": "^2.10.1", + "prettier": "^3.1.0", + "prettier-plugin-svelte": "^3.1.2", "svelte": "^4.0.5", "svelte-check": "^3.4.3", "svelte-jester": "^3.0.0", diff --git a/web/src/app.html b/web/src/app.html index f35409429..5f31df333 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/web/src/lib/components/asset-viewer/album-list-item.svelte b/web/src/lib/components/asset-viewer/album-list-item.svelte index ede316ff4..c632ec319 100644 --- a/web/src/lib/components/asset-viewer/album-list-item.svelte +++ b/web/src/lib/components/asset-viewer/album-list-item.svelte @@ -44,14 +44,10 @@ > {#if variant === 'simple'} - {#if album.shared}Shared{/if} - + {album.shared ? 'Shared' : ''} {:else} {album.assetCount} items - {#if album.shared} · Shared{/if} - + {album.shared ? ' · Shared' : ''} {/if} diff --git a/web/src/lib/components/memory-page/memory-viewer.svelte b/web/src/lib/components/memory-page/memory-viewer.svelte index e30b5967c..d90efe712 100644 --- a/web/src/lib/components/memory-page/memory-viewer.svelte +++ b/web/src/lib/components/memory-page/memory-viewer.svelte @@ -275,6 +275,8 @@ diff --git a/web/src/lib/components/photos-page/memory-lane.svelte b/web/src/lib/components/photos-page/memory-lane.svelte index 2424de320..91f5168f1 100644 --- a/web/src/lib/components/photos-page/memory-lane.svelte +++ b/web/src/lib/components/photos-page/memory-lane.svelte @@ -91,6 +91,8 @@ diff --git a/web/src/lib/components/shared-components/album-selection-modal.svelte b/web/src/lib/components/shared-components/album-selection-modal.svelte index acdf6607a..b49ced3a0 100644 --- a/web/src/lib/components/shared-components/album-selection-modal.svelte +++ b/web/src/lib/components/shared-components/album-selection-modal.svelte @@ -52,7 +52,7 @@

- Add to {#if shared}Shared {/if} Album + Add to {shared ? 'Shared ' : ''}Album

@@ -88,7 +88,7 @@

- New {#if shared}Shared {/if}Album {#if search.length > 0}{search}{/if} + New {shared ? 'Shared ' : ''}Album {#if search.length > 0}{search}{/if}

{#if filteredAlbums.length > 0} @@ -101,7 +101,8 @@ {#if !shared}

- {#if search.length === 0}ALL {/if}ALBUMS + {#if search.length === 0}ALL + {/if}ALBUMS

{/if} {#each filteredAlbums as album (album.id)} diff --git a/web/src/lib/components/shared-components/upload-asset-preview.svelte b/web/src/lib/components/shared-components/upload-asset-preview.svelte index 088b6ed2e..f7e999e61 100644 --- a/web/src/lib/components/shared-components/upload-asset-preview.svelte +++ b/web/src/lib/components/shared-components/upload-asset-preview.svelte @@ -66,13 +66,17 @@

Skipped - {#if uploadAsset.message} ({uploadAsset.message}){/if} + {#if uploadAsset.message} + ({uploadAsset.message}) + {/if}

{:else if uploadAsset.state === UploadState.DONE}

Uploaded - {#if uploadAsset.message} ({uploadAsset.message}){/if} + {#if uploadAsset.message} + ({uploadAsset.message}) + {/if}

{/if}
diff --git a/web/src/lib/stores/assets.store.ts b/web/src/lib/stores/assets.store.ts index 635d6e7aa..add61979d 100644 --- a/web/src/lib/stores/assets.store.ts +++ b/web/src/lib/stores/assets.store.ts @@ -73,7 +73,10 @@ export class AssetStore { assets: AssetResponseDto[] = []; albumAssets: Set = new Set(); - constructor(options: AssetStoreOptions, private albumId?: string) { + constructor( + options: AssetStoreOptions, + private albumId?: string, + ) { this.options = { ...options, size: TimeBucketSize.Month }; this.store$.set(this); } diff --git a/web/src/routes/admin/user-management/+page.svelte b/web/src/routes/admin/user-management/+page.svelte index 09b3db7f7..ee266289a 100644 --- a/web/src/routes/admin/user-management/+page.svelte +++ b/web/src/routes/admin/user-management/+page.svelte @@ -181,8 +181,8 @@ isDeleted(user) ? 'bg-red-300 dark:bg-red-900' : i % 2 == 0 - ? 'bg-immich-gray dark:bg-immich-dark-gray/75' - : 'bg-immich-bg dark:bg-immich-dark-gray/50' + ? 'bg-immich-gray dark:bg-immich-dark-gray/75' + : 'bg-immich-bg dark:bg-immich-dark-gray/50' }`} > {user.email} @@ -247,8 +247,8 @@ isDeleted(user) ? 'bg-red-300 dark:bg-red-900' : i % 2 == 0 - ? 'bg-immich-gray dark:bg-immich-dark-gray/75' - : 'bg-immich-bg dark:bg-immich-dark-gray/50' + ? 'bg-immich-gray dark:bg-immich-dark-gray/75' + : 'bg-immich-bg dark:bg-immich-dark-gray/50' }`} > {user.name}