Skip to content

Conversation

@N6REJ
Copy link
Collaborator

@N6REJ N6REJ commented Aug 21, 2025

PR Type

Enhancement


Description

  • Archive old Node.js releases (18.8.0, 18.9.1)

  • Add new Node.js versions (22.18.0, 24.6.0)

  • Update bundle release to 2025.8.21

  • Fix ignored file formatting issues


Diagram Walkthrough

flowchart LR
  A["Old Releases"] -- "Archive" --> B["bin/archived/"]
  C["New Versions"] -- "Add" --> D["bin/nodejs22.18.0/"]
  C -- "Add" --> E["bin/nodejs24.6.0/"]
  F["Bundle Config"] -- "Update" --> G["2025.8.21"]
Loading

File Walkthrough

Relevant files
Formatting
4 files
launch.bat
Fix line ending formatting                                                             
+11/-11 
launch.bat
Fix line ending formatting                                                             
+11/-11 
.npmignore
Fix empty file formatting                                                               
+1/-1     
.npmignore
Fix empty file formatting                                                               
+1/-1     
Enhancement
2 files
launch.bat
Add Node.js 22.18.0 launch script                                               
+12/-0   
launch.bat
Add Node.js 24.6.0 launch script                                                 
+12/-0   
Configuration changes
12 files
bearsampp.conf
Add Node.js 22.18.0 configuration                                               
+8/-0     
npmrc
Add npm configuration for 22.18.0                                               
+4/-0     
npmrc.ber
Add backup npm configuration for 22.18.0                                 
+4/-0     
npmrc
Add npm module configuration for 22.18.0                                 
+1/-0     
npmrc.ber
Add backup npm module config for 22.18.0                                 
+1/-0     
bearsampp.conf
Add Node.js 24.6.0 configuration                                                 
+8/-0     
npmrc
Add npm configuration for 24.6.0                                                 
+4/-0     
npmrc.ber
Add backup npm configuration for 24.6.0                                   
+4/-0     
npmrc
Add npm module configuration for 24.6.0                                   
+1/-0     
npmrc.ber
Add backup npm module config for 24.6.0                                   
+1/-0     
build.properties
Update bundle release to 2025.8.21                                             
+1/-1     
releases.properties
Add download URLs for new versions                                             
+2/-0     
Additional files
101 files
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
launch.bat [link]   
npmrc [link]   
npmrc.ber [link]   
bearsampp.conf [link]   
.npmignore [link]   
npmrc [link]   
npmrc.ber [link]   
Additional files not shown

@N6REJ N6REJ added the enhancement ✨ Improve program label Aug 21, 2025
@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Aug 21, 2025

PR Reviewer Guide 🔍

(Review updated until commit 4d78995)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Hardcoded Paths

The npmrc files use hardcoded versioned paths; ensure tooling updates these when switching versions to prevent config drift or broken global prefix/globalconfig resolution.

cache = ~BEARSAMPP_WIN_PATH~\tmp\npm-cache
globalconfig = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.18.0\etc\npmrc
init-module = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.18.0\etc\.npm-init.js
userconfig = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.18.0\etc\npmrc
Hardcoded Paths

Same concern with version-specific absolute paths which can become stale; verify templates or build scripts replace these consistently across .ber and non-.ber files.

cache = ~BEARSAMPP_WIN_PATH~\tmp\npm-cache
globalconfig = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs24.6.0\etc\npmrc
init-module = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs24.6.0\etc\.npm-init.js
userconfig = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs24.6.0\etc\npmrc
URL/Version Consistency

Validate the newly added release URLs are reachable and checksums/process expect the 2025.8.21 tag and filename pattern; mismatch would break automated downloads.

22.18.0 = https://github.com/Bearsampp/module-nodejs/releases/download/2025.8.21/bearsampp-nodejs-22.18.0-2025.8.21.7z
23.1.0 = https://github.com/Bearsampp/module-nodejs/releases/download/2024.11.1/bearsampp-nodejs-23.1.0-2024.11.1.7z
23.3.0 = https://github.com/Bearsampp/module-nodejs/releases/download/2024.12.1/bearsampp-nodejs-23.3.0-2024.12.1.7z
23.6.1 = https://github.com/Bearsampp/module-nodejs/releases/download/2025.1.23/bearsampp-nodejs-23.6.1-2025.1.23.7z

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Aug 21, 2025

PR Code Suggestions ✨

Latest suggestions up to 4d78995
Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Halt on nodevars failure

Use command chaining that stops on failure to avoid running npm config if
nodevars.bat fails. This prevents misconfiguration and provides a clear error
path.

bin/nodejs22.18.0/launch.bat [10]

-"%BEARSAMPP_NODEJS_PATH%\nodevars.bat" & "%BEARSAMPP_NODEJS_PATH%\npm" config set globalconfig "%BEARSAMPP_NODEJS_CONFIG_PATH%" --global
+"%BEARSAMPP_NODEJS_PATH%\nodevars.bat" && "%BEARSAMPP_NODEJS_PATH%\npm" config set globalconfig "%BEARSAMPP_NODEJS_CONFIG_PATH%" --global || EXIT /B 1

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly proposes changing the command separator from & to && to prevent the npm command from running if nodevars.bat fails, which improves the script's robustness and error handling.

Medium
Conditional chaining with exit

Ensure the npm configuration step only runs if environment setup succeeds by
using '&&' and exit on error. This avoids partial or incorrect global npm config
when prerequisites fail.

bin/nodejs24.6.0/launch.bat [10]

-"%BEARSAMPP_NODEJS_PATH%\nodevars.bat" & "%BEARSAMPP_NODEJS_PATH%\npm" config set globalconfig "%BEARSAMPP_NODEJS_CONFIG_PATH%" --global
+"%BEARSAMPP_NODEJS_PATH%\nodevars.bat" && "%BEARSAMPP_NODEJS_PATH%\npm" config set globalconfig "%BEARSAMPP_NODEJS_CONFIG_PATH%" --global || EXIT /B 1

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly proposes changing the command separator from & to && to prevent the npm command from running if nodevars.bat fails, which improves the script's robustness and error handling.

Medium
General
Guard npm after setup

For safety in archived scripts too, prevent npm from running when nodevars fails
by using '&&' and propagate errors with a non-zero exit code. This keeps
archived launchers consistent and reliable.

bin/archived/nodejs18.9.1/launch.bat [10]

-"%BEARSAMPP_NODEJS_PATH%\nodevars.bat" & "%BEARSAMPP_NODEJS_PATH%\npm" config set globalconfig "%BEARSAMPP_NODEJS_CONFIG_PATH%" --global
+"%BEARSAMPP_NODEJS_PATH%\nodevars.bat" && "%BEARSAMPP_NODEJS_PATH%\npm" config set globalconfig "%BEARSAMPP_NODEJS_CONFIG_PATH%" --global || EXIT /B 1

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly proposes changing the command separator from & to && to prevent the npm command from running if nodevars.bat fails, which improves the script's robustness and error handling, even for an archived version.

Medium
  • More

Previous suggestions

✅ Suggestions up to commit 0f1d310
CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix incorrect prefix path
Suggestion Impact:The commit updated the prefix path to nodejs22.18.0 exactly as suggested.

code diff:

@@ -1 +1 @@
-prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.17.0\
+prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.18.0\

The prefix points to nodejs22.17.0, which mismatches the new version directory
nodejs22.18.0. Update it to avoid writing global installs to the wrong path.

bin/nodejs22.18.0/node_modules/npm/npmrc [1]

-prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.17.0\
+prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.18.0\
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical configuration error where the prefix path points to the wrong Node.js version, which would cause incorrect behavior.

High
Align backup prefix path
Suggestion Impact:The commit updated the prefix path in the backup npmrc from 22.17.0 to 22.18.0 exactly as suggested.

code diff:

@@ -1 +1 @@
-prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.17.0\
+prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.18.0\

The backup npmrc mirrors the same incorrect prefix. Align it with the 22.18.0
directory to keep configurations consistent and prevent misrouting installs.

bin/nodejs22.18.0/node_modules/npm/npmrc.ber [1]

-prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.17.0\
+prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs22.18.0\
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical configuration error in a backup file, ensuring consistency and preventing issues if the backup is used.

High
Update prefix to new version
Suggestion Impact:The commit updated the prefix path to reference nodejs24.6.0 exactly as suggested.

code diff:

@@ -1 +1 @@
-prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs24.3.0\
+prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs24.6.0\

The prefix still references nodejs24.3.0. Update it to 24.6.0 so global package
installs target the correct new version directory.

bin/nodejs24.6.0/node_modules/npm/npmrc [1]

-prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs24.3.0\
+prefix = ~BEARSAMPP_WIN_PATH~\bin\nodejs\nodejs24.6.0\
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical configuration error where the prefix path points to the wrong Node.js version, which would cause incorrect behavior.

High

@jwaisner jwaisner merged commit 0919dd9 into main Aug 22, 2025
@jwaisner jwaisner deleted the archived branch August 22, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ Improve program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants