nuxt-typed-router

🚦Provide autocompletion and typecheck to Nuxt router

MIT License

Downloads
53.4K
Stars
307
Committers
11

Bot releases are hidden (Show)

nuxt-typed-router - v3.2.2

Published by victorgarciaesgi over 1 year ago

🐞 Bug Fixes

  • fix: route names of default locale are broken #93
nuxt-typed-router - v3.0.1

Published by victorgarciaesgi over 1 year ago

  • fix: GlobalComponents declaration #71
nuxt-typed-router - v3.0.0

Published by victorgarciaesgi over 1 year ago

🎉 New features

Path autocomplete and validity type-check (⚠️ Experimental)

Can be disabled with the experimentalPathCheck option.

  • Autocomplete for path programmatic navigation
  • Support NuxtLink, useRouter, navigateTo and useLocalePath
  • Support query params and hashs
  • Throw an error if the path doesn't match any defined routes pattern

This feature is still experimental and has to be well tested on more apps.

Nuxt devtools support ⚙️

  • Display nuxt-typed-router docs from devtools

definePageMeta support

Get autocompletion et type check for redirect, validate and key

Bug fixs 🐞

  • Fixed tsconfig augmentation when used with other modules

@nuxtjs/i18n

  • Removed routes generated by @nuxtjs/i18n from autocomplete
  • Support prefix_and_default strategy
  • localePath will only validate and autocomplete default routes

Breaking changes ⚠️

  • Reworked routeNames object params to better match pages folder structure
nuxt-typed-router - v2.3.5

Published by victorgarciaesgi over 1 year ago

  • fix: nuxt components not being typed #70
nuxt-typed-router - v3.0.0-beta.0

Published by victorgarciaesgi over 1 year ago

🎉 New features

Path autocomplete and validity type-check (⚠️ Experimental)

Can be disabled with the experimentalPathCheck option.

  • Autocomplete for path programmatic navigation
  • Support NuxtLink, useRouter, navigateTo and useLocalePath
  • Support query params and hashs
  • Throw an error if the path doesn't match any defined routes pattern

This feature is still experimental and has to be well tested on more apps.

Nuxt devtools support ⚙️

  • Display nuxt-typed-router docs from devtools

definePageMeta support

Get autocompletion et type check for redirect, validate and key

Breaking changes ⚠️

  • Removed routes generated by @nuxtjs/i18n from autocomplete
  • Reworked routeNames object params to better match pages folder structure
nuxt-typed-router - v2.3.4

Published by victorgarciaesgi over 1 year ago

  • fixed #66
nuxt-typed-router - v2.3.3

Published by victorgarciaesgi over 1 year ago

  • Fixed localePath string navigation type bug
nuxt-typed-router - v2.3.2

Published by victorgarciaesgi over 1 year ago

  • fixed localePath return type to match <NuxtLink/> typed props
nuxt-typed-router - v2.3.1

Published by victorgarciaesgi over 1 year ago

  • fix: support all i18n module declarations (#48)
nuxt-typed-router - v2.3.0

Published by victorgarciaesgi over 1 year ago

🎉 New features

i18n support (#48)

  • Autocomplete routes and locales on useLocalePath and useLocaleRoute.
  • Zero config!
  • Generate correct routes names for prefixed routes

Strict mode support (#64)

  • Added strict option to prevent passing string paths
  • Customizable behaviours for <NuxtLink/> and router

Misc

  • Small options refacto
  • Updated docs
nuxt-typed-router - v2.2.1

Published by victorgarciaesgi over 1 year ago

  • Fixed a type issue where types returned by useRoute(name) where wrong
nuxt-typed-router - v2.2.0

Published by victorgarciaesgi over 1 year ago

v2.2.0 update.

Features

  • Updated to Nuxt 3.1.1
  • Plugin generation is now using addPlugin and no longer added in your plugins folder

Fixs

  • Fixed some types issues

⚠️ Breaking changes

Renamed some exported types to match vue-router ones

  • TypedRouteList -> RoutesNamesList
  • TypedNamedRoute -> TypedRouteFromName
  • TypedRouteParams -> RoutesParamsRecord
  • ResolvedTypedRouteNamedMapper -> RoutesNamedLocationsResolved

Misc

  • generators code refactor
  • Updated docs for "How to use"
  • Added more edge cases tests
nuxt-typed-router - v2.1.4

Published by victorgarciaesgi over 1 year ago

  • Fixed a bug where key were missing from navigateTo args
nuxt-typed-router - v2.1.3

Published by victorgarciaesgi over 1 year ago

New features

  • Support for navigateTo
  • Support for module-extended routes

Fixs

  • Fixed a bug with routes added by router config in nuxt.config.ts
  • Fixed a plugin registration bug

Misc

  • Added more e2e tests and unit tests
nuxt-typed-router - v2.1.2

Published by victorgarciaesgi over 1 year ago

  • Fixed utility types export
  • Added new section for utility types in doc
nuxt-typed-router - v2.1.1

Published by victorgarciaesgi over 1 year ago

  • Fixed an issue with pnpm install and prepare script

Thanks @tobychidi !

nuxt-typed-router - v2.1.0

Published by victorgarciaesgi over 1 year ago

Fast releases I know! But I managed to override useRouter and useRoute global typings.

  • useRoute and useRouter are now typed without importing anything
  • Fixed a bug where <nuxt-link/> types were not working if not importing from @typed-router
  • Support for "catchAll" routes like [...slug].vue
  • Support for optional params like [[bar]].vue
  • Updated docs
  • Added more robust e2e and unit tests
nuxt-typed-router - v2.0.3

Published by victorgarciaesgi almost 2 years ago

  • Replaced srcDir with rootDir to target the correct .nuxt path #59

Thanks @Pierre-M !

nuxt-typed-router - v2.0.2

Published by victorgarciaesgi almost 2 years ago

  • fixed url resolver and crash on node version > 19 #57
    Thanks to @thunfisch987 !
nuxt-typed-router - v2.0.1

Published by victorgarciaesgi almost 2 years ago

  • Fixed breaking bug #56
    Thanks @AnoRebel!
Package Rankings
Top 4.98% on Npmjs.org
Badges
Extracted from project README
npm version npm downloads npm downloads Documentation Open in StackBlitz Watch the video