Skip to content

Commit f4e672f

Browse files
committed
chore: replace lodash with dettle
The `lodash.*` packages are advised against being used these days for lack of maintenance and security updates. Instead, we can pull in `dettle` for only the debounce functionality. This will also be smaller.
1 parent 513df96 commit f4e672f

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

package-lock.json

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

packages/dev-utils/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"author": "Netlify Inc.",
4343
"devDependencies": {
4444
"@netlify/types": "2.0.1",
45-
"@types/lodash.debounce": "^4.0.9",
4645
"@types/node": "^18.19.110",
4746
"@types/parse-gitignore": "^1.0.2",
4847
"@types/write-file-atomic": "^4.0.3",
@@ -55,12 +54,12 @@
5554
"ansis": "^4.1.0",
5655
"chokidar": "^4.0.1",
5756
"decache": "^4.6.2",
57+
"dettle": "^1.0.5",
5858
"dot-prop": "9.0.0",
5959
"env-paths": "^3.0.0",
6060
"find-up": "7.0.0",
6161
"image-size": "^2.0.2",
6262
"js-image-generator": "^1.0.4",
63-
"lodash.debounce": "^4.0.8",
6463
"parse-gitignore": "^2.0.0",
6564
"semver": "^7.7.2",
6665
"tmp-promise": "^3.0.3",

packages/dev-utils/src/lib/watch-debounced.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { once } from 'node:events'
22

3-
import chokidar, { FSWatcher } from 'chokidar'
3+
import chokidar from 'chokidar'
44
import decache from 'decache'
5-
import debounce from 'lodash.debounce'
5+
import { debounce } from 'dettle';
66

77
const DEBOUNCE_WAIT = 100
88

0 commit comments

Comments
 (0)