From b53569a388b51151f149e55a1b6cc1772e648945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Fern=C3=A1ndez?= Date: Fri, 30 Jun 2023 17:29:45 -0400 Subject: [PATCH 1/2] feat(version): update node version --- .node-version | 2 +- CHANGELOG.md | 1 + lib/potassium/version.rb | 2 +- spec/features/node_spec.rb | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.node-version b/.node-version index 8351c193..209e3ef4 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -14 +20 diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a0728a..b2e6205f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Features - Add environment variables module recipe [#435](https://github.com/platanus/potassium/pull/435) - Run [Brakeman](https://brakemanscanner.org/) with reviewdog on CI [#440](https://github.com/platanus/potassium/pull/440) + - Update node to 20 [#447](https://github.com/platanus/potassium/pull/447) Fixes - Fix CircleCI config [#434](https://github.com/platanus/potassium/pull/434) diff --git a/lib/potassium/version.rb b/lib/potassium/version.rb index a73e354a..2a919cc5 100644 --- a/lib/potassium/version.rb +++ b/lib/potassium/version.rb @@ -6,7 +6,7 @@ module Potassium RUBOCOP_RSPEC_VERSION = "~> 2.2" POSTGRES_VERSION = "11.3" MYSQL_VERSION = "5.7" - NODE_VERSION = "14" + NODE_VERSION = "20" TAILWINDCSS_VERSION = "^3.2.7" POSTCSS_VERSION = "^8.4.21" AUTOPREFIXER_VERSION = "^10.4.13" diff --git a/spec/features/node_spec.rb b/spec/features/node_spec.rb index c03703d1..9b97d74d 100644 --- a/spec/features/node_spec.rb +++ b/spec/features/node_spec.rb @@ -1,7 +1,7 @@ require "spec_helper" RSpec.describe "Node" do - let(:version) { "14" } + let(:version) { Potassium::NODE_VERSION } before(:all) do drop_dummy_database From f561869901398301e5f5a6c130fe34c8f0b014e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Fern=C3=A1ndez?= Date: Fri, 30 Jun 2023 17:30:15 -0400 Subject: [PATCH 2/2] chore(config-yml): get node version from .node-version --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e9faed1f..93b5fcdb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 -ruby-image: &ruby-image cimg/ruby:2.7.4-node +ruby-image: &ruby-image cimg/ruby:2.7 env-vars: &env-vars BUNDLE_JOBS: 4 RAILS_ENV: test @@ -32,6 +32,14 @@ commands: gem install bundler:2.1.4 bundle _2.1.4_ install + - run: + name: Install node and yarn + command: | + curl -sL https://deb.nodesource.com/setup_$(cat .node-version).x | sudo -E bash - + sudo apt-get install -y nodejs + curl -o- -sL https://yarnpkg.com/install.sh | bash + sudo ln -s $HOME/.yarn/bin/yarn /usr/local/bin/yarn + - save_cache: key: potassium-vendor-bundle-{{ .Branch }} paths: