diff --git a/.rubocop.yml b/.rubocop.yml index 5bc60944..4a965219 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,12 +27,6 @@ Layout/LineLength: Layout/EmptyLinesAroundAttributeAccessor: Enabled: true -Layout/SpaceAroundMethodCallOperator: - EnforcedStyle: compact - -Layout/SpaceAroundBlockParameters: - EnforcedStyle: compact - Layout/SpaceInsideArrayLiteralBrackets: EnforcedStyle: compact diff --git a/CHANGELOG.md b/CHANGELOG.md index 8973e6e0..80d97fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,23 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- Added shared helpers for null or empty value checks in front-end code. + +### Changed + +- Updated runtime and build dependencies as part of the 2026-01 audit. + [#570](https://github.com/epimorphics/ukhpi/issues/570) + - Updated Rails and Ruby dependencies for security and stability. + - Updated front-end packages and build tooling for compatibility. + - Reduced lodash usage in client-side utilities to simplify runtime code. + - Split dependency update tasks to cover Node and Ruby separately. + +### Removed + +- Removed `glob`, an unused front-end dependency, from the build toolchain. + ## [2.3.0] - 2026-02 ### Added diff --git a/Gemfile.lock b/Gemfile.lock index b963bd7d..cf707759 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,31 +10,31 @@ GIT GEM remote: https://rubygems.org/ specs: - action_text-trix (2.1.15) + action_text-trix (2.1.16) railties - actioncable (8.1.1) - actionpack (= 8.1.1) - activesupport (= 8.1.1) + actioncable (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.1.1) - actionpack (= 8.1.1) - activejob (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) + actionmailbox (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) - actionmailer (8.1.1) - actionpack (= 8.1.1) - actionview (= 8.1.1) - activejob (= 8.1.1) - activesupport (= 8.1.1) + actionmailer (8.1.2) + actionpack (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.1.1) - actionview (= 8.1.1) - activesupport (= 8.1.1) + actionpack (8.1.2) + actionview (= 8.1.2) + activesupport (= 8.1.2) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -42,36 +42,36 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.1.1) + actiontext (8.1.2) action_text-trix (~> 2.1.15) - actionpack (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) + actionpack (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.1.1) - activesupport (= 8.1.1) + actionview (8.1.2) + activesupport (= 8.1.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.1.1) - activesupport (= 8.1.1) + activejob (8.1.2) + activesupport (= 8.1.2) globalid (>= 0.3.6) - activemodel (8.1.1) - activesupport (= 8.1.1) - activerecord (8.1.1) - activemodel (= 8.1.1) - activesupport (= 8.1.1) + activemodel (8.1.2) + activesupport (= 8.1.2) + activerecord (8.1.2) + activemodel (= 8.1.2) + activesupport (= 8.1.2) timeout (>= 0.4.0) - activestorage (8.1.1) - actionpack (= 8.1.1) - activejob (= 8.1.1) - activerecord (= 8.1.1) - activesupport (= 8.1.1) + activestorage (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activesupport (= 8.1.2) marcel (~> 1.0) - activesupport (8.1.1) + activesupport (8.1.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -84,8 +84,8 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) ansi (1.5.0) ast (2.4.3) backport (1.2.0) @@ -94,10 +94,11 @@ GEM benchmark (0.5.0) bigdecimal (3.3.1) bindex (0.8.1) - bootsnap (1.19.0) + bootsnap (1.22.0) msgpack (~> 1.2) builder (3.3.0) - byebug (12.0.0) + byebug (13.0.0) + reline (>= 0.6.0) capybara (3.40.0) addressable matrix @@ -111,16 +112,16 @@ GEM addressable capybara playwright-ruby-client (>= 1.16.0) - concurrent-ruby (1.3.5) - connection_pool (2.5.4) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) crass (1.0.6) csv (3.3.5) - date (3.5.0) + date (3.5.1) diff-lcs (1.6.2) docile (1.4.1) - dotenv (3.1.8) + dotenv (3.2.0) drb (2.2.3) - dry-cli (1.3.0) + dry-cli (1.4.1) ebnf (2.6.0) base64 (~> 0.2) htmlentities (~> 4.3) @@ -128,20 +129,20 @@ GEM scanf (~> 1.0) sxp (~> 2.0) unicode-types (~> 1.8) - erb (6.0.0) + erb (6.0.1) erubi (1.13.1) execjs (2.10.0) - faraday (2.14.0) + faraday (2.14.1) faraday-net_http (>= 2.0, < 3.5) json logger faraday-encoding (0.0.6) faraday - faraday-follow_redirects (0.4.0) + faraday-follow_redirects (0.5.0) faraday (>= 1, < 3) faraday-net_http (3.4.2) net-http (~> 0.5) - faraday-retry (2.3.2) + faraday-retry (2.4.0) faraday (~> 2.0) ffi (1.17.2-aarch64-linux-gnu) ffi (1.17.2-aarch64-linux-musl) @@ -162,7 +163,7 @@ GEM activesupport (>= 6.1) govuk_template (0.26.0) rails (>= 3.1) - haml (7.0.2) + haml (7.2.0) temple (>= 0.8.2) thor tilt @@ -173,7 +174,7 @@ GEM activesupport (>= 5.1) haml (>= 4.0.6) railties (>= 5.1) - haml_lint (0.67.0) + haml_lint (0.69.0) haml (>= 5.0) parallel (~> 1.10) rainbow @@ -182,21 +183,21 @@ GEM htmlbeautifier (1.4.3) htmlentities (4.4.0) http_accept_language (2.1.1) - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - io-console (0.8.1) - irb (1.15.3) + io-console (0.8.2) + irb (1.16.0) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) jaro_winkler (1.6.1) - js-routes (2.3.5) + js-routes (2.3.6) railties (>= 5) sorbet-runtime - json (2.16.0) + json (2.18.1) json_expressions (0.9.0) - kramdown (2.5.1) - rexml (>= 3.3.9) + kramdown (2.5.2) + rexml (>= 3.4.4) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) language_server-protocol (3.17.0.5) @@ -208,12 +209,11 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.24.1) + loofah (2.25.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - m (1.6.2) - method_source (>= 0.6.7) - rake (>= 0.9.2.2) + m (1.7.0) + rake mail (2.9.0) logger mini_mime (>= 0.1.1) @@ -222,13 +222,12 @@ GEM net-smtp marcel (1.1.0) matrix (0.4.3) - method_source (1.1.0) mime-types (3.7.0) logger mime-types-data (~> 3.2025, >= 3.2025.0507) mime-types-data (3.2025.0924) mini_mime (1.1.5) - minitest (5.26.1) + minitest (5.27.0) minitest-rails (8.1.0) minitest (~> 5.20) railties (>= 8.1.0, < 8.2.0) @@ -240,13 +239,13 @@ GEM builder minitest (>= 5.0) ruby-progressbar - mocha (2.8.2) + mocha (3.0.1) ruby2_keywords (>= 0.0.5) msgpack (1.8.0) mutex_m (0.3.0) - net-http (0.8.0) + net-http (0.9.1) uri (>= 0.11.1) - net-imap (0.5.12) + net-imap (0.6.2) date net-protocol net-pop (0.1.2) @@ -256,29 +255,30 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.5) - nokogiri (1.18.10-aarch64-linux-gnu) + nokogiri (1.19.0-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.10-aarch64-linux-musl) + nokogiri (1.19.0-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.18.10-arm-linux-gnu) + nokogiri (1.19.0-arm-linux-gnu) racc (~> 1.4) - nokogiri (1.18.10-arm-linux-musl) + nokogiri (1.19.0-arm-linux-musl) racc (~> 1.4) - nokogiri (1.18.10-arm64-darwin) + nokogiri (1.19.0-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.10-x86_64-darwin) + nokogiri (1.19.0-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.19.0-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-musl) + nokogiri (1.19.0-x86_64-linux-musl) racc (~> 1.4) observer (0.1.2) - oj (3.16.12) + oj (3.16.15) bigdecimal (>= 3.0) ostruct (>= 0.2) + open3 (0.2.1) ostruct (0.6.3) parallel (1.27.0) - parser (3.3.10.0) + parser (3.3.10.1) ast (~> 2.4.1) racc playwright-ruby-client (1.56.0) @@ -287,18 +287,18 @@ GEM pp (0.6.3) prettyprint prettyprint (0.2.0) - prism (1.6.0) + prism (1.9.0) prometheus-client (4.2.5) base64 - psych (5.2.6) + psych (5.3.1) date stringio - public_suffix (6.0.2) - puma (7.1.0) + public_suffix (7.0.2) + puma (7.2.0) nio4r (~> 2.0) - puma-metrics (1.4.2) + puma-metrics (1.5.0) prometheus-client (>= 0.10) - puma (>= 6, != 7.0.0) + puma (>= 6.6.0, != 7.0.0) racc (1.8.1) rack (3.2.4) rack-contrib (2.5.0) @@ -310,22 +310,22 @@ GEM rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rackup (2.2.1) + rackup (2.3.1) rack (>= 3) - rails (8.1.1) - actioncable (= 8.1.1) - actionmailbox (= 8.1.1) - actionmailer (= 8.1.1) - actionpack (= 8.1.1) - actiontext (= 8.1.1) - actionview (= 8.1.1) - activejob (= 8.1.1) - activemodel (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) + rails (8.1.2) + actioncable (= 8.1.2) + actionmailbox (= 8.1.2) + actionmailer (= 8.1.2) + actionpack (= 8.1.2) + actiontext (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activemodel (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) bundler (>= 1.15.0) - railties (= 8.1.1) + railties (= 8.1.2) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -333,9 +333,9 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.1.1) - actionpack (= 8.1.1) - activesupport (= 8.1.1) + railties (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -344,8 +344,9 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.3.1) - rbs (3.9.5) + rbs (3.10.3) logger + tsort rdf (3.3.4) bcp47_spec (~> 0.2) bigdecimal (~> 3.1, >= 3.1.5) @@ -358,7 +359,7 @@ GEM bigdecimal (~> 3.1, >= 3.1.5) ebnf (~> 2.5) rdf (~> 3.3) - rdoc (6.15.1) + rdoc (7.1.0) erb psych (>= 4.0.0) tsort @@ -369,10 +370,10 @@ GEM io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) - reverse_markdown (3.0.0) + reverse_markdown (3.0.2) nokogiri rexml (3.4.4) - rubocop (1.81.7) + rubocop (1.84.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -380,12 +381,12 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.47.1, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.48.0) + rubocop-ast (1.49.0) parser (>= 3.3.7.2) - prism (~> 1.4) + prism (~> 1.7) rubocop-capybara (2.22.1) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) @@ -393,7 +394,7 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.47.1, < 2.0) - rubocop-rails (2.34.0) + rubocop-rails (2.34.3) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) @@ -403,7 +404,7 @@ GEM rubocop (>= 1.72) rubocop-performance (>= 1.24) rubocop-rails (>= 2.30) - ruby-lsp (0.26.3) + ruby-lsp (0.26.5) language_server-protocol (~> 3.17.0) prism (>= 1.2, < 2.0) rbs (>= 3, < 5) @@ -421,10 +422,10 @@ GEM tilt scanf (1.0.0) securerandom (0.4.1) - sentry-rails (6.1.0) + sentry-rails (6.3.0) railties (>= 5.2.0) - sentry-ruby (~> 6.1.0) - sentry-ruby (6.1.0) + sentry-ruby (~> 6.3.0) + sentry-ruby (6.3.0) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) simplecov (0.22.0) @@ -433,16 +434,18 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) - solargraph (0.57.0) + solargraph (0.58.2) + ast (~> 2.4.3) backport (~> 1.2) benchmark (~> 0.4) - bundler (~> 2.0) + bundler (>= 2.0) diff-lcs (~> 1.4) jaro_winkler (~> 1.6, >= 1.6.1) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) logger (~> 1.6) observer (~> 0.1) + open3 (~> 0.2.1) ostruct (~> 0.6) parser (~> 3.0) prism (~> 1.4) @@ -454,8 +457,8 @@ GEM yard (~> 0.9, >= 0.9.24) yard-activesupport-concern (~> 0.0) yard-solargraph (~> 0.1) - sorbet-runtime (0.6.12768) - spring (4.4.0) + sorbet-runtime (0.6.12925) + spring (4.4.2) sprockets (4.2.2) concurrent-ruby (~> 1.0) logger @@ -464,7 +467,7 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - stringio (3.1.8) + stringio (3.2.0) sxp (2.0.0) matrix (~> 0.4) rdf (~> 3.3) @@ -472,23 +475,22 @@ GEM temple (0.10.4) terser (1.2.6) execjs (>= 0.3.0, < 3) - thor (1.4.0) - tilt (2.6.1) - timeout (0.4.4) + thor (1.5.0) + tilt (2.7.0) + timeout (0.6.0) tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2025.2) + tzinfo-data (1.2025.3) tzinfo (>= 1.0.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) + unicode-emoji (4.2.0) unicode-types (1.11.0) uri (1.1.1) useragent (0.16.11) - vcr (6.3.1) - base64 - vite_rails (3.0.19) + vcr (6.4.0) + vite_rails (3.0.20) railties (>= 5.1, < 9) vite_ruby (~> 3.0, >= 3.2.2) vite_ruby (3.9.2) @@ -509,12 +511,12 @@ GEM xpath (3.2.0) nokogiri (~> 1.8) yajl-ruby (1.4.3) - yard (0.9.37) + yard (0.9.38) yard-activesupport-concern (0.0.1) yard (>= 0.8) yard-solargraph (0.1.0) yard (~> 0.9) - zeitwerk (2.7.3) + zeitwerk (2.7.4) GEM remote: https://rubygems.pkg.github.com/epimorphics/ diff --git a/Makefile b/Makefile index e4571851..dc4d3d5c 100644 --- a/Makefile +++ b/Makefile @@ -198,13 +198,21 @@ test-assets: ## Run unit tests with assets rebuilt update: ## Review and update dependencies interactively @echo "Checking for outdated dependencies..." + @make update-node && make update-gems + @echo "All dependencies checked for updates." + +update-gems: ## Review and update Ruby gems interactively + @echo "Checking for outdated Ruby gems..." + @${BUNDLE} outdated --only-explicit || true + +update-node: ## Review and update Node modules interactively + @echo "Checking for outdated Node modules..." @if [ -f package.json ]; then \ echo "Running yarn upgrade-interactive..."; \ yarn upgrade-interactive; \ + else \ + echo "No package.json found. Skipping Node module update."; \ fi - @echo "Running bundle outdated to check Ruby gems..." -# Let bundler handle output; treat this as informational even if deps are outdated - @${BUNDLE} outdated --only-explicit || true vars: ## Display environment variables @echo "Docker: ${REPO}:${TAG}" diff --git a/app/javascript/components/compare-locations-table.vue b/app/javascript/components/compare-locations-table.vue index ede69309..463f0dcf 100644 --- a/app/javascript/components/compare-locations-table.vue +++ b/app/javascript/components/compare-locations-table.vue @@ -44,6 +44,7 @@