Skip to content

Commit 5469634

Browse files
authored
Remove lodash-es dependency (#93)
* refactor: use custom merge,mergeWith,defaultsDeep * refactor: use custom get * refactor: use custom set * refactor: use custom isEqual * build(deps): drop lodash-es * chore: add changeset
1 parent 64929bc commit 5469634

File tree

25 files changed

+702
-32
lines changed

25 files changed

+702
-32
lines changed

.changeset/dry-ends-read.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@layerstack/svelte-actions': patch
3+
'@layerstack/svelte-stores': patch
4+
'@layerstack/svelte-state': patch
5+
'@layerstack/svelte-table': patch
6+
'@layerstack/tailwind': patch
7+
'@layerstack/utils': patch
8+
---
9+
10+
Remove lodash-es dependency

packages/svelte-stores/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"dependencies": {
3838
"@layerstack/utils": "workspace:*",
3939
"immer": "^10.1.1",
40-
"lodash-es": "^4.17.21",
4140
"zod": "^3.24.3"
4241
},
4342
"main": "./dist/index.js",

packages/svelte-stores/src/lib/fetchStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getContext, setContext } from 'svelte';
22
import { get, writable } from 'svelte/store';
33
import type { Writable } from 'svelte/store';
4-
import { merge } from 'lodash-es';
4+
import { merge } from '@layerstack/utils';
55

66
type BodyMethods = 'arrayBuffer' | 'blob' | 'formData' | 'json' | 'text';
77

packages/svelte-stores/src/lib/formStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
type Patch,
1111
} from 'immer';
1212
import type { Schema } from 'zod';
13-
import { set } from 'lodash-es';
13+
import { set } from '@layerstack/utils';
1414

1515
// Needed for finishDraft() patches/inverseChanges - https://immerjs.github.io/immer/patches
1616
enablePatches();

packages/svelte-stores/src/lib/graphStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { setContext, getContext } from 'svelte';
22
import { writable } from 'svelte/store';
3-
import { merge } from 'lodash-es';
3+
import { merge } from '@layerstack/utils';
44

55
import { parse, stringify } from '@layerstack/utils';
66

packages/svelte-stores/src/lib/queryParamsStore.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { derived, get, type Readable } from 'svelte/store';
22
import type { Page } from '@sveltejs/kit';
3-
import { isEqual } from 'lodash-es';
43

54
import * as Serialize from '@layerstack/utils/serialize';
65
import rollup from '@layerstack/utils/rollup';
7-
import { entries, type ValueOf } from '@layerstack/utils';
6+
import { entries, isEqual, type ValueOf } from '@layerstack/utils';
87

98
// Matches $app/navigation's goto without dependency - https://kit.svelte.dev/docs/modules#$app-navigation-goto
109
type Goto = (url: string | URL, opts?: any) => any;

packages/svelte-table/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
"dependencies": {
3838
"@layerstack/svelte-actions": "workspace:*",
3939
"@layerstack/utils": "workspace:*",
40-
"d3-array": "^3.2.4",
41-
"lodash-es": "^4.17.21"
40+
"d3-array": "^3.2.4"
4241
},
4342
"main": "./dist/index.js",
4443
"exports": {

packages/svelte-table/src/lib/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Action } from 'svelte/action';
2-
import { merge } from 'lodash-es';
2+
import { merge } from '@layerstack/utils';
33
import { extent, max, min } from 'd3-array';
44

55
import type { tableOrderStore } from './stores.js';

packages/svelte-table/src/lib/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { get } from 'lodash-es';
2-
3-
import { PeriodType, parseDate } from '@layerstack/utils';
1+
import { PeriodType, parseDate, get } from '@layerstack/utils';
42

53
import type { ColumnDef } from './types.js';
64

packages/tailwind/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"@layerstack/utils": "workspace:^",
4242
"clsx": "^2.1.1",
4343
"d3-array": "^3.2.4",
44-
"lodash-es": "^4.17.21",
4544
"tailwind-merge": "^3.2.0"
4645
},
4746
"main": "./dist/index.js",

0 commit comments

Comments
 (0)