• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / tigerdata-app / 48b1bef5-fe39-4e76-a43a-b10fc80b92ab

22 Oct 2025 11:08AM UTC coverage: 91.051%. Remained the same
48b1bef5-fe39-4e76-a43a-b10fc80b92ab

push

circleci

web-flow
Bump vite from 5.4.20 to 5.4.21 in the npm_and_yarn group across 1 directory (#2062)

Bumps the npm_and_yarn group with 1 update in the / directory:
[vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).

Updates `vite` from 5.4.20 to 5.4.21
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.21</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.21 (2025-10-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(dev): trim trailing slash before <code>server.fs.deny</code>
check (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20970">#20970</a>)
(<a
href="https://github.com/vitejs/vite/commit/<a class=hub.com/pulibrary/tigerdata-app/commit/cad1d31d0635dd8fd4ddfe6e5a92eb9ff13cd06c">cad1d31d0<a href="https://github.com/pulibrary/tigerdata-app/commit/c2277b4d23cf53321b272bce8dc929ddec37f4ef">&quot;&gt;cad1d31&lt;/a&gt;),
closes &lt;a
href=&quot;https://redirect.github.com/vitejs/vite/issues/20968&quot;&gt;#20968&lt;/a&gt;
&lt;a
href=&quot;https://redirect.github.com/vitejs/vite/issues/20970">#20970</a></li>
<li>chore: update CHANGELOG (<a
href="https://github.com/vitejs/vite/commit/<a class="double-link" href="https://github.com/pulibrary/tigerdata-app/commit/ca88ed7398288ce0c60176ac9a6392f10654c67c">ca88ed739</a><a href="https://github.com/pulibrary/tigerdata-app/commit/c2277b4d23cf53321b272bce8dc929ddec37f4ef">&quot;&gt;ca88ed7&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/details&gt;
&lt;details&gt;
&lt;summary&gt;Commits&lt;/summary&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a
href=&quot;https://github.com/vitejs/vite/commit/</a><a class="double-link" href="https://github.com/pulibrary/tigerdata-app/commit/adce3c22c64cc9d44cc8f45cc92b543e3e4bf385">adce3c22c">adce3c2
release: v5.4.21
  • cad1d31 fix(dev): trim trailing slash before server.fs.deny check (
  • 2737 of 3006 relevant lines covered (91.05%)

    381.59 hits per line

    Source File
    Press 'n' to go to next uncovered line, 'b' for previous

    100.0
    /app/models/version_footer.rb
    1
    # frozen_string_literal: true
    
    2
    
    
    3
    # Retrieves version information from Capistrano's files. The general approach is
    
    4
    # to read the version information (branch name, git SHA, and date deployed) out
    
    5
    # of Capistrano's revisions.log file.
    
    6
    #
    
    7
    # The code is a bit more complicated than it should because Capistrano does not
    
    8
    # always update the revision.log file before the application reads this information.
    
    9
    # Therefore there is logic in this class to detect if the version information is
    
    10
    # stale and re-read it until it is up to date. Because re-reading this file is
    
    11
    # an expensive operation we cache the information as soon as we are sure it's
    
    12
    # current.
    
    13
    #
    
    14
    # rubocop:disable Style/ClassVars
    
    15
    class VersionFooter
    
    5✔
    16
      @@stale = true
    
    5✔
    17
      @@git_sha = nil
    
    5✔
    18
      @@branch = nil
    
    5✔
    19
      @@version = nil
    
    5✔
    20
    
    
    21
      # Returns a hash with version information.
    
    22
      def self.info
    
    5✔
    23
        reset! if stale?
    
    224✔
    24
        { sha: git_sha, branch:, version:, stale: stale?, tagged_release: tagged_release? }
    
    223✔
    25
      rescue StandardError => ex
    
    26
        { error: "Error retrieving version information: #{ex.message}" }
    
    1✔
    27
      end
    
    28
    
    
    29
      def self.reset!
    
    5✔
    30
        # Initalize these values so that they recalculated
    
    31
        @@git_sha = nil
    
    232✔
    32
        @@branch = nil
    
    232✔
    33
        @@version = nil
    
    232✔
    34
      end
    
    35
    
    
    36
      def self.stale?
    
    5✔
    37
        return false if @@stale == false
    
    449✔
    38
        # Only read the file when version information is stale
    
    39
        if File.exist?(revision_file)
    
    447✔
    40
          local_sha = File.read(revision_file).chomp.gsub(/\)$/, "")
    
    10✔
    41
          @@stale = local_sha != git_sha
    
    10✔
    42
        else
    
    43
          @@stale = true
    
    437✔
    44
        end
    
    45
      end
    
    46
    
    
    47
      def self.git_sha
    
    5✔
    48
        @@git_sha ||= if File.exist?(revisions_logfile)
    
    235✔
    49
                        log_line(revisions_logfile).chomp.split(" ")[3].gsub(/\)$/, "")
    
    6✔
    50
                      elsif Rails.env.development? || Rails.env.test?
    
    222✔
    51
                        `git rev-parse HEAD`.chomp
    
    221✔
    52
                      else
    
    53
                        "Unknown SHA"
    
    1✔
    54
                      end
    
    55
      end
    
    56
    
    
    57
      def self.tagged_release?
    
    5✔
    58
        # e.g. v0.8.0
    
    59
        branch.match(/^v[\d+\.+]+/) != nil
    
    223✔
    60
      end
    
    61
    
    
    62
      def self.branch
    
    5✔
    63
        @@branch ||= if File.exist?(revisions_logfile)
    
    448✔
    64
                       log_line(revisions_logfile).chomp.split(" ")[1]
    
    3✔
    65
                     elsif Rails.env.development? || Rails.env.test?
    
    222✔
    66
                       `git rev-parse --abbrev-ref HEAD`.chomp
    
    221✔
    67
                     else
    
    68
                       "Unknown branch"
    
    1✔
    69
                     end
    
    70
      end
    
    71
    
    
    72
      def self.version
    
    5✔
    73
        @@version ||= if File.exist?(revisions_logfile)
    
    224✔
    74
                        deployed = log_line(revisions_logfile).chomp.split(" ")[7]
    
    3✔
    75
                        Date.parse(deployed).strftime("%d %B %Y")
    
    3✔
    76
                      else
    
    77
                        "Not in deployed environment"
    
    221✔
    78
                      end
    
    79
      end
    
    80
    
    
    81
      # This file is local to the application.
    
    82
      # This file only has the git SHA of the version deployed (i.e. no date or branch)
    
    83
      def self.revision_file
    
    5✔
    84
        @@revision_file ||= Rails.root.join("REVISION")
    
    457✔
    85
      end
    
    86
    
    
    87
      # Capistrano keeps this file a couple of levels up _outside_ the application.
    
    88
      # This file includes all the information that we need (git SHA, branch name, date)
    
    89
      def self.revisions_logfile
    
    5✔
    90
        @@revisions_logfile ||= Rails.root.join("..", "..", "revisions.log")
    
    689✔
    91
      end
    
    92
    
    
    93
      # These assignment methods are needed to facilitate testing
    
    94
      def self.revision_file=(x)
    
    5✔
    95
        @@stale = true
    
    6✔
    96
        @@revision_file = x
    
    6✔
    97
      end
    
    98
    
    
    99
      def self.revisions_logfile=(x)
    
    5✔
    100
        @@stale = true
    
    10✔
    101
        @@revisions_logfile = x
    
    10✔
    102
      end
    
    103
    
    
    104
      def self.log_line(revisions_logfile)
    
    5✔
    105
        log_line = `tail -1 #{revisions_logfile}`
    
    11✔
    106
        if log_line.include?("rolled back")
    
    11✔
    107
          grep_lines = `grep #{log_line.chomp.split(" ").last} #{revisions_logfile}`.split("\n")
    
    3✔
    108
          log_line = grep_lines.first
    
    3✔
    109
        end
    
    110
        log_line
    
    11✔
    111
      end
    
    112
    end
    
    113
    # rubocop:enable RuboCop::Cop::Style::ClassVars
    
    STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
    ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

    © 2025 Coveralls, Inc