@nodenv/node-build 5.3.37 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -138,6 +138,7 @@ The build process may be configured through the following environment variables:
138
138
  | `NODE_BUILD_MIRROR_PACKAGE_URL` | Custom complete mirror URL (e.g. http://mirror.example.com/package-1.0.0.tar.gz). |
139
139
  | `NODE_BUILD_SKIP_MIRROR` | Bypass the download mirror and fetch all package files from their original URLs. |
140
140
  | `NODE_BUILD_ROOT` | Custom build definition directory. (Default: `share/node-build`) |
141
+ | `NODE_BUILD_TARBALL_OVERRIDE` | Override the URL to fetch the node tarball from, optionally followed by `#checksum`. |
141
142
  | `NODE_BUILD_DEFINITIONS` | Additional paths to search for build definitions. (Colon-separated list) |
142
143
  | `CC` | Path to the C compiler. |
143
144
  | `NODE_CFLAGS` | Additional `CFLAGS` options (_e.g.,_ to override `-O3`). |
package/bin/node-build CHANGED
@@ -15,7 +15,7 @@
15
15
  # --version Show version of node-build
16
16
  #
17
17
 
18
- NODE_BUILD_VERSION=5.3.37
18
+ NODE_BUILD_VERSION=5.4.0
19
19
 
20
20
  OLDIFS="$IFS"
21
21
 
@@ -485,6 +485,10 @@ fetch_tarball() {
485
485
  local checksum
486
486
  local extracted_dir
487
487
 
488
+ if is_node_package "$1" && [ -n "$NODE_BUILD_TARBALL_OVERRIDE" ]; then
489
+ package_url="$NODE_BUILD_TARBALL_OVERRIDE"
490
+ fi
491
+
488
492
  if [ -z "$package_url" ]; then
489
493
  echo "error: failed to download $package_name (missing package url)" >&2
490
494
  return 1
@@ -853,14 +857,23 @@ build_package_enable_shared() {
853
857
 
854
858
  apply_node_patch() {
855
859
  local patchfile
856
- case "$1" in
857
- node-* | iojs-* )
860
+ if is_node_package "$1"; then
858
861
  patchfile="$(mktemp "${TMP}/node-patch.XXXXXX")"
859
862
  cat "${2:--}" >"$patchfile"
860
863
 
861
864
  local striplevel=0
862
865
  grep -q '^--- a/' "$patchfile" && striplevel=1
863
866
  patch -p$striplevel --force -i "$patchfile"
867
+ fi
868
+ }
869
+
870
+ is_node_package() {
871
+ case "$1" in
872
+ node-* | iojs-* )
873
+ return 0
874
+ ;;
875
+ *)
876
+ return 1
864
877
  ;;
865
878
  esac
866
879
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodenv/node-build",
3
- "version": "5.3.37",
3
+ "version": "5.4.0",
4
4
  "description": "Install NodeJS versions",
5
5
  "homepage": "https://github.com/nodenv/node-build#readme",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "preversion": "script/preversion",
42
42
  "version": "script/version-sync",
43
43
  "postversion": "git push --follow-tags",
44
- "unmerged": "git for-each-ref refs/rbtags --format='%(refname)' --no-merged"
44
+ "unmerged": "git for-each-ref refs/rbtags --format='%(creatordate:short) %(refname:short) https://github.com/rbenv/ruby-build/releases/tag/%(refname:lstrip=-1)' --no-merged"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@nodenv/node-build-update-defs": "^2.11.1",