Skip to content

Commit cac3bfa

Browse files
adithyaakrishnaSg312
authored andcommitted
chore: remove lodash (#3741)
1 parent fec0a21 commit cac3bfa

File tree

11 files changed

+521
-495
lines changed

11 files changed

+521
-495
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
2-
import isEqual from 'lodash/isEqual'
2+
import { isEqual } from 'es-toolkit'
33
import { useReactFlow } from 'reactflow'
44
import { useStoreWithEqualityFn } from 'zustand/traditional'
55
import { Combobox, type ComboboxOption } from '@/components/emcn/components'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
2-
import isEqual from 'lodash/isEqual'
2+
import { isEqual } from 'es-toolkit'
33
import { useStoreWithEqualityFn } from 'zustand/traditional'
44
import { Badge } from '@/components/emcn'
55
import { Combobox, type ComboboxOption } from '@/components/emcn/components'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/messages-input/messages-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
useRef,
88
useState,
99
} from 'react'
10-
import isEqual from 'lodash/isEqual'
10+
import { isEqual } from 'es-toolkit'
1111
import { ChevronDown, ChevronsUpDown, ChevronUp, Plus } from 'lucide-react'
1212
import { Button, Popover, PopoverContent, PopoverItem, PopoverTrigger } from '@/components/emcn'
1313
import { Trash } from '@/components/emcn/icons/trash'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useCallback, useMemo } from 'react'
4-
import { isEqual } from 'lodash'
4+
import { isEqual } from 'es-toolkit'
55
import { useStoreWithEqualityFn } from 'zustand/traditional'
66
import {
77
buildCanonicalIndex,

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useCallback, useEffect, useRef } from 'react'
22
import { createLogger } from '@sim/logger'
3-
import { isEqual } from 'lodash'
3+
import { isEqual } from 'es-toolkit'
44
import { useShallow } from 'zustand/react/shallow'
55
import { useStoreWithEqualityFn } from 'zustand/traditional'
66
import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type JSX, type MouseEvent, memo, useCallback, useMemo, useRef, useState } from 'react'
2-
import isEqual from 'lodash/isEqual'
2+
import { isEqual } from 'es-toolkit'
33
import {
44
AlertTriangle,
55
ArrowLeftRight,

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
4-
import isEqual from 'lodash/isEqual'
4+
import { isEqual } from 'es-toolkit'
55
import {
66
BookOpen,
77
Check,

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { memo, useCallback, useEffect, useMemo, useRef } from 'react'
22
import { createLogger } from '@sim/logger'
3-
import isEqual from 'lodash/isEqual'
3+
import { isEqual } from 'es-toolkit'
44
import { useParams } from 'next/navigation'
55
import { Handle, type NodeProps, Position, useUpdateNodeInternals } from 'reactflow'
66
import { useStoreWithEqualityFn } from 'zustand/traditional'

apps/sim/lib/mcp/tool-validation.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import isEqual from 'lodash/isEqual'
2-
import omit from 'lodash/omit'
1+
import { isEqual, omit } from 'es-toolkit'
32
import type { McpToolSchema, StoredMcpToolReference } from '@/lib/mcp/types'
43

54
export type McpToolIssueType =
@@ -33,8 +32,8 @@ export function hasSchemaChanged(
3332
): boolean {
3433
if (!storedSchema || !serverSchema) return false
3534

36-
const storedWithoutDesc = omit(storedSchema, 'description')
37-
const serverWithoutDesc = omit(serverSchema, 'description')
35+
const storedWithoutDesc = omit(storedSchema, ['description'])
36+
const serverWithoutDesc = omit(serverSchema, ['description'])
3837

3938
return !isEqual(storedWithoutDesc, serverWithoutDesc)
4039
}

apps/sim/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"drizzle-orm": "^0.44.5",
107107
"encoding": "0.1.13",
108108
"entities": "6.0.1",
109+
"es-toolkit": "1.45.1",
109110
"ffmpeg-static": "5.3.0",
110111
"fluent-ffmpeg": "2.1.3",
111112
"framer-motion": "^12.5.0",
@@ -126,7 +127,6 @@
126127
"json5": "2.2.3",
127128
"jszip": "3.10.1",
128129
"jwt-decode": "^4.0.0",
129-
"lodash": "4.17.21",
130130
"lucide-react": "^0.479.0",
131131
"mammoth": "^1.9.0",
132132
"marked": "17.0.4",
@@ -193,7 +193,6 @@
193193
"@types/html-to-text": "9.0.4",
194194
"@types/js-yaml": "4.0.9",
195195
"@types/jsdom": "21.1.7",
196-
"@types/lodash": "^4.17.16",
197196
"@types/micromatch": "4.0.10",
198197
"@types/node": "24.2.1",
199198
"@types/nodemailer": "7.0.4",

0 commit comments

Comments
 (0)