-
-
Notifications
You must be signed in to change notification settings - Fork 1
fix: add node version requirement #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| engine-strict=true |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,9 @@ | |||||||||||||
| "htaccess-punk": "bin/htaccess-punk.js" | ||||||||||||||
| }, | ||||||||||||||
| "description": "Redirect checker for .htaccess files", | ||||||||||||||
| "engines" : { | ||||||||||||||
| "node" : ">=14.0.0" | ||||||||||||||
| }, | ||||||||||||||
|
Comment on lines
+7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify runtime APIs used vs declared engine floor.
set -euo pipefail
echo "Declared engines:"
rg -n '"engines"|"node"' package.json -n -A2 -B1
echo
echo "AbortSignal.timeout usage:"
rg -nP '\bAbortSignal\.timeout\s*\(' -g '!**/node_modules/**'
echo
echo "parseArgs/styleText usage:"
rg -nP 'from\s+[\"\x27]node:util[\"\x27]|\\bparseArgs\\s*\\(|\\bstyleText\\s*\\(' -g '!**/node_modules/**'
echo
echo "CI node versions under test:"
rg -n 'node-version|matrix:|node:' .github/workflows -g '*.yml' -g '*.yaml'Repository: j9t/htaccess-punk Length of output: 485 🏁 Script executed: # Check for parseArgs import and usage
echo "=== Checking for parseArgs import ==="
cat -n bin/htaccess-punk.js | head -20
echo -e "\n=== Checking for any 'node:util' imports ==="
rg "node:util|parseArgs|styleText" -n
echo -e "\n=== CI workflows node versions ==="
find .github/workflows -name "*.yml" -o -name "*.yaml" | head -5
cat .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null | grep -i "node" | head -20Repository: j9t/htaccess-punk Length of output: 2709
Line 8 declares Suggested patch- "engines" : {
- "node" : ">=14.0.0"
+ "engines": {
+ "node": ">=18.17.0"
},📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| "exports": { | ||||||||||||||
| ".": "./src/index.js" | ||||||||||||||
| }, | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat README.md | head -20Repository: j9t/htaccess-punk
Length of output: 1050
🏁 Script executed:
cat package.json | head -50Repository: j9t/htaccess-punk
Length of output: 1028
🏁 Script executed:
Repository: j9t/htaccess-punk
Length of output: 3793
🏁 Script executed:
Repository: j9t/htaccess-punk
Length of output: 4308
🌐 Web query:
Node.js parseArgs util minimum version requirement💡 Result:
The minimum Node.js version required to use the util.parseArgs function is v16.17.0 or v18.3.0. It was added as an experimental feature in these versions via PR
#42675(merged May 2022) and later stabilized.Citations:
🌐 Web query:
Node.js fetch native API minimum version requirement💡 Result:
The native Fetch API in Node.js is available starting from version 18.0.0, where it was introduced as an experimental feature enabled by default (disable with --no-experimental-fetch). It remained experimental through versions 18-20. In Node.js 21.0.0, Fetch was promoted to stable. As of 2026, all current LTS versions (20, 22, 24) and later include stable native Fetch with no flags required. For production use without experimental warnings or instability, the minimum recommended version is Node.js 21.
Citations:
🌐 Web query:
Node.js AbortSignal.timeout minimum version requirement💡 Result:
Node.js AbortSignal.timeout requires Node.js version 16.14.0 or 17.3.0 minimum.
Citations:
🌐 Web query:
Node.js util.styleText minimum version requirement💡 Result:
The minimum Node.js version required to use util.styleText is v20.12.0 or v21.7.0. It was added as a semver-minor feature in these releases via PR
#51850, which merged on 2024-02-26. It is available (but experimental/unstable) in Node.js 20.12+ and 21.7+, became stable in v22.13.0 and v23.5.0. Prior versions like v18 and v21.0.0 do not have it. As of 2026-03-25, all maintained LTS versions (20, 22, 24) support it since v20.12.0.Citations:
chalkwith Node.js' nativestyleTextin v10 eslint/eslint#20012Documented and configured Node version is inaccurate.
Line 5 states
Node v14+andpackage.jsonspecifies>=14.0.0, but the code usesstyleTextfromnode:util(imported inbin/htaccess-punk.js), which requires Node 20.12.0 or later. Update both the README andpackage.jsonengines field to reflect the actual minimum supported version: Node 20.12.0 (or 21.7.0+ if preferring a stable release without experimental warnings).🤖 Prompt for AI Agents