Skip to content

fix(build): replace tsc-alias to clear unpatched braces advisory - #24

Merged
TheGeniusOfEternity merged 1 commit into
mainfrom
fix/drop-tsc-alias
Oct 3, 2026
Merged

TheGeniusOfEternity merged 1 commit into
mainfrom
fix/drop-tsc-alias

Conversation

@TheGeniusOfEternity

Copy link
Copy Markdown
Owner

Why

CI started failing on every branch (e.g. #21) at the last step, npm audit --audit-level=high. A new high-severity advisory for braces (GHSA-vfj7-8cjw-p6xm, stack exhaustion on deeply nested patterns) affects all versions ≤ 3.0.3, and there is no patched release. The only path to it was the server's build-time dev dependency tsc-alias (→ chokidar / globby → micromatch → braces). It never runs in production, but the CI policy is strict and there's no fix to upgrade to.

What

  • Removed tsc-alias. server/scripts/resolve-aliases.mjs (~50 lines) does the one thing we used it for: it rewrites @server/* and @shared/* specifiers in server/dist to relative paths (static, re-export and dynamic import()).
  • npm audit fix for two other advisories published since: brace-expansion (high) and ip-address (moderate).
  • ESLint: node globals for server/scripts/*.mjs.

Test plan

  • npm run build -w server: 22 files rewritten, 0 aliases left in dist, server/dist/src/app.js loads
  • typecheck:api passes (Vercel handlers resolve against the rewritten dist)
  • Unit tests for the rewrite (nested paths, same directory, dynamic import, non-alias imports untouched)
  • npm audit --audit-level=high: 0 vulnerabilities; format:check, lint, typecheck, test, build

After merge I'll merge main into the open grid-refactor PRs (#21–#23) so their CI goes green.

tsc-alias pulled in braces@3.0.3 (via chokidar and globby), which has a
high-severity advisory with no patched release (GHSA-vfj7-8cjw-p6xm), so
npm audit --audit-level=high failed CI on every branch.

- server/scripts/resolve-aliases.mjs rewrites @server/* and @shared/*
  imports in dist to relative paths (tested)
- npm audit fix for brace-expansion and ip-address
@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
widgecode Ignored Ignored Oct 3, 2026 3:20pm UTC

@TheGeniusOfEternity
TheGeniusOfEternity merged commit 6783a3c into main Oct 3, 2026
3 checks passed
@TheGeniusOfEternity
TheGeniusOfEternity deleted the fix/drop-tsc-alias branch October 3, 2026 15:27
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.

1 participant