Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/core/store/instance.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/core/store/workspace.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand All @@ -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:",
Expand Down
1 change: 0 additions & 1 deletion apps/live/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/components/issues/filters/root.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/components/issues/issue-layouts/utils.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
6 changes: 1 addition & 5 deletions apps/space/core/store/helpers/base-issues.store.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/instance.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
3 changes: 1 addition & 2 deletions apps/space/core/store/issue-detail.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
4 changes: 1 addition & 3 deletions apps/space/core/store/issue-filters.store.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/label.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/members.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/module.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/profile.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/publish/publish_list.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/state.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/space/core/store/user.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/space/helpers/date-time.helper.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions apps/space/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand All @@ -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:",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
26 changes: 9 additions & 17 deletions apps/web/ce/store/estimates/estimate.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -140,19 +136,15 @@ export class Estimate implements IEstimate {
projectId: string,
payload: Partial<IEstimatePointType>
): Promise<IEstimatePointType | undefined> => {
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));
}
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Error Handling Removed in Async Method

The error handling try-catch block was removed from the creteEstimatePoint method. The original code wrapped the async operation in try-catch and re-threw errors, but the new code completely removes error handling. This means errors from estimateService.createEstimatePoint() will now bubble up unhandled instead of being properly caught and re-thrown, potentially breaking error handling expectations for callers of this method.

Fix in Cursor Fix in Web

}
};
}
8 changes: 1 addition & 7 deletions apps/web/ce/store/issue/issue-details/activity.store.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions apps/web/ce/store/timeline/base-timeline.store.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/common/filters/created-by.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/cycles/list/cycles-list-item.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/exporter/export-form.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/exporter/export-modal.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
6 changes: 3 additions & 3 deletions apps/web/core/components/gantt-chart/views/month-view.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import range from "lodash/range";
import { range } from "lodash-es";
// ui
import { Loader } from "@plane/ui";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import range from "lodash/range";
import { range } from "lodash-es";
// ui
import { Loader } from "@plane/ui";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import range from "lodash/range";
import { range } from "lodash-es";
// ui
import { Loader } from "@plane/ui";

Expand Down
3 changes: 1 addition & 2 deletions apps/web/core/components/inbox/inbox-filter/filters/date.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/issues/description-input.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading
Loading