Skip to content

Replace update-notifier with a zero-dependency equivalent (removes 23 packages) #8368

Open

Description

@HeversonSilva-gif

Which problem is this feature request solving?

update-notifier pulls 23 packages into the CLI's dependency tree purely to check whether a newer version has been published. For a tool installed as widely as this one, that is 23 more packages to resolve, audit and trust, in service of one request to the registry and a box drawn on stderr.

Describe the solution you'd like

Replace it with nano-update-notifier, which implements the same public API — same options, same notifier.update shape, same suppression rules — on Node.js built-ins alone, with no runtime dependencies. Types ship with the package, so @types/update-notifier can go as well.

I have the change prepared and verified against main:

  • One import in bin/run.js, two entries in package.json.
  • 23 packages removed from the lockfile, 1 added: @pnpm/config.env-replace, @pnpm/network.ca-file, @pnpm/npm-conf, @types/configstore, @types/update-notifier, config-chain, configstore, deep-extend, escape-goat, global-directory, is-in-ci, is-installed-globally, is-npm, ky, latest-version, package-json, proto-list, pupa, rc, registry-auth-token, registry-url, update-notifier, xdg-basedir.
  • npm run test:unit passes 423/423, identical to the same run on main including the 5 pre-existing errors from exec-fetcher downloads.
  • build, typecheck, lint and format:check are all clean.
  • The rendered notification is unchanged. I captured the full output of bin/run.js with a seeded update under both libraries and diffed it: byte for byte identical, including the ⬥ title, the OSC 8 hyperlink on "release notes", the inverse truecolour install command, and the #28b5ac border.

Compatibility is held by differential test suites that run update-notifier, boxen, semver and string-width as oracles: the full box option matrix, the notification rendering with colour enabled, and fuzzed version comparison. The package is published from a GitHub Actions release with provenance.

The branch is ready at HeversonSilva-gif/cli:deps/nano-update-notifier if you would like to see the diff.

Two things worth raising before any pull request:

  • .kodiak.toml shows dependencies here are managed by Renovate. A hand-swapped dependency sits outside that flow, and I don't know whether you would want Renovate taught about the replacement.
  • Disclosure: I wrote nano-update-notifier. That is exactly why I am opening an issue rather than dropping a pull request on you — CONTRIBUTING asks for discussion first, and a proposal to adopt my own package deserves it more than most. If this is not something you want to take on, saying so costs you nothing and I will not push it.

Activity

  1. HeversonSilva-gif commented on Aug 1, 2026

    @HeversonSilva-gif
    Author

    Two things I can add since opening this, both measured today against 27.0.1.

    The change reaches roughly twice the installs I quoted. netlify and netlify-cli
    are both published from this repository and both sit at 27.0.1. Last month they drew
    1,308,635 and 1,162,250 downloads, so the swap lands in 2,470,885 installs a month
    rather than the 1.16M figure in the issue above.

    A refreshed dependency delta, measured from the consumer side. The number in the
    issue came from diffing this repository's own lockfile, which includes devDependencies.
    Measured the other way instead — two scratch projects each depending on
    netlify-cli@27.0.1, resolved by npm and diffed, the second with update-notifier
    pointed at nano-update-notifier — a fresh install goes from 1190 entries to 1166.
    24 fewer packages:

    @pnpm/config.env-replace, @pnpm/network.ca-file, @pnpm/npm-conf, config-chain,
    configstore, deep-extend, escape-goat, global-directory, is-in-ci,
    is-installed-globally, is-npm, ky, latest-version, package-json, proto-list,
    pupa, rc, registry-auth-token, registry-url, strip-json-comments,
    xdg-basedir.

    boxen is deliberately not in that list. It is a direct dependency here and stays
    either way, so I am not counting it.

    No urgency on this from my side. The branch is still ready if a pull request would be
    easier to evaluate than an issue, and if this is not something you want to take on,
    saying so costs you nothing.

  2. HeversonSilva-gif commented on Aug 1, 2026

    @HeversonSilva-gif
    Author

    Correcting my own comment above: it says 24 fewer packages and then lists 21
    names. Both figures are right, but I did not say they measure different things, and as
    written they simply do not add up.

    • 24 is installed lockfile entries — what npm install reports.
    • 21 is distinct package names.

    The three-entry gap is nested copies of dot-prop, graceful-fs and ini that the tree
    carries at more than one path; those names survive elsewhere, so they are not in the list.

    1190 → 1166 is unchanged, and so is everything else in the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions