Skip to content

修复 main 上 CI 失败:部署脚本测试在 runner 上解析 JSON 出错 + react-router 审计告警 - #121

Merged
todosdev[bot] merged 1 commit into
mainfrom
tds/conv-01a14a1e-41ef-7208-a9f0-68733bce0c22
Oct 17, 2026
Merged

todosdev[bot] merged 1 commit into
mainfrom
tds/conv-01a14a1e-41ef-7208-a9f0-68733bce0c22

Conversation

@todosdev

@todosdev todosdev Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix the Test deploy scripts CI failure: pnpm exec wrangler d1 execute --local --json emitted non-JSON lines (Already up to date / Done in … using pnpm) to stdout on the runner, corrupting the JSON parsed by the test and d1_query. Root cause is pnpm 11's default verify-deps-before-run=install, not wrangler itself.
  • Resolve the failing pnpm audit by bumping react-router-dom to ^7.18.2 (resolves 7.18.4), clearing 2 high + 3 moderate advisories.
  • Make the audit job blocking again now that those advisories are gone.

Changes

  • .github/scripts/test-d1-migrations.mjs — set pnpm_config_verify_deps_before_run=false in the fixture env so pnpm exec wrangler no longer runs a deps-check install and pollutes stdout. Production deploy scripts (d1-prepare-migrations.sh / d1-prefixed-migrations.sh, --remote path) run from apps/worker with deps in sync, so they are unaffected (already proven by Deploy #183).
  • apps/web/package.json / pnpm-lock.yaml — react-router-dom ^7.0.0 → ^7.18.2 (lockfile resolves 7.18.4).
  • .github/workflows/ci.yml — remove continue-on-error: true from the audit job, per the original chore(deps): update dependency wrangler to v4.84.1 #3 intent to make it blocking once the react-router advisories were resolved.

Testing

  • node --test .github/scripts/test-d1-migrations.mjs .github/scripts/test-deploy-checks.mjs — 17/17 pass locally (macOS).
  • Reproduced the failure and verified the fix in a Linux container (node 24 + pnpm 11.8.0): 7/7 D1 tests pass after the change.
  • pnpm audit --prod --audit-level=high → "No known vulnerabilities found".
  • pnpm check / pnpm typecheck / pnpm build all pass.

- disable pnpm's verify-deps-before-run in the D1 migration test so
  `pnpm exec wrangler --json` no longer prints "Already up to date" /
  "Done in ... using pnpm" to stdout and corrupts the JSON
- bump react-router-dom to ^7.18.2 (resolves 7.18.4), clearing the two
  high and three moderate advisories
- make the dependency-audit job blocking now that the advisories are resolved

Checkpoint: bphcfujQfhRLfAF6R3vVx
@todosdev
todosdev Bot merged commit a9bd5c6 into main Oct 17, 2026
4 checks passed
@mapxn
mapxn deleted the tds/conv-01a14a1e-41ef-7208-a9f0-68733bce0c22 branch October 18, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants