From bedc1fae1fb0f862f14177d3faf2955f92dbecdf Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Fri, 26 Sep 2025 17:59:31 +0530 Subject: [PATCH] [WEB-5027] fix: replace lodash package with lodash-es (#7856) * fix: replace lodash pacakge with lodash-es * fix: lint errors * fix: import fixes --- .../authentication/github/form.tsx | 2 +- .../authentication/gitlab/form.tsx | 2 +- .../authentication/google/form.tsx | 2 +- apps/admin/core/store/instance.store.ts | 2 +- apps/admin/core/store/workspace.store.ts | 2 +- apps/admin/package.json | 4 +- apps/live/package.json | 1 - .../issues/filters/applied-filters/root.tsx | 2 +- .../core/components/issues/filters/root.tsx | 2 +- .../issue-layouts/kanban/base-kanban-root.tsx | 2 +- .../issues/issue-layouts/kanban/default.tsx | 2 +- .../components/issues/issue-layouts/utils.tsx | 2 +- .../core/store/helpers/base-issues.store.ts | 6 +- apps/space/core/store/instance.store.ts | 2 +- apps/space/core/store/issue-detail.store.ts | 3 +- apps/space/core/store/issue-filters.store.ts | 4 +- apps/space/core/store/label.store.ts | 2 +- apps/space/core/store/members.store.ts | 2 +- apps/space/core/store/module.store.ts | 2 +- apps/space/core/store/profile.store.ts | 2 +- .../core/store/publish/publish_list.store.ts | 2 +- apps/space/core/store/state.store.ts | 2 +- apps/space/core/store/user.store.ts | 2 +- apps/space/helpers/date-time.helper.ts | 2 +- apps/space/package.json | 4 +- .../[workspaceSlug]/(projects)/sidebar.tsx | 2 +- apps/web/ce/store/estimates/estimate.ts | 26 +++----- .../issue/issue-details/activity.store.ts | 8 +-- .../ce/store/timeline/base-timeline.store.ts | 3 +- .../components/common/filters/created-by.tsx | 2 +- .../modals/existing-issues-list-modal.tsx | 1 - .../cycles/active-cycle/cycle-stats.tsx | 2 +- .../analytics-sidebar/issue-progress.tsx | 2 +- .../analytics-sidebar/sidebar-details.tsx | 2 +- .../cycles/list/cycles-list-item.tsx | 1 - .../core/components/exporter/export-form.tsx | 2 +- .../core/components/exporter/export-modal.tsx | 2 +- .../gantt-chart/views/month-view.ts | 6 +- .../home/widgets/loaders/home-loader.tsx | 2 +- .../home/widgets/loaders/quick-links.tsx | 2 +- .../home/widgets/loaders/recent-activity.tsx | 2 +- .../inbox/inbox-filter/filters/date.tsx | 3 +- .../inbox/inbox-filter/filters/members.tsx | 2 +- .../components/issues/description-input.tsx | 2 +- .../sub-issues/display-filters.tsx | 2 +- .../sub-issues/title-actions.tsx | 2 +- .../issues/issue-detail/module-select.tsx | 2 +- .../issues/issue-detail/subscription.tsx | 2 +- .../issue-layouts/empty-states/cycle.tsx | 2 +- .../display-filters-selection.tsx | 2 +- .../filters/header/filters/assignee.tsx | 2 +- .../filters/header/filters/created-by.tsx | 2 +- .../filters/header/filters/cycle.tsx | 2 +- .../filters/header/filters/labels.tsx | 2 +- .../filters/header/filters/mentions.tsx | 2 +- .../filters/header/filters/module.tsx | 2 +- .../filters/header/filters/project.tsx | 2 +- .../filters/header/filters/state.tsx | 2 +- .../properties/all-properties.tsx | 2 +- .../quick-action-dropdowns/all-issue.tsx | 2 +- .../quick-action-dropdowns/cycle-issue.tsx | 2 +- .../quick-action-dropdowns/issue-detail.tsx | 2 +- .../quick-action-dropdowns/module-issue.tsx | 2 +- .../quick-action-dropdowns/project-issue.tsx | 2 +- .../issue-layouts/roots/cycle-layout-root.tsx | 2 +- .../spreadsheet/columns/module-column.tsx | 2 +- .../components/issues/issue-layouts/utils.tsx | 6 +- .../issues/issue-modal/draft-issue-layout.tsx | 2 +- .../workspace-draft/draft-issue-block.tsx | 2 +- .../issues/workspace-draft/loader.tsx | 2 +- .../modules/dropdowns/filters/lead.tsx | 2 +- .../modules/dropdowns/filters/members.tsx | 2 +- .../components/pages/loaders/page-loader.tsx | 2 +- .../project/dropdowns/filters/lead.tsx | 2 +- .../project/dropdowns/filters/members.tsx | 2 +- .../components/project/multi-select-modal.tsx | 2 +- .../project/sidebar/nav-item-children.tsx | 2 +- .../core/components/stickies/modal/search.tsx | 2 +- .../core/components/stickies/sticky/root.tsx | 2 +- .../ui/loader/cycle-module-board-loader.tsx | 2 +- .../ui/loader/cycle-module-list-loader.tsx | 2 +- .../loader/layouts/calendar-layout-loader.tsx | 2 +- .../ui/loader/layouts/gantt-layout-loader.tsx | 2 +- .../loader/layouts/kanban-layout-loader.tsx | 2 +- .../ui/loader/layouts/list-layout-loader.tsx | 2 +- .../loader/layouts/members-layout-loader.tsx | 2 +- .../project-inbox/inbox-sidebar-loader.tsx | 2 +- .../layouts/spreadsheet-layout-loader.tsx | 2 +- .../ui/loader/notification-loader.tsx | 2 +- .../components/ui/loader/pages-loader.tsx | 2 +- .../components/ui/loader/projects-loader.tsx | 2 +- .../ui/loader/settings/activity.tsx | 2 +- .../ui/loader/settings/api-token.tsx | 2 +- .../components/ui/loader/settings/email.tsx | 2 +- .../ui/loader/settings/import-and-export.tsx | 2 +- .../ui/loader/settings/integration.tsx | 2 +- .../components/ui/loader/settings/members.tsx | 2 +- .../components/ui/loader/view-list-loader.tsx | 2 +- .../components/web-hooks/form/secret-key.tsx | 2 +- .../filters-hoc/project-level.tsx | 3 +- .../filters-hoc/workspace-level.tsx | 3 +- .../sidebar/loader.tsx | 2 +- .../workspace/settings/members-list-item.tsx | 2 +- .../sidebar/favorites/favorite-folder.tsx | 2 +- .../sidebar/favorites/favorites-menu.tsx | 2 +- .../sidebar/favorites/favorites.helpers.ts | 1 - apps/web/core/hooks/store/use-issues.ts | 2 +- apps/web/core/hooks/use-auto-save.tsx | 2 +- apps/web/core/lib/local-storage.ts | 2 +- apps/web/core/local-db/storage.sqlite.ts | 2 +- .../web/core/local-db/utils/load-workspace.ts | 3 +- apps/web/core/local-db/utils/utils.ts | 2 +- apps/web/core/store/cycle.store.ts | 4 +- apps/web/core/store/cycle_filter.store.ts | 2 +- apps/web/core/store/dashboard.store.ts | 2 +- apps/web/core/store/editor/asset.store.ts | 3 +- .../core/store/estimates/estimate-point.ts | 2 +- .../store/estimates/project-estimate.store.ts | 4 +- apps/web/core/store/favorite.store.ts | 3 +- apps/web/core/store/global-view.store.ts | 4 +- .../web/core/store/inbox/inbox-issue.store.ts | 3 +- .../core/store/inbox/project-inbox.store.ts | 5 +- .../core/store/issue/archived/filter.store.ts | 3 +- .../core/store/issue/cycle/filter.store.ts | 3 +- .../web/core/store/issue/cycle/issue.store.ts | 11 +--- .../store/issue/helpers/base-issues-utils.ts | 8 +-- .../store/issue/helpers/base-issues.store.ts | 12 +--- .../helpers/issue-filter-helper.store.ts | 2 +- .../issue/issue-details/attachment.store.ts | 7 +-- .../issue/issue-details/comment.store.ts | 9 +-- .../issue-details/comment_reaction.store.ts | 12 ++-- .../store/issue/issue-details/link.store.ts | 2 +- .../issue/issue-details/reaction.store.ts | 14 ++--- .../issue/issue-details/relation.store.ts | 4 +- .../issue/issue-details/sub_issues.store.ts | 8 +-- .../issue-details/sub_issues_filter.store.ts | 2 +- .../issue/issue-details/subscription.store.ts | 2 +- apps/web/core/store/issue/issue.store.ts | 4 +- .../core/store/issue/module/filter.store.ts | 3 +- .../core/store/issue/profile/filter.store.ts | 3 +- .../store/issue/project-views/filter.store.ts | 3 +- .../core/store/issue/project/filter.store.ts | 3 +- apps/web/core/store/issue/root.store.ts | 2 +- .../issue/workspace-draft/filter.store.ts | 10 ++-- .../issue/workspace-draft/issue.store.ts | 8 +-- .../store/issue/workspace/filter.store.ts | 3 +- apps/web/core/store/label.store.ts | 3 +- .../project/base-project-member.store.ts | 6 +- .../workspace/workspace-member.store.ts | 3 +- apps/web/core/store/module.store.ts | 5 +- apps/web/core/store/module_filter.store.ts | 2 +- apps/web/core/store/multiple_select.store.ts | 4 +- .../core/store/notifications/notification.ts | 2 +- .../workspace-notifications.store.ts | 5 +- apps/web/core/store/pages/base-page.ts | 2 +- .../core/store/pages/project-page.store.ts | 3 +- apps/web/core/store/project-view.store.ts | 2 +- .../store/project/project-publish.store.ts | 3 +- apps/web/core/store/project/project.store.ts | 5 +- .../store/project/project_filter.store.ts | 2 +- apps/web/core/store/state.store.ts | 3 +- apps/web/core/store/sticky/sticky.store.ts | 2 +- apps/web/core/store/user/account.store.ts | 2 +- .../core/store/user/base-permissions.store.ts | 3 +- apps/web/core/store/user/index.ts | 3 +- apps/web/core/store/user/profile.store.ts | 3 +- apps/web/core/store/workspace/home.ts | 7 ++- apps/web/core/store/workspace/index.ts | 3 +- apps/web/core/store/workspace/link.store.ts | 2 +- apps/web/next.config.js | 2 +- apps/web/package.json | 4 +- packages/i18n/package.json | 4 +- packages/i18n/src/store/index.ts | 3 +- packages/shared-state/package.json | 4 +- .../src/store/rich-filters/config.ts | 2 +- .../src/store/rich-filters/filter-helpers.ts | 2 +- .../src/store/rich-filters/filter.ts | 2 +- .../src/store/work-item-filters/adapter.ts | 2 +- packages/ui/package.json | 4 +- packages/ui/src/dropdown/common/loader.tsx | 2 +- packages/ui/src/dropdown/multi-select.tsx | 2 +- packages/ui/src/dropdown/single-select.tsx | 2 +- packages/ui/src/sortable/draggable.tsx | 2 +- packages/utils/package.json | 4 +- packages/utils/src/array.ts | 2 +- packages/utils/src/cycle.ts | 5 +- packages/utils/src/datetime.ts | 2 +- packages/utils/src/distribution-update.ts | 3 +- packages/utils/src/module.ts | 2 +- packages/utils/src/page.ts | 2 +- packages/utils/src/project-views.ts | 3 +- packages/utils/src/project.ts | 2 +- .../src/rich-filters/operations/comparison.ts | 4 +- .../utils/src/rich-filters/operators/core.ts | 2 +- packages/utils/src/subscription.ts | 2 +- packages/utils/src/work-item/base.ts | 2 +- packages/utils/src/work-item/modal.ts | 2 +- pnpm-lock.yaml | 60 ++++++++++--------- pnpm-workspace.yaml | 4 +- 199 files changed, 261 insertions(+), 396 deletions(-) diff --git a/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx index 6e5f2a903..5e75529c9 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useState } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import Link from "next/link"; import { useForm } from "react-hook-form"; // plane internal packages diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx index 888b2533c..ed5ef1fe0 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx @@ -1,5 +1,5 @@ import { FC, useState } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import Link from "next/link"; import { useForm } from "react-hook-form"; // plane internal packages diff --git a/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx index f136df308..585b1c2b1 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx @@ -1,6 +1,6 @@ "use client"; import { FC, useState } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import Link from "next/link"; import { useForm } from "react-hook-form"; // plane internal packages diff --git a/apps/admin/core/store/instance.store.ts b/apps/admin/core/store/instance.store.ts index 764c95bf2..b27aa4c78 100644 --- a/apps/admin/core/store/instance.store.ts +++ b/apps/admin/core/store/instance.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { observable, action, computed, makeObservable, runInAction } from "mobx"; // plane internal packages import { EInstanceStatus, TInstanceStatus } from "@plane/constants"; diff --git a/apps/admin/core/store/workspace.store.ts b/apps/admin/core/store/workspace.store.ts index 64f7501d3..b8856620f 100644 --- a/apps/admin/core/store/workspace.store.ts +++ b/apps/admin/core/store/workspace.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, observable, runInAction, makeObservable, computed } from "mobx"; // plane imports import { InstanceWorkspaceService } from "@plane/services"; diff --git a/apps/admin/package.json b/apps/admin/package.json index 18acfb50f..8249dfef9 100644 --- a/apps/admin/package.json +++ b/apps/admin/package.json @@ -27,7 +27,7 @@ "@plane/utils": "workspace:*", "autoprefixer": "10.4.14", "axios": "catalog:", - "lodash": "catalog:", + "lodash-es": "catalog:", "lucide-react": "catalog:", "mobx": "catalog:", "mobx-react": "catalog:", @@ -45,7 +45,7 @@ "@plane/eslint-config": "workspace:*", "@plane/tailwind-config": "workspace:*", "@plane/typescript-config": "workspace:*", - "@types/lodash": "catalog:", + "@types/lodash-es": "catalog:", "@types/node": "18.16.1", "@types/react": "catalog:", "@types/react-dom": "catalog:", diff --git a/apps/live/package.json b/apps/live/package.json index 97e5c50d7..b29ce0df1 100644 --- a/apps/live/package.json +++ b/apps/live/package.json @@ -36,7 +36,6 @@ "express-ws": "^5.0.2", "helmet": "^7.1.0", "ioredis": "^5.4.1", - "lodash": "catalog:", "morgan": "1.10.1", "pino-http": "^10.3.0", "pino-pretty": "^11.2.2", diff --git a/apps/space/core/components/issues/filters/applied-filters/root.tsx b/apps/space/core/components/issues/filters/applied-filters/root.tsx index c509ee3ae..f5d2ce5a6 100644 --- a/apps/space/core/components/issues/filters/applied-filters/root.tsx +++ b/apps/space/core/components/issues/filters/applied-filters/root.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useCallback } from "react"; -import cloneDeep from "lodash/cloneDeep"; +import { cloneDeep } from "lodash-es"; import { observer } from "mobx-react"; import { useRouter } from "next/navigation"; // hooks diff --git a/apps/space/core/components/issues/filters/root.tsx b/apps/space/core/components/issues/filters/root.tsx index 7e6dcd803..c9316598a 100644 --- a/apps/space/core/components/issues/filters/root.tsx +++ b/apps/space/core/components/issues/filters/root.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useCallback } from "react"; -import cloneDeep from "lodash/cloneDeep"; +import { cloneDeep } from "lodash-es"; import { observer } from "mobx-react"; import { useRouter } from "next/navigation"; // constants diff --git a/apps/space/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx b/apps/space/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx index 9dd7f898a..a3ccabd0e 100644 --- a/apps/space/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx +++ b/apps/space/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx @@ -1,7 +1,7 @@ "use client"; import { useCallback, useMemo, useRef } from "react"; -import debounce from "lodash/debounce"; +import { debounce } from "lodash-es"; import { observer } from "mobx-react"; // types import { IIssueDisplayProperties } from "@plane/types"; diff --git a/apps/space/core/components/issues/issue-layouts/kanban/default.tsx b/apps/space/core/components/issues/issue-layouts/kanban/default.tsx index db48e6e0f..e87250546 100644 --- a/apps/space/core/components/issues/issue-layouts/kanban/default.tsx +++ b/apps/space/core/components/issues/issue-layouts/kanban/default.tsx @@ -1,5 +1,5 @@ import { MutableRefObject } from "react"; -import isNil from "lodash/isNil"; +import { isNil } from "lodash-es"; import { observer } from "mobx-react"; // types import { diff --git a/apps/space/core/components/issues/issue-layouts/utils.tsx b/apps/space/core/components/issues/issue-layouts/utils.tsx index 4733dc78a..9beb230c8 100644 --- a/apps/space/core/components/issues/issue-layouts/utils.tsx +++ b/apps/space/core/components/issues/issue-layouts/utils.tsx @@ -1,6 +1,6 @@ "use client"; -import isNil from "lodash/isNil"; +import { isNil } from "lodash-es"; import { ContrastIcon } from "lucide-react"; // types import { EIconSize, ISSUE_PRIORITIES } from "@plane/constants"; diff --git a/apps/space/core/store/helpers/base-issues.store.ts b/apps/space/core/store/helpers/base-issues.store.ts index 32f5abf9d..01d4d706b 100644 --- a/apps/space/core/store/helpers/base-issues.store.ts +++ b/apps/space/core/store/helpers/base-issues.store.ts @@ -1,8 +1,4 @@ -import concat from "lodash/concat"; -import get from "lodash/get"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; -import update from "lodash/update"; +import { concat, get, set, uniq, update } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/space/core/store/instance.store.ts b/apps/space/core/store/instance.store.ts index 9887e5b8a..a3be82ece 100644 --- a/apps/space/core/store/instance.store.ts +++ b/apps/space/core/store/instance.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { observable, action, makeObservable, runInAction } from "mobx"; // plane imports import { InstanceService } from "@plane/services"; diff --git a/apps/space/core/store/issue-detail.store.ts b/apps/space/core/store/issue-detail.store.ts index c6c8d8eee..8ae390364 100644 --- a/apps/space/core/store/issue-detail.store.ts +++ b/apps/space/core/store/issue-detail.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { makeObservable, observable, action, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; import { v4 as uuidv4 } from "uuid"; diff --git a/apps/space/core/store/issue-filters.store.ts b/apps/space/core/store/issue-filters.store.ts index e5df3447e..a48b07a79 100644 --- a/apps/space/core/store/issue-filters.store.ts +++ b/apps/space/core/store/issue-filters.store.ts @@ -1,6 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; -import isEqual from "lodash/isEqual"; -import set from "lodash/set"; +import { cloneDeep, isEqual, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane internal diff --git a/apps/space/core/store/label.store.ts b/apps/space/core/store/label.store.ts index eed442aaa..53ffcbc6f 100644 --- a/apps/space/core/store/label.store.ts +++ b/apps/space/core/store/label.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // plane imports import { SitesLabelService } from "@plane/services"; diff --git a/apps/space/core/store/members.store.ts b/apps/space/core/store/members.store.ts index a8f775d89..45abdc711 100644 --- a/apps/space/core/store/members.store.ts +++ b/apps/space/core/store/members.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // plane imports import { SitesMemberService } from "@plane/services"; diff --git a/apps/space/core/store/module.store.ts b/apps/space/core/store/module.store.ts index 66449a408..0635d6f8c 100644 --- a/apps/space/core/store/module.store.ts +++ b/apps/space/core/store/module.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // plane imports import { SitesModuleService } from "@plane/services"; diff --git a/apps/space/core/store/profile.store.ts b/apps/space/core/store/profile.store.ts index e231853c0..79bbee393 100644 --- a/apps/space/core/store/profile.store.ts +++ b/apps/space/core/store/profile.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; // plane imports import { UserService } from "@plane/services"; diff --git a/apps/space/core/store/publish/publish_list.store.ts b/apps/space/core/store/publish/publish_list.store.ts index 3dba131bb..3f37d5b16 100644 --- a/apps/space/core/store/publish/publish_list.store.ts +++ b/apps/space/core/store/publish/publish_list.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { makeObservable, observable, runInAction, action } from "mobx"; // plane imports import { SitesProjectPublishService } from "@plane/services"; diff --git a/apps/space/core/store/state.store.ts b/apps/space/core/store/state.store.ts index a7171b19d..a525f1003 100644 --- a/apps/space/core/store/state.store.ts +++ b/apps/space/core/store/state.store.ts @@ -1,4 +1,4 @@ -import clone from "lodash/clone"; +import { clone } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // plane imports import { SitesStateService } from "@plane/services"; diff --git a/apps/space/core/store/user.store.ts b/apps/space/core/store/user.store.ts index 2b864ea5a..1a97989f4 100644 --- a/apps/space/core/store/user.store.ts +++ b/apps/space/core/store/user.store.ts @@ -1,5 +1,5 @@ import { AxiosError } from "axios"; -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // plane imports import { UserService } from "@plane/services"; diff --git a/apps/space/helpers/date-time.helper.ts b/apps/space/helpers/date-time.helper.ts index 2e7a03b82..f0bb64892 100644 --- a/apps/space/helpers/date-time.helper.ts +++ b/apps/space/helpers/date-time.helper.ts @@ -1,5 +1,5 @@ import { format, isValid } from "date-fns"; -import isNumber from "lodash/isNumber"; +import { isNumber } from "lodash-es"; export const timeAgo = (time: any) => { switch (typeof time) { diff --git a/apps/space/package.json b/apps/space/package.json index 58caf798d..9f98c05f4 100644 --- a/apps/space/package.json +++ b/apps/space/package.json @@ -33,7 +33,7 @@ "date-fns": "^4.1.0", "dompurify": "^3.0.11", "dotenv": "^16.3.1", - "lodash": "catalog:", + "lodash-es": "catalog:", "lowlight": "^2.9.0", "lucide-react": "catalog:", "mobx": "catalog:", @@ -56,7 +56,7 @@ "@plane/eslint-config": "workspace:*", "@plane/tailwind-config": "workspace:*", "@plane/typescript-config": "workspace:*", - "@types/lodash": "catalog:", + "@types/lodash-es": "catalog:", "@types/node": "18.14.1", "@types/nprogress": "^0.2.0", "@types/react": "catalog:", diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx index f39274644..e82016f3d 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx @@ -1,5 +1,5 @@ import { FC } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; // plane helpers import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; diff --git a/apps/web/ce/store/estimates/estimate.ts b/apps/web/ce/store/estimates/estimate.ts index 0be2f1dd3..456a7f155 100644 --- a/apps/web/ce/store/estimates/estimate.ts +++ b/apps/web/ce/store/estimates/estimate.ts @@ -1,8 +1,4 @@ -/* eslint-disable no-useless-catch */ - -import orderBy from "lodash/orderBy"; -import set from "lodash/set"; -// import unset from "lodash/unset"; +import { orderBy, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types @@ -140,19 +136,15 @@ export class Estimate implements IEstimate { projectId: string, payload: Partial ): Promise => { - try { - if (!this.id || !payload) return; + if (!this.id || !payload) return; - const estimatePoint = await estimateService.createEstimatePoint(workspaceSlug, projectId, this.id, payload); - if (estimatePoint) { - runInAction(() => { - if (estimatePoint.id) { - set(this.estimatePoints, [estimatePoint.id], new EstimatePoint(this.store, this.data, estimatePoint)); - } - }); - } - } catch (error) { - throw error; + const estimatePoint = await estimateService.createEstimatePoint(workspaceSlug, projectId, this.id, payload); + if (estimatePoint) { + runInAction(() => { + if (estimatePoint.id) { + set(this.estimatePoints, [estimatePoint.id], new EstimatePoint(this.store, this.data, estimatePoint)); + } + }); } }; } diff --git a/apps/web/ce/store/issue/issue-details/activity.store.ts b/apps/web/ce/store/issue/issue-details/activity.store.ts index 95f133cf9..95a9ed792 100644 --- a/apps/web/ce/store/issue/issue-details/activity.store.ts +++ b/apps/web/ce/store/issue/issue-details/activity.store.ts @@ -1,10 +1,4 @@ -/* eslint-disable no-useless-catch */ - -import concat from "lodash/concat"; -import orderBy from "lodash/orderBy"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; -import update from "lodash/update"; +import { concat, orderBy, set, uniq, update } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane package imports diff --git a/apps/web/ce/store/timeline/base-timeline.store.ts b/apps/web/ce/store/timeline/base-timeline.store.ts index 35b1a10f4..d64508b64 100644 --- a/apps/web/ce/store/timeline/base-timeline.store.ts +++ b/apps/web/ce/store/timeline/base-timeline.store.ts @@ -1,5 +1,4 @@ -import isEqual from "lodash/isEqual"; -import set from "lodash/set"; +import { isEqual, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // components diff --git a/apps/web/core/components/common/filters/created-by.tsx b/apps/web/core/components/common/filters/created-by.tsx index e6bfa5823..bd39056c8 100644 --- a/apps/web/core/components/common/filters/created-by.tsx +++ b/apps/web/core/components/common/filters/created-by.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // ui import { Avatar, Loader } from "@plane/ui"; diff --git a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx index 09a6618bf..1aa9ef018 100644 --- a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx +++ b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx @@ -1,7 +1,6 @@ "use client"; import React, { useEffect, useState } from "react"; -import { filter } from "lodash"; import { Rocket, Search, X } from "lucide-react"; import { Combobox, Dialog, Transition } from "@headlessui/react"; // i18n diff --git a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx index 0a8bfa3ff..e25df3008 100644 --- a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx +++ b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, Fragment, useCallback, useRef, useState } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { CalendarCheck } from "lucide-react"; // headless ui diff --git a/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx b/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx index fbea2e7be..22337ce26 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useMemo } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { useSearchParams } from "next/navigation"; import { ChevronUp, ChevronDown } from "lucide-react"; diff --git a/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx b/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx index 29ddfe1eb..f09ed83f5 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx @@ -1,6 +1,6 @@ "use client"; import React, { FC } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { LayersIcon, SquareUser, Users } from "lucide-react"; // plane types diff --git a/apps/web/core/components/cycles/list/cycles-list-item.tsx b/apps/web/core/components/cycles/list/cycles-list-item.tsx index 0e17743bb..d4bbde54c 100644 --- a/apps/web/core/components/cycles/list/cycles-list-item.tsx +++ b/apps/web/core/components/cycles/list/cycles-list-item.tsx @@ -1,6 +1,5 @@ "use client"; import { FC, MouseEvent, useRef } from "react"; -import isEmpty from "lodash/isEmpty"; import { observer } from "mobx-react"; import { usePathname, useSearchParams } from "next/navigation"; import { Check } from "lucide-react"; diff --git a/apps/web/core/components/exporter/export-form.tsx b/apps/web/core/components/exporter/export-form.tsx index 1b43d7784..f021a1afe 100644 --- a/apps/web/core/components/exporter/export-form.tsx +++ b/apps/web/core/components/exporter/export-form.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { intersection } from "lodash"; +import { intersection } from "lodash-es"; import { Controller, useForm } from "react-hook-form"; import { EUserPermissions, diff --git a/apps/web/core/components/exporter/export-modal.tsx b/apps/web/core/components/exporter/export-modal.tsx index 86bd6bd86..81c356427 100644 --- a/apps/web/core/components/exporter/export-modal.tsx +++ b/apps/web/core/components/exporter/export-modal.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useState } from "react"; -import intersection from "lodash/intersection"; +import { intersection } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { Dialog, Transition } from "@headlessui/react"; diff --git a/apps/web/core/components/gantt-chart/views/month-view.ts b/apps/web/core/components/gantt-chart/views/month-view.ts index 178a68d67..cac52e4d1 100644 --- a/apps/web/core/components/gantt-chart/views/month-view.ts +++ b/apps/web/core/components/gantt-chart/views/month-view.ts @@ -1,7 +1,7 @@ -import cloneDeep from "lodash/cloneDeep"; -import uniqBy from "lodash/uniqBy"; -// +import { cloneDeep, uniqBy } from "lodash-es"; +// plane imports import type { ChartDataType } from "@plane/types"; +// local imports import { months } from "../data"; import { getNumberOfDaysBetweenTwoDates, getNumberOfDaysInMonth } from "./helpers"; import { getWeeksBetweenTwoDates, IWeekBlock } from "./week-view"; diff --git a/apps/web/core/components/home/widgets/loaders/home-loader.tsx b/apps/web/core/components/home/widgets/loaders/home-loader.tsx index 56d32725b..579d7497f 100644 --- a/apps/web/core/components/home/widgets/loaders/home-loader.tsx +++ b/apps/web/core/components/home/widgets/loaders/home-loader.tsx @@ -1,6 +1,6 @@ "use client"; -import range from "lodash/range"; +import { range } from "lodash-es"; // ui import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/home/widgets/loaders/quick-links.tsx b/apps/web/core/components/home/widgets/loaders/quick-links.tsx index 3037bf39c..67e4b4cf6 100644 --- a/apps/web/core/components/home/widgets/loaders/quick-links.tsx +++ b/apps/web/core/components/home/widgets/loaders/quick-links.tsx @@ -1,6 +1,6 @@ "use client"; -import range from "lodash/range"; +import { range } from "lodash-es"; // ui import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/home/widgets/loaders/recent-activity.tsx b/apps/web/core/components/home/widgets/loaders/recent-activity.tsx index 741ef29eb..9dc7a6fa0 100644 --- a/apps/web/core/components/home/widgets/loaders/recent-activity.tsx +++ b/apps/web/core/components/home/widgets/loaders/recent-activity.tsx @@ -1,6 +1,6 @@ "use client"; -import range from "lodash/range"; +import { range } from "lodash-es"; // ui import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/date.tsx b/apps/web/core/components/inbox/inbox-filter/filters/date.tsx index 7382a028d..6aedda71e 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/date.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/date.tsx @@ -1,6 +1,5 @@ import { FC, useState } from "react"; -import concat from "lodash/concat"; -import uniq from "lodash/uniq"; +import { concat, uniq } from "lodash-es"; import { observer } from "mobx-react"; import { PAST_DURATION_FILTER_OPTIONS } from "@plane/constants"; import { TInboxIssueFilterDateKeys } from "@plane/types"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/members.tsx b/apps/web/core/components/inbox/inbox-filter/filters/members.tsx index 070ceb00b..4a6b95ec7 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/members.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/members.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane types import { TInboxIssueFilterMemberKeys } from "@plane/types"; diff --git a/apps/web/core/components/issues/description-input.tsx b/apps/web/core/components/issues/description-input.tsx index c320daf27..6d7c5eebb 100644 --- a/apps/web/core/components/issues/description-input.tsx +++ b/apps/web/core/components/issues/description-input.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useCallback, useEffect, useRef, useState } from "react"; -import debounce from "lodash/debounce"; +import { debounce } from "lodash-es"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx index aa43c7759..a71ff6786 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx @@ -1,5 +1,5 @@ import { FC, useMemo } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { SlidersHorizontal } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx index 84c21900f..9899b216c 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx @@ -1,5 +1,5 @@ import { FC, useCallback } from "react"; -import cloneDeep from "lodash/cloneDeep"; +import { cloneDeep } from "lodash-es"; import { observer } from "mobx-react"; import { EIssueFilterType, diff --git a/apps/web/core/components/issues/issue-detail/module-select.tsx b/apps/web/core/components/issues/issue-detail/module-select.tsx index a038e0bf4..a877d97ee 100644 --- a/apps/web/core/components/issues/issue-detail/module-select.tsx +++ b/apps/web/core/components/issues/issue-detail/module-select.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import xor from "lodash/xor"; +import { xor } from "lodash-es"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/subscription.tsx b/apps/web/core/components/issues/issue-detail/subscription.tsx index 0bac4a730..31a8a9625 100644 --- a/apps/web/core/components/issues/issue-detail/subscription.tsx +++ b/apps/web/core/components/issues/issue-detail/subscription.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useState } from "react"; -import isNil from "lodash/isNil"; +import { isNil } from "lodash-es"; import { observer } from "mobx-react"; import { Bell, BellOff } from "lucide-react"; // plane-i18n diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx index 24b65acff..011170546 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx index 471ded192..b93765e19 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx @@ -1,5 +1,5 @@ import React from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { IIssueDisplayFilterOptions, diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx index b7a592b78..f26a9bd26 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane ui import { Avatar, Loader } from "@plane/ui"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx index b1406e5d4..56847644c 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane ui import { Avatar, Loader } from "@plane/ui"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx index 0e4b17b45..9cf42e0eb 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { CycleGroupIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx index 5b80a2fbb..e5e15c3cd 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; import { IIssueLabel } from "@plane/types"; // components diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx index 22811062a..8220a43d1 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane ui import { Loader, Avatar } from "@plane/ui"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx index ca4b4c63b..6c36ee526 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // components diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx index d1038be5e..b04f42620 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // ui import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx index c7f0206b8..1821a0bff 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; import { EIconSize } from "@plane/constants"; import { StateGroupIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx b/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx index a14a2ad95..86da5e38f 100644 --- a/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx +++ b/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx @@ -1,7 +1,7 @@ "use client"; import { useCallback, useMemo, SyntheticEvent } from "react"; -import xor from "lodash/xor"; +import { xor } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // icons diff --git a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx index 4d8116f3a..ce522e14f 100644 --- a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx +++ b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import omit from "lodash/omit"; +import { omit } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx index b24988808..6c0399e01 100644 --- a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx +++ b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import omit from "lodash/omit"; +import { omit } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx index 6f450f6d1..29abea656 100644 --- a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx +++ b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import omit from "lodash/omit"; +import { omit } from "lodash-es"; import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx index cd9cc96c8..e147d448a 100644 --- a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx +++ b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import omit from "lodash/omit"; +import { omit } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx index 7637c5faf..83c58c881 100644 --- a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx +++ b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import omit from "lodash/omit"; +import { omit } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx b/apps/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx index 1860073bf..a67fecce3 100644 --- a/apps/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; diff --git a/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx b/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx index dcd1c03e5..45c30c02b 100644 --- a/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx +++ b/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/module-column.tsx @@ -1,5 +1,5 @@ import React, { useCallback } from "react"; -import xor from "lodash/xor"; +import { xor } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // types diff --git a/apps/web/core/components/issues/issue-layouts/utils.tsx b/apps/web/core/components/issues/issue-layouts/utils.tsx index b4c1db970..d17cdd8e4 100644 --- a/apps/web/core/components/issues/issue-layouts/utils.tsx +++ b/apps/web/core/components/issues/issue-layouts/utils.tsx @@ -2,11 +2,7 @@ import { CSSProperties, FC } from "react"; import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; -import clone from "lodash/clone"; -import concat from "lodash/concat"; -import isNil from "lodash/isNil"; -import pull from "lodash/pull"; -import uniq from "lodash/uniq"; +import { clone, isNil, pull, uniq, concat } from "lodash-es"; import scrollIntoView from "smooth-scroll-into-view-if-needed"; import { ContrastIcon } from "lucide-react"; // plane types diff --git a/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx b/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx index b9d4e5122..5c9111b44 100644 --- a/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx +++ b/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useState } from "react"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { WORK_ITEM_TRACKER_EVENTS } from "@plane/constants"; diff --git a/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx b/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx index 2a984fa5c..2c185c087 100644 --- a/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx +++ b/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx @@ -1,6 +1,6 @@ "use client"; import React, { FC, useRef, useState } from "react"; -import { omit } from "lodash"; +import { omit } from "lodash-es"; import { observer } from "mobx-react"; import { Copy, Pencil, SquareStackIcon, Trash2 } from "lucide-react"; // plane utils diff --git a/apps/web/core/components/issues/workspace-draft/loader.tsx b/apps/web/core/components/issues/workspace-draft/loader.tsx index ef09385d3..849eb382b 100644 --- a/apps/web/core/components/issues/workspace-draft/loader.tsx +++ b/apps/web/core/components/issues/workspace-draft/loader.tsx @@ -1,7 +1,7 @@ "use client"; import { FC } from "react"; -import range from "lodash/range"; +import { range } from "lodash-es"; // components import { ListLoaderItemRow } from "@/components/ui/loader/layouts/list-layout-loader"; diff --git a/apps/web/core/components/modules/dropdowns/filters/lead.tsx b/apps/web/core/components/modules/dropdowns/filters/lead.tsx index fb7166b51..c067e1757 100644 --- a/apps/web/core/components/modules/dropdowns/filters/lead.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/lead.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane ui import { Avatar, Loader } from "@plane/ui"; diff --git a/apps/web/core/components/modules/dropdowns/filters/members.tsx b/apps/web/core/components/modules/dropdowns/filters/members.tsx index eebad7c1e..7f92ef45a 100644 --- a/apps/web/core/components/modules/dropdowns/filters/members.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/members.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane ui import { Avatar, Loader } from "@plane/ui"; diff --git a/apps/web/core/components/pages/loaders/page-loader.tsx b/apps/web/core/components/pages/loaders/page-loader.tsx index 974c28f6b..43d8d915d 100644 --- a/apps/web/core/components/pages/loaders/page-loader.tsx +++ b/apps/web/core/components/pages/loaders/page-loader.tsx @@ -1,6 +1,6 @@ "use client"; -import range from "lodash/range"; +import { range } from "lodash-es"; import { Loader } from "@plane/ui"; export const PageLoader: React.FC = (props) => { diff --git a/apps/web/core/components/project/dropdowns/filters/lead.tsx b/apps/web/core/components/project/dropdowns/filters/lead.tsx index fb7166b51..c067e1757 100644 --- a/apps/web/core/components/project/dropdowns/filters/lead.tsx +++ b/apps/web/core/components/project/dropdowns/filters/lead.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane ui import { Avatar, Loader } from "@plane/ui"; diff --git a/apps/web/core/components/project/dropdowns/filters/members.tsx b/apps/web/core/components/project/dropdowns/filters/members.tsx index eebad7c1e..7f92ef45a 100644 --- a/apps/web/core/components/project/dropdowns/filters/members.tsx +++ b/apps/web/core/components/project/dropdowns/filters/members.tsx @@ -1,7 +1,7 @@ "use client"; import { useMemo, useState } from "react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; // plane ui import { Avatar, Loader } from "@plane/ui"; diff --git a/apps/web/core/components/project/multi-select-modal.tsx b/apps/web/core/components/project/multi-select-modal.tsx index 6d16987c0..b6012ccf6 100644 --- a/apps/web/core/components/project/multi-select-modal.tsx +++ b/apps/web/core/components/project/multi-select-modal.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; -import xor from "lodash/xor"; +import { xor } from "lodash-es"; import { observer } from "mobx-react"; import { Search, X } from "lucide-react"; import { Combobox } from "@headlessui/react"; diff --git a/apps/web/core/components/settings/project/sidebar/nav-item-children.tsx b/apps/web/core/components/settings/project/sidebar/nav-item-children.tsx index e161d0900..d82a28f0c 100644 --- a/apps/web/core/components/settings/project/sidebar/nav-item-children.tsx +++ b/apps/web/core/components/settings/project/sidebar/nav-item-children.tsx @@ -1,4 +1,4 @@ -import { range } from "lodash"; +import { range } from "lodash-es"; import { observer } from "mobx-react"; import Link from "next/link"; import { usePathname, useParams } from "next/navigation"; diff --git a/apps/web/core/components/stickies/modal/search.tsx b/apps/web/core/components/stickies/modal/search.tsx index 8cdee6cc4..ab791c486 100644 --- a/apps/web/core/components/stickies/modal/search.tsx +++ b/apps/web/core/components/stickies/modal/search.tsx @@ -1,7 +1,7 @@ "use client"; import { FC, useCallback, useRef, useState } from "react"; -import { debounce } from "lodash"; +import { debounce } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { Search, X } from "lucide-react"; diff --git a/apps/web/core/components/stickies/sticky/root.tsx b/apps/web/core/components/stickies/sticky/root.tsx index 170440405..bbc2c2c9c 100644 --- a/apps/web/core/components/stickies/sticky/root.tsx +++ b/apps/web/core/components/stickies/sticky/root.tsx @@ -1,5 +1,5 @@ import { useCallback, useState } from "react"; -import { debounce } from "lodash"; +import { debounce } from "lodash-es"; import { observer } from "mobx-react"; import { Minimize2 } from "lucide-react"; // plane types diff --git a/apps/web/core/components/ui/loader/cycle-module-board-loader.tsx b/apps/web/core/components/ui/loader/cycle-module-board-loader.tsx index aac5a7fbb..a4fe6b188 100644 --- a/apps/web/core/components/ui/loader/cycle-module-board-loader.tsx +++ b/apps/web/core/components/ui/loader/cycle-module-board-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const CycleModuleBoardLayoutLoader = () => (
diff --git a/apps/web/core/components/ui/loader/cycle-module-list-loader.tsx b/apps/web/core/components/ui/loader/cycle-module-list-loader.tsx index 7370559e4..57947f0ab 100644 --- a/apps/web/core/components/ui/loader/cycle-module-list-loader.tsx +++ b/apps/web/core/components/ui/loader/cycle-module-list-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const CycleModuleListLayoutLoader = () => (
diff --git a/apps/web/core/components/ui/loader/layouts/calendar-layout-loader.tsx b/apps/web/core/components/ui/loader/layouts/calendar-layout-loader.tsx index 0edc51c4e..80a257d4b 100644 --- a/apps/web/core/components/ui/loader/layouts/calendar-layout-loader.tsx +++ b/apps/web/core/components/ui/loader/layouts/calendar-layout-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; import { getRandomInt } from "../utils"; const CalendarDay = () => { diff --git a/apps/web/core/components/ui/loader/layouts/gantt-layout-loader.tsx b/apps/web/core/components/ui/loader/layouts/gantt-layout-loader.tsx index 8fc6fac88..3b0a36caf 100644 --- a/apps/web/core/components/ui/loader/layouts/gantt-layout-loader.tsx +++ b/apps/web/core/components/ui/loader/layouts/gantt-layout-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; import { Row } from "@plane/ui"; import { BLOCK_HEIGHT } from "@/components/gantt-chart/constants"; import { getRandomLength } from "../utils"; diff --git a/apps/web/core/components/ui/loader/layouts/kanban-layout-loader.tsx b/apps/web/core/components/ui/loader/layouts/kanban-layout-loader.tsx index 9cf250a18..7c21660d2 100644 --- a/apps/web/core/components/ui/loader/layouts/kanban-layout-loader.tsx +++ b/apps/web/core/components/ui/loader/layouts/kanban-layout-loader.tsx @@ -1,5 +1,5 @@ import { forwardRef } from "react"; -import range from "lodash/range"; +import { range } from "lodash-es"; // plane ui import { ContentWrapper } from "@plane/ui"; // plane utils diff --git a/apps/web/core/components/ui/loader/layouts/list-layout-loader.tsx b/apps/web/core/components/ui/loader/layouts/list-layout-loader.tsx index fdcaf8898..fd0250779 100644 --- a/apps/web/core/components/ui/loader/layouts/list-layout-loader.tsx +++ b/apps/web/core/components/ui/loader/layouts/list-layout-loader.tsx @@ -1,5 +1,5 @@ import { Fragment, forwardRef } from "react"; -import range from "lodash/range"; +import { range } from "lodash-es"; // plane ui import { Row } from "@plane/ui"; // plane utils diff --git a/apps/web/core/components/ui/loader/layouts/members-layout-loader.tsx b/apps/web/core/components/ui/loader/layouts/members-layout-loader.tsx index 6010d17bf..4c011855e 100644 --- a/apps/web/core/components/ui/loader/layouts/members-layout-loader.tsx +++ b/apps/web/core/components/ui/loader/layouts/members-layout-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const MembersLayoutLoader = () => (
{range(5).map((columnIndex) => ( diff --git a/apps/web/core/components/ui/loader/layouts/project-inbox/inbox-sidebar-loader.tsx b/apps/web/core/components/ui/loader/layouts/project-inbox/inbox-sidebar-loader.tsx index 0ead51f58..a8741ef8f 100644 --- a/apps/web/core/components/ui/loader/layouts/project-inbox/inbox-sidebar-loader.tsx +++ b/apps/web/core/components/ui/loader/layouts/project-inbox/inbox-sidebar-loader.tsx @@ -1,5 +1,5 @@ import React from "react"; -import range from "lodash/range"; +import { range } from "lodash-es"; export const InboxSidebarLoader = () => (
diff --git a/apps/web/core/components/ui/loader/layouts/spreadsheet-layout-loader.tsx b/apps/web/core/components/ui/loader/layouts/spreadsheet-layout-loader.tsx index c1b00d0ad..580c6744e 100644 --- a/apps/web/core/components/ui/loader/layouts/spreadsheet-layout-loader.tsx +++ b/apps/web/core/components/ui/loader/layouts/spreadsheet-layout-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; import { Row } from "@plane/ui"; import { getRandomLength } from "../utils"; diff --git a/apps/web/core/components/ui/loader/notification-loader.tsx b/apps/web/core/components/ui/loader/notification-loader.tsx index 4526e400d..12a364978 100644 --- a/apps/web/core/components/ui/loader/notification-loader.tsx +++ b/apps/web/core/components/ui/loader/notification-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const NotificationsLoader = () => (
diff --git a/apps/web/core/components/ui/loader/pages-loader.tsx b/apps/web/core/components/ui/loader/pages-loader.tsx index 296c87275..a3d25d751 100644 --- a/apps/web/core/components/ui/loader/pages-loader.tsx +++ b/apps/web/core/components/ui/loader/pages-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const PagesLoader = () => (
diff --git a/apps/web/core/components/ui/loader/projects-loader.tsx b/apps/web/core/components/ui/loader/projects-loader.tsx index 263919cd1..bfdf7716c 100644 --- a/apps/web/core/components/ui/loader/projects-loader.tsx +++ b/apps/web/core/components/ui/loader/projects-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const ProjectsLoader = () => (
diff --git a/apps/web/core/components/ui/loader/settings/activity.tsx b/apps/web/core/components/ui/loader/settings/activity.tsx index a9860f6c0..59fd18e0e 100644 --- a/apps/web/core/components/ui/loader/settings/activity.tsx +++ b/apps/web/core/components/ui/loader/settings/activity.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; import { getRandomLength } from "../utils"; export const ActivitySettingsLoader = () => ( diff --git a/apps/web/core/components/ui/loader/settings/api-token.tsx b/apps/web/core/components/ui/loader/settings/api-token.tsx index a05088370..576601b30 100644 --- a/apps/web/core/components/ui/loader/settings/api-token.tsx +++ b/apps/web/core/components/ui/loader/settings/api-token.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; import { useTranslation } from "@plane/i18n"; export const APITokenSettingsLoader = () => { const { t } = useTranslation(); diff --git a/apps/web/core/components/ui/loader/settings/email.tsx b/apps/web/core/components/ui/loader/settings/email.tsx index 964a68b08..3fecb3590 100644 --- a/apps/web/core/components/ui/loader/settings/email.tsx +++ b/apps/web/core/components/ui/loader/settings/email.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const EmailSettingsLoader = () => (
diff --git a/apps/web/core/components/ui/loader/settings/import-and-export.tsx b/apps/web/core/components/ui/loader/settings/import-and-export.tsx index eea44c493..55097f02f 100644 --- a/apps/web/core/components/ui/loader/settings/import-and-export.tsx +++ b/apps/web/core/components/ui/loader/settings/import-and-export.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const ImportExportSettingsLoader = () => (
diff --git a/apps/web/core/components/ui/loader/settings/integration.tsx b/apps/web/core/components/ui/loader/settings/integration.tsx index ed4253760..d1385d2bc 100644 --- a/apps/web/core/components/ui/loader/settings/integration.tsx +++ b/apps/web/core/components/ui/loader/settings/integration.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const IntegrationsSettingsLoader = () => (
diff --git a/apps/web/core/components/ui/loader/settings/members.tsx b/apps/web/core/components/ui/loader/settings/members.tsx index 226fec4f8..d8b975e1d 100644 --- a/apps/web/core/components/ui/loader/settings/members.tsx +++ b/apps/web/core/components/ui/loader/settings/members.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const MembersSettingsLoader = () => (
diff --git a/apps/web/core/components/ui/loader/view-list-loader.tsx b/apps/web/core/components/ui/loader/view-list-loader.tsx index 71432a543..e9f91f09e 100644 --- a/apps/web/core/components/ui/loader/view-list-loader.tsx +++ b/apps/web/core/components/ui/loader/view-list-loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const ViewListLoader = () => (
diff --git a/apps/web/core/components/web-hooks/form/secret-key.tsx b/apps/web/core/components/web-hooks/form/secret-key.tsx index b1e1f33d7..7f0dffba2 100644 --- a/apps/web/core/components/web-hooks/form/secret-key.tsx +++ b/apps/web/core/components/web-hooks/form/secret-key.tsx @@ -1,7 +1,7 @@ "use client"; import { useState, FC } from "react"; -import range from "lodash/range"; +import { range } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // icons diff --git a/apps/web/core/components/work-item-filters/filters-hoc/project-level.tsx b/apps/web/core/components/work-item-filters/filters-hoc/project-level.tsx index 19794a53b..09526976f 100644 --- a/apps/web/core/components/work-item-filters/filters-hoc/project-level.tsx +++ b/apps/web/core/components/work-item-filters/filters-hoc/project-level.tsx @@ -1,6 +1,5 @@ import { useCallback, useMemo, useState } from "react"; -import cloneDeep from "lodash/cloneDeep"; -import isEqual from "lodash/isEqual"; +import { isEqual, cloneDeep } from "lodash-es"; import { observer } from "mobx-react"; // plane imports import { EUserPermissionsLevel, PROJECT_VIEW_TRACKER_EVENTS } from "@plane/constants"; diff --git a/apps/web/core/components/work-item-filters/filters-hoc/workspace-level.tsx b/apps/web/core/components/work-item-filters/filters-hoc/workspace-level.tsx index 7f8cc3e13..94b3dc07e 100644 --- a/apps/web/core/components/work-item-filters/filters-hoc/workspace-level.tsx +++ b/apps/web/core/components/work-item-filters/filters-hoc/workspace-level.tsx @@ -1,6 +1,5 @@ import { useCallback, useMemo, useState } from "react"; -import cloneDeep from "lodash/cloneDeep"; -import isEqual from "lodash/isEqual"; +import { isEqual, cloneDeep } from "lodash-es"; import { observer } from "mobx-react"; // plane imports import { DEFAULT_GLOBAL_VIEWS_LIST, EUserPermissionsLevel, GLOBAL_VIEW_TRACKER_EVENTS } from "@plane/constants"; diff --git a/apps/web/core/components/workspace-notifications/sidebar/loader.tsx b/apps/web/core/components/workspace-notifications/sidebar/loader.tsx index 6feca28cc..7112651da 100644 --- a/apps/web/core/components/workspace-notifications/sidebar/loader.tsx +++ b/apps/web/core/components/workspace-notifications/sidebar/loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; export const NotificationsLoader = () => (
diff --git a/apps/web/core/components/workspace/settings/members-list-item.tsx b/apps/web/core/components/workspace/settings/members-list-item.tsx index 093eab474..2f8a144b7 100644 --- a/apps/web/core/components/workspace/settings/members-list-item.tsx +++ b/apps/web/core/components/workspace/settings/members-list-item.tsx @@ -1,7 +1,7 @@ "use client"; import { FC } from "react"; -import { isEmpty } from "lodash"; +import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; // plane imports import { MEMBER_TRACKER_EVENTS } from "@plane/constants"; diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorite-folder.tsx b/apps/web/core/components/workspace/sidebar/favorites/favorite-folder.tsx index f9f5c881f..d358f1c2f 100644 --- a/apps/web/core/components/workspace/sidebar/favorites/favorite-folder.tsx +++ b/apps/web/core/components/workspace/sidebar/favorites/favorite-folder.tsx @@ -12,7 +12,7 @@ import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/eleme import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview"; import { attachInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; -import orderBy from "lodash/orderBy"; +import { orderBy } from "lodash-es"; import { useParams } from "next/navigation"; import { createRoot } from "react-dom/client"; import { PenSquare, Star, MoreHorizontal, ChevronRight, GripVertical } from "lucide-react"; diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorites-menu.tsx b/apps/web/core/components/workspace/sidebar/favorites/favorites-menu.tsx index 484027999..a8ca638f3 100644 --- a/apps/web/core/components/workspace/sidebar/favorites/favorites-menu.tsx +++ b/apps/web/core/components/workspace/sidebar/favorites/favorites-menu.tsx @@ -8,7 +8,7 @@ import { ElementDragPayload, } from "@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types"; import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; -import orderBy from "lodash/orderBy"; +import { orderBy } from "lodash-es"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { ChevronRight, FolderPlus } from "lucide-react"; diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorites.helpers.ts b/apps/web/core/components/workspace/sidebar/favorites/favorites.helpers.ts index 37ae56c60..0bad0f3df 100644 --- a/apps/web/core/components/workspace/sidebar/favorites/favorites.helpers.ts +++ b/apps/web/core/components/workspace/sidebar/favorites/favorites.helpers.ts @@ -1,5 +1,4 @@ import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; -import orderBy from "lodash/orderBy"; import { IFavorite, InstructionType, IPragmaticPayloadLocation, TDropTarget } from "@plane/types"; export type TargetData = { diff --git a/apps/web/core/hooks/store/use-issues.ts b/apps/web/core/hooks/store/use-issues.ts index a732b6580..dea396108 100644 --- a/apps/web/core/hooks/store/use-issues.ts +++ b/apps/web/core/hooks/store/use-issues.ts @@ -1,5 +1,5 @@ import { useContext } from "react"; -import merge from "lodash/merge"; +import { merge } from "lodash-es"; import { EIssuesStoreType, TIssueMap } from "@plane/types"; import { StoreContext } from "@/lib/store-context"; // plane web types diff --git a/apps/web/core/hooks/use-auto-save.tsx b/apps/web/core/hooks/use-auto-save.tsx index 8f4dd39f4..1d8a6b12b 100644 --- a/apps/web/core/hooks/use-auto-save.tsx +++ b/apps/web/core/hooks/use-auto-save.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from "react"; -import { debounce } from "lodash"; +import { debounce } from "lodash-es"; const AUTO_SAVE_TIME = 30000; diff --git a/apps/web/core/lib/local-storage.ts b/apps/web/core/lib/local-storage.ts index ab84b358f..f81b96d95 100644 --- a/apps/web/core/lib/local-storage.ts +++ b/apps/web/core/lib/local-storage.ts @@ -1,4 +1,4 @@ -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; export const storage = { set: (key: string, value: object | string | boolean): void => { diff --git a/apps/web/core/local-db/storage.sqlite.ts b/apps/web/core/local-db/storage.sqlite.ts index 90cda8a81..599cf3de1 100644 --- a/apps/web/core/local-db/storage.sqlite.ts +++ b/apps/web/core/local-db/storage.sqlite.ts @@ -1,5 +1,5 @@ import * as Comlink from "comlink"; -import set from "lodash/set"; +import { set } from "lodash-es"; // plane import { EIssueGroupBYServerToProperty } from "@plane/constants"; import { TIssue, TIssueParams } from "@plane/types"; diff --git a/apps/web/core/local-db/utils/load-workspace.ts b/apps/web/core/local-db/utils/load-workspace.ts index 92037d15d..2ac60c11c 100644 --- a/apps/web/core/local-db/utils/load-workspace.ts +++ b/apps/web/core/local-db/utils/load-workspace.ts @@ -1,5 +1,4 @@ -import { difference } from "lodash"; -import { API_BASE_URL } from "@plane/constants"; +import { difference } from "lodash-es"; import { IEstimate, IEstimatePoint, IWorkspaceMember, TIssue } from "@plane/types"; import { EstimateService } from "@/plane-web/services/project/estimate.service"; import { CycleService } from "@/services/cycle.service"; diff --git a/apps/web/core/local-db/utils/utils.ts b/apps/web/core/local-db/utils/utils.ts index 2a89a7fb6..33c3f39c0 100644 --- a/apps/web/core/local-db/utils/utils.ts +++ b/apps/web/core/local-db/utils/utils.ts @@ -1,4 +1,4 @@ -import pick from "lodash/pick"; +import { pick } from "lodash-es"; import { TIssue } from "@plane/types"; import { rootStore } from "@/lib/store-context"; import { persistence } from "../storage.sqlite"; diff --git a/apps/web/core/store/cycle.store.ts b/apps/web/core/store/cycle.store.ts index 3c86b16ce..c3c96144f 100644 --- a/apps/web/core/store/cycle.store.ts +++ b/apps/web/core/store/cycle.store.ts @@ -1,7 +1,5 @@ import { isPast, isToday } from "date-fns"; -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; -import sortBy from "lodash/sortBy"; +import { sortBy, set, isEmpty } from "lodash-es"; import { action, computed, observable, makeObservable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/cycle_filter.store.ts b/apps/web/core/store/cycle_filter.store.ts index 33b284b7a..81f9d52f0 100644 --- a/apps/web/core/store/cycle_filter.store.ts +++ b/apps/web/core/store/cycle_filter.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, observable, makeObservable, runInAction, reaction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/dashboard.store.ts b/apps/web/core/store/dashboard.store.ts index 171cdcbac..70f17119f 100644 --- a/apps/web/core/store/dashboard.store.ts +++ b/apps/web/core/store/dashboard.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/editor/asset.store.ts b/apps/web/core/store/editor/asset.store.ts index 587acba02..5de9c7e2e 100644 --- a/apps/web/core/store/editor/asset.store.ts +++ b/apps/web/core/store/editor/asset.store.ts @@ -1,5 +1,4 @@ -import debounce from "lodash/debounce"; -import set from "lodash/set"; +import { debounce, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; import { v4 as uuidv4 } from "uuid"; diff --git a/apps/web/core/store/estimates/estimate-point.ts b/apps/web/core/store/estimates/estimate-point.ts index 9f6d42f82..fa517e0d4 100644 --- a/apps/web/core/store/estimates/estimate-point.ts +++ b/apps/web/core/store/estimates/estimate-point.ts @@ -1,6 +1,6 @@ /* eslint-disable no-useless-catch */ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // types import { IEstimate, IEstimatePoint as IEstimatePointType } from "@plane/types"; diff --git a/apps/web/core/store/estimates/project-estimate.store.ts b/apps/web/core/store/estimates/project-estimate.store.ts index f12edf8f2..ae3e42325 100644 --- a/apps/web/core/store/estimates/project-estimate.store.ts +++ b/apps/web/core/store/estimates/project-estimate.store.ts @@ -1,6 +1,4 @@ -import orderBy from "lodash/orderBy"; -import set from "lodash/set"; -import unset from "lodash/unset"; +import { unset, orderBy, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/favorite.store.ts b/apps/web/core/store/favorite.store.ts index 9e2409a6d..dc1961d5b 100644 --- a/apps/web/core/store/favorite.store.ts +++ b/apps/web/core/store/favorite.store.ts @@ -1,5 +1,4 @@ -import { orderBy, result, uniqBy } from "lodash"; -import set from "lodash/set"; +import { orderBy, uniqBy, set } from "lodash-es"; import { action, observable, makeObservable, runInAction, computed } from "mobx"; import { v4 as uuidv4 } from "uuid"; import { IFavorite } from "@plane/types"; diff --git a/apps/web/core/store/global-view.store.ts b/apps/web/core/store/global-view.store.ts index 3915c5251..c6a6f3608 100644 --- a/apps/web/core/store/global-view.store.ts +++ b/apps/web/core/store/global-view.store.ts @@ -1,6 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; -import isEqual from "lodash/isEqual"; -import set from "lodash/set"; +import { set, cloneDeep, isEqual } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/inbox/inbox-issue.store.ts b/apps/web/core/store/inbox/inbox-issue.store.ts index ff8e5295e..fbb101039 100644 --- a/apps/web/core/store/inbox/inbox-issue.store.ts +++ b/apps/web/core/store/inbox/inbox-issue.store.ts @@ -1,5 +1,4 @@ -import clone from "lodash/clone"; -import set from "lodash/set"; +import { clone, set } from "lodash-es"; import { makeObservable, observable, runInAction, action } from "mobx"; import { TInboxIssue, diff --git a/apps/web/core/store/inbox/project-inbox.store.ts b/apps/web/core/store/inbox/project-inbox.store.ts index f036afe9d..b1cf7bd9b 100644 --- a/apps/web/core/store/inbox/project-inbox.store.ts +++ b/apps/web/core/store/inbox/project-inbox.store.ts @@ -1,7 +1,4 @@ -import { uniq, update } from "lodash"; -import isEmpty from "lodash/isEmpty"; -import omit from "lodash/omit"; -import set from "lodash/set"; +import { uniq, update, isEmpty, omit, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; import { EPastDurationFilters } from "@plane/constants"; diff --git a/apps/web/core/store/issue/archived/filter.store.ts b/apps/web/core/store/issue/archived/filter.store.ts index 1d2ac4b2a..d051a858b 100644 --- a/apps/web/core/store/issue/archived/filter.store.ts +++ b/apps/web/core/store/issue/archived/filter.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // base class import { computedFn } from "mobx-utils"; diff --git a/apps/web/core/store/issue/cycle/filter.store.ts b/apps/web/core/store/issue/cycle/filter.store.ts index 9e65dcf4d..fe410a117 100644 --- a/apps/web/core/store/issue/cycle/filter.store.ts +++ b/apps/web/core/store/issue/cycle/filter.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // base class import { computedFn } from "mobx-utils"; diff --git a/apps/web/core/store/issue/cycle/issue.store.ts b/apps/web/core/store/issue/cycle/issue.store.ts index 48b5a17d0..d3751b819 100644 --- a/apps/web/core/store/issue/cycle/issue.store.ts +++ b/apps/web/core/store/issue/cycle/issue.store.ts @@ -1,14 +1,7 @@ -// base class -// types -import concat from "lodash/concat"; -import get from "lodash/get"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; -import update from "lodash/update"; +import { get, set, concat, uniq, update } from "lodash-es"; import { action, observable, makeObservable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; -// types -// plane constants +// plane imports import { ALL_ISSUES } from "@plane/constants"; import { TIssue, diff --git a/apps/web/core/store/issue/helpers/base-issues-utils.ts b/apps/web/core/store/issue/helpers/base-issues-utils.ts index 42892365b..bc7c99b00 100644 --- a/apps/web/core/store/issue/helpers/base-issues-utils.ts +++ b/apps/web/core/store/issue/helpers/base-issues-utils.ts @@ -1,10 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; -import groupBy from "lodash/groupBy"; -import indexOf from "lodash/indexOf"; -import isEmpty from "lodash/isEmpty"; -import orderBy from "lodash/orderBy"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; +import { uniq, orderBy, isEmpty, indexOf, groupBy, cloneDeep, set } from "lodash-es"; import { ALL_ISSUES, EIssueFilterType, FILTER_TO_ISSUE_MAP, ISSUE_PRIORITIES } from "@plane/constants"; import { IIssueDisplayFilterOptions, diff --git a/apps/web/core/store/issue/helpers/base-issues.store.ts b/apps/web/core/store/issue/helpers/base-issues.store.ts index 610797f85..e08d22d32 100644 --- a/apps/web/core/store/issue/helpers/base-issues.store.ts +++ b/apps/web/core/store/issue/helpers/base-issues.store.ts @@ -1,14 +1,4 @@ -import clone from "lodash/clone"; -import concat from "lodash/concat"; -import get from "lodash/get"; -import indexOf from "lodash/indexOf"; -import isEmpty from "lodash/isEmpty"; -import isEqual from "lodash/isEqual"; -import orderBy from "lodash/orderBy"; -import pull from "lodash/pull"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; -import update from "lodash/update"; +import { isEqual, concat, get, indexOf, isEmpty, orderBy, pull, set, uniq, update, clone } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane constants diff --git a/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts b/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts index 393e9943d..fa0e6eae5 100644 --- a/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts +++ b/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts @@ -1,4 +1,4 @@ -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; // plane constants import { EIssueGroupByToServerOptions, diff --git a/apps/web/core/store/issue/issue-details/attachment.store.ts b/apps/web/core/store/issue/issue-details/attachment.store.ts index 90c28840a..4a65f1673 100644 --- a/apps/web/core/store/issue/issue-details/attachment.store.ts +++ b/apps/web/core/store/issue/issue-details/attachment.store.ts @@ -1,9 +1,4 @@ -import concat from "lodash/concat"; -import debounce from "lodash/debounce"; -import pull from "lodash/pull"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; -import update from "lodash/update"; +import { uniq, pull, set, debounce, update, concat } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; import { v4 as uuidv4 } from "uuid"; diff --git a/apps/web/core/store/issue/issue-details/comment.store.ts b/apps/web/core/store/issue/issue-details/comment.store.ts index 9bb3a7d19..729f5eaad 100644 --- a/apps/web/core/store/issue/issue-details/comment.store.ts +++ b/apps/web/core/store/issue/issue-details/comment.store.ts @@ -1,11 +1,8 @@ -import concat from "lodash/concat"; -import pull from "lodash/pull"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; -import update from "lodash/update"; +import { pull, concat, update, uniq, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; -// services +// Plane Imports import { TIssueComment, TIssueCommentMap, TIssueCommentIdMap, TIssueServiceType } from "@plane/types"; +// services import { IssueCommentService } from "@/services/issue"; // types import { IIssueDetail } from "./root.store"; diff --git a/apps/web/core/store/issue/issue-details/comment_reaction.store.ts b/apps/web/core/store/issue/issue-details/comment_reaction.store.ts index ae679990e..be246fb03 100644 --- a/apps/web/core/store/issue/issue-details/comment_reaction.store.ts +++ b/apps/web/core/store/issue/issue-details/comment_reaction.store.ts @@ -1,15 +1,11 @@ -import concat from "lodash/concat"; -import find from "lodash/find"; -import pull from "lodash/pull"; -import set from "lodash/set"; -import update from "lodash/update"; +import { pull, find, concat, update, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; -// services -// types -// helpers +// Plane Imports import { TIssueCommentReaction, TIssueCommentReactionIdMap, TIssueCommentReactionMap } from "@plane/types"; import { groupReactions } from "@plane/utils"; +// services import { IssueReactionService } from "@/services/issue"; +// types import { IIssueDetail } from "./root.store"; export interface IIssueCommentReactionStoreActions { diff --git a/apps/web/core/store/issue/issue-details/link.store.ts b/apps/web/core/store/issue/issue-details/link.store.ts index 763787a1b..a42acf015 100644 --- a/apps/web/core/store/issue/issue-details/link.store.ts +++ b/apps/web/core/store/issue/issue-details/link.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // services import { TIssueLink, TIssueLinkMap, TIssueLinkIdMap, TIssueServiceType } from "@plane/types"; diff --git a/apps/web/core/store/issue/issue-details/reaction.store.ts b/apps/web/core/store/issue/issue-details/reaction.store.ts index f7eda21cc..7f3298270 100644 --- a/apps/web/core/store/issue/issue-details/reaction.store.ts +++ b/apps/web/core/store/issue/issue-details/reaction.store.ts @@ -1,15 +1,11 @@ -import concat from "lodash/concat"; -import find from "lodash/find"; -import pull from "lodash/pull"; -import set from "lodash/set"; -import update from "lodash/update"; +import { pull, find, concat, set, update } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; -// services -// types -// helpers -import { TIssueReaction, TIssueReactionMap, TIssueReactionIdMap, TIssue, TIssueServiceType } from "@plane/types"; +// Plane Imports +import type { TIssueReaction, TIssueReactionMap, TIssueReactionIdMap, TIssueServiceType } from "@plane/types"; import { groupReactions } from "@plane/utils"; +// services import { IssueReactionService } from "@/services/issue"; +// types import { IIssueDetail } from "./root.store"; export interface IIssueReactionStoreActions { diff --git a/apps/web/core/store/issue/issue-details/relation.store.ts b/apps/web/core/store/issue/issue-details/relation.store.ts index 3763c4bdf..3b0d3af9f 100644 --- a/apps/web/core/store/issue/issue-details/relation.store.ts +++ b/apps/web/core/store/issue/issue-details/relation.store.ts @@ -1,6 +1,4 @@ -import get from "lodash/get"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; +import { uniq, get, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/issue/issue-details/sub_issues.store.ts b/apps/web/core/store/issue/issue-details/sub_issues.store.ts index c461ea72a..a82dd558b 100644 --- a/apps/web/core/store/issue/issue-details/sub_issues.store.ts +++ b/apps/web/core/store/issue/issue-details/sub_issues.store.ts @@ -1,11 +1,7 @@ -import concat from "lodash/concat"; -import pull from "lodash/pull"; -import set from "lodash/set"; -import uniq from "lodash/uniq"; -import update from "lodash/update"; +import { pull, concat, uniq, set, update } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; -// types +// Plane Imports import { EIssueServiceType, TIssue, diff --git a/apps/web/core/store/issue/issue-details/sub_issues_filter.store.ts b/apps/web/core/store/issue/issue-details/sub_issues_filter.store.ts index 1338f79b2..e577f5292 100644 --- a/apps/web/core/store/issue/issue-details/sub_issues_filter.store.ts +++ b/apps/web/core/store/issue/issue-details/sub_issues_filter.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; import { EIssueFilterType } from "@plane/constants"; diff --git a/apps/web/core/store/issue/issue-details/subscription.store.ts b/apps/web/core/store/issue/issue-details/subscription.store.ts index 7c33eb72c..7e6a6e7ee 100644 --- a/apps/web/core/store/issue/issue-details/subscription.store.ts +++ b/apps/web/core/store/issue/issue-details/subscription.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; // services import { EIssueServiceType } from "@plane/types"; diff --git a/apps/web/core/store/issue/issue.store.ts b/apps/web/core/store/issue/issue.store.ts index 871abd5d1..c259f26b8 100644 --- a/apps/web/core/store/issue/issue.store.ts +++ b/apps/web/core/store/issue/issue.store.ts @@ -1,6 +1,4 @@ -import clone from "lodash/clone"; -import set from "lodash/set"; -import update from "lodash/update"; +import { clone, set, update } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/issue/module/filter.store.ts b/apps/web/core/store/issue/module/filter.store.ts index 228e5e728..de0703417 100644 --- a/apps/web/core/store/issue/module/filter.store.ts +++ b/apps/web/core/store/issue/module/filter.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // base class import { computedFn } from "mobx-utils"; diff --git a/apps/web/core/store/issue/profile/filter.store.ts b/apps/web/core/store/issue/profile/filter.store.ts index 2d2b040e5..ed57096eb 100644 --- a/apps/web/core/store/issue/profile/filter.store.ts +++ b/apps/web/core/store/issue/profile/filter.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // base class import { computedFn } from "mobx-utils"; diff --git a/apps/web/core/store/issue/project-views/filter.store.ts b/apps/web/core/store/issue/project-views/filter.store.ts index 840c8b9b3..37b7e9fa8 100644 --- a/apps/web/core/store/issue/project-views/filter.store.ts +++ b/apps/web/core/store/issue/project-views/filter.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // base class import { computedFn } from "mobx-utils"; diff --git a/apps/web/core/store/issue/project/filter.store.ts b/apps/web/core/store/issue/project/filter.store.ts index 473dc0d30..1b3bf46ff 100644 --- a/apps/web/core/store/issue/project/filter.store.ts +++ b/apps/web/core/store/issue/project/filter.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // base class import { computedFn } from "mobx-utils"; diff --git a/apps/web/core/store/issue/root.store.ts b/apps/web/core/store/issue/root.store.ts index e773069c2..9739bbbc8 100644 --- a/apps/web/core/store/issue/root.store.ts +++ b/apps/web/core/store/issue/root.store.ts @@ -1,4 +1,4 @@ -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { autorun, makeObservable, observable } from "mobx"; // types import { diff --git a/apps/web/core/store/issue/workspace-draft/filter.store.ts b/apps/web/core/store/issue/workspace-draft/filter.store.ts index 330f543de..c2409de03 100644 --- a/apps/web/core/store/issue/workspace-draft/filter.store.ts +++ b/apps/web/core/store/issue/workspace-draft/filter.store.ts @@ -1,8 +1,7 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; -// base class import { computedFn } from "mobx-utils"; +// Plane Imports import { EIssueFilterType, TSupportedFilterTypeForUpdate } from "@plane/constants"; import { EIssuesStoreType, @@ -16,13 +15,12 @@ import { TSupportedFilterForUpdate, } from "@plane/types"; import { handleIssueQueryParamsByLayout } from "@plane/utils"; +// services import { IssueFiltersService } from "@/services/issue_filter.service"; -import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store"; // helpers +import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store"; // types import { IIssueRootStore } from "../root.store"; -// constants -// services export interface IWorkspaceDraftIssuesFilter extends IBaseIssueFilterStore { // observables diff --git a/apps/web/core/store/issue/workspace-draft/issue.store.ts b/apps/web/core/store/issue/workspace-draft/issue.store.ts index 3aebd98b6..09d1b3ee3 100644 --- a/apps/web/core/store/issue/workspace-draft/issue.store.ts +++ b/apps/web/core/store/issue/workspace-draft/issue.store.ts @@ -1,8 +1,4 @@ -import clone from "lodash/clone"; -import orderBy from "lodash/orderBy"; -import set from "lodash/set"; -import unset from "lodash/unset"; -import update from "lodash/update"; +import { clone, update, unset, orderBy, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports @@ -20,8 +16,6 @@ import { TIssue, TBulkOperationsPayload, } from "@plane/types"; -// constants -// helpers import { getCurrentDateTimeInISO, convertToISODateString } from "@plane/utils"; // local-db import { addIssueToPersistanceLayer } from "@/local-db/utils/utils"; diff --git a/apps/web/core/store/issue/workspace/filter.store.ts b/apps/web/core/store/issue/workspace/filter.store.ts index e47be04db..ae265187c 100644 --- a/apps/web/core/store/issue/workspace/filter.store.ts +++ b/apps/web/core/store/issue/workspace/filter.store.ts @@ -1,5 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import set from "lodash/set"; +import { isEmpty, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/label.store.ts b/apps/web/core/store/label.store.ts index 282f508e6..937947201 100644 --- a/apps/web/core/store/label.store.ts +++ b/apps/web/core/store/label.store.ts @@ -1,5 +1,4 @@ -import set from "lodash/set"; -import sortBy from "lodash/sortBy"; +import { set, sortBy } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/member/project/base-project-member.store.ts b/apps/web/core/store/member/project/base-project-member.store.ts index 5c75c01b7..3f15a4f2e 100644 --- a/apps/web/core/store/member/project/base-project-member.store.ts +++ b/apps/web/core/store/member/project/base-project-member.store.ts @@ -1,8 +1,4 @@ -import set from "lodash/set"; -import sortBy from "lodash/sortBy"; -import uniq from "lodash/uniq"; -import unset from "lodash/unset"; -import update from "lodash/update"; +import { uniq, unset, set, update, sortBy } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/member/workspace/workspace-member.store.ts b/apps/web/core/store/member/workspace/workspace-member.store.ts index 53e7f9de8..a6d1de820 100644 --- a/apps/web/core/store/member/workspace/workspace-member.store.ts +++ b/apps/web/core/store/member/workspace/workspace-member.store.ts @@ -1,5 +1,4 @@ -import set from "lodash/set"; -import sortBy from "lodash/sortBy"; +import { set, sortBy } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/module.store.ts b/apps/web/core/store/module.store.ts index 11be7ab02..d60298cb3 100644 --- a/apps/web/core/store/module.store.ts +++ b/apps/web/core/store/module.store.ts @@ -1,7 +1,4 @@ -import concat from "lodash/concat"; -import set from "lodash/set"; -import sortBy from "lodash/sortBy"; -import update from "lodash/update"; +import { update, concat, set, sortBy } from "lodash-es"; import { action, computed, observable, makeObservable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/module_filter.store.ts b/apps/web/core/store/module_filter.store.ts index b3d19b90f..d892195c0 100644 --- a/apps/web/core/store/module_filter.store.ts +++ b/apps/web/core/store/module_filter.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, observable, makeObservable, runInAction, reaction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/multiple_select.store.ts b/apps/web/core/store/multiple_select.store.ts index c573cec5b..377bd2e2d 100644 --- a/apps/web/core/store/multiple_select.store.ts +++ b/apps/web/core/store/multiple_select.store.ts @@ -1,6 +1,4 @@ -import differenceWith from "lodash/differenceWith"; -import isEqual from "lodash/isEqual"; -import remove from "lodash/remove"; +import { differenceWith, remove, isEqual } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // hooks diff --git a/apps/web/core/store/notifications/notification.ts b/apps/web/core/store/notifications/notification.ts index 6ee3ce081..e0a4e678f 100644 --- a/apps/web/core/store/notifications/notification.ts +++ b/apps/web/core/store/notifications/notification.ts @@ -1,5 +1,5 @@ /* eslint-disable no-useless-catch */ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { IUserLite, TNotification, TNotificationData } from "@plane/types"; // services diff --git a/apps/web/core/store/notifications/workspace-notifications.store.ts b/apps/web/core/store/notifications/workspace-notifications.store.ts index 1e383b7ed..2e595efc3 100644 --- a/apps/web/core/store/notifications/workspace-notifications.store.ts +++ b/apps/web/core/store/notifications/workspace-notifications.store.ts @@ -1,7 +1,4 @@ -import isEmpty from "lodash/isEmpty"; -import orderBy from "lodash/orderBy"; -import set from "lodash/set"; -import update from "lodash/update"; +import { orderBy, isEmpty, update, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/pages/base-page.ts b/apps/web/core/store/pages/base-page.ts index 2835da3a4..6416d26d9 100644 --- a/apps/web/core/store/pages/base-page.ts +++ b/apps/web/core/store/pages/base-page.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, reaction, runInAction } from "mobx"; // plane imports import { EPageAccess } from "@plane/constants"; diff --git a/apps/web/core/store/pages/project-page.store.ts b/apps/web/core/store/pages/project-page.store.ts index acd6b5d58..caefe8670 100644 --- a/apps/web/core/store/pages/project-page.store.ts +++ b/apps/web/core/store/pages/project-page.store.ts @@ -1,5 +1,4 @@ -import set from "lodash/set"; -import unset from "lodash/unset"; +import { unset, set } from "lodash-es"; import { makeObservable, observable, runInAction, action, reaction, computed } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/project-view.store.ts b/apps/web/core/store/project-view.store.ts index 732122471..e2c244039 100644 --- a/apps/web/core/store/project-view.store.ts +++ b/apps/web/core/store/project-view.store.ts @@ -1,4 +1,4 @@ -import { set } from "lodash"; +import { set } from "lodash-es"; import { observable, action, makeObservable, runInAction, computed } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/project/project-publish.store.ts b/apps/web/core/store/project/project-publish.store.ts index ab7ac2aa5..8ad787bd5 100644 --- a/apps/web/core/store/project/project-publish.store.ts +++ b/apps/web/core/store/project/project-publish.store.ts @@ -1,5 +1,4 @@ -import set from "lodash/set"; -import unset from "lodash/unset"; +import { unset, set } from "lodash-es"; import { observable, action, makeObservable, runInAction } from "mobx"; // types import { TProjectPublishSettings } from "@plane/types"; diff --git a/apps/web/core/store/project/project.store.ts b/apps/web/core/store/project/project.store.ts index 20a0b3071..aa505c238 100644 --- a/apps/web/core/store/project/project.store.ts +++ b/apps/web/core/store/project/project.store.ts @@ -1,7 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; -import set from "lodash/set"; -import sortBy from "lodash/sortBy"; -import update from "lodash/update"; +import { sortBy, cloneDeep, update, set } from "lodash-es"; import { observable, action, computed, makeObservable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/project/project_filter.store.ts b/apps/web/core/store/project/project_filter.store.ts index 47ac3efab..199104c52 100644 --- a/apps/web/core/store/project/project_filter.store.ts +++ b/apps/web/core/store/project/project_filter.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, observable, makeObservable, runInAction, reaction } from "mobx"; import { computedFn } from "mobx-utils"; // types diff --git a/apps/web/core/store/state.store.ts b/apps/web/core/store/state.store.ts index 9e3cd4717..529add901 100644 --- a/apps/web/core/store/state.store.ts +++ b/apps/web/core/store/state.store.ts @@ -1,5 +1,4 @@ -import groupBy from "lodash/groupBy"; -import set from "lodash/set"; +import { set, groupBy } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/sticky/sticky.store.ts b/apps/web/core/store/sticky/sticky.store.ts index 087255175..424d53103 100644 --- a/apps/web/core/store/sticky/sticky.store.ts +++ b/apps/web/core/store/sticky/sticky.store.ts @@ -1,4 +1,4 @@ -import { orderBy, set } from "lodash"; +import { orderBy, set } from "lodash-es"; import { observable, action, makeObservable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; import { STICKIES_PER_PAGE } from "@plane/constants"; diff --git a/apps/web/core/store/user/account.store.ts b/apps/web/core/store/user/account.store.ts index 1a6806b67..a30052472 100644 --- a/apps/web/core/store/user/account.store.ts +++ b/apps/web/core/store/user/account.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { makeObservable, observable } from "mobx"; // types import { IUserAccount } from "@plane/types"; diff --git a/apps/web/core/store/user/base-permissions.store.ts b/apps/web/core/store/user/base-permissions.store.ts index 019c46219..b80d40b9e 100644 --- a/apps/web/core/store/user/base-permissions.store.ts +++ b/apps/web/core/store/user/base-permissions.store.ts @@ -1,5 +1,4 @@ -import set from "lodash/set"; -import unset from "lodash/unset"; +import { unset, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/apps/web/core/store/user/index.ts b/apps/web/core/store/user/index.ts index bbce6d63a..27ffa3d0b 100644 --- a/apps/web/core/store/user/index.ts +++ b/apps/web/core/store/user/index.ts @@ -1,5 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; -import set from "lodash/set"; +import { cloneDeep, set } from "lodash-es"; import { action, makeObservable, observable, runInAction, computed } from "mobx"; // plane imports import { EUserPermissions, API_BASE_URL } from "@plane/constants"; diff --git a/apps/web/core/store/user/profile.store.ts b/apps/web/core/store/user/profile.store.ts index 92ab89897..3dca664b3 100644 --- a/apps/web/core/store/user/profile.store.ts +++ b/apps/web/core/store/user/profile.store.ts @@ -1,5 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; -import set from "lodash/set"; +import { cloneDeep, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; // types import { EStartOfTheWeek, IUserTheme, TUserProfile } from "@plane/types"; diff --git a/apps/web/core/store/workspace/home.ts b/apps/web/core/store/workspace/home.ts index 551ef7a23..48da35fc3 100644 --- a/apps/web/core/store/workspace/home.ts +++ b/apps/web/core/store/workspace/home.ts @@ -1,9 +1,10 @@ -import clone from "lodash/clone"; -import orderBy from "lodash/orderBy"; -import set from "lodash/set"; +import { orderBy, clone, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; +// plane imports import { THomeWidgetKeys, TWidgetEntityData } from "@plane/types"; +// plane web services import { WorkspaceService } from "@/plane-web/services"; +// store import { IWorkspaceLinkStore, WorkspaceLinkStore } from "./link.store"; export interface IHomeStore { diff --git a/apps/web/core/store/workspace/index.ts b/apps/web/core/store/workspace/index.ts index 76b1da64d..99f5b92ca 100644 --- a/apps/web/core/store/workspace/index.ts +++ b/apps/web/core/store/workspace/index.ts @@ -1,5 +1,4 @@ -import clone from "lodash/clone"; -import set from "lodash/set"; +import { clone, set } from "lodash-es"; import { action, computed, observable, makeObservable, runInAction } from "mobx"; // types import { computedFn } from "mobx-utils"; diff --git a/apps/web/core/store/workspace/link.store.ts b/apps/web/core/store/workspace/link.store.ts index 4a19f92c0..ab69954bd 100644 --- a/apps/web/core/store/workspace/link.store.ts +++ b/apps/web/core/store/workspace/link.store.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; // types import { TLink, TLinkIdMap, TLinkMap } from "@plane/types"; diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 2067cf1f8..c20d64ed5 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -28,7 +28,7 @@ const nextConfig = { "react-day-picker", "react-dropzone", "react-hook-form", - "lodash", + "lodash-es", "clsx", "tailwind-merge", "@plane/constants", diff --git a/apps/web/package.json b/apps/web/package.json index 4a7b96814..a88e47bbd 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -43,7 +43,7 @@ "emoji-picker-react": "^4.5.16", "export-to-csv": "^1.4.0", "isomorphic-dompurify": "^2.12.0", - "lodash": "catalog:", + "lodash-es": "catalog:", "lucide-react": "catalog:", "mobx": "catalog:", "mobx-react": "catalog:", @@ -72,7 +72,7 @@ "@plane/eslint-config": "workspace:*", "@plane/tailwind-config": "workspace:*", "@plane/typescript-config": "workspace:*", - "@types/lodash": "catalog:", + "@types/lodash-es": "catalog:", "@types/node": "18.16.1", "@types/react": "catalog:", "@types/react-color": "^3.0.6", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index ccb0d4880..101676563 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -22,14 +22,14 @@ "intl-messageformat": "^10.7.11", "mobx": "catalog:", "mobx-react": "catalog:", - "lodash": "catalog:", + "lodash-es": "catalog:", "react": "catalog:" }, "devDependencies": { "@plane/eslint-config": "workspace:*", "@plane/typescript-config": "workspace:*", "@types/node": "^22.5.4", - "@types/lodash": "catalog:", + "@types/lodash-es": "catalog:", "@types/react": "catalog:", "tsdown": "catalog:", "typescript": "catalog:" diff --git a/packages/i18n/src/store/index.ts b/packages/i18n/src/store/index.ts index 3816c2d99..7b89347b7 100644 --- a/packages/i18n/src/store/index.ts +++ b/packages/i18n/src/store/index.ts @@ -1,6 +1,5 @@ import IntlMessageFormat from "intl-messageformat"; -import get from "lodash/get"; -import merge from "lodash/merge"; +import { get, merge } from "lodash-es"; import { makeAutoObservable, runInAction } from "mobx"; // constants import { FALLBACK_LANGUAGE, SUPPORTED_LANGUAGES, LANGUAGE_STORAGE_KEY, ETranslationFiles } from "../constants"; diff --git a/packages/shared-state/package.json b/packages/shared-state/package.json index 02d5632f7..520239ccd 100644 --- a/packages/shared-state/package.json +++ b/packages/shared-state/package.json @@ -18,7 +18,7 @@ "@plane/constants": "workspace:*", "@plane/types": "workspace:*", "@plane/utils": "workspace:*", - "lodash": "catalog:", + "lodash-es": "catalog:", "mobx": "catalog:", "mobx-utils": "catalog:", "uuid": "catalog:", @@ -28,7 +28,7 @@ "@plane/eslint-config": "workspace:*", "@plane/typescript-config": "workspace:*", "@types/node": "^22.5.4", - "@types/lodash": "catalog:", + "@types/lodash-es": "catalog:", "@types/uuid": "catalog:", "typescript": "catalog:" } diff --git a/packages/shared-state/src/store/rich-filters/config.ts b/packages/shared-state/src/store/rich-filters/config.ts index b93742cd0..57fe8fcf4 100644 --- a/packages/shared-state/src/store/rich-filters/config.ts +++ b/packages/shared-state/src/store/rich-filters/config.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports diff --git a/packages/shared-state/src/store/rich-filters/filter-helpers.ts b/packages/shared-state/src/store/rich-filters/filter-helpers.ts index 68ca76fc7..6f7306d4c 100644 --- a/packages/shared-state/src/store/rich-filters/filter-helpers.ts +++ b/packages/shared-state/src/store/rich-filters/filter-helpers.ts @@ -1,4 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; +import { cloneDeep } from "lodash-es"; import { toJS } from "mobx"; // plane imports import { DEFAULT_FILTER_EXPRESSION_OPTIONS, TExpressionOptions } from "@plane/constants"; diff --git a/packages/shared-state/src/store/rich-filters/filter.ts b/packages/shared-state/src/store/rich-filters/filter.ts index e840845f8..67545433c 100644 --- a/packages/shared-state/src/store/rich-filters/filter.ts +++ b/packages/shared-state/src/store/rich-filters/filter.ts @@ -1,4 +1,4 @@ -import cloneDeep from "lodash/cloneDeep"; +import { cloneDeep } from "lodash-es"; import { action, computed, makeObservable, observable, toJS } from "mobx"; import { computedFn } from "mobx-utils"; import { v4 as uuidv4 } from "uuid"; diff --git a/packages/shared-state/src/store/work-item-filters/adapter.ts b/packages/shared-state/src/store/work-item-filters/adapter.ts index 2f507e963..1655424ce 100644 --- a/packages/shared-state/src/store/work-item-filters/adapter.ts +++ b/packages/shared-state/src/store/work-item-filters/adapter.ts @@ -1,5 +1,5 @@ // plane imports -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { LOGICAL_OPERATOR, SingleOrArray, diff --git a/packages/ui/package.json b/packages/ui/package.json index 5e3b86652..0af3cc117 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -43,7 +43,7 @@ "@radix-ui/react-scroll-area": "^1.2.3", "clsx": "^2.0.0", "emoji-picker-react": "^4.5.16", - "lodash": "catalog:", + "lodash-es": "catalog:", "lucide-react": "catalog:", "react-color": "^2.19.3", "react-day-picker": "9.5.0", @@ -67,7 +67,7 @@ "@storybook/react": "^8.1.1", "@storybook/react-webpack5": "^8.1.1", "@storybook/test": "^8.1.1", - "@types/lodash": "catalog:", + "@types/lodash-es": "catalog:", "@types/node": "^20.5.2", "@types/react": "catalog:", "@types/react-color": "^3.0.9", diff --git a/packages/ui/src/dropdown/common/loader.tsx b/packages/ui/src/dropdown/common/loader.tsx index 814ed4805..c19bda620 100644 --- a/packages/ui/src/dropdown/common/loader.tsx +++ b/packages/ui/src/dropdown/common/loader.tsx @@ -1,4 +1,4 @@ -import range from "lodash/range"; +import { range } from "lodash-es"; import React from "react"; export const DropdownOptionsLoader = () => ( diff --git a/packages/ui/src/dropdown/multi-select.tsx b/packages/ui/src/dropdown/multi-select.tsx index 6da069427..e33b08873 100644 --- a/packages/ui/src/dropdown/multi-select.tsx +++ b/packages/ui/src/dropdown/multi-select.tsx @@ -1,5 +1,5 @@ import { Combobox } from "@headlessui/react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import React, { FC, useMemo, useRef, useState } from "react"; import { usePopper } from "react-popper"; // plane imports diff --git a/packages/ui/src/dropdown/single-select.tsx b/packages/ui/src/dropdown/single-select.tsx index 31c2223d1..54db877db 100644 --- a/packages/ui/src/dropdown/single-select.tsx +++ b/packages/ui/src/dropdown/single-select.tsx @@ -1,5 +1,5 @@ import { Combobox } from "@headlessui/react"; -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; import React, { FC, useMemo, useRef, useState } from "react"; import { usePopper } from "react-popper"; // plane imports diff --git a/packages/ui/src/sortable/draggable.tsx b/packages/ui/src/sortable/draggable.tsx index 1513c7f57..efc2f185f 100644 --- a/packages/ui/src/sortable/draggable.tsx +++ b/packages/ui/src/sortable/draggable.tsx @@ -1,7 +1,7 @@ import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge"; -import { isEqual } from "lodash"; +import { isEqual } from "lodash-es"; import React, { useEffect, useRef, useState } from "react"; import { DropIndicator } from "../drop-indicator"; import { cn } from "../utils"; diff --git a/packages/utils/package.json b/packages/utils/package.json index 408961269..5794b4ebf 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -26,7 +26,7 @@ "clsx": "^2.1.1", "date-fns": "^4.1.0", "isomorphic-dompurify": "^2.16.0", - "lodash": "catalog:", + "lodash-es": "catalog:", "lucide-react": "catalog:", "react": "catalog:", "tailwind-merge": "^2.5.5", @@ -36,7 +36,7 @@ "devDependencies": { "@plane/eslint-config": "workspace:*", "@plane/typescript-config": "workspace:*", - "@types/lodash": "catalog:", + "@types/lodash-es": "catalog:", "@types/node": "^22.5.4", "@types/react": "catalog:", "@types/uuid": "^9.0.8", diff --git a/packages/utils/src/array.ts b/packages/utils/src/array.ts index 5d1791c72..035de49bf 100644 --- a/packages/utils/src/array.ts +++ b/packages/utils/src/array.ts @@ -1,4 +1,4 @@ -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { IIssueLabel, IIssueLabelTree } from "@plane/types"; /** diff --git a/packages/utils/src/cycle.ts b/packages/utils/src/cycle.ts index 2f47f223f..05688bba0 100644 --- a/packages/utils/src/cycle.ts +++ b/packages/utils/src/cycle.ts @@ -1,8 +1,5 @@ import { startOfToday, format } from "date-fns"; -import isEmpty from "lodash/isEmpty"; -import orderBy from "lodash/orderBy"; -import sortBy from "lodash/sortBy"; -import uniqBy from "lodash/uniqBy"; +import { isEmpty, orderBy, sortBy, uniqBy } from "lodash-es"; // plane imports import { ICycle, TCycleFilters, TProgressSnapshot } from "@plane/types"; // local imports diff --git a/packages/utils/src/datetime.ts b/packages/utils/src/datetime.ts index 685273dba..bc9d06964 100644 --- a/packages/utils/src/datetime.ts +++ b/packages/utils/src/datetime.ts @@ -1,5 +1,5 @@ import { differenceInDays, format, formatDistanceToNow, isAfter, isEqual, isValid, parseISO } from "date-fns"; -import isNumber from "lodash/isNumber"; +import { isNumber } from "lodash-es"; // Format Date Helpers /** diff --git a/packages/utils/src/distribution-update.ts b/packages/utils/src/distribution-update.ts index de9e254cc..15c238569 100644 --- a/packages/utils/src/distribution-update.ts +++ b/packages/utils/src/distribution-update.ts @@ -1,8 +1,7 @@ "use client"; import { format } from "date-fns"; -import get from "lodash/get"; -import set from "lodash/set"; +import { get, set } from "lodash-es"; // plane imports import { COMPLETED_STATE_GROUPS, STATE_DISTRIBUTION } from "@plane/constants"; import { ICycle, IEstimatePoint, IModule, IState, TIssue } from "@plane/types"; diff --git a/packages/utils/src/module.ts b/packages/utils/src/module.ts index 8d7eb4659..722687af7 100644 --- a/packages/utils/src/module.ts +++ b/packages/utils/src/module.ts @@ -1,4 +1,4 @@ -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; // plane imports import { IModule, TModuleDisplayFilters, TModuleFilters, TModuleOrderByOptions } from "@plane/types"; // local imports diff --git a/packages/utils/src/page.ts b/packages/utils/src/page.ts index c2afc8a92..2947695a7 100644 --- a/packages/utils/src/page.ts +++ b/packages/utils/src/page.ts @@ -1,4 +1,4 @@ -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; // plane imports import { TPage, TPageFilterProps, TPageFiltersSortBy, TPageFiltersSortKey, TPageNavigationTabs } from "@plane/types"; // local imports diff --git a/packages/utils/src/project-views.ts b/packages/utils/src/project-views.ts index aa11f4de0..dd275d0ab 100644 --- a/packages/utils/src/project-views.ts +++ b/packages/utils/src/project-views.ts @@ -1,5 +1,4 @@ -import isNil from "lodash/isNil"; -import orderBy from "lodash/orderBy"; +import { isNil, orderBy } from "lodash-es"; // plane imports import { SPACE_BASE_PATH, SPACE_BASE_URL } from "@plane/constants"; import { IProjectView, TViewFilterProps, TViewFiltersSortBy, TViewFiltersSortKey } from "@plane/types"; diff --git a/packages/utils/src/project.ts b/packages/utils/src/project.ts index 7ae60748c..ea0b5c0e6 100644 --- a/packages/utils/src/project.ts +++ b/packages/utils/src/project.ts @@ -1,4 +1,4 @@ -import sortBy from "lodash/sortBy"; +import { sortBy } from "lodash-es"; // plane imports import { TProject, TProjectDisplayFilters, TProjectFilters, TProjectOrderByOptions } from "@plane/types"; // local imports diff --git a/packages/utils/src/rich-filters/operations/comparison.ts b/packages/utils/src/rich-filters/operations/comparison.ts index 63d5ecb2e..ae738c18e 100644 --- a/packages/utils/src/rich-filters/operations/comparison.ts +++ b/packages/utils/src/rich-filters/operations/comparison.ts @@ -1,6 +1,4 @@ -import compact from "lodash/compact"; -import isEqual from "lodash/isEqual"; -import sortBy from "lodash/sortBy"; +import { compact, isEqual, sortBy } from "lodash-es"; // plane imports import { FILTER_NODE_TYPE, diff --git a/packages/utils/src/rich-filters/operators/core.ts b/packages/utils/src/rich-filters/operators/core.ts index 8d7384b98..a87bc7079 100644 --- a/packages/utils/src/rich-filters/operators/core.ts +++ b/packages/utils/src/rich-filters/operators/core.ts @@ -1,4 +1,4 @@ -import get from "lodash/get"; +import { get } from "lodash-es"; // plane imports import { DATE_OPERATOR_LABELS_MAP, EMPTY_OPERATOR_LABEL, OPERATOR_LABELS_MAP } from "@plane/constants"; import { diff --git a/packages/utils/src/subscription.ts b/packages/utils/src/subscription.ts index 35aacfbc1..53f4a0185 100644 --- a/packages/utils/src/subscription.ts +++ b/packages/utils/src/subscription.ts @@ -1,4 +1,4 @@ -import orderBy from "lodash/orderBy"; +import { orderBy } from "lodash-es"; // plane imports import { EProductSubscriptionEnum, IPaymentProduct, TProductSubscriptionType, TSubscriptionPrice } from "@plane/types"; diff --git a/packages/utils/src/work-item/base.ts b/packages/utils/src/work-item/base.ts index 61fd44c5f..826fb7c54 100644 --- a/packages/utils/src/work-item/base.ts +++ b/packages/utils/src/work-item/base.ts @@ -1,5 +1,5 @@ import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays"; -import isEmpty from "lodash/isEmpty"; +import { isEmpty } from "lodash-es"; import { v4 as uuidv4 } from "uuid"; // plane imports import { diff --git a/packages/utils/src/work-item/modal.ts b/packages/utils/src/work-item/modal.ts index f39f87eda..ec07c5508 100644 --- a/packages/utils/src/work-item/modal.ts +++ b/packages/utils/src/work-item/modal.ts @@ -1,4 +1,4 @@ -import set from "lodash/set"; +import { set } from "lodash-es"; // plane imports import { DEFAULT_WORK_ITEM_FORM_VALUES } from "@plane/constants"; import { IPartialProject, ISearchIssueResponse, IState, TIssue } from "@plane/types"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f782fccba..a1afe3ee1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,9 +6,9 @@ settings: catalogs: default: - '@types/lodash': - specifier: 4.17.20 - version: 4.17.20 + '@types/lodash-es': + specifier: 4.17.12 + version: 4.17.12 '@types/react': specifier: 18.3.11 version: 18.3.11 @@ -21,7 +21,7 @@ catalogs: axios: specifier: 1.12.0 version: 1.12.0 - lodash: + lodash-es: specifier: 4.17.21 version: 4.17.21 lucide-react: @@ -115,7 +115,7 @@ importers: axios: specifier: 'catalog:' version: 1.12.0 - lodash: + lodash-es: specifier: 'catalog:' version: 4.17.21 lucide-react: @@ -164,9 +164,9 @@ importers: '@plane/typescript-config': specifier: workspace:* version: link:../../packages/typescript-config - '@types/lodash': + '@types/lodash-es': specifier: 'catalog:' - version: 4.17.20 + version: 4.17.12 '@types/node': specifier: 18.16.1 version: 18.16.1 @@ -233,9 +233,6 @@ importers: ioredis: specifier: ^5.4.1 version: 5.7.0 - lodash: - specifier: 'catalog:' - version: 4.17.21 morgan: specifier: 1.10.1 version: 1.10.1 @@ -360,7 +357,7 @@ importers: dotenv: specifier: ^16.3.1 version: 16.6.1 - lodash: + lodash-es: specifier: 'catalog:' version: 4.17.21 lowlight: @@ -424,9 +421,9 @@ importers: '@plane/typescript-config': specifier: workspace:* version: link:../../packages/typescript-config - '@types/lodash': + '@types/lodash-es': specifier: 'catalog:' - version: 4.17.20 + version: 4.17.12 '@types/node': specifier: 18.14.1 version: 18.14.1 @@ -532,7 +529,7 @@ importers: isomorphic-dompurify: specifier: ^2.12.0 version: 2.26.0 - lodash: + lodash-es: specifier: 'catalog:' version: 4.17.21 lucide-react: @@ -614,9 +611,9 @@ importers: '@plane/typescript-config': specifier: workspace:* version: link:../../packages/typescript-config - '@types/lodash': + '@types/lodash-es': specifier: 'catalog:' - version: 4.17.20 + version: 4.17.12 '@types/node': specifier: 18.16.1 version: 18.16.1 @@ -923,7 +920,7 @@ importers: intl-messageformat: specifier: ^10.7.11 version: 10.7.16 - lodash: + lodash-es: specifier: 'catalog:' version: 4.17.21 mobx: @@ -942,9 +939,9 @@ importers: '@plane/typescript-config': specifier: workspace:* version: link:../typescript-config - '@types/lodash': + '@types/lodash-es': specifier: 'catalog:' - version: 4.17.20 + version: 4.17.12 '@types/node': specifier: ^22.5.4 version: 22.18.0 @@ -1110,7 +1107,7 @@ importers: '@plane/utils': specifier: workspace:* version: link:../utils - lodash: + lodash-es: specifier: 'catalog:' version: 4.17.21 mobx: @@ -1132,9 +1129,9 @@ importers: '@plane/typescript-config': specifier: workspace:* version: link:../typescript-config - '@types/lodash': + '@types/lodash-es': specifier: 'catalog:' - version: 4.17.20 + version: 4.17.12 '@types/node': specifier: ^22.5.4 version: 22.18.0 @@ -1240,7 +1237,7 @@ importers: emoji-picker-react: specifier: ^4.5.16 version: 4.13.2(react@18.3.1) - lodash: + lodash-es: specifier: 'catalog:' version: 4.17.21 lucide-react: @@ -1313,9 +1310,9 @@ importers: '@storybook/test': specifier: ^8.1.1 version: 8.6.14(storybook@8.6.14(prettier@3.6.2)) - '@types/lodash': + '@types/lodash-es': specifier: 'catalog:' - version: 4.17.20 + version: 4.17.12 '@types/node': specifier: ^20.5.2 version: 20.19.11 @@ -1364,7 +1361,7 @@ importers: isomorphic-dompurify: specifier: ^2.16.0 version: 2.26.0 - lodash: + lodash-es: specifier: 'catalog:' version: 4.17.21 lucide-react: @@ -1389,9 +1386,9 @@ importers: '@plane/typescript-config': specifier: workspace:* version: link:../typescript-config - '@types/lodash': + '@types/lodash-es': specifier: 'catalog:' - version: 4.17.20 + version: 4.17.12 '@types/node': specifier: ^22.5.4 version: 22.18.0 @@ -3491,6 +3488,9 @@ packages: '@types/linkify-it@5.0.0': resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + '@types/lodash-es@4.17.12': + resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} + '@types/lodash@4.17.20': resolution: {integrity: sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==} @@ -10403,6 +10403,10 @@ snapshots: '@types/linkify-it@5.0.0': {} + '@types/lodash-es@4.17.12': + dependencies: + '@types/lodash': 4.17.20 + '@types/lodash@4.17.20': {} '@types/markdown-it@13.0.9': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index bda86ac05..ae83b7676 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -9,8 +9,8 @@ catalog: mobx: 6.12.0 mobx-react: 9.1.1 mobx-utils: 6.0.8 - lodash: 4.17.21 - "@types/lodash": 4.17.20 + lodash-es: 4.17.21 + "@types/lodash-es": 4.17.12 lucide-react: 0.469.0 next: 14.2.32 sharp: 0.33.5