You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces several significant updates across the
codebase, primarily focused on modernizing the Node.js environment,
allow code sharing between backend and UI, improving TypeScript usage,
and enhancing import consistency. The most notable changes include
upgrading to Node.js 22, transitioning all imports to use explicit `.ts`
extensions and more precise type-only imports, and updating workflow and
configuration files to align with these changes.
**Node.js and Tooling Upgrades:**
* Upgraded Node.js version from 20 to 22 in both the GitHub Actions
workflow (`.github/workflows/test-application.yml`) and `.nvmrc`,
ensuring the project uses the latest LTS features and performance
improvements.
[[1]](diffhunk://#diff-9261914205164383e5e6930bef1909548ba0acc9cd1a241217e88b8dbb730894L21-R21)
[[2]](diffhunk://#diff-2c8effdf840690ccb88c7e21e56148978c6adb2c6926530c58ff0e47a9588b44L1-R1)
* Updated the workflow to build the backend before starting it, and
adjusted process checks and log outputs to match the new start command.
[[1]](diffhunk://#diff-9261914205164383e5e6930bef1909548ba0acc9cd1a241217e88b8dbb730894L84-R85)
[[2]](diffhunk://#diff-9261914205164383e5e6930bef1909548ba0acc9cd1a241217e88b8dbb730894R95-R108)
**TypeScript and Import Improvements:**
* Converted all internal imports to use explicit `.ts` extensions and
transitioned to type-only imports where appropriate, improving type
safety and compatibility with ES module standards. This affects nearly
all files in the `api/` directory, including `app.ts`,
`config/store.ts`, `lib/Gateway.ts`, and others.
[[1]](diffhunk://#diff-fe6a6140f19ab1b0dd1e7eac27de4a8366de9b7c0da27d292f99ba219e5a3e97L1-R31)
[[2]](diffhunk://#diff-fe6a6140f19ab1b0dd1e7eac27de4a8366de9b7c0da27d292f99ba219e5a3e97L35-R53)
[[3]](diffhunk://#diff-2abb3e2a5c46a2bdec870296307cc957672d574ee97c5c148d9947d3ea9fef1fL3-R7)
[[4]](diffhunk://#diff-3e2f08e1ca9a7cf0505f53c191827d903a5b7c23e37099590645c0fe8b34e7a0L1-R30)
[[5]](diffhunk://#diff-529b5159720cb6dfa3c4cbdc74cbd4e926b9d4b2ec1f861db52e4464c40dcdbcL1-R4)
[[6]](diffhunk://#diff-1181514579645f4a4c65086a3f127004ab212aa1aa37c9b66be0ab1b1e3b8e38L3-R23)
[[7]](diffhunk://#diff-9e87e739e41326d30862db11b85ba2fcbdfd938fd95aa1ff4be27b2e12ba83f9L3-R8)
[[8]](diffhunk://#diff-89d06f80641536a8b9d0cfc838a6f1528505040ed8509ad4809caf44d0c0114eR1-R20)
[[9]](diffhunk://#diff-21e7a2e7559aeee5103b6ea891ae6bdd44cda13256496671cd9b0a349a7ab0fbR1-L85)
[[10]](diffhunk://#diff-1ddaf3ef24f2e86d72fe6c6a971f5a10c696daaf5b3702fa16c110cb12d8001aL1-R8)
[[11]](diffhunk://#diff-5df935e8cb44f1ec7180e734ca106c3d6f5429654d9ccb6537a61f04431bfc76L1-R1)
[[12]](diffhunk://#diff-cce2f94deee2e0540eceb55c4ba5ff08ca38f50568ea2a7eea5b55b5d3804018L4-R4)
[[13]](diffhunk://#diff-fe9fabd25eb368d77a1700a270584d420f2631dcbdd691c29638683cc9456244L3-R3)
**Configuration and Linting Updates:**
* Changed `.prettierrc.js` to use ES module export syntax, aligning with
modern JavaScript module standards.
* Removed the `watch-files` option from `.mocharc.yml`, possibly to
streamline or fix test runner behavior.
**Codebase Consistency and Minor Fixes:**
* Standardized usage of Node.js built-in modules by using the `node:`
prefix (e.g., `node:fs`, `node:path`) across the codebase.
[[1]](diffhunk://#diff-fe6a6140f19ab1b0dd1e7eac27de4a8366de9b7c0da27d292f99ba219e5a3e97L1-R31)
[[2]](diffhunk://#diff-3e2f08e1ca9a7cf0505f53c191827d903a5b7c23e37099590645c0fe8b34e7a0L1-R30)
[[3]](diffhunk://#diff-1181514579645f4a4c65086a3f127004ab212aa1aa37c9b66be0ab1b1e3b8e38L3-R23)
[[4]](diffhunk://#diff-89d06f80641536a8b9d0cfc838a6f1528505040ed8509ad4809caf44d0c0114eR1-R20)
[[5]](diffhunk://#diff-1ddaf3ef24f2e86d72fe6c6a971f5a10c696daaf5b3702fa16c110cb12d8001aL1-R8)
* Added or updated utility exports and constants, such as introducing
`deviceConfigPriorityDir` in `Constants.ts` and updating its usage in
`config/store.ts`.
[[1]](diffhunk://#diff-6e3049fb752155a398da8d028881cd4e16401429ba95c63cb9ccfba85e071d79R48-R49)
[[2]](diffhunk://#diff-2abb3e2a5c46a2bdec870296307cc957672d574ee97c5c148d9947d3ea9fef1fL3-R7)
These changes collectively modernize the codebase, improve
maintainability, and ensure compatibility with the latest Node.js and
TypeScript features.
**References:**
[[1]](diffhunk://#diff-9261914205164383e5e6930bef1909548ba0acc9cd1a241217e88b8dbb730894L21-R21)
[[2]](diffhunk://#diff-2c8effdf840690ccb88c7e21e56148978c6adb2c6926530c58ff0e47a9588b44L1-R1)
[[3]](diffhunk://#diff-9261914205164383e5e6930bef1909548ba0acc9cd1a241217e88b8dbb730894L84-R85)
[[4]](diffhunk://#diff-9261914205164383e5e6930bef1909548ba0acc9cd1a241217e88b8dbb730894R95-R108)
[[5]](diffhunk://#diff-fe6a6140f19ab1b0dd1e7eac27de4a8366de9b7c0da27d292f99ba219e5a3e97L1-R31)
[[6]](diffhunk://#diff-fe6a6140f19ab1b0dd1e7eac27de4a8366de9b7c0da27d292f99ba219e5a3e97L35-R53)
[[7]](diffhunk://#diff-2abb3e2a5c46a2bdec870296307cc957672d574ee97c5c148d9947d3ea9fef1fL3-R7)
[[8]](diffhunk://#diff-3e2f08e1ca9a7cf0505f53c191827d903a5b7c23e37099590645c0fe8b34e7a0L1-R30)
[[9]](diffhunk://#diff-529b5159720cb6dfa3c4cbdc74cbd4e926b9d4b2ec1f861db52e4464c40dcdbcL1-R4)
[[10]](diffhunk://#diff-1181514579645f4a4c65086a3f127004ab212aa1aa37c9b66be0ab1b1e3b8e38L3-R23)
[[11]](diffhunk://#diff-9e87e739e41326d30862db11b85ba2fcbdfd938fd95aa1ff4be27b2e12ba83f9L3-R8)
[[12]](diffhunk://#diff-89d06f80641536a8b9d0cfc838a6f1528505040ed8509ad4809caf44d0c0114eR1-R20)
[[13]](diffhunk://#diff-21e7a2e7559aeee5103b6ea891ae6bdd44cda13256496671cd9b0a349a7ab0fbR1-L85)
[[14]](diffhunk://#diff-1ddaf3ef24f2e86d72fe6c6a971f5a10c696daaf5b3702fa16c110cb12d8001aL1-R8)
[[15]](diffhunk://#diff-5df935e8cb44f1ec7180e734ca106c3d6f5429654d9ccb6537a61f04431bfc76L1-R1)
[[16]](diffhunk://#diff-cce2f94deee2e0540eceb55c4ba5ff08ca38f50568ea2a7eea5b55b5d3804018L4-R4)
[[17]](diffhunk://#diff-fe9fabd25eb368d77a1700a270584d420f2631dcbdd691c29638683cc9456244L3-R3)
[[18]](diffhunk://#diff-7312296367dd7c725b9beb500d7dab7bbeeb2aa03a1010a3fb2935f826d03fa6L1-R1)
[[19]](diffhunk://#diff-751a54bee66ebd0d32763befd5f74abfe8c00f15aeeb61b8509ff3ed8d52ec89L2-L3)
[[20]](diffhunk://#diff-6e3049fb752155a398da8d028881cd4e16401429ba95c63cb9ccfba85e071d79R48-R49)
Fixes#4401
---------
Co-authored-by: Dominic Griesel <[email protected]>
0 commit comments