Skip to content

Commit

Permalink
Increase Node requirement from 18 to 20 (current LTS) (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson authored Oct 27, 2024
1 parent 713d429 commit 718fe86
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 (see the [npm note](#yarn-or-npm) below)
- **Node 20.9+ and Yarn** are required if you choose Vite or other Node-based options (see the [npm note](#yarn-or-npm) below)
- 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
@@ -1,6 +1,6 @@
# frozen_string_literal: true

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 718fe86

Please sign in to comment.