fix(build): unblock mvn test — tsconfig baseUrl + frontend.skip (RAN-27)#66
Merged
Conversation
…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>
3 tasks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
"baseUrl": "."fromsrc/main/frontend/tsconfig.json. TS 5.7 emits TS5101 on this option, which abortstsc -binside frontend-maven-plugin'snpm-buildand fails everymvn test/mvn packagerun. Since TS 4.1,pathsresolves relative to tsconfig's own directory, so the existing@/* → ./src/*alias keeps working (Vite already aliases it viavite.config.ts).frontend.skipproperty (defaultfalse) and wire<skip>${frontend.skip}</skip>into the plugin-level<configuration>offrontend-maven-plugin. Backend-only contributors can now runmvn test -Dfrontend.skip=trueand 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=trueshort-circuits all threefrontend-maven-pluginexecutions → BUILD SUCCESS (verified locally on this branch).tsc -bno longer errors onbaseUrl(confirmed on PR fix(frontend): drop deprecated tsconfig baseUrl (RAN-11) #64 CI using the same tsconfig change).buildjob green on this branch.🤖 Generated with Claude Code