Skip to content

Commit ec7960b

Browse files
authored
build(pnpm): pnpm 11 워크스페이스로 전환
1 parent 775941a commit ec7960b

13 files changed

Lines changed: 7614 additions & 10161 deletions

File tree

‎.github/labeler.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
- changed-files:
8181
- any-glob-to-any-file:
8282
- "package.json"
83-
- "package-lock.json"
83+
- "pnpm-lock.yaml"
84+
- "pnpm-workspace.yaml"
8485
- "tsconfig*.json"
8586
- "vite.config.ts"
8687
- "eslint.config.*"
@@ -96,7 +97,8 @@
9697
- changed-files:
9798
- any-glob-to-any-file:
9899
- "package.json"
99-
- "package-lock.json"
100+
- "pnpm-lock.yaml"
101+
- "pnpm-workspace.yaml"
100102

101103
"documentation":
102104
- changed-files:

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020

21-
- uses: actions/setup-node@v4
21+
- uses: pnpm/action-setup@v6
22+
23+
- uses: actions/setup-node@v6
2224
with:
2325
node-version: 22
24-
cache: npm
26+
cache: pnpm
27+
cache-dependency-path: pnpm-lock.yaml
2528

26-
- run: npm ci
27-
- run: npm run lint
28-
- run: npm run type-check
29-
- run: npm run test:post-dates
30-
- run: npm run build
31-
- run: npm run test:sitemap-lastmod
29+
- run: pnpm install --frozen-lockfile
30+
- run: pnpm lint
31+
- run: pnpm type-check
32+
- run: pnpm test:post-dates
33+
- run: pnpm build
34+
- run: pnpm test:sitemap-lastmod

‎.github/workflows/deploy.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- uses: actions/setup-node@v4
24+
- uses: pnpm/action-setup@v6
25+
26+
- uses: actions/setup-node@v6
2527
with:
2628
node-version: 22
27-
cache: npm
29+
cache: pnpm
30+
cache-dependency-path: pnpm-lock.yaml
2831

29-
- run: npm ci
30-
- run: npm run build
32+
- run: pnpm install --frozen-lockfile
33+
- run: pnpm build
3134

3235
- uses: actions/upload-pages-artifact@v3
3336
with:

‎.gitignore‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Dependencies
2-
node_modules
1+
# Dependencies (all workspace packages; pnpm links these from the global store)
2+
node_modules/
33

44
# Build
55
dist
@@ -12,6 +12,7 @@ dist-ssr
1212
# Logs
1313
*.log
1414
npm-debug.log*
15+
pnpm-debug.log*
1516

1617
# Editor
1718
.vscode/*
@@ -27,4 +28,4 @@ npm-debug.log*
2728
.superset
2829

2930
tsconfig.app.tsbuildinfo
30-
tsconfig.node.tsbuildinfo
31+
tsconfig.node.tsbuildinfo

‎AGENTS.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ publishDate: "2025-12-01" # optional - 예약 발행
137137
- 글 상세와 프로젝트 상세 경로는 빌드 시 개별 HTML로 프리렌더
138138
- 클라이언트는 `src/routes.tsx`에서 현재 경로 컴포넌트만 hydration 전에 preload하고, 나머지 라우트는 lazy 유지
139139
- `PostPage` 코드블록은 서버에서 안정적인 `<pre>` fallback을 렌더하고 hydration 후 `CodeBlock`/Shiki를 로드
140-
- hydration 관련 변경 후에는 `npm run build`, `npm run preview`로 `Loading...`, Suspense hidden segment, React hydration warning이 없는지 확인
140+
- hydration 관련 변경 후에는 `pnpm build`, `pnpm preview`로 `Loading...`, Suspense hidden segment, React hydration warning이 없는지 확인
141141

142142
### Page Views
143143
- Google Apps Script API로 GA 데이터 조회
@@ -151,11 +151,11 @@ publishDate: "2025-12-01" # optional - 예약 발행
151151

152152
## Commands
153153
```bash
154-
npm run dev # 개발 서버 (Vite)
155-
npm run build # 프로덕션 빌드 (tsc + client build + SSR build + hydrated SSG 생성)
156-
npm run preview # 빌드 결과 미리보기
157-
npm run lint # ESLint 실행
158-
npm run type-check # TypeScript 타입 체크
154+
pnpm dev # 개발 서버 (Vite)
155+
pnpm build # 프로덕션 빌드 (tsc + client build + SSR build + hydrated SSG 생성)
156+
pnpm preview # 빌드 결과 미리보기
157+
pnpm lint # ESLint 실행
158+
pnpm type-check # TypeScript 타입 체크
159159
```
160160

161161
## Deployment

‎CLAUDE.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ publishDate: "2025-12-01" # optional - 예약 발행
137137
- 글 상세와 프로젝트 상세 경로는 빌드 시 개별 HTML로 프리렌더
138138
- 클라이언트는 `src/routes.tsx`에서 현재 경로 컴포넌트만 hydration 전에 preload하고, 나머지 라우트는 lazy 유지
139139
- `PostPage` 코드블록은 서버에서 안정적인 `<pre>` fallback을 렌더하고 hydration 후 `CodeBlock`/Shiki를 로드
140-
- hydration 관련 변경 후에는 `npm run build`, `npm run preview`로 `Loading...`, Suspense hidden segment, React hydration warning이 없는지 확인
140+
- hydration 관련 변경 후에는 `pnpm build`, `pnpm preview`로 `Loading...`, Suspense hidden segment, React hydration warning이 없는지 확인
141141

142142
### Page Views
143143
- Google Apps Script API로 GA 데이터 조회
@@ -151,11 +151,11 @@ publishDate: "2025-12-01" # optional - 예약 발행
151151

152152
## Commands
153153
```bash
154-
npm run dev # 개발 서버 (Vite)
155-
npm run build # 프로덕션 빌드 (tsc + client build + SSR build + hydrated SSG 생성)
156-
npm run preview # 빌드 결과 미리보기
157-
npm run lint # ESLint 실행
158-
npm run type-check # TypeScript 타입 체크
154+
pnpm dev # 개발 서버 (Vite)
155+
pnpm build # 프로덕션 빌드 (tsc + client build + SSR build + hydrated SSG 생성)
156+
pnpm preview # 빌드 결과 미리보기
157+
pnpm lint # ESLint 실행
158+
pnpm type-check # TypeScript 타입 체크
159159
```
160160

161161
## Deployment

‎README.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,23 @@ flowchart LR
101101
## 빠른 시작
102102

103103
```bash
104-
npm ci
105-
npm run dev
104+
pnpm install --frozen-lockfile
105+
pnpm dev
106106
```
107107

108+
`packageManager`에 pnpm 11.17.0을 고정합니다. 루트 앱과 `oauth-proxy`는 하나의 workspace/lockfile을 공유하며, 패키지 파일은 머신 전역 pnpm store에서 중복 없이 재사용합니다. 프로젝트별 `node_modules`에는 실행에 필요한 링크만 생성되고 Git에서는 제외됩니다.
109+
108110
개발 서버는 기본적으로 `http://localhost:5173`에서 실행됩니다.
109111

110112
## 명령어
111113

112114
| Command | Description |
113115
| --- | --- |
114-
| `npm run dev` | Vite 개발 서버 실행 |
115-
| `npm run build` | 타입 체크, client/SSR 빌드, hydrated SSG 생성 |
116-
| `npm run preview` | `dist` 결과 미리보기 |
117-
| `npm run lint` | ESLint 검사 |
118-
| `npm run type-check` | TypeScript 타입 검사 |
116+
| `pnpm dev` | Vite 개발 서버 실행 |
117+
| `pnpm build` | 타입 체크, client/SSR 빌드, hydrated SSG 생성 |
118+
| `pnpm preview` | `dist` 결과 미리보기 |
119+
| `pnpm lint` | ESLint 검사 |
120+
| `pnpm type-check` | TypeScript 타입 검사 |
119121

120122
## 글 작성
121123

‎docs/admin.md‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ GitHub OAuth로 로그인한 관리자가 블로그 페이지 안에서 글의 *
3838
## 2. Cloudflare Worker 배포 (`oauth-proxy/`)
3939

4040
```bash
41-
cd oauth-proxy
42-
npm install
43-
npx wrangler login # 최초 1회
41+
pnpm install --frozen-lockfile
42+
pnpm --dir oauth-proxy exec wrangler login # 최초 1회
4443

4544
# 시크릿 주입
46-
npx wrangler secret put GITHUB_CLIENT_ID # 위에서 받은 Client ID
47-
npx wrangler secret put GITHUB_CLIENT_SECRET # 위에서 받은 Client Secret
45+
pnpm --dir oauth-proxy exec wrangler secret put GITHUB_CLIENT_ID # 위에서 받은 Client ID
46+
pnpm --dir oauth-proxy exec wrangler secret put GITHUB_CLIENT_SECRET # 위에서 받은 Client Secret
4847

49-
npm run deploy
48+
pnpm --dir oauth-proxy deploy
5049
```
5150

5251
배포되면 `https://devy-blog-oauth-proxy.<your-subdomain>.workers.dev` 같은 URL이 출력됩니다. 이 URL을 메모하세요.
@@ -72,7 +71,7 @@ VITE_OAUTH_PROXY_URL=https://devy-blog-oauth-proxy.<your-subdomain>.workers.dev
7271
## 4. 빌드 & 배포
7372

7473
```bash
75-
npm run build # /admin, /admin/callback 정적 셸도 함께 프리렌더됨
74+
pnpm build # /admin, /admin/callback 정적 셸도 함께 프리렌더됨
7675
git commit && git push # main 푸시 → GitHub Actions 배포
7776
```
7877

@@ -99,6 +98,6 @@ git commit && git push # main 푸시 → GitHub Actions 배포
9998

10099
```bash
101100
# .env.development 에 client_id / 프록시 URL 채우고
102-
npm run dev
101+
pnpm dev
103102
# OAuth App callback에 http://localhost:5173/admin/callback/ 가 등록되어 있어야 함
104103
```

‎oauth-proxy/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
## 배포
99

1010
```bash
11-
npm install
12-
npx wrangler login
13-
npx wrangler secret put GITHUB_CLIENT_ID
14-
npx wrangler secret put GITHUB_CLIENT_SECRET
15-
npm run deploy
11+
pnpm install --frozen-lockfile
12+
pnpm exec wrangler login
13+
pnpm exec wrangler secret put GITHUB_CLIENT_ID
14+
pnpm exec wrangler secret put GITHUB_CLIENT_SECRET
15+
pnpm deploy
1616
```
1717

1818
## 바인딩

0 commit comments

Comments
 (0)