<commit_before>class NodeAT10 < Formula
  desc "Platform built on V8 to build network applications"
  homepage "https://nodejs.org/"
  url "https://nodejs.org/dist/v10.20.1/node-v10.20.1.tar.xz"
  sha256 "ee1f88a04c608aeda1299bbcb0895eebb6394e901f03398c377236905d95f492"
  revision 1

  bottle do
    cellar :any
    sha256 "a321451d66c4758f0a1835a6763a10c7ed16d31e38348e6a4bea84db3e6255cf" => :catalina
    sha256 "8bb6365e39db531e9441ab2de52c274d61c728cf7bcbe145d76d4381221167dd" => :mojave
    sha256 "858bd41aa3ff4b057719a29a4b94fc1dbf4e9a891abcc5bce8112c031f85d459" => :high_sierra
  end

  keg_only :versioned_formula

  depends_on "pkg-config" => :build
  depends_on "icu4c"
  depends_on :macos # Due to Python 2 (Will not work with Python 3 without extensive patching)
  # Node 10 will be EOL April 2021

  def install
    system "./configure", "--prefix=#{prefix}", "--with-intl=system-icu"
    system "make", "install"
  end

  def post_install
    (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n")
  end

  test do
    path = testpath/"test.js"
    path.write "console.log('hello');"

    output = shell_output("#{bin}/node #{path}").strip
    assert_equal "hello", output
    output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip<commit_msg>node@10: update 10.20.1_1 bottle.<commit_after>class NodeAT10 < Formula
  desc "Platform built on V8 to build network applications"
  homepage "https://nodejs.org/"
  url "https://nodejs.org/dist/v10.20.1/node-v10.20.1.tar.xz"
  sha256 "ee1f88a04c608aeda1299bbcb0895eebb6394e901f03398c377236905d95f492"
  revision 1

  bottle do
    cellar :any
    sha256 "2d38510d712485965ac6bfc5189c6045fee477f894bde2fa8f67fe7cf4e681fc" => :catalina
    sha256 "f4e8b50e62af76611efaf430a0dbc9f8af53591520ac951e1e52d4671c57cd8c" => :mojave
    sha256 "fb1c20c3173c361d45755b028c5a22dd58bb9f9a1d7d78e62f817b0c75d16a28" => :high_sierra
  end

  keg_only :versioned_formula

  depends_on "pkg-config" => :build
  depends_on "icu4c"
  depends_on :macos # Due to Python 2 (Will not work with Python 3 without extensive patching)
  # Node 10 will be EOL April 2021

  def install
    system "./configure", "--prefix=#{prefix}", "--with-intl=system-icu"
    system "make", "install"
  end

  def post_install
    (lib/"node_modules/npm/npmrc").atomic_write("prefix = #{HOMEBREW_PREFIX}\n")
  end

  test do
    path = testpath/"test.js"
    path.write "console.log('hello');"

    output = shell_output("#{bin}/node #{path}").strip
    assert_equal "hello", output
    output = shell_output("#{bin}/node -e 'console.log(new Intl.NumberFormat(\"en-EN\").format(1234.56))'").strip
{'fraction_non_alphanumeric': 0.12221396731054977, 'fraction_numerical': 0.15304606240713226, 'mean_word_length': 4.507157464212679, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '7175672', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1065, 'n_words': 192}