-
Notifications
You must be signed in to change notification settings - Fork 4
feat : 패키지 매니저 마이그레이션 #347
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
Changes from all commits
472534a
b092fcc
8978edc
9633b89
da9a77f
82d2e84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| npx --no -- commitlint --edit ${1} | ||
| pnpm dlx commitlint --edit ${1} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| echo "🔍 Running lint check before push..." | ||
| npm run lint | ||
| pnpm run lint | ||
|
|
||
| echo "🔍 Running type check before push..." | ||
| npm run typecheck | ||
| pnpm run typecheck | ||
|
|
||
| echo "✅ All checks passed!" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Next.js 호환성을 위한 설정 | ||
| shamefully-hoist=true | ||
| auto-install-peers=true | ||
| strict-peer-dependencies=false | ||
|
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major 🧩 Analysis chain🏁 Script executed: # Check if .npmrc exists and read its content
if [ -f .npmrc ]; then
echo "=== .npmrc content ==="
cat -n .npmrc
echo ""
else
echo ".npmrc not found"
fi
# Check for package.json to understand the project
if [ -f package.json ]; then
echo "=== package.json (first 50 lines) ==="
head -50 package.json
echo ""
fiRepository: solid-connection/solid-connect-web Length of output: 2002 🏁 Script executed: # Search for any related issues or comments about shamefully-hoist or pnpm settings
echo "=== Searching for pnpm config related comments ==="
rg -i "shamefully-hoist|auto-install-peers|strict-peer-dependencies|public-hoist" --type-list | head -20Repository: solid-connection/solid-connect-web Length of output: 535 🏁 Script executed: # Check for any build configuration files
echo "=== Checking for build/config files ==="
fd -e "next.config" -e "tsconfig" -e "babel.config" -e ".npmrc" -e "pnpm-workspace"Repository: solid-connection/solid-connect-web Length of output: 117 🏁 Script executed: # Check for pnpm-related files and search for any configuration comments
echo "=== Checking for pnpm workspace or related configs ==="
find . -maxdepth 2 -type f \( -name "pnpm-workspace.yaml" -o -name ".pnpmfile.cjs" -o -name "pnpm-lock.yaml" \) 2>/dev/null | head -10
echo ""
echo "=== Searching for peer dependency or pnpm-related issues in comments ==="
rg -i "peer.*depend|shamefully|hoist|pnpm.*config" --type ts --type tsx --type js --type json -B 1 -A 1 2>/dev/null | head -30Repository: solid-connection/solid-connect-web Length of output: 223 🏁 Script executed: # Check if there are any build errors or warnings documented
echo "=== Looking for any related documentation or issues ==="
find . -maxdepth 2 -type f \( -name "README.md" -o -name "CONTRIBUTING.md" -o -name ".github" \) 2>/dev/null | head -10
# Search in README if it exists
if [ -f README.md ]; then
echo ""
echo "=== Checking README for pnpm/Next.js setup info ==="
rg -i "pnpm|install|setup|next" README.md -A 2 | head -40
fiRepository: solid-connection/solid-connect-web Length of output: 606 🌐 Web query:
💡 Result: Short answer: avoid shamefully-hoist=true for Next.js workspaces unless you must — prefer targeted hoisting (publicHoistPattern / hoistPattern) or fixing dependency declarations. Use shamefully-hoist only as a last-resort compatibility fallback. Why:
Best practices
If you want, I can:
Citations:
pnpm 설정의 엄격함을 약화시키는 옵션들을 검토하고 개선해주세요. 현재
🤖 Prompt for AI Agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 음 npmrc가 필수적일까요 ? 이 파일 제거해도 좋을것 같아보이는데 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
테스트 방법:
만약 위 과정이 에러 없이 정상 작동한다면, pnpm의 기본 설정이 가장 엄격하고 안전하기 때문에, 특별한 이유가 없다면 설정 파일 없이 사용하는 것이 권장됩니다. 혹시 빌드나 실행 중 문제가 발생한다면 그때 필요한 최소한의 설정만 추가하는 방식이 좋습니다. 🧠 Learnings used
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 추가적으로 pnpm 설정 부족한 부분이 있을까? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: Length of output: 1275
📋 추가 권장 사항1. packageManager 필드 추가 (🔴 중요)
{
"packageManager": "pnpm@9.15.0"
}이렇게 하면:
2. preinstall 스크립트 추가 (🟡 권장)실수로 {
"scripts": {
"preinstall": "npx only-allow pnpm"
}
}3. Node.js 버전 파일 추가 (🟡 권장)
또는 package.json의 4. .npmrc 제거 (이미 논의됨)위에서 논의한 대로, 우선순위:
현재 CI 설정에서 pnpm 캐싱이 잘 구성되어 있고, pnpm-lock.yaml도 존재하므로 기본적인 마이그레이션은 잘 되어 있습니다! 👍 🧠 Learnings used
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 최고~~~!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
구현 중에 궁금한 점이나 문제가 생기면 언제든 말씀해주세요. 도움이 필요하시면 기꺼이 도와드리겠습니다! 🧠 Learnings usedIf you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
||
|
|
||
| # 기본 설정 | ||
| registry=https://registry.npmjs.org/ | ||
| enable-pre-post-scripts=true | ||
| lockfile=true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,42 @@ | ||
| module.exports = { | ||
| extends: ["@commitlint/config-conventional"], | ||
| parserPreset: { | ||
| parserOpts: { | ||
| headerPattern: /^([\p{Emoji_Presentation}\p{Extended_Pictographic}]|\w+)(?:\((.+)\))?[:\s]+(.+)$/u, | ||
| headerCorrespondence: ["type", "scope", "subject"], | ||
| }, | ||
| }, | ||
| rules: { | ||
| "type-enum": [2, "always", ["feat", "fix", "refactor", "style", "test", "docs", "chore"]], | ||
| "type-enum": [ | ||
| 2, | ||
| "always", | ||
| [ | ||
| "feat", | ||
| "fix", | ||
| "refactor", | ||
| "style", | ||
| "test", | ||
| "docs", | ||
| "chore", | ||
| // Gitmoji support | ||
| "✨", | ||
| "🐛", | ||
| "🔧", | ||
| "📝", | ||
| "💄", | ||
| "♻️", | ||
| "🔥", | ||
| "🚀", | ||
| "✅", | ||
| "🔒", | ||
| "⬆️", | ||
| "⬇️", | ||
| "🎨", | ||
| "🚧", | ||
| "💚", | ||
| "📦", | ||
| "🔀", | ||
| ], | ||
| ], | ||
| }, | ||
| }; |
Uh oh!
There was an error while loading. Please reload this page.
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.
🧩 Analysis chain
🌐 Web query:
pnpm dlx vs npx --no behavior commitlint💡 Result:
Short answer: they’re different.
npx --no (aka --no-install) prevents npx from downloading a package; it only runs an existing local/global binary and will fail instead of installing. This is what commitlint docs use in husky hooks to avoid prompting to install. [1][3]
pnpm dlx always fetches a package temporarily from the registry and runs it (does not add it to package.json). It’s the pnpm equivalent of npx for one‑off remote execution. It does not implement an npx‑style “no‑install” that refuses to download. [2]
Practical guidance for commitlint + Husky:
Sources:
[1] npx docs (npm) — npx options and --no/--no-install behavior.
[2] pnpm dlx docs — dlx fetches and runs packages temporarily.
[3] commitlint local setup (Husky example uses "npx --no -- commitlint --edit $1").
🌐 Web query:
pnpm dlx automatic install prompt behavior missing package💡 Result:
Short answer: pnpm dlx does not "automatically install" a package into your project — it fetches the requested package temporarily from the registry and runs it. If the package cannot be resolved (not published, private/unreachable, or blocked by policy like minimumReleaseAge), dlx will fail with an error (or with the same resolution behavior as normal pnpm commands) rather than silently installing something different. There are related pnpm settings that control prompts and automatic installs for other commands (e.g., verify-deps-before-run), and there are known edge-case bugs (e.g., minimumReleaseAge interactions) discussed in the pnpm issue tracker. See pnpm dlx docs and related GitHub issues for details. [1][2][3]
Sources:
🌐 Web query:
npx --no flag purpose prevent install prompt💡 Result:
--no tells npx to answer the interactive "Ok to proceed?" prompt with "no" (i.e., refuse installing missing packages), so it prevents npx from prompting to download/install and causes the run to fail if the command isn’t already available. It’s the replacement for the older --no-install behavior. [1][2]
pnpm dlx에서pnpm exec로 변경하세요.npx --no에서pnpm dlx로의 전환은 기능적으로 다릅니다. 다음을 확인해주세요:npx --no의 역할: 원격 패키지 설치를 거부하고 로컬에 있는 패키지만 실행합니다. 패키지가 없으면 실행이 실패합니다.pnpm dlx의 동작: 항상 레지스트리에서 패키지를 임시로 다운로드하여 실행합니다.--no같은 플래그로 다운로드를 거부할 수 없습니다.올바른 대체 방법: commitlint가 devDependency로 설치되어 있다면
pnpm exec commitlint --edit ${1}을 사용하세요. 이것이npx --no동작과 동등합니다.현재 코드는 의도하지 않은 동작 변경을 포함하고 있습니다.
🤖 Prompt for AI Agents
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.
커밋린트가 데브디펜던시인지 확인하고
해당 내용은 커밋메시지 허스키인데 크게 중요한가 ?
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.
🧩 Analysis chain
🏁 Script executed:
Length of output: 121
@manNomi, 확인 결과 commitlint는 devDependency로 설치되어 있습니다 (@commitlint/cli,@commitlint/config-conventional).중요도에 대해서는:
크게 중요하지 않습니다. 커밋 메시지 검증 훅이므로 프로덕션에 영향을 주지 않고,
pnpm dlx도 정상 동작합니다.다만 차이점은:
pnpm dlx: 매번 레지스트리에서 임시 다운로드 (약간 느림)pnpm exec: 로컬 설치된 패키지 실행 (원래npx --no동작과 동일)이미 로컬에 설치되어 있으니
pnpm exec commitlint --edit ${1}또는pnpm commitlint --edit ${1}로 변경하면 더 빠르고 원래 동작과 일치하지만, 현 상태로도 문제없이 작동합니다. 우선순위 낮은 개선사항으로 보시면 됩니다.🧠 Learnings used