Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setup rollup-plugin-visualizer and remove lodash #6974

Merged
merged 4 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 236 additions & 0 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"postcss": "^8.4.21",
"prettier": "^3.1.0",
"prettier-plugin-svelte": "^3.1.2",
"rollup-plugin-visualizer": "^5.12.0",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"svelte-preprocess": "^5.0.3",
Expand Down
4 changes: 2 additions & 2 deletions web/src/lib/components/elements/dropdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { mdiCheck } from '@mdi/js';

import _ from 'lodash';
import { isEqual } from 'lodash-es';
import LinkButton from './buttons/link-button.svelte';
import { clickOutside } from '$lib/utils/click-outside';
import { fly } from 'svelte/transition';
Expand Down Expand Up @@ -92,7 +92,7 @@
class="grid grid-cols-[20px,1fr] place-items-center p-2 transition-all hover:bg-gray-300 dark:hover:bg-gray-800"
on:click={() => handleSelectOption(option)}
>
{#if _.isEqual(selectedOption, option)}
{#if isEqual(selectedOption, option)}
<div class="text-immich-primary dark:text-immich-dark-primary">
<Icon path={mdiCheck} size="18" />
</div>
Expand Down
5 changes: 2 additions & 3 deletions web/src/lib/utils/timeline-util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { AssetResponseDto } from '@api';
import lodash from 'lodash-es';
import { chain } from 'lodash-es';
import { DateTime, Interval } from 'luxon';

export const fromLocalDateTime = (localDateTime: string) => DateTime.fromISO(localDateTime, { zone: 'UTC' });
Expand Down Expand Up @@ -45,8 +45,7 @@ export function splitBucketIntoDateGroups(
assets: AssetResponseDto[],
locale: string | undefined,
): AssetResponseDto[][] {
return lodash
.chain(assets)
return chain(assets)
.groupBy((asset) => fromLocalDateTime(asset.localDateTime).toLocaleString(groupDateFormat, { locale }))
.sortBy((group) => assets.indexOf(group[0]))
.value();
Expand Down
1 change: 0 additions & 1 deletion web/src/routes/admin/system-settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import LibrarySettings from '$lib/components/admin-page/settings/library-settings/library-settings.svelte';
import LoggingSettings from '$lib/components/admin-page/settings/logging-settings/logging-settings.svelte';
import { mdiAlert, mdiContentCopy, mdiDownload } from '@mdi/js';
import _ from 'lodash';
import AdminSettings from '$lib/components/admin-page/settings/admin-settings.svelte';

export let data: PageData;
Expand Down
Loading
Loading