feat : turborepo 기본 설정 #353
Conversation
- pnpm-workspace.yaml 추가 - turbo.json 설정 추가 - package.json 워크스페이스 구조로 변경 - vercel.json 배포 설정 업데이트
- 루트 레벨의 Next.js 앱 파일 삭제 - src 디렉토리 전체 제거 - public 디렉토리 전체 제거 - 앱별 설정 파일 제거 (next.config.mjs, tailwind.config.ts 등) - 환경 변수 파일 제거 (.env 파일들)
- apps/web 워크스페이스 생성 - packages 워크스페이스 생성 - 기존 앱을 apps/web으로 마이그레이션
Walkthrough
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.husky/commit-msg:
- Line 1: The commit hook uses an unquoted positional parameter ${1} which will
break if the commit message path contains spaces; update the hook invocation
(the line that runs pnpm dlx commitlint --edit ${1}) to wrap the argument in
quotes so the positional parameter is passed as a single argument (e.g., --edit
"${1}"), ensuring the commit message file path with spaces is handled correctly.
🧹 Nitpick comments (7)
apps/web/.eslintrc.js (1)
1-46: ESLint 설정이 잘 구성되어 있습니다.
파서 및 환경 설정
- TypeScript 파서와 프로젝트 참조가 올바르게 설정되어 있습니다.
- 브라우저, ES2021, Node 환경이 적절히 구성되어 있습니다.
확장 설정 순서
- Next.js → TypeScript → Prettier 순서로 확장되어 규칙 충돌이 올바르게 해결됩니다.
Overrides 설정 관련 작은 제안
- 설정 파일 패턴에
.cjs확장자도 포함하면 CommonJS 설정 파일도 커버할 수 있습니다.♻️ 선택적 개선 제안
- files: [".eslintrc.{js,cjs}", "*.config.{js,mjs,ts}"], + files: [".eslintrc.{js,cjs}", "*.config.{js,cjs,mjs,ts}"],README.md (3)
17-27: Corepack 사용을 권장합니다.Node.js 16.13 이상에서는 Corepack이 내장되어 있어 pnpm을 더 쉽게 관리할 수 있습니다. Prerequisites에서 Node.js 22.x를 요구하므로, Corepack을 활성화하는 방법을 추가하거나 주요 설치 방법으로 제안하는 것이 좋습니다.
📝 Corepack을 포함한 설치 안내 개선안
## Installation This project uses pnpm as the package manager. ```bash -# Install pnpm globally +# Option 1: Enable Corepack (recommended for Node.js 16.13+) +corepack enable +corepack prepare pnpm@latest --activate + +# Option 2: Install pnpm globally via npm npm install -g pnpm # Install dependencies pnpm install</details> --- `1-11`: **프로젝트 구조 안내 추가를 고려해 보세요.** 이번 PR에서 Turborepo 모노레포 구조를 도입했습니다. README에 간단한 프로젝트 구조 섹션을 추가하면 새로운 기여자들이 코드베이스를 더 쉽게 이해할 수 있습니다. 다만 문서를 간결하게 유지하려는 의도라면 현재 상태도 충분합니다. <details> <summary>📁 프로젝트 구조 섹션 추가 예시</summary> 스택 정보 아래에 추가할 수 있습니다: ```diff - Prettier - Vercel +## Project Structure + +This project uses Turborepo for monorepo management: + +``` +├── apps/ +│ └── web/ # Main Next.js application +└── packages/ # Shared packages +``` + ## Prerequisites
12-16: Node.js 버전 요구사항 완화를 검토해 주세요.현재 package.json에 명시된 Node.js 22.x 요구사항을 몇 가지 이유로 다시 검토하실 것을 권장합니다:
LTS 버전이 아님: Node.js 22는 LTS 버전이 아니며, 2025년 4월에 지원이 종료됩니다. 반면 18.x와 20.x는 안정적인 LTS 버전입니다.
특별한 의존성 없음: 현재 프로젝트의 의존성(turbo, commitlint 등)은 Node.js 22.x를 특별히 요구하지 않습니다.
기여자 진입장벽: Node.js 22.x는 매우 최신 버전으로, 구버전을 사용 중인 기여자의 참여를 제한할 수 있습니다.
package.json의 engines 필드를 Node.js 20.x 이상으로 완화하거나, 22.x를 꼭 필요로 하는 이유가 있다면 README에 그 배경을 설명하는 것을 추천합니다.
.github/workflows/release.yml (1)
45-52: 1) Vercel CLI 버전 고정을 권장합니다.
1)@latest는 배포 재현성을 낮춥니다.
2) 고정 버전을 환경변수로 관리하면 롤백이 쉬워집니다.♻️ 제안 예시
env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} VERCEL_ENV: production + VERCEL_CLI_VERSION: "X.Y.Z" @@ - - name: Install Vercel CLI - run: pnpm add --global vercel@latest + - name: Install Vercel CLI + run: pnpm add --global vercel@${{ env.VERCEL_CLI_VERSION }}.github/workflows/build.yml (1)
30-36: 1) Preview 배포도 Vercel CLI 버전 고정이 안전합니다.
1)@latest는 예기치 않은 변경을 유발할 수 있습니다.
2) 고정 버전으로 일관성을 유지해 주세요..npmrc (1)
1-9: 1) peer 의존성 완화 설정 의도를 확인해주세요.
1)strict-peer-dependencies=false는 충돌을 숨길 수 있습니다.
2) 의도된 정책이면 간단한 주석으로 근거를 남겨두는 편이 안전합니다.📝 주석 추가 예시
- strict-peer-dependencies=false + # NOTE: 의도적으로 peer 충돌을 허용(정리 후 true 복귀 고려) + strict-peer-dependencies=false
| @@ -1,2 +1,2 @@ | |||
| npx --no -- commitlint --edit ${1} | |||
| pnpm dlx commitlint --edit ${1} | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check if the file exists and view its contents
if [ -f .husky/commit-msg ]; then
echo "=== File exists ==="
cat -n .husky/commit-msg
else
echo "File not found"
fiRepository: solid-connection/solid-connect-web
Length of output: 144
🏁 Script executed:
# Check other husky hooks to see if they have similar patterns
if [ -d .husky ]; then
echo "=== Husky hooks directory ==="
ls -la .husky/
echo ""
echo "=== Content of other hooks ==="
for file in .husky/*; do
if [ -f "$file ] && [ ! -d "$file" ]; then
echo "--- $file ---"
cat "$file"
fi
done
fiRepository: solid-connection/solid-connect-web
Length of output: 147
🌐 Web query:
husky commit-msg hook ${1} argument positional parameter shell quoting best practices
💡 Result:
Short best-practices for using the commit-msg hook's positional parameter ($1) with Husky
-
Always source Husky's init first in the hook file.
- Example top lines (generated by husky):
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh" - Reason: ensures Husky wiring and correct working dir/behavior. [3]
- Example top lines (generated by husky):
-
Treat $1 as a filename — not the message text — and quote it.
- Read safely: commit_message="$(< "$1")" or commit_message="$(cat "$1")".
- Don’t use unquoted $1 (echo $1) — it breaks with spaces/newlines. [2][3]
-
Validate presence defensively.
- Use ${1:?Missing commit message file} or test -f "$1" and fail with a clear error if absent. [2]
-
When adding the hook via shell/echo/ npm scripts, escape the dollar or use single quotes so $1 is evaluated at runtime (hook), not when creating the file.
- Good: echo 'npx --no -- commitlint --edit $1' > .husky/commit-msg
- If double quotes are required, escape: echo "npx --no -- commitlint --edit $1" > .husky/commit-msg. [1][4]
-
Use commitlint / other tools with --edit "$1" (or "${1}") so they read the temporary commit message file.
- Example inside .husky/commit-msg: npx --no -- commitlint --edit "$1". [1][4]
-
Windows caveat
- Windows shell/encoding differences require care: use proper quoting/UTF-8 and follow platform notes in commitlint/husky docs (use backtick-escaping in some docs/examples). [1]
References
- Commitlint local setup & Husky examples (shows echo "npx --no -- commitlint --edit $1"). [1]
- Git commit-msg hook behavior / read the commit message file and examples for quoting ($1). [2]
- Git hooks docs: commit-msg receives one parameter — path to the temp message file. [3]
- Practical Husky + commitlint examples and quoting notes. [4]
1) 인자 경로는 따옴표로 감싸주세요.
$1에는 깃이 전달한 커밋 메시지 파일의 경로가 담깁니다. 따옴표 없이 사용하면 경로에 공백이 있을 때 명령이 깨질 수 있습니다.
🔧 제안 수정
-pnpm dlx commitlint --edit ${1}
+pnpm dlx commitlint --edit "$1"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| pnpm dlx commitlint --edit ${1} | |
| pnpm dlx commitlint --edit "$1" |
🤖 Prompt for AI Agents
In @.husky/commit-msg at line 1, The commit hook uses an unquoted positional
parameter ${1} which will break if the commit message path contains spaces;
update the hook invocation (the line that runs pnpm dlx commitlint --edit ${1})
to wrap the argument in quotes so the positional parameter is passed as a single
argument (e.g., --edit "${1}"), ensuring the commit message file path with
spaces is handled correctly.
- next.config.mjs: 기존 S3/CloudFront 도메인 제거, 새 CDN 도메인만 유지 - .env: IMAGE_URL을 새 CDN 도메인으로 변경 변경된 도메인: - cdn.default.solid-connection.com (기본 이미지) - cdn.upload.solid-connection.com (업로드 이미지) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
chore: enable Vercel preview deployments
fix: add vercel link step before pull in deploy workflows
fix: add vercel link step before pull in deploy workflows
fix: prettier 설정 통일 및 포맷팅 수정
|
@manNomi is attempting to deploy a commit to the manNomi's projects Team on Vercel. A member of the Team first needs to authorize it. |
8851d55 to
da9a77f
Compare
90b7f63
into
solid-connection:chore/turbo-repo
관련 이슈
#350
작업 내용
기본적인 터보레포 셋업 진행했습니다
특이 사항
리뷰 요구사항 (선택)