Skip to content

Releases: tatethurston/nextjs-routes

v2.2.4

23 Nov 01:38
11c98bc
Compare
Choose a tag to compare

What's Changed

  • CLI invocation now reads next.config.js or next.config.mjs.
  • Fix route's handling of query keys whose value is undefined. Fixes #206. Thanks @sleepdotexe!

Full Changelog: v2.2.3...v2.2.4

v2.2.4-rc.1

09 Oct 05:13
8231dbd
Compare
Choose a tag to compare
v2.2.4-rc.1 Pre-release
Pre-release

2.2.4-rc.1

  • CLI invocation now reads next.config.js or next.config.mjs.

Full Changelog: v2.2.3...v2.2.4-rc.1

v2.2.3

08 Oct 00:42
01b9efd
Compare
Choose a tag to compare

2.2.3

  • Bug fix: usePathname and useParams from next/navigation were incorrectly resolving to any return types.

Full Changelog: v2.2.2...v2.2.3

v2.2.2

01 Oct 01:42
0516c38
Compare
Choose a tag to compare

2.2.2

  • Adds support for Next.js's app directory. Link accepts either static routes (no url parameters) or a RouteLiteral string, which can be generated by the route helper from this library:

    import { route } from "nextjs-routes";
    
    <Link
      href={route({
        pathname: "/foos/[foo]",
        query: { foo: "bar" },
      })}
    >
      Baz
    </Link>;
  • Add RouteLiteral type. This type represents a string that has been confirmed to be a validated application route and can be passed to Link or useRouter. This is a TypeScript branded type.

    import { RouteLiteral } from "nextjs-routes";

    route returns a RouteLiteral. If you construct a route string you can cast it to a RouteLiteral so that Link and useRouter will accept it:

    const myRoute = `/foos/${foo}` as RouteLiteral
    

    In general, prefer using the route helper to generate routes.

  • Refine types for usePathname, useRouter and useParams from "next/navigation" to use nextjs-routes generated types.

  • Fix generated routes when using parallel-routes and intercepting-routes.

  • Fix ref type for Link. Previously ref was missing, now it's correctly typed.

Full Changelog: v2.2.1...v2.2.2

v2.2.2-rc.4

25 Sep 04:06
0956f4f
Compare
Choose a tag to compare
v2.2.2-rc.4 Pre-release
Pre-release

2.2.2

  • Adds support for Next.js's app directory. Link accepts either static routes (no url parameters) or a RouteLiteral string, which can be generated by the route helper from this library:

    import { route } from "nextjs-routes";
    
    <Link
      href={route({
        pathname: "/foos/[foo]",
        query: { foo: "bar" },
      })}
    >
      Baz
    </Link>;
  • Add RouteLiteral type. This type represents a string that confirmed to be a validated application route and can be passed to Link or useRouter. This is a TypeScript branded type.

    import { RouteLiteral } from "nextjs-routes";
  • Refine types for usePathname and useParams from "next/navigation" to use nextjs-routes generated types.

  • Fix generated routes when using parallel-routes and intercepting-routes.

  • Fix ref type for Link. Previously ref was missing, now it's correctly typed.

Full Changelog: v2.2.2-rc.3...v2.2.2-rc.4

v2.2.2-rc.3

20 Sep 04:24
c917293
Compare
Choose a tag to compare
v2.2.2-rc.3 Pre-release
Pre-release

2.2.2-rc.3

  • Adds support for Next.js's app directory. Link accepts either static routes (no url parameters) or a RouteLiteral string, which can be generated by the route helper from this library:

    import { route } from "nextjs-routes";
    
    <Link
      href={route({
        pathname: "/foos/[foo]",
        query: { foo: "bar" },
      })}
    >
      Baz
    </Link>;
  • Add RouteLiteral type. This type represents a string that confirmed to be a validated application route and can be passed to Link or useRouter. This is a TypeScript branded type.

    import { RouteLiteral } from "nextjs-routes";
  • Refine types for usePathname and useParams from "next/navigation" to use nextjs-routes generated types.

  • Fix generated routes when using parallel-routes and intercepting-routes.

v2.2.2-rc.2

20 Sep 02:48
5484840
Compare
Choose a tag to compare
v2.2.2-rc.2 Pre-release
Pre-release

What's Changed

2.2.2-rc.2

  • Adds support for Next.js's app directory. Link accepts either static routes (no url parameters) or a RouteLiteral string, which can be generated by the route helper from this library:

    import { route } from "nextjs-routes";
    
    <Link
      href={route({
        pathname: "/foos/[foo]",
        query: { foo: "bar" },
      })}
    >
      Baz
    </Link>;
  • Add RouteLiteral type. This type represents a string that confirmed to be a validated application route and can be passed to Link or useRouter. This is a TypeScript branded type.

    import { RouteLiteral } from "nextjs-routes";
  • Refine types for usePathname and useParams from "next/navigation"

Full Changelog: v2.2.2-rc.1...v2.2.2-rc.2

v2.2.2-rc.1

15 Sep 21:28
28fc7b2
Compare
Choose a tag to compare
v2.2.2-rc.1 Pre-release
Pre-release

2.2.2

  • Adds support for Next.js's app directory. Link accepts either static routes (no url parameters) or a RouteLiteral string, which can be generated by the route helper from this library:

    import { route } from "nextjs-routes";
    
    <Link
      href={route({
        pathname: "/foos/[foo]",
        query: { foo: "bar" },
      })}
    >
      Baz
    </Link>;
  • Add RouteLiteral type. This type represents a string that confirmed to be a validated application route and can be passed to Link or useRouter. This is a TypeScript branded type.

    import { RouteLiteral } from "nextjs-routes";

v2.2.0

27 May 19:15
49e3ae3
Compare
Choose a tag to compare

What's Changed

  • Add trailingSlash option to route. See #168
  • Fix the generated optional catch all route type. See #183
  • Sort the generated route types lexicographically.

Full Changelog: v2.1.0...v2.2.0

v2.1.0

04 Nov 18:40
fdc0255
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.1...v2.1.0