Skip to content

Commit

Permalink
Support Next.js 15 & React 19 (#94)
Browse files Browse the repository at this point in the history
* chore(peerDependencies): support Next.js 15 & React 19

* test: replace custom locale test with an actual example

---------

Co-authored-by: Angelo Ashmore <[email protected]>
  • Loading branch information
levimykel and angeloashmore authored May 30, 2024
1 parent df6fda8 commit c4e1b7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
},
"peerDependencies": {
"@prismicio/client": "^6 || ^7",
"next": ">=13.4.5",
"react": "^18"
"next": "^13.4.5 || ^14 || ^15.0.0-rc.0",
"react": "^18 || ^19.0.0-rc.0"
},
"engines": {
"node": ">=14.15.0"
Expand Down
6 changes: 2 additions & 4 deletions test/createLocaleRedirect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ it("allows for custom locale codes", async () => {
acceptLanguage: "fr-fr,fr;q=0.5",
}),
localeOverrides: {
"fr-fr": "custom-locale",
"fr-fr": "jp",
},
};

Expand All @@ -132,9 +132,7 @@ it("allows for custom locale codes", async () => {

const redirect = await createLocaleRedirect(config);

expect(redirect?.headers.get("location")).toBe(
"https://example.com/custom-locale/foo",
);
expect(redirect?.headers.get("location")).toBe("https://example.com/jp/foo");
expect(redirect?.status).toBe(302);
});

Expand Down

0 comments on commit c4e1b7f

Please sign in to comment.