Skip to content

Commit eb05201

Browse files
fix(build): unblock mvn test — drop tsconfig baseUrl, add frontend.skip (RAN-27) (#66)
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>
1 parent d3692cd commit eb05201

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
<owasp.dependency-check.version>12.2.0</owasp.dependency-check.version>
3131
<checkstyle-plugin.version>3.6.0</checkstyle-plugin.version>
3232

33+
<!--
34+
Toggle for the frontend-maven-plugin. Defaults to false so
35+
`mvn package` still bundles the React SPA. Backend-only
36+
contributors can bypass the npm build with:
37+
mvn test -Dfrontend.skip=true
38+
-->
39+
<frontend.skip>false</frontend.skip>
40+
3341
<!--
3442
Security override: Spring Boot 4.0.5 pulls tomcat-embed-core 11.0.20
3543
and jackson (tools.jackson.core) 3.1.0; both have CVEs fixed in the
@@ -246,6 +254,7 @@
246254
<configuration>
247255
<workingDirectory>src/main/frontend</workingDirectory>
248256
<nodeVersion>v20.11.0</nodeVersion>
257+
<skip>${frontend.skip}</skip>
249258
</configuration>
250259
<executions>
251260
<execution>

src/main/frontend/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"noImplicitReturns": true,
1818
"noFallthroughCasesInSwitch": true,
1919
"forceConsistentCasingInFileNames": true,
20-
"baseUrl": ".",
2120
"paths": {
2221
"@/*": ["./src/*"]
2322
}

0 commit comments

Comments
 (0)