Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,40 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed
- The npm wrapper's `tar` dependency was pinned to `6.2.1`, which npm
itself flags as deprecated ("Old versions of tar are not supported,
and contain widely publicized security vulnerabilities"). `npm audit`
against the published wrapper reports **1 critical and 1 high**
vulnerability, all of them in `tar` — the hardlink-path-traversal,
symlink-poisoning, and file-smuggling advisories that apply to the
archive-extraction path the wrapper uses to unpack the release
tarball.

Bumped to `tar@7.5.22`, which is past the advisory range
(`<=7.5.20`). `npm audit` is now clean: **0 vulnerabilities**.

The bump raises the wrapper's Node floor from 14 to 18, because
`tar@7` declares `engines: { node: ">=18" }`. The wrapper's own
code is unchanged and still runs on Node 14 — the floor comes from
the dependency.

Verified end-to-end: the wrapper's `extractTarGz` path (with its
zip-slip `filter` guard) extracts the real v1.2.2 release archive
correctly under `tar@7`, producing the binary at the expected size.

### Added
- The npm wrapper README (and the main README / installation docs) now
explain npm 12's `allowScripts` gate. npm 12 **blocks install
scripts** for packages that aren't on an allowlist, and `nodeupx`
needs its `postinstall` to download the binary — so on npm 12+ a
fresh `npm install -g nodeupx` finishes with the wrapper in place
but **no binary** and `nodeup` missing from `$PATH`. The fix is
`npm install-scripts approve nodeupx`, which the docs now spell
out.

## [1.2.2] - 2026-11-01

A patch release that **stops the snapshot leak**, gives the user
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ scoop install nodeup
Best for: Windows users who already use Scoop. The manifest is
auto-managed by GoReleaser from `scoop: {}` in `.goreleaser.yaml`.

#### npm wrapper (any platform with Node ≥ 14)
#### npm wrapper (any platform with Node ≥ 18)

```bash
npm install -g nodeupx
Expand All @@ -116,6 +116,12 @@ dormant 2015 package (`romanmt/nodeup` — "a simple cluster
implementation for node"). The downloaded binary still installs
as the `nodeup` CLI on your `$PATH`.

> **npm 12+:** npm's `allowScripts` gate blocks install scripts for
> packages that aren't on an allowlist. `nodeupx` needs its
> `postinstall` to download the binary, so approve it once:
> `npm install-scripts approve nodeupx && npm install -g nodeupx`.
> See [`nodeup-npm/README.md`](./nodeup-npm/README.md#npm-12-approve-the-install-script).

Best for: anyone who treats their global npm install as the source
of truth for CLI tools — typical in JavaScript / TypeScript projects.
The wrapper is a thin downloader (`scripts/install.js`) that fetches
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ holds the manifest and is auto-pushed by GoReleaser.
**Tradeoffs:** user-level install (no admin shell), upgrades via
`scoop update nodeup`. Same Node-decoupled shape as Homebrew.

### npm wrapper (any platform with Node ≥ 14)
### npm wrapper (any platform with Node ≥ 18)

```bash
npm install -g nodeupx
Expand Down
28 changes: 28 additions & 0 deletions nodeup-npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,34 @@ The `postinstall` script downloads a ~6 MB static Go binary into
`node_modules/nodeup/bin/` and symlinks it onto your global `$PATH`
as `nodeup`. No Go toolchain, no system services.

Requires **Node ≥ 18** (the `tar` dependency needs it).

### npm 12+: approve the install script

npm 12 added `allowScripts`, which **blocks install scripts** for
packages that aren't on an allowlist. `nodeupx` needs its
`postinstall` to download the binary, so on npm 12+ a fresh install
finishes with the wrapper in place but **no binary** — `nodeup` isn't
on your `$PATH`, and the install log says:

```
npm warn install-scripts 1 package had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts nodeupx@1.2.2 (preinstall: node scripts/check.js; postinstall: node scripts/install.js)
```

Approve the script and re-run the install:

```bash
npm install-scripts approve nodeupx
npm install -g nodeupx
```

To approve it permanently, add it to your `~/.npmrc`:

```ini
allow-scripts[]=nodeupx
```

## Who should use this wrapper

**Pick the npm wrapper if you already live inside Node and want a
Expand Down
6 changes: 3 additions & 3 deletions nodeup-npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"cli"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"bin": {
"nodeup": "bin/nodeup"
Expand All @@ -34,7 +34,7 @@
"preinstall": "node scripts/check.js"
},
"dependencies": {
"tar": "^6.2.1"
"tar": "7.5.22"
},
"files": [
"scripts/install.js",
Expand All @@ -43,4 +43,4 @@
"LICENSE"
],
"binaryVersion": "1.2.2"
}
}
Loading