Skip to content

Commit

Permalink
feat: migrate lodash to es-toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain committed Sep 27, 2024
1 parent c09bb00 commit 956b518
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 1,087 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"@opensumi/workers-utils": "workspace:^",
"chatgpt": "^5.0.9",
"dayjs": "^1.11.10",
"es-toolkit": "^1.21.0",
"hono": "^4.3.9",
"lodash": "^4.17.21",
"mdast-util-from-markdown": "^2.0.1",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-markdown": "^2.1.0",
Expand All @@ -71,7 +71,6 @@
"@octokit/types": "^11.1.0",
"@octokit/webhooks-examples": "^7.3.0",
"@types/jest": "^29.4.0",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.18",
"dotenv": "^16.3.1",
"esbuild": "^0.21.4",
Expand Down
2 changes: 1 addition & 1 deletion src/github/renderer/template-engine.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import get from 'lodash/get';
import { get } from 'es-toolkit/compat';

import {
IssuesLink,
Expand Down
2 changes: 1 addition & 1 deletion src/github/templates/components.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import capitalize from 'lodash/capitalize';
import { capitalize } from 'es-toolkit/string';

import {
StringBuilder,
Expand Down
2 changes: 1 addition & 1 deletion src/github/templates/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pick from 'lodash/pick';
import { pick } from 'es-toolkit/compat';

import { Context } from '@/github/types';

Expand Down
2 changes: 1 addition & 1 deletion src/im/openai.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import throttle from 'lodash/throttle';
import { throttle } from 'es-toolkit';

import { Conversation } from '@/ai/conversation';
import { convertToDingMarkdown } from '@/github/dingtalk';
Expand Down
4 changes: 1 addition & 3 deletions src/queue/worker/github.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { EmitterWebhookEventName, Webhooks } from '@octokit/webhooks';
import { orderBy } from 'lodash';
import chunk from 'lodash/chunk';
import groupBy from 'lodash/groupBy';
import { chunk, groupBy, orderBy } from 'es-toolkit';
import DefaultMap from 'mnemonist/default-map';

import { initApp } from '@/github/app';
Expand Down
Loading

0 comments on commit 956b518

Please sign in to comment.