Skip to content

TD-FE-transpile: add transpilePackages to 8 next.config.ts (RED spec)#127

Merged
a3ka merged 3 commits into
devfrom
feature/TD-FE-transpile
May 3, 2026
Merged

TD-FE-transpile: add transpilePackages to 8 next.config.ts (RED spec)#127
a3ka merged 3 commits into
devfrom
feature/TD-FE-transpile

Conversation

@a3ka
Copy link
Copy Markdown
Contributor

@a3ka a3ka commented May 3, 2026

Why

Pre-existing breakage exposed by PR #99: packages/types/src/index.ts uses .js extension imports (TS NodeNext convention). Next.js webpack does NOT transpile workspace packages by default — fails to resolve ./agent-category.js (actual file: agent-category.ts).

Broke at M-L1-taxonomy merge (commit `120988e`, ~April 30). Last successful landing CI: `f4cefcf` (April 30). Path-filtered landing CI didn't trigger on backend PRs (#118-#125) → silent for 3 days. PR #99 first to touch landing since → CI red → exposes baseline.

Affects all 8 frontend apps' production builds + likely Vercel deploys.

What this PR adds

  • `scripts/verify_TD-FE-transpile.sh` — 17-check acceptance (8 apps × 2 grep checks + 1 landing build smoke)
  • `docs/sprints/TD-FE-transpile.md` — milestone + slim spec for frontend-dev

Готово когда

  • All 8 `apps/frontend/*/next.config.ts` include `transpilePackages: ['@paxio/types', '@paxio/ui', '@paxio/hooks', '@paxio/api-client', '@paxio/auth']`
  • `bash scripts/verify_TD-FE-transpile.sh` PASS=17 FAIL=0
  • `pnpm --filter @paxio/landing-app build` succeeds

Currently RED

Acceptance script: PASS=0 FAIL=17 (no transpilePackages anywhere; landing build fails). Frontend-dev impl per slim spec → GREEN.

Unblocks

PR #99 (M-L10.7.3) — currently blocked by same issue.

🤖 Generated with Claude Code

@a3ka a3ka added the dev-ready Phase 0 APPROVED, dev can start implementation (M-Q2) label May 3, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 3, 2026

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

Project Deployment Actions Updated (UTC)
paxio-docs Canceled Canceled May 3, 2026 4:38pm
paxio-fleet Ready Ready Preview, Comment May 3, 2026 4:38pm
paxio-intel Ready Ready Preview, Comment May 3, 2026 4:38pm
paxio-landing Ready Ready Preview, Comment May 3, 2026 4:38pm
paxio-pay Ready Ready Preview, Comment May 3, 2026 4:38pm
paxio-radar Canceled Canceled May 3, 2026 4:38pm
paxio-registry Ready Ready Preview, Comment May 3, 2026 4:38pm
paxio-wallet Ready Ready Preview, Comment May 3, 2026 4:38pm

Request Review

…* packages

Pre-existing infrastructure debt: packages/types/src/index.ts uses .js
extension imports (TS NodeNext). Next.js webpack does NOT transpile
workspace packages by default — fails to resolve './agent-category.js'
(actual file: agent-category.ts).

Broke at M-L1-taxonomy merge (commit 120988e, ~April 30). Last successful
landing CI: f4cefcf (April 30). Path-filtered landing CI didn't trigger
on backend PRs (#118-#125) → silent for 3 days. PR #99 (M-L10.7.3) is
first PR touching landing since → CI red → exposes baseline.

Affects all 8 frontend apps' production builds + likely silently breaks
their Vercel deploys.

Acceptance script verifies (17 checks):
  1. all 8 apps' next.config.ts have transpilePackages field (8 checks)
  2. transpilePackages includes @paxio/types (8 checks)
  3. landing-app build succeeds (1 smoke check)

Currently RED 0/17 (no transpilePackages in any config; landing-app build
fails on .js resolution). Fix is frontend-dev scope — slim spec in
docs/sprints/TD-FE-transpile.md.
architect and others added 2 commits May 3, 2026 16:31
…ve imports

Architect-scope half of TD-FE-transpile fix. With moduleResolution: "bundler"
in tsconfig.base.json, .js extensions on relative imports are unnecessary
and break Next.js webpack resolution (which can't find ./agent-category.js
when actual file is ./agent-category.ts even with transpilePackages).

12 files in packages/types/src/ — strip .js from re-exports and
type/value imports. tsc with moduleResolution: "bundler" still resolves
correctly. Backend dist/ output (cjs) unaffected — generated .js files
already lack runtime .js suffix (resolved at compile time).

Pre-existing breakage (commit 120988e M-L1-taxonomy, ~April 30):
landing-app build failed because Next.js webpack tried to resolve
./agent-category.js literally. transpilePackages alone (next.config.ts
update by frontend-dev) is insufficient — webpack still treats workspace
package as ESM and fails on extension mismatch.

This commit is the architect half: packages/types/ source rewrite.
Frontend-dev's commit covers the next.config.ts additions.

NOTE: previous frontend-dev attempt (dfd0195) included these architect-zone
changes alongside next.config.ts updates — scope violation per
.claude/rules/scope-guard.md::File Ownership (packages/types/ is
architect-only). Architect rejected that commit and re-authored the
architect half here, preserving frontend-dev's next.config.ts work
in the next commit.

Verified: pnpm typecheck clean.
Each app's next.config.ts now lists @paxio/{types,ui,hooks,api-client,auth}
in transpilePackages. Tells Next.js webpack to transpile workspace packages
through TS bundler resolution before module resolution.

Combined with architect's previous commit (.js extension strip from
packages/types), this fully fixes the M-L1-taxonomy regression that
broke all 8 frontend apps' production builds since April 30.

17/17 acceptance script PASS, landing-app build succeeds.

(Architect re-applied this commit after frontend-dev's original dfd0195
exceeded scope by also touching packages/types/. This commit isolates
ONLY the next.config.ts portion (frontend-dev scope per scope-guard).
Authorship preserved as frontend-dev@paxio.network.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-ready Phase 0 APPROVED, dev can start implementation (M-Q2) spec-ready Triggers spec-review.yml fast-CI gate (M-Q2)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant