Change Node.js version to use current LTS in provision script by default#4162
Change Node.js version to use current LTS in provision script by default#4162antonmedv merged 1 commit intodeployphp:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Node.js provisioning recipe to default to installing the current Node LTS via fnm, rather than pinning a specific major version.
Changes:
- Change
node_versiondefault from23.xto--ltsin the Node provisioning recipe.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| use function Deployer\Support\escape_shell_argument; | ||
|
|
||
| set('node_version', '23.x'); | ||
| set('node_version', '--lts'); |
There was a problem hiding this comment.
This change updates the default for node_version, but the generated docs are now stale. docs/recipe/provision/nodejs.md still shows the default value as '23.x' (see around its "Default value" block). Please regenerate docs (php bin/docgen) and include the updated docs in this PR.
| set('node_version', '--lts'); | |
| set('node_version', '23.x'); |
| use function Deployer\Support\escape_shell_argument; | ||
|
|
||
| set('node_version', '23.x'); | ||
| set('node_version', '--lts'); |
There was a problem hiding this comment.
Defaulting to --lts makes provisioning time-dependent (the installed Node version will change when the LTS line advances), which can reduce reproducibility and introduce unexpected changes on reprovisioning. Consider defaulting to an explicit LTS major (and documenting --lts as an opt-in override) if deterministic builds/environments are important for this recipe.
This changes the default value to use the current LTS release, and can still be overridden by the user by setting for example
24.x.It passes the
--ltsoption instead of a version number, so it will be kept up to date when new Node versions are released. Seefmn install helpfor usage.Let me know if anything is missing. It's my first contribution to the project.
Bug fix #…?
New feature?
BC breaks?
Tests added?
Docs added?