Skip to content

Commit be162cb

Browse files
yslpnkettanaito
andauthored
fix: replace lodash with es-toolkit (#334)
Co-authored-by: Artem Zakharchenko <[email protected]>
1 parent 681ae82 commit be162cb

File tree

8 files changed

+17
-32
lines changed

8 files changed

+17
-32
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@
6767
},
6868
"dependencies": {
6969
"@standard-schema/spec": "^1.0.0",
70-
"@types/lodash-es": "^4.17.12",
71-
"lodash-es": "^4.17.21",
70+
"es-toolkit": "^1.39.10",
7271
"mutative": "^1.3.0",
7372
"outvariant": "^1.4.3",
7473
"rettime": "^0.7.0"
7574
}
76-
}
75+
}

pnpm-lock.yaml

Lines changed: 8 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { StandardSchemaV1 } from '@standard-schema/spec'
2-
import { get } from 'lodash-es'
2+
import { get } from 'es-toolkit/compat'
33
import { apply, create as createDraft, type Draft, type Patch } from 'mutative'
44
import { invariant, InvariantError } from 'outvariant'
55
import { Logger } from '#/src/logger.js'

src/extensions/persist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { invariant } from 'outvariant'
2-
import { unset } from 'lodash-es'
2+
import { unset } from 'es-toolkit/compat'
33
import { defineExtension } from '#/src/extensions/index.js'
44
import {
55
Collection,

src/extensions/sync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { set } from 'lodash-es'
1+
import { set } from 'es-toolkit/compat'
22
import { defineExtension } from '#/src/extensions/index.js'
33
import {
44
kCollectionId,

src/relation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { StandardSchemaV1 } from '@standard-schema/spec'
22
import { invariant, format } from 'outvariant'
3-
import { get, isEqual, set, unset } from 'lodash-es'
3+
import { isEqual } from 'es-toolkit'
4+
import { get, set, unset } from 'es-toolkit/compat'
45
import {
56
kPrimaryKey,
67
kRelationMap,

src/sort.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { StandardSchemaV1 } from '@standard-schema/spec'
2-
import { get } from 'lodash-es'
2+
import { get } from 'es-toolkit/compat'
33
import { toDeepEntries } from '#/src/utils.js'
44

55
export type SortDirection = 'asc' | 'desc'

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { invariant } from 'outvariant'
2-
import { isPlainObject } from 'lodash-es'
2+
import { isPlainObject } from 'es-toolkit'
33
import { kPrimaryKey, type RecordType } from '#/src/collection.js'
44

55
/**

0 commit comments

Comments
 (0)