diff --git a/Aliases/node@8 b/Aliases/node@9 similarity index 100% rename from Aliases/node@8 rename to Aliases/node@9 diff --git a/Formula/node.rb b/Formula/node.rb index bdb74f1ad4f..aa97a5617f1 100644 --- a/Formula/node.rb +++ b/Formula/node.rb @@ -1,18 +1,9 @@ class Node < Formula desc "Platform built on V8 to build network applications" homepage "https://nodejs.org/" - - stable do - url "https://nodejs.org/dist/v8.9.2/node-v8.9.2.tar.xz" - sha256 "53a51eda2347681c88b83236c6a005db9d696c3ae5d78496f0921804d5937b59" - - # We track major/minor from upstream Node releases. - # We will accept *important* npm patch releases when necessary. - resource "npm" do - url "https://registry.npmjs.org/npm/-/npm-5.5.1.tgz" - sha256 "b8b9afb0bb6211a289f969f66ba184ca5bc83abf6a570e0853ea5185073dca6f" - end - end + url "https://nodejs.org/dist/v9.2.1/node-v9.2.1.tar.xz" + sha256 "200de3c145e79d5da5361ab079df199cec13dbd10902df9cf9a75c6546cd4582" + head "https://github.com/nodejs/node.git" bottle do sha256 "b59ba890672766ff969a2658b5fdf68e46e7fba483591ae20f263283636a3e14" => :high_sierra @@ -20,26 +11,6 @@ class Node < Formula sha256 "3e76d2a530f987651cc8f3406b93de80abef34430ddc3152ff45e9ce8d92aac3" => :el_capitan end - devel do - url "https://nodejs.org/dist/v9.2.0/node-v9.2.0.tar.xz" - sha256 "64caf263eadc1aea072ce5d30ded7f4534aa7f59c8c6993eee4accad96e3bbc2" - - # pre-release as of 28 Nov 2017; expected stable 7 Dec 2017 - resource "npm" do - url "https://registry.npmjs.org/npm/-/npm-5.6.0.tgz" - sha256 "b1f0de3767136c1d7b4b0f10e6eb2fb3397e2fe11e4c9cddcd0030ad1af9eddd" - end - end - - head do - url "https://github.com/nodejs/node.git" - - resource "npm" do - url "https://registry.npmjs.org/npm/-/npm-5.6.0.tgz" - sha256 "b1f0de3767136c1d7b4b0f10e6eb2fb3397e2fe11e4c9cddcd0030ad1af9eddd" - end - end - option "with-debug", "Build with debugger hooks" option "with-openssl", "Build against Homebrew's OpenSSL instead of the bundled OpenSSL" option "without-npm", "npm will not be installed" @@ -61,6 +32,13 @@ class Node < Formula fails_with :gcc => n end + # We track major/minor from upstream Node releases. + # We will accept *important* npm patch releases when necessary. + resource "npm" do + url "https://registry.npmjs.org/npm/-/npm-5.6.0.tgz" + sha256 "b1f0de3767136c1d7b4b0f10e6eb2fb3397e2fe11e4c9cddcd0030ad1af9eddd" + end + def install # Never install the bundled "npm", always prefer our # installation from tarball for better packaging control. @@ -82,12 +60,6 @@ class Node < Formula system "node", bootstrap/"bin/npm-cli.js", "install", "-ddd", "--global", "--prefix=#{libexec}", resource("npm").cached_download - # Fix from chrmoritz for ENOENT issue with @ in path to node - if build.stable? - inreplace libexec/"lib/node_modules/npm/node_modules/libnpx/index.js", - "return child.escapeArg(npmPath, true)", "return npmPath" - end - # The `package.json` stores integrity information about the above passed # in `cached_download` npm resource, which breaks `npm -g outdated npm`. # This copies back over the vanilla `package.json` to fix this issue.