@akinon/next 1.82.0-rc.12 → 1.82.0-rc.13

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.82.0-rc.13
4
+
5
+ ### Minor Changes
6
+
7
+ - 3bf63c8: ZERO-3286: Add notFound handling for chunk URLs starting with \_next
8
+
3
9
  ## 1.82.0-rc.12
4
10
 
5
11
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  import settings from 'settings';
2
2
  import { LayoutProps, PageProps, RootLayoutProps } from '../../types';
3
- import { redirect } from 'next/navigation';
3
+ import { redirect, notFound } from 'next/navigation';
4
4
  import { ServerVariables } from '../../utils/server-variables';
5
5
  import { ROUTES } from 'routes';
6
6
  import logger from '../../utils/log';
@@ -21,6 +21,12 @@ export const withSegmentDefaults =
21
21
  async (props: T) => {
22
22
  let componentProps = { ...props };
23
23
 
24
+ // Handle not found chunk urls starting with _next
25
+ // Normally, next.js router should handle these urls and should not reach this point
26
+ if (props.params.commerce === '_next') {
27
+ return notFound();
28
+ }
29
+
24
30
  if (options.segmentType === 'root-layout') {
25
31
  componentProps = (await addRootLayoutProps(
26
32
  componentProps as RootLayoutProps
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": "1.82.0-rc.12",
4
+ "version": "1.82.0-rc.13",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "set-cookie-parser": "2.6.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@akinon/eslint-plugin-projectzero": "1.82.0-rc.12",
33
+ "@akinon/eslint-plugin-projectzero": "1.82.0-rc.13",
34
34
  "@types/react-redux": "7.1.30",
35
35
  "@types/set-cookie-parser": "2.4.7",
36
36
  "@typescript-eslint/eslint-plugin": "6.7.4",