sh-ui-cli 0.59.8 → 0.59.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$description": "sh-ui 릴리즈 노트 단일 소스. docs(React)와 showcase(Flutter)가 함께 읽는다. 새 릴리즈마다 맨 앞에 추가.",
|
|
4
4
|
"versions": [
|
|
5
|
+
{
|
|
6
|
+
"version": "0.59.9",
|
|
7
|
+
"date": "2026-05-06",
|
|
8
|
+
"title": "fix — next-intl standalone 빌드 (globals.css 상대 경로 보정)",
|
|
9
|
+
"type": "patch",
|
|
10
|
+
"highlights": [
|
|
11
|
+
"**`sh-ui-cli create --plugins next-intl --structure standalone` prod 빌드 폭발 수정** — next-intl 플러그인이 `app/layout.tsx` 를 `app/[locale]/layout.tsx` 로 이동하면서 보존하는 side-effect import (`import './globals.css';`) 의 상대 경로를 보정하지 않아, 한 단계 깊어진 새 위치에서 `./globals.css` 가 미해결 모듈이 됐다. `pnpm build` (`next build`) 가 `Module not found: Can't resolve './globals.css'` 로 실패.",
|
|
12
|
+
"**경로 보정** — `nextIntl.js` 의 `contentFn` 에서 보존되는 side-effect import 의 `./` / `../` 접두사를 디렉토리 깊이 변화(1단계)만큼 끌어올림. 절대 경로(`/x`) 와 모듈명(`polyfills`) 은 그대로.",
|
|
13
|
+
"**회귀 가드 강화** — smoke 시나리오 3 의 globals.css 검사가 `/[^'\"]*globals\\.css/` 단순 존재만 봤어서 v0.59.8 까지 누락. `import '../globals.css';` 정확 매치 + `import './globals.css';` 부재로 강화.",
|
|
14
|
+
"**전수 검증** — 36-combo 스캐폴드 매트릭스(structure × arch × css × plugins) 의 standalone+all-plugins 6 케이스 모두 fix 후 prod 빌드 성공 확인. monorepo+all-plugins 는 원래부터 정상."
|
|
15
|
+
],
|
|
16
|
+
"url": "https://github.com/sanghyeonKim0201/sh-ui/releases/tag/v0.59.9"
|
|
17
|
+
},
|
|
5
18
|
{
|
|
6
19
|
"version": "0.59.8",
|
|
7
20
|
"date": "2026-05-06",
|
package/package.json
CHANGED
|
@@ -64,12 +64,20 @@ export const nextIntlPlugin = {
|
|
|
64
64
|
// side-effect import (`import 'x';` 형태, binding 없음) 만 보존하고 나머지는 통째 교체.
|
|
65
65
|
// 이름 있는 import (예: `import { RootLayout } from ...`) 는 새 본체와 식별자 충돌 가능성이
|
|
66
66
|
// 있어 제외.
|
|
67
|
+
//
|
|
68
|
+
// 경로 보정: 파일이 `app/layout.tsx` → `app/[locale]/layout.tsx` 로 1단계 깊어졌으므로
|
|
69
|
+
// 보존된 side-effect import 의 상대 경로(`./x` / `../x`)는 `../` 한 번만큼 더 위로 끌어올린다.
|
|
70
|
+
// 절대 경로(`/x`)나 모듈명(`polyfills`)은 그대로. v0.59.8 까지는 보정이 빠져 standalone+next-intl
|
|
71
|
+
// 조합에서 `./globals.css` 가 깨졌고 prod 빌드가 실패했다.
|
|
67
72
|
type: 'replace',
|
|
68
73
|
path: 'app/[locale]/layout.tsx',
|
|
69
74
|
contentFn: (existing) => {
|
|
75
|
+
const adjustRelative = (line) =>
|
|
76
|
+
line.replace(/(['"])(\.\.?\/)/g, (_m, q, prefix) => `${q}../${prefix === './' ? '' : prefix}`);
|
|
70
77
|
const sideEffectImports = existing
|
|
71
78
|
.split('\n')
|
|
72
79
|
.filter((line) => /^\s*import\s+['"][^'"]+['"];?\s*$/.test(line))
|
|
80
|
+
.map(adjustRelative)
|
|
73
81
|
.join('\n');
|
|
74
82
|
const body = `import type { Metadata } from 'next';
|
|
75
83
|
import { RootLayout } from '${arch.aliases.layouts}/RootLayout';
|