diff --git a/.npmrc b/.npmrc index 34b5602..5a03cc3 100644 --- a/.npmrc +++ b/.npmrc @@ -1,16 +1,41 @@ -# 1. 強制檢查 Node 版本 -engine-strict=true +# 指定下載來源 +registry=https://registry.npmjs.org/ -# 2. 自動安裝 Peer Dependencies -auto-install-peers=true - -# 3. 提升特定套件 (選配) -# 如果遇到某些舊套件找不到 Vue 或 Vuetify,開啟這個可以模擬 npm 的扁平化結構 -# shamefully-hoist=true - -# 4. 鎖定版本 (如果您希望版本極度穩定) +# 自動儲存精確版本號 (不帶 ^ 或 ~),避免版本漂移 # save-exact=true -# 5. 針對 WSL 的優化 (選配) -# 如果您在 WSL 存取 Windows 磁碟區(如 /mnt/c)時遇到權限問題,可以開啟 -# node-linker=hoisted +# 安全防禦:禁止安裝發布未滿 7 天的套件 (預防供應鏈攻擊) +# npm v11.10+ +min-release-age=7 +# pnpm +minimum-release-age=10080 + +# 嚴格版本檢查:若 Node 或 pnpm 版本不符 package.json 定義則報錯 +# engine-strict=true + +# 讓 pnpm 自動安裝缺失的 peer dependencies,減少手動維護的負擔 +auto-install-peers=true + +# 效能優化:讓 pnpm 盡可能解析出唯一的依賴版本 +resolution-mode=highest + +# ========================================== +# 團隊協作規範 +# ========================================== +# 當 Lockfile 有變動但未對應安裝時,在 CI 環境直接報錯 +# frozen-lockfile=true + +# ========================================== +# Monorepo 結構與依賴管理 +# ========================================== +# 強制使用 workspace: 協議,確保子專案互相引用時是指向原始碼而非 npm 上的版本 +# save-workspace-protocol=true + +# 禁止子專案之間出現循環依賴,避免構建時陷入死循環 +# disallow-workspace-cycles=true + +# 從根目錄解析 peerDependencies,確保全專案的 peer 依賴版本統一,減少重複打包 +# resolve-peers-from-workspace-root=true + +# 執行遞迴指令 (pnpm -r) 時包含根目錄 (適用於根目錄有腳本或工具時) +# include-workspace-root=true diff --git a/src/components/maint/EditableGrid.vue b/src/components/maint/EditableGrid.vue index ec70d26..981ac7e 100644 --- a/src/components/maint/EditableGrid.vue +++ b/src/components/maint/EditableGrid.vue @@ -85,15 +85,16 @@
+
@@ -330,7 +373,7 @@