1
0
forked from baron/baron-sso

fix(adminfront): fix TS error and CI dependency resolution

- Fix 'unknown' to 'string' type mismatch in UserBulkUploadModal.tsx
- Update CI script to install from workspace root (common) for proper dependency resolution
- Use 'env CI=true' for better shell compatibility
This commit is contained in:
2026-05-27 14:44:25 +09:00
parent dda1df9c48
commit e09e83351e
2 changed files with 12 additions and 8 deletions

View File

@@ -196,12 +196,17 @@ fi
set +e
(
cd "$tmp_dir/adminfront"
# [Fix] Dependency resolution fails when installing from sub-app in isolated CI.
# We must install from the workspace root (common) and ensure the workspace config
# only points to available directories (adminfront & common).
cd "$tmp_dir/common"
echo "packages: ['.', '../adminfront']" > pnpm-workspace.yaml
if [ "$reuse_seed_node_modules" -eq 0 ]; then
if ! command -v pnpm >/dev/null 2>&1; then
run_with_retry 3 npm install -g pnpm
fi
run_with_retry 3 CI=true pnpm install -C ../common --no-frozen-lockfile --store-dir "$pnpm_store_dir"
run_with_retry 3 env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist --store-dir "$pnpm_store_dir"
fi
) 2>&1 | tee reports/adminfront-install.log
install_exit_code=${PIPESTATUS[0]}
@@ -217,7 +222,7 @@ if [ "$install_exit_code" -ne 0 ]; then
echo "- Exit Code: \`$install_exit_code\`"
echo
echo "## Command"
echo "\`cd adminfront && if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install -C ../common --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`"
echo "\`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`"
echo
echo "## Install Log Tail (last 200 lines)"
echo '```text'
@@ -283,10 +288,9 @@ if [ "$test_exit_code" -ne 0 ]; then
echo "- Exit Code: \`$test_exit_code\`"
echo
echo "## Commands"
echo "1. \`cd adminfront\`"
echo "2. \`if [ \"$reuse_seed_node_modules\" -eq 0 ]; then if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm; fi && pnpm install -C ../common --no-frozen-lockfile --store-dir \"\$TMPDIR/pnpm-store\"; fi\`"
echo "3. \`${playwright_install_desc}\`"
echo "4. \`npx playwright test\`"
echo "1. \`cd common && echo \"packages: ['.', '../adminfront']\" > pnpm-workspace.yaml && env CI=true pnpm install --no-frozen-lockfile --shamefully-hoist\`"
echo "2. \`${playwright_install_desc}\`"
echo "3. \`pnpm exec playwright test\`"
echo
echo "## Log Tail (last 200 lines)"
echo '```text'