Skip to content

Commit 10d1607

Browse files
committed
refactor: replace lodash with es-toolkit
Replace lodash utility functions with es-toolkit equivalents to reduce bundle size and improve performance. Update imports in config service and merge-configs utility.
1 parent 6dc1ffb commit 10d1607

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

lib/config.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import { Inject, Injectable, Optional } from '@nestjs/common';
22
import { isUndefined } from '@nestjs/common/utils/shared.utils';
33
import * as dotenv from 'dotenv';
44
import fs from 'fs';
5-
import get from 'lodash/get';
6-
import has from 'lodash/has';
7-
import set from 'lodash/set';
5+
import { get, has, set } from 'es-toolkit/compat';
86
import { Subject } from 'rxjs';
97
import {
108
CONFIGURATION_TOKEN,

lib/utils/merge-configs.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import set from 'lodash/set';
1+
import { set } from 'es-toolkit/compat';
22

33
/**
44
* @publicApi

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dependencies": {
2121
"dotenv": "16.4.7",
2222
"dotenv-expand": "12.0.2",
23-
"lodash": "4.17.21"
23+
"es-toolkit": "^1.39.3"
2424
},
2525
"devDependencies": {
2626
"@commitlint/cli": "19.8.1",

0 commit comments

Comments
 (0)