Skip to content

Commit

Permalink
Increase Node requirement from 18 (EOL) to 20 (current LTS)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson committed Sep 27, 2024
1 parent b918070 commit 8c85cbf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Nextgen generates apps using **Rails 7.2**.

- **Ruby 3.1+** is required (Ruby 3.2 if you choose a Rails 8 pre-release)
- **Rubygems 3.4.8+** is required (run `gem update --system` to get it)
- **Node 18.12+ and Yarn** are required if you choose Vite or other Node-based options
- **Node 20.9+ and Yarn** are required if you choose Vite or other Node-based options
- Additional tools may be required depending on the options you select (e.g. PostgreSQL)

Going forward, my goal is that Nextgen will always target the latest stable version of Rails and the next pre-release version. Support for Node LTS and Ruby versions will be dropped as soon as they reach EOL (see [Ruby](https://endoflife.date/ruby) and [Node](https://endoflife.date/nodejs) EOL schedules).
Expand Down
2 changes: 1 addition & 1 deletion lib/nextgen/generators/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

say_git "Add Node and Yarn prerequisites"
copy_file "package.json" unless File.exist?("package.json")
inject_into_file "README.md", "\n- Node 18 (LTS) or newer\n- Yarn 1.x (classic)", after: /^- Ruby.*$/
inject_into_file "README.md", "\n- Node 20 (LTS) or newer\n- Yarn 1.x (classic)", after: /^- Ruby.*$/
inject_into_file "README.md", "\nbrew install node\nbrew install yarn", after: /^brew install rbenv.*$/
gitignore "node_modules/"
2 changes: 1 addition & 1 deletion template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"private": true,
"type": "module",
"engines": {
"node": "^18.12.0 || >= 20.0.0"
"node": "^20.9.0 || >= 22.0.0"
}
}

0 comments on commit 8c85cbf

Please sign in to comment.