diff --git a/README.md b/README.md index 8693ede..61cacad 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/lib/nextgen/generators/node.rb b/lib/nextgen/generators/node.rb index dab8556..87f2efc 100644 --- a/lib/nextgen/generators/node.rb +++ b/lib/nextgen/generators/node.rb @@ -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/" diff --git a/template/package.json b/template/package.json index 281eee5..38c0c99 100644 --- a/template/package.json +++ b/template/package.json @@ -2,6 +2,6 @@ "private": true, "type": "module", "engines": { - "node": "^18.12.0 || >= 20.0.0" + "node": "^20.9.0 || >= 22.0.0" } }