Packages

nanoid

6.0.2 · 5 Oct 2026MIT398.9M / weekRepositoryHomepagenpmAtom feed

Upgrading nanoid From 3.1.30 to 6.0.2

57 releases in betweennotes for 53

Reading releases, release notes and advisories…

Other targets from 3.1.30Newest 3.x3.3.20Clears its 5 advisories3.3.18
5.0.0, 4.0.0 have no release note on GitHub or in the repository's changelog, so their breaking changes are missing from the counts below.
  1. 3.1.30yours
  2. 3.1.31security
  3. 23 releases
  4. 4.0.0major
  5. 2 releases
  6. 5.0.0major
  7. 26 releases
  8. 6.0.0major
  9. 1 release
  10. 6.0.2target
1+
change to make
5
advisories fixed
4+
new
33+
fixes

Counted from 53 of 57 release notes. Advisories are counted from the advisory database, in full.

Before you upgrade

Tick each one off as you go
  • Breaking6.0.0

Security

  • Fixed collision vulnerability on object in size (by Artyom Arutyunyan).

    3.1.31

Release by release

  1. 6.0.2

    5 Oct 20263 fixes
    • Fixed

      Fixed floats in size of customRandom

    • Fixed

      Fixed performance of customRandom on changes size

    • Fixed

      Fixed docs (by @Likio3000 & @lenamonj).

  2. 6.0.1

    3 Aug 20261 fix
    • Fixed

      Fixed docs.

  3. 6.0.0

    Migration needed12 Jul 2026
    • Breaking

      Removed Node.js 18 and 20 support.

  4. 5.1.16

    24 Jun 20261 fix
    • Fixed

      Fixed forever loop on negative size

  5. 5.1.15

    20 Jun 20261 fix
    • Fixed

      Fixed random pool corruption on big ID sizes.

  6. 5.1.14

    18 Jun 20261 fix
    • Fixed

      Fixed npm package size regression.

  7. 5.1.12 – 5.1.132 releases, nothing new or fixed in the notes

  8. 5.1.11

    30 Apr 20261 fix
    • Fixed

      Fixed breaking Nano ID by requesting big ID.

14 other lines we could not sort, mostly version bumps
  • Reduced JS bundle size

    6.0.2
  • Made nanoid() and customAlphabet() 4 times faster

    6.0.0
  • Moved to npm Provenance and Staged Publishing.

    5.1.12
  • Made cusatomAlphabet 75% faster

    5.1.8
  • Updated nanoid.js for CDN

    5.1.7
  • Reduced customAlphabet size

    5.0.8
  • Make browser’s version faster by increasing size a little (by Samuel Elgozi).

    5.0.5
  • Reduced npm package size

    4.0.1
  • Reduced npm package size.

    3.3.13
  • Backport funding information.

    3.3.5

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.