@qijenchen/design-system 0.1.0-beta.57 → 0.1.0-beta.59
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.
|
@@ -51,7 +51,14 @@ fi
|
|
|
51
51
|
|
|
52
52
|
CWD=$(pwd)
|
|
53
53
|
URLS_FOUND=""
|
|
54
|
-
|
|
54
|
+
# 2026-06-07 ROOT fix:只從「git push ... origin <ref>」這一段擷取 branch,不是整條 compound command 的
|
|
55
|
+
# 第一個 `origin X`。否則 `git fetch origin --quiet && git push origin main` 會誤抓 fetch 段的 `--quiet`
|
|
56
|
+
# 當 branch → 推導 `--quiet--site` 404(此前 5 道 guard 都沒擋到,因 `--quiet` 全是合法 git ref 字元)。
|
|
57
|
+
# 隔出 push 段(到下個 command 分隔 ; & | 為止)後,取 origin 後第一個 token。
|
|
58
|
+
PUSH_SEG=$(echo "$CMD" | grep -oE '(^|[;&|(])[[:space:]]*git[[:space:]]+push[[:space:]][^;&|]*' | head -1)
|
|
59
|
+
BRANCH=$(echo "$PUSH_SEG" | grep -oE 'origin[[:space:]]+[^[:space:]]+' | head -1 | awk '{print $2}')
|
|
60
|
+
# origin 後第一個 token 是 flag(`git push origin --force` = 無顯式 branch)→ 清空走 current-branch fallback
|
|
61
|
+
case "$BRANCH" in -*) BRANCH="" ;; esac
|
|
55
62
|
# 2026-06-06 fix:refspec `src:dst` → 取 dst(`HEAD:main` → `main`),否則推導出 `HEAD:main--site` 404 URL
|
|
56
63
|
case "$BRANCH" in *:*) BRANCH="${BRANCH##*:}" ;; esac
|
|
57
64
|
# 2026-06-06 fix:`git push origin HEAD`(或 `@`)= symbolic ref 指向當前 branch → 解析成真 branch 名,
|
|
@@ -41,6 +41,12 @@ head_leaked() { echo "$STDOUT" | grep -qE 'HEAD(--|:|\))'; }
|
|
|
41
41
|
fn7() { echo "$STDOUT" | grep -q "feature-test" && ! head_leaked; }
|
|
42
42
|
fn8() { ! head_leaked; }
|
|
43
43
|
fn9() { echo "$STDOUT" | grep -q "feature-test"; }
|
|
44
|
+
has_feature() { echo "$STDOUT" | grep -q "feature-test"; }
|
|
45
|
+
no_quiet() { ! echo "$STDOUT" | grep -q -- "--quiet"; }
|
|
46
|
+
fn10() { has_feature && no_quiet; } # compound:fetch 段的 --quiet 不可被誤抓為 branch
|
|
47
|
+
fn11() { has_feature; } # compound:pull 段的 main 不可被誤抓(否則 grep feature-test 失敗)
|
|
48
|
+
fn12() { has_feature; } # bare push origin → fallback current branch
|
|
49
|
+
fn13() { has_feature; } # flag-after-origin → 清空 → fallback current branch
|
|
44
50
|
|
|
45
51
|
check() { # <name> <expect: skip|fire> [extra-assert-fn]
|
|
46
52
|
local name="$1" expect="$2" extra="${3:-}"
|
|
@@ -98,6 +104,23 @@ check "8 refspec HEAD:main → no HEAD leak" fire 'fn8'
|
|
|
98
104
|
run_hook "git add -A && git push origin feature-test"
|
|
99
105
|
check "9 real branch push (positive control) → fire" fire 'fn9'
|
|
100
106
|
|
|
107
|
+
# 10. ROOT regression:compound 命令前段 `git fetch origin --quiet` 的 flag 不可被誤抓為 branch
|
|
108
|
+
# (2026-06-07 anchor:merge 時 `git fetch origin --quiet && ... && git push origin main` 吐 `--quiet--site` 404)
|
|
109
|
+
run_hook "git fetch origin --quiet && git push origin feature-test"
|
|
110
|
+
check "10 compound w/ fetch flag → branch from push seg only (no --quiet leak)" fire 'fn10'
|
|
111
|
+
|
|
112
|
+
# 11. compound 前段 `git pull origin main` 的 main 不可被誤抓(branch 必來自 push 段)
|
|
113
|
+
run_hook "git pull origin main && git push origin feature-test"
|
|
114
|
+
check "11 compound w/ pull → branch from push seg (not pull's main)" fire 'fn11'
|
|
115
|
+
|
|
116
|
+
# 12. bare `git push origin`(無顯式 branch)→ fallback 當前 branch
|
|
117
|
+
run_hook "git push origin"
|
|
118
|
+
check "12 bare push origin → fallback current branch" fire 'fn12'
|
|
119
|
+
|
|
120
|
+
# 13. flag-after-origin `git push origin --force`(無顯式 branch)→ fallback 當前 branch
|
|
121
|
+
run_hook "git push origin --force"
|
|
122
|
+
check "13 flag-after-origin → fallback current branch (no flag-as-branch)" fire 'fn13'
|
|
123
|
+
|
|
101
124
|
teardown
|
|
102
125
|
|
|
103
126
|
echo ""
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
// (per `.claude/rules/story-rules.md`「Production-grade composition fidelity」+ M23(d) nearest-same-purpose canonical wins)
|
|
3
3
|
//
|
|
4
4
|
// @story-baseline: @qijenchen/design-system/components/Sidebar/sidebar.stories.tsx#IconCollapse
|
|
5
|
+
// (2026-06-02 conformance-model:@story-baseline = consume canonical 結構的意圖,由靜態 conformance hook 驗
|
|
6
|
+
// 〔check_consumer_ds_primitive_misuse〔含 Pattern 8〕/ check_layout_space_magic_numbers / check_story_invariants
|
|
7
|
+
// R7+R8〕。舊的 shell-only 視覺 identity-diff 標記已移除(此範本品牌 Acme Product / nav / 內容 by-design
|
|
8
|
+
// 異於 DS demo Acme Inc / MAIN_NAV,連 shell 文字都不同,pixel/DOM identity 即使遮罩內容也必 false-positive,
|
|
9
|
+
// per composition-fidelity.md「禁拿產品範本 pixel 比 showcase」)。注意:此註解刻意不寫可被 diff script regex
|
|
10
|
+
// 解析的標記字面,以免「解釋移除」反而把標記種回去。)
|
|
5
11
|
//
|
|
6
12
|
// SSOT 鐵律:
|
|
7
13
|
// - Consumer 只 import `@qijenchen/design-system` public exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qijenchen/design-system",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.59",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "World-class design system — components, patterns, tokens, hooks (single source of truth for team distribution).",
|
|
6
6
|
"type": "module",
|