Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): switch from lodash-es to es-toolkit #3142

Merged
merged 5 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 16 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
},
"dependencies": {
"@typed-mxgraph/typed-mxgraph": "~1.0.8",
"es-toolkit": "~1.16.0",
"fast-xml-parser": "4.4.1",
"lodash-es": "~4.17.21",
"mxgraph": "4.2.2",
"strnum": "1.0.5"
},
Expand All @@ -118,7 +118,6 @@
"@rollup/plugin-terser": "~0.4.4",
"@types/debug": "~4.1.12",
"@types/jest-image-snapshot": "~6.4.0",
"@types/lodash-es": "~4.17.12",
"@types/minimist": "~1.2.5",
"@typescript-eslint/eslint-plugin": "~7.18.0",
"@typescript-eslint/parser": "~7.18.0",
Expand Down
2 changes: 1 addition & 1 deletion src/component/mxgraph/BpmnGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import type { FitOptions, ZoomConfiguration } from '../options';
import type { mxCellRenderer, mxCellState, mxGraphView, mxPoint } from 'mxgraph';

import { debounce, throttle } from 'lodash-es';
import { debounce, throttle } from 'es-toolkit';

import { ensurePositiveValue, ensureValidZoomConfiguration } from '../helpers/validators';
import { FitType } from '../options';
Expand Down
9 changes: 1 addition & 8 deletions test/integration/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ module.exports = {
},
],
},
moduleNameMapper: {
...moduleNameMapper,
// Hack to use lodash instead of lodash-es in integration tests.
// This is only to resolve the import, otherwise Jest fails to parse the lodash-es files.
// For more details, see https://github.com/process-analytics/bpmn-visualization-js/pull/2678
// The lodash code is not called in integration tests, so changing the lodash implementation in used in not an issue.
'^lodash-es$': 'lodash',
},
moduleNameMapper,
collectCoverageFrom: ['src/**/*.{ts,js}'],
coveragePathIgnorePatterns: ['/src/model/'],
coverageReporters: ['lcov', 'text-summary'],
Expand Down
Loading