WatWowMap / ReactMap

Pokemon GO Map frontend built with React
MIT License
123 stars 62 forks source link

fix(config): Add missing environment variable for devOptions.skipUpdateCheck parameter #1018

Closed wmedlar closed 2 months ago

wmedlar commented 2 months ago

This change adds a missing environment variable for the devOptions.skipUpdateCheck boolean parameter — DEV_OPTIONS_SKIP_UPDATE_CHECK. This option defaults to false, running the update check at boot.

Skipping the update check marginally reduces boot time and prevents a warning message when git is not installed (such as in a minimal container image).

Below is a brief demonstration of the change on a system that does have git installed:

$ npm run server

> reactmap@1.33.0-develop.7 server
> node server/src/index.js

[ ... ]
ℹ 2024-06-15 21:14:32 [API] Loaded users.js
ℹ 2024-06-15 21:14:32 [UPDATE] There is a new version available:   git pull  to update
ℹ 2024-06-15 21:14:32 [UPDATE] Completed
ℹ 2024-06-15 21:14:33 [DB] Determining database types for 2 connections
[ ... ]
$ DEV_OPTIONS_SKIP_UPDATE_CHECK=true npm run server 

> reactmap@1.33.0-develop.7 server
> node server/src/index.js

[...]
ℹ 2024-06-15 21:14:52 [API] Loaded users.js
ℹ 2024-06-15 21:14:54 [DB] Determining database types for 2 connections
[...]
$ DEV_OPTIONS_SKIP_UPDATE_CHECK=false npm run server

> reactmap@1.33.0-develop.7 server
> node server/src/index.js

[...]
ℹ 2024-06-15 21:15:32 [API] Loaded users.js
ℹ 2024-06-15 21:15:32 [UPDATE] There is a new version available:   git pull  to update
ℹ 2024-06-15 21:15:32 [UPDATE] Completed
ℹ 2024-06-15 21:15:33 [DB] Determining database types for 2 connections
[...]
index 4dc24f09..3d9960bd 100644
--- a/server/src/configs/default.json
+++ b/server/src/configs/default.json
@@ -8,8 +8,7 @@
     "graphiql": false,
     "queryDebug": false,
     "logLevel": "info",
-    "skipMinified": false,
-    "skipUpdateCheck": false
+    "skipMinified": false
   },
   "api": {
$ npm run server                                    

> reactmap@1.33.0-develop.7 server
> node server/src/index.js

[ ... ]
ℹ 2024-06-15 21:25:44 [API] Loaded users.js
ℹ 2024-06-15 21:25:45 [UPDATE] There is a new version available:   git pull  to update
ℹ 2024-06-15 21:25:45 [UPDATE] Completed
ℹ 2024-06-15 21:25:45 [DB] Determining database types for 2 connections
[ ... ]
github-actions[bot] commented 1 month ago

:tada: This PR is included in version 1.33.0-develop.9 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: