Skip to content

fix(build): unblock mvn test — tsconfig baseUrl + frontend.skip (RAN-27)#66

Merged
aksOps merged 1 commit into
mainfrom
fix/ran-27-frontend-skip-flag
Apr 25, 2026
Merged

fix(build): unblock mvn test — tsconfig baseUrl + frontend.skip (RAN-27)#66
aksOps merged 1 commit into
mainfrom
fix/ran-27-frontend-skip-flag

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented Apr 24, 2026

Summary

  • Drop "baseUrl": "." from src/main/frontend/tsconfig.json. TS 5.7 emits TS5101 on this option, which aborts tsc -b inside frontend-maven-plugin's npm-build and fails every mvn test / mvn package run. Since TS 4.1, paths resolves relative to tsconfig's own directory, so the existing @/* → ./src/* alias keeps working (Vite already aliases it via vite.config.ts).
  • Add a frontend.skip property (default false) and wire <skip>${frontend.skip}</skip> into the plugin-level <configuration> of frontend-maven-plugin. Backend-only contributors can now run mvn test -Dfrontend.skip=true and bypass the entire npm toolchain.

Context

Supersedes PR #64 (fix/ran11-tsconfig-baseurl) which contained only the tsconfig piece. RAN-27 is the same blocker plus the ergonomic escape hatch.

Closes RAN-27. Subsumes RAN-11.

Test plan

  • mvn test -Dfrontend.skip=true short-circuits all three frontend-maven-plugin executions → BUILD SUCCESS (verified locally on this branch).
  • Without skip, tsc -b no longer errors on baseUrl (confirmed on PR fix(frontend): drop deprecated tsconfig baseUrl (RAN-11) #64 CI using the same tsconfig change).
  • CI build job green on this branch.

🤖 Generated with Claude Code

…ip (RAN-27)

Two related fixes so `mvn test` / `mvn package` run green from a clean
checkout:

1. src/main/frontend/tsconfig.json: remove `"baseUrl": "."`.
   TypeScript 5.7 emits TS5101 (`Option 'baseUrl' is deprecated and
   will stop functioning in TypeScript 7.0`), which aborts `tsc -b`
   inside frontend-maven-plugin's `npm-build` execution and kills
   every Maven build.  Since TS 4.1, `paths` resolves relative to
   the tsconfig's own location, so the existing `"@/*": ["./src/*"]`
   mapping keeps working untouched — and Vite already resolves the
   same alias via `resolve.alias` in `vite.config.ts`.

2. pom.xml: add a `<frontend.skip>` property (default `false`) and
   wire `<skip>${frontend.skip}</skip>` into the frontend-maven-plugin
   configuration.  Backend-only contributors can now run
   `mvn test -Dfrontend.skip=true` and bypass the npm toolchain
   entirely while CI and release builds continue to bundle the SPA.

Acceptance
- `mvn test` green from a clean checkout on main
- `mvn test -Dfrontend.skip=true` skips the npm executions (verified
  locally: all three executions short-circuit, BUILD SUCCESS)
- `npm run build` under `src/main/frontend/` no longer errors on
  TS5101 (the previously blocking diagnostic)

Subsumes RAN-11 / PR #64 (same tsconfig change) and is the complete
fix for the blocker.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@sonarqubecloud
Copy link
Copy Markdown

@aksOps aksOps merged commit eb05201 into main Apr 25, 2026
8 checks passed
@aksOps aksOps deleted the fix/ran-27-frontend-skip-flag branch April 25, 2026 13:19
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