-
Notifications
You must be signed in to change notification settings - Fork 52
Remove and re-implement lodash-es
#1079
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
Remove and re-implement lodash-es
#1079
Conversation
🦋 Changeset detectedLatest commit: 48f1c05 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
0e5682b to
4811263
Compare
Codecov ReportBase: 83.47% // Head: 83.60% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## next-v1 #1079 +/- ##
===========================================
+ Coverage 83.47% 83.60% +0.13%
===========================================
Files 285 289 +4
Lines 3570 3709 +139
Branches 714 769 +55
===========================================
+ Hits 2980 3101 +121
- Misses 517 533 +16
- Partials 73 75 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
4811263 to
5072bd5
Compare
Chromatic Report🚀 Congratulations! Your build was successful! |
440ddb0 to
bf3adfb
Compare
|
|
||
| filePaths.forEach(filePath => { | ||
| const basename = path.basename(filePath, path.extname(filePath)) | ||
| const kebabCase = (value) => value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forEach callback 함수 바깥(defaultIndexTemplate 바깥)으로 분리할 수 있을 거 같습니다.
| onClick = noop, | ||
| onMouseEnter = noop, | ||
| onMouseLeave = noop, | ||
| onClick = () => {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noop 라는 함수가 별도로 있으면 좋겠네요! (+ 테스트 코드)
| ) : VariantTuple[] { | ||
| function toArray<T>(items: T | T[]): T[] { | ||
| return isArray(items) ? items : [items] | ||
| return Array.isArray(items) ? items : [items] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is*** 같은 함수들이 typeUtils 에 모두 구현되어있는 편이 사용하는 입장에서 예측 가능할 거 같아요.
|
어디까지 유틸함수화할 것인가라고 생각해보면 어렵네요. 예를 들어 |
251b639 to
281f35c
Compare
sungik-choi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍👍
Dogdriip
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| return !value | ||
| } | ||
|
|
||
| export function noop() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마이너 코멘트: noop 함수가 typeUtils에 있는 이유가 따로 있을까요? 타입을 체크하는 함수는 확실히 아닌 것 같아서, functionUtils 등 다른 파일로 빼는 게 어떨까 제안합니다.
CHEWCHEWW
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍👍
… isRegExp(typeUtils)
345e096 to
e6e86fb
Compare
Self Checklist
CODEOWNERSfile.Related Issue
Fixes #1027
Summary
lodash-es가 사용되던 로직을 직접 구현한 util 함수로 변경하고,lodash-es를 제거합니다.(참고) 기존에 올렸었던 as-is(붉은색 사진)은
yarn clean을 하지 않은 상태로 빌드되었었습니다.yarn clean->yarn install->yarn build동일한 과정으로 다시 측정한 파일로 다시 올렸습니다!Details
Breaking change or not (Yes/No)
No
References