Skip to content

Commit c10e5f6

Browse files
Copilotfengmk2
andauthored
chore: restrict prepare script to Node.js >= 20 (#681)
`vp config` in the `prepare` script requires Node.js >= 20, but the package supports >= 18.19.0. This causes failures when installing on Node.js 18.x. ## Changes - **`package.json`**: Replace bare `vp config` with an inline Node.js version guard that skips execution on Node.js < 20: ```json "prepare": "node -e \"const v = parseInt(process.versions.node, 10); if (v >= 20) require('child_process').execSync('vp config', {stdio: 'inherit'});\"" ``` <!-- START COPILOT CODING AGENT TIPS --> --- 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
1 parent 1e8845c commit c10e5f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"ci": "vp run cov && vp run prepublishOnly && npm pack && attw --pack",
6767
"clean": "rm -rf dist && tsc -b --clean",
6868
"prepublishOnly": "vp run build",
69-
"prepare": "vp config",
69+
"prepare": "node -e \"const v = parseInt(process.versions.node, 10); if (v >= 20) require('child_process').execSync('vp config', {stdio: 'inherit'});\"",
7070
"check": "vp check",
7171
"check:fix": "vp check --fix"
7272
},

0 commit comments

Comments
 (0)