Repository navigation
What's fixed
router.replace()to the current pathname now navigates. Query-only changes such as/?tab=1→/?tab=2or/?redirect=%2F→/were silently dropped.push()andreplace()fromuseRouter()now always navigate exactly likenext/navigation; the package only decides whether to show the bar.useRouter()returns the same object across renders, so it is safe inuseEffectdependencies (#28).- A page containing an SVG
<a>no longer stops the bar from showing for every link. sms:,javascript:and other non-http links no longer start a bar that never finishes.- Unmounting
<Next13ProgressBar />now cleans up its listeners and thehistorymethods it patched. nonceandtransformCSSprops now work. Before, they were documented but ignored, so CSP setups couldn't add a nonce.- A numeric
height(e.g.height={3}) is now treated as pixels. - Types work with
@types/react19 and no longer import Next.js internals (#14, #18). - The default CSS is minified, and the bundle is smaller: 3.7 kB, down from 4.9 kB (#30).
New
- The package is marked
'use client', so you can render<Next13ProgressBar />directly in a serverlayout.tsx. Wrapping it in a client "providers" component still works.
Compatibility
Tested in CI against Next.js 14, 15 and 16 (React 18 and 19), in both next build and next dev. Peer dependencies are unchanged.
Deprecated
startPosition, stopDelayMs and showOnShallow never had an effect. They are now marked deprecated and will be removed in a future major version. To set where the bar starts, use options={{ minimum: 0.3 }}.
Upgrade notes
push()andreplace()now return what Next returns (void). Before, they sometimes returnedPromise<boolean>.await router.replace(...)still works.- If you relied on
replace()doing nothing for same-pathname targets, that call now navigates.
Thanks to @zecka for #32/#34 and to everyone who reported issues.
Full changelog: v1.2.2...v1.3.0