<commit_before>require "language/node"

class Svgo < Formula
  desc "Nodejs-based tool for optimizing SVG vector graphics files"
  homepage "https://github.com/svg/svgo"
  url "https://github.com/svg/svgo/archive/v2.6.0.tar.gz"
  sha256 "f4901a74396e16cf0c12533ff0b7be11112514c748fc115d870df6cc2791c0f6"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, all: "ff8067529ac3a87a3c6b9720cad22a71b7177c42f53874ce485ab6aa9f06649f"
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    cp test_fixtures("test.svg"), testpath
    system bin/"svgo", "test.svg", "-o", "test.min.svg"
    assert_match(/^<svg /, (testpath/"test.min.svg").read)
  end
end<commit_msg>svgo 2.6.1<commit_after>require "language/node"

class Svgo < Formula
  desc "Nodejs-based tool for optimizing SVG vector graphics files"
  homepage "https://github.com/svg/svgo"
  url "https://github.com/svg/svgo/archive/v2.6.1.tar.gz"
  sha256 "407e75c7d616df5f1382b6cf27164a59726658f5b8426a1fb4efa12632ae091e"
  license "MIT"

  bottle do
    sha256 cellar: :any_skip_relocation, all: "ff8067529ac3a87a3c6b9720cad22a71b7177c42f53874ce485ab6aa9f06649f"
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    cp test_fixtures("test.svg"), testpath
    system bin/"svgo", "test.svg", "-o", "test.min.svg"
    assert_match(/^<svg /, (testpath/"test.min.svg").read)
  end
end
{'fraction_non_alphanumeric': 0.1303538175046555, 'fraction_numerical': 0.11731843575418995, 'mean_word_length': 4.558620689655172, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5851109', 'n_tokens_mistral': 755, 'n_tokens_neox': 654, 'n_words': 110}