nanoid
6.0.2 · 5 Oct 2026MIT398.9M / weekRepositoryHomepagenpmAtom feed
Upgrading nanoid From 2.1.11 to 3.0.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
- ?
- changes to make
- 0
- advisories fixed
- 3
- new
- 0
- fixes
Security
5 advisories still affect 3.0.0
- nanoid: non-secure generators can loop indefinitely with negative sizehigh · GHSA-28wg-ghj8-5hjv
- nanoid: custom generators can loop indefinitely when size is zerohigh · GHSA-2v37-7h3g-55p8
- Predictable results in nanoid generation when given non-integer valuesmoderate · GHSA-mwcw-c2x4-8c55
Upgrading to 3.3.18 clears them.
Release by release
- New
The size was decreased by 10% from 119 to 108 bytes.
- New
We got full TypeScript support. We use check-dts to test out
.d.tsfiles. - New
Nano ID now has out-of-the-box ES modules support and extra file to load Nano ID from jsDelivr (use it only for experiments, because of the bad loading performance). Dual ESM/CommonJS packaging is provided by dual-publish and will work in Node.js ≥12, webpack, Parcel, Rollup, and React Native.
- New
3 other lines we could not sort, mostly version bumps
- 3.0.0
Only Create React App 4.0 supports dual ESM/CJS modules.
- 3.0.0
Change polyfill for hardware random generator from
expo-randomtoreact-native-get-random-values. - 3.0.0
Use sync Nano ID instead of async.
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.