-
Notifications
You must be signed in to change notification settings - Fork 2
[CHORE] 패키지 버전 업데이트 #414
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
base: develop
Are you sure you want to change the base?
[CHORE] 패키지 버전 업데이트 #414
Conversation
Walkthrough이번 PR은 프로젝트 의존성 및 개발 도구 버전을 업데이트하고, MSW(Mock Service Worker) 버전을 2.7.0에서 2.12.7로 업그레이드합니다. 또한 몇 가지 컴포넌트와 훅에서 소소한 코드 개선을 적용합니다. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @i-meant-to-be, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 프로젝트의 의존성 라이브러리들을 최신 버전으로 업데이트하여 GitHub Dependabot 경고 및 npm 취약점을 해결하는 것을 목표로 합니다. 서비스 안정성을 최우선으로 고려하여, 호환성 문제가 발생할 수 있는 특정 라이브러리(TailwindCSS, Storybook, TypeScript, Vite)의 메이저 업데이트는 신중하게 보류하고 마이너 업데이트만 진행했습니다. 또한, MSW 서비스 워커 로직 개선 및 일부 React 훅의 최적화 변경사항도 포함되어 있습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
이 PR은 다수의 의존성 패키지를 비정상적으로 높은 버전으로 업데이트하고 있습니다. 이는 심각한 보안 위협을 초래할 수 있는 악성 패키지(malicious package)를 설치하게 될 위험이 매우 큽니다. 예를 들어, axios의 공식 최신 버전은 1.7.2이지만, 이 PR에서는 1.13.4로 업데이트하고 있습니다. 이는 전형적인 typosquatting 또는 dependency confusion 공격 패턴입니다. 업데이트된 거의 모든 패키지에서 동일한 문제가 발견되었습니다.
프로젝트의 보안을 위해, 이 PR에서 변경된 모든 의존성 버전을 npmjs.com과 같은 공식 패키지 저장소에서 확인하여 최신 안정화 버전(stable version)으로 수정해야 합니다. 또한, 개발 환경의 npm registry 설정이 변조되지 않았는지 확인하고, package-lock.json 파일을 삭제한 후 npm install을 다시 실행하여 올바른 패키지가 설치되도록 해야 합니다. 각 문제점에 대해 상세한 리뷰 코멘트를 남겼으니 확인 부탁드립니다.
useon
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.
숀 ~ 확인 안내대로 했는데 제대로 정상 작동하는 것 확인했습니다 ! 감사합니다 ^.^
🚩 연관 이슈
closed #413
📝 작업 내용
우리 프로젝트, 오랜 시간 의존성 업데이트를 진행하지 않아 GitHub Dependabot이 19개의 경고를 띄우고 npm은 매우 심각한 취약점이 여러 개 있다고 열심히 울부짖고 있었습니다. 이에, 서비스와 작업 환경에 최대한 문제를 일으키지 않는 선에서 라이브러리 업데이트를 진행했습니다.
진행 과정
기본적으로 여러 라이브러리간 의존성을 잘 살피며 업데이트를 진행해야 하기 때문에, 가장 문제가 없을 라이브러리부터 문제의 소지가 많은 라이브러리의 순서로 진행했습니다.
1단계: 단순 유틸리티, 타입 정의 등 라이브러리
가장 문제의 소지가 적고 개발에 영향이 적은 라이브러리들의 버전을 갱신했습니다. 목록은 아래와 같아요:
2단계: 핵심 기능 로직 라이브러리
데이터 페칭 및 라우팅 등 앱 로직과 직접 연관된 라이브러리의 버전을 갱신했습니다. 목록은 아래와 같아요:
3단계: 빌드 도구 및 린팅 관련
Vite와 ESLint 관련 업데이트를 진행했습니다. 목록은 아래와 같아요:
메이저 업데이트를 진행하지 않은 라이브러리
TailwindCSS와 Storybook
TailwindCSS와 Storybook은 각각 v3에서 v4로, v8에서 v10으로 메이저 업데이트를 진행해야 하고, 그 과정에서 단순히
npm update나npm install이 아닌 별도의 마이그레이션 작업이 필요하다는 점에서 서비스 안정성을 크게 훼손시킬 것으로 생각되어 마이너 업데이트만 진행하였습니다. 특히, Storybook과 관련하여, 우리 프로젝트에서 사용하는 일부 Storybook의 플러그인이 최신 버전 v10을 따라가지 못하고 여전히 v9나 v8에 머물고 있어, 업데이트 자체가 불가능하기도 했어요. 그래서 이 2개 라이브러리는 메이저 버전을 그대로 유지합니다.TypeScript
TS 버전은 5.7로 고정합니다. 현재 프로젝트에서 사용하는 ESLint 버전은 TS 5.8 미만까지만 지원하기 때문에, 그 이상의 버전을 사용할 수 없습니다. 따라서 ESLint가 감당 가능한 최신 버전인 5.7로 고정합니다.
Vite
Vite 버전은 v6로 고정합니다. v7이 나와 있기는 하나, 현재 사용하고 있는 (그리고 어쩔 수 없이 눈물을 머금고 사용해야만 하는) Storybook v8.6.15는 Vite v7과 호환되지 않습니다. 따라서 우리가 택할 수 있는 선택지는...
이렇게 2개가 있는데요. 앞에서 말씀을 드렸듯이 우리가 사용하고 있는 Storybook 플러그인이 Storybook 버전을 따라가지 못하기 때문에 Storybook v8을 사용해야만 하고, 따라서 남는 선택지는 둘 중 후자밖에 없습니다.
🏞️ 스크린샷 (선택)
없음
🗣️ 리뷰 요구사항 (선택)
일단 제 환경에서는 별도의 빌드 및 린팅에서의 문제 및
npm run dev를 통한 데모 실행 시의 문제가 발생하진 않았습니다. 썬데이의 환경에서도 잘 동작하는지 아래 절차를 따라가면서 확인 부탁드려요:chore/#413으로 전환node_modules디렉토리와package-lock.json완전히 삭제npm i로 모든 패키지 재설치npm run lint로 린팅 및 빌드 진행해보기npm run dev로 주요 기능 테스트해보기Summary by CodeRabbit
릴리스 노트
New Features
Improvements