@akinon/next 2.0.5-beta.0 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/package.json +3 -3
- package/utils/redirect.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
-
## 2.0.5
|
|
3
|
+
## 2.0.5
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- d8ed63e5: ZERO-4385: Fix `RedirectType` import in `redirect.ts` to derive type from `nextRedirect` signature, restoring compatibility with Next.js 16.2.x where `RedirectType` is exported only as a runtime const from `next/navigation`. Also bumps `next`, `@next/third-parties`, and `eslint-config-next` to 16.2.4.
|
|
8
8
|
|
|
9
9
|
## 2.0.4
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "2.0.5
|
|
4
|
+
"version": "2.0.5",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"set-cookie-parser": "2.6.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@akinon/eslint-plugin-projectzero": "2.0.5
|
|
40
|
+
"@akinon/eslint-plugin-projectzero": "2.0.5",
|
|
41
41
|
"@babel/core": "7.26.10",
|
|
42
42
|
"@babel/preset-env": "7.26.9",
|
|
43
43
|
"@babel/preset-typescript": "7.27.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@typescript-eslint/parser": "6.7.4",
|
|
49
49
|
"babel-jest": "29.7.0",
|
|
50
50
|
"eslint": "8.56.0",
|
|
51
|
-
"eslint-config-next": "16.
|
|
51
|
+
"eslint-config-next": "16.2.4",
|
|
52
52
|
"eslint-config-prettier": "8.5.0",
|
|
53
53
|
"jest": "29.7.0",
|
|
54
54
|
"ts-jest": "29.3.2",
|
package/utils/redirect.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { redirect as nextRedirect
|
|
1
|
+
import { redirect as nextRedirect } from 'next/navigation';
|
|
2
2
|
import Settings from 'settings';
|
|
3
3
|
import { headers } from 'next/headers';
|
|
4
4
|
import { ServerVariables } from '@akinon/next/utils/server-variables';
|
|
5
5
|
import { getUrlPathWithLocale } from '@akinon/next/utils/localization';
|
|
6
6
|
import { urlLocaleMatcherRegex } from '@akinon/next/utils';
|
|
7
7
|
|
|
8
|
+
type RedirectType = NonNullable<Parameters<typeof nextRedirect>[1]>;
|
|
9
|
+
|
|
8
10
|
export const redirect = async (path: string, type?: RedirectType) => {
|
|
9
11
|
const nextHeaders = await headers();
|
|
10
12
|
const pageUrl = new URL(
|