Skip to content

v1.3.0

Latest

Choose a tag to compare

@ndungtse ndungtse released this 09 Nov 10:41
· 1 commit to main since this release
da6ad71

What's fixed

  • router.replace() to the current pathname now navigates. Query-only changes such as /?tab=1 → /?tab=2 or /?redirect=%2F → / were silently dropped. push() and replace() from useRouter() now always navigate exactly like next/navigation; the package only decides whether to show the bar.
  • useRouter() returns the same object across renders, so it is safe in useEffect dependencies (#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 the history methods it patched.
  • nonce and transformCSS props 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/react 19 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 server layout.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() and replace() now return what Next returns (void). Before, they sometimes returned Promise<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