Skip to content

Commit

Permalink
refactor: replace lodash with es-toolkit (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanszabo-bitrise authored Nov 15, 2024
1 parent 00f1b08 commit 83674b1
Show file tree
Hide file tree
Showing 27 changed files with 221 additions and 254 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
Promise: false,
},
extends: ['plugin:@bitrise/config'],
plugins: ['jasmine', 'lodash'],
plugins: ['jasmine'],
rules: {
/** * Import related rules ** */
'import/no-extraneous-dependencies': [
Expand Down
161 changes: 63 additions & 98 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 @@ -82,13 +82,13 @@
"angular-route": "^1.8.3",
"angular-sanitize": "^1.8.3",
"classnames": "^2.5.1",
"es-toolkit": "^1.27.0",
"esprima": "^4.0.1",
"fuse.js": "^7.0.0",
"http-method-enum": "^1.0.0",
"jquery": "^3.7.1",
"json-schema-to-ts": "^3.1.1",
"launchdarkly-js-client-sdk": "^3.5.0",
"lodash": "^4.17.21",
"monaco-editor": "^0.52.0",
"monaco-yaml": "^5.2.3",
"ng-showdown": "^1.1.0",
Expand Down Expand Up @@ -152,7 +152,6 @@
"eslint": "^8.57.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-jasmine": "^4.2.2",
"eslint-plugin-lodash": "^7.4.0",
"file-loader": "^6.2.0",
"glob": "^11.0.0",
"husky": "^9.1.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forwardRef, useCallback, useState } from 'react';
import debounce from 'lodash/debounce';
import { debounce } from 'es-toolkit';
import { SearchInput, SearchInputProps } from '@bitrise/bitkit';

const DEBOUNCE_TIME = 300;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import capitalize from 'lodash/capitalize';
import { capitalize } from 'es-toolkit';
import { Step } from '@/core/models/Step';
import { StepApiResult } from '@/core/api/StepApi';
import { CategoryRowItem, StepsRowItem, VirtualizedListItem } from './StepSelectorDrawer.types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DndContext, DragEndEvent, DragOverlay, DragStartEvent } from '@dnd-kit/
import { arrayMove, SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable';
import { restrictToParentElement, restrictToVerticalAxis } from '@dnd-kit/modifiers';
import { CSS } from '@dnd-kit/utilities';
import omit from 'lodash/omit';
import { omit } from 'es-toolkit';
import { useDebounceCallback } from 'usehooks-ts';
import AutoGrowableInput from '@/components/AutoGrowableInput';
import DragHandle from '@/components/DragHandle/DragHandle';
Expand Down Expand Up @@ -146,7 +146,7 @@ const EnvVarCard = ({ env, isDragging, onRemove, onChange }: EnvVarCardProps) =>
isChecked={env.isExpand !== false}
onChange={(e) => {
if (e.target.checked) {
onChange?.(omit(env, 'isExpand'));
onChange?.(omit(env, ['isExpand']));
} else {
onChange?.({ ...env, isExpand: false });
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef } from 'react';
import uniq from 'lodash/uniq';
import { uniq } from 'es-toolkit';
import { useDebounceCallback } from 'usehooks-ts';
import useBitriseYmlStore from '@/hooks/useBitriseYmlStore';
import { useWorkflowConfigContext } from '../WorkflowConfig.context';
Expand Down
Loading

0 comments on commit 83674b1

Please sign in to comment.