Skip to content

Releases: tatethurston/nextjs-routes

v1.0.2

21 Nov 01:33
1cf9566
Compare
Choose a tag to compare

1.0.2

  • Link now accepts anchor props:

    <Link href="/dashboard" className="border-indigo-500">
      Dashboard
    </Link>

Full Changelog: v1.0.1...v1.0.2

v1.0.1

18 Nov 03:43
d3e8af7
Compare
Choose a tag to compare

1.0.1

  • Update NextRouter type to keep query and pathname bound in a union. This allows you to use router from useRouter as an argument to router.push or router.replace:

    const router = useRouter();
    // reload the current page, preserving search parameters
    router.push(router, undefined, { locale: "fr" });

Full Changelog: v1.0.0...v1.0.1

v1.0.0

11 Nov 19:02
38da772
Compare
Choose a tag to compare

1.0.0

  • This library will now follow semantic versioning.

  • The previously deprecated direct invocation of nextjs-routes via npx nextjs-routes has been removed in favor of automatic regeneration via withRoutes. See #63 for the motivation behind this change or to voice any concerns.

Full Changelog: v0.1.7...v1.0.0

v0.1.7

08 Nov 22:04
d09ebd1
Compare
Choose a tag to compare

0.1.7

  • Support Next 13 app (beta) directory

  • Add dir option to support non standard NextJS project structures such as Nx:

    // next.config.js
    const withRoutes = require("nextjs-routes/config")({ dir: __dirname });

    Thanks @alexgorbatchev for the contribution!

New Contributors

Full Changelog: v0.1.6...v0.1.7

v0.1.6

29 Oct 00:20
679174b
Compare
Choose a tag to compare

0.1.6

  • Accept path strings for static routes:

    <Link href="/foo">Foo</Link>

    Thanks @MariaSolOs for the contribution!

  • Use function overloads for Link and router.push and router.replace. This yields better hints for typos in pathnames:

    <Link href={{ pathname: "/foosy/[foo]" }}>Foo</Link>

    Previously:
    [tsserver 2322] [E] Type '"/foos/[foo]"' is not assignable to type '"/"'.

    Now:
    Type '"/foosy/[foo]"' is not assignable to type '"/api/hello" | "/bars/[bar]" | "/foos/[foo]" | "/"'. Did you mean '"/foos/[foo]"'? (+2 other overload errors).

Full Changelog: v0.1.5...v0.1.6

v0.1.5

18 Oct 17:29
f0e1ade
Compare
Choose a tag to compare

0.1.5

  • Export Locale from nextjs-routes.

    import { Locale } from "nextjs-routes";

New Contributors

Full Changelog: v0.1.4...v0.1.5

v0.1.4

11 Oct 20:33
Compare
Choose a tag to compare

0.1.4

module.exports = withRoutes({
  i18n: {
    defaultLocale: "de-DE",
    locales: ["de-DE", "en-FR", "en-US"],
  },
});

Will make locale typed as 'de-DE' | 'en-FR' | 'en-US' for Link and useRouter.

Full Changelog: v0.1.3...v0.1.4

v0.1.3

06 Oct 17:50
Compare
Choose a tag to compare

0.1.3

  • nextjs-routes pageExtensions has been updated to respect multiple extensions such as .page.tsx. In 0.1.2, only single extensions .tsx were respected. This is now identical behavior to Next.js. Thanks @Elindorath!

New Contributors

Full Changelog: v0.1.2...v0.1.3

v0.1.2

05 Oct 21:54
554d367
Compare
Choose a tag to compare

0.1.2

Full Changelog: v0.1.1...v0.1.2

v0.1.1

05 Oct 21:44
4c3e7a1
Compare
Choose a tag to compare

0.1.1

[skipped]