@akinon/next 1.127.0-rc.2 → 1.127.0-rc.4

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,12 +1,16 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.127.0-rc.2
3
+ ## 1.127.0-rc.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 9db81a71: ZERO-4365: Remove brand `@theme/*` alias imports from library packages
4
8
 
5
9
  ## 1.127.0-rc.1
6
10
 
7
11
  ### Minor Changes
8
12
 
9
- - 1d00f2d0: BRDG-16664: Set secure flag for CSRF token cookies in useCaptcha and default middleware
13
+ - 57d7eb30: ZERO-4276: Refactor route generation logic by removing environment loading and simplifying skip segments handling
10
14
 
11
15
  ## 1.127.0-rc.0
12
16
 
@@ -25,11 +29,22 @@
25
29
  - 591e345e: ZERO-3855: Enhance credit card payment handling in checkout middlewares
26
30
  - 4de5303c: ZERO-2504: add cookie filter to api client request
27
31
  - 95b139dc: ZERO-3795: Remove duplicate entry for SavedCard in PluginComponents map
32
+ - 1d00f2d0: BRDG-16664: Set secure flag for CSRF token cookies in useCaptcha and default middleware
28
33
  - 4ac7b2a1: ZERO-4219: fix masterpass-rest callback route format and double-encoded error cookie
29
34
  - 4998a963: ZERO-4168: Add server-side payload optimization
30
35
  - 3909d322: Edit the duplicate Plugin.SimilarProducts in the plugin-module.
31
36
  - e18836b2: ZERO-4160: Restore scope in Sentry addon configuration in akinon.json
32
37
 
38
+ ## 1.126.1
39
+
40
+ ### Patch Changes
41
+
42
+ - 8d9e44ef: ZERO-4365: Remove brand `@theme/*` alias imports from library packages
43
+
44
+ `pz-virtual-try-on/src/components/barcode-scanner.tsx` was importing `LoaderSpinner` from `@theme/components`, which only resolves inside the brand's own `src/` scope (Next.js tsconfig paths -> webpack alias). Plugin source compiled via `transpilePackages` cannot see this alias, so any brand using the plugin (since 1.117.0) fails to build with `Module not found: Can't resolve '@theme/components'`. The `LoaderSpinner` was a redundant second spinner on top of an existing Tailwind `animate-spin` div — removed entirely. The `settings.customRenderers.renderLoadingSpinner` override path is unchanged.
45
+
46
+ `akinon-next/components/select.tsx` was using `import { SelectProps } from '@theme/components/types'` (value import). Changed to `import type` so the brand-side type dependency is erased at compile time and never reaches webpack module resolution.
47
+
33
48
  ## 1.126.0
34
49
 
35
50
  ## 1.125.2
@@ -7,15 +7,6 @@ const findBaseDir = require('../utils/find-base-dir');
7
7
  const generateRoutes = () => {
8
8
  const baseDir = findBaseDir();
9
9
 
10
- try {
11
- const { loadEnvConfig } = require('@next/env');
12
- loadEnvConfig(baseDir, false, { info: () => {}, error: () => {} });
13
- } catch {
14
- console.warn(
15
- 'Could not load .env file. Set PZ_SKIP_ROUTE_SEGMENTS as a shell environment variable if needed.'
16
- );
17
- }
18
-
19
10
  const srcDir = path.join(baseDir, 'src');
20
11
  const appDir = path.join(srcDir, 'app');
21
12
 
@@ -35,7 +26,7 @@ const generateRoutes = () => {
35
26
  const routes = [];
36
27
  const excludedDirs = ['api', 'pz-not-found'];
37
28
 
38
- const defaultSkipSegments = [
29
+ const skipSegments = [
39
30
  '[pz]',
40
31
  '[commerce]',
41
32
  '[locale]',
@@ -44,21 +35,10 @@ const generateRoutes = () => {
44
35
  '[segment]',
45
36
  '[url]',
46
37
  '[theme]',
47
- '[member_type]'
38
+ '[member_type]',
39
+ '[clienttype]'
48
40
  ];
49
41
 
50
- const customSegments = process.env.PZ_SKIP_ROUTE_SEGMENTS
51
- ? process.env.PZ_SKIP_ROUTE_SEGMENTS.split(',')
52
- .map((s) => s.trim())
53
- .filter(Boolean)
54
- .map((s) =>
55
- s.startsWith('[') ? s.toLowerCase() : `[${s}]`.toLowerCase()
56
- )
57
- : [];
58
-
59
- const skipSegments = [
60
- ...new Set([...defaultSkipSegments, ...customSegments])
61
- ];
62
42
  const skipCatchAllRoutes = ['[...prettyurl]', '[...not_found]'];
63
43
 
64
44
  const walkDirectory = (dir, basePath = '') => {
@@ -1,5 +1,5 @@
1
1
  import { forwardRef } from 'react';
2
- import { SelectProps } from '@theme/components/types';
2
+ import type { SelectProps } from '@theme/components/types';
3
3
  import clsx from 'clsx';
4
4
  import { Icon } from './icon';
5
5
  import { twMerge } from 'tailwind-merge';
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.127.0-rc.2",
4
+ "version": "1.127.0-rc.4",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -35,7 +35,7 @@
35
35
  "set-cookie-parser": "2.6.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@akinon/eslint-plugin-projectzero": "1.127.0-rc.2",
38
+ "@akinon/eslint-plugin-projectzero": "1.127.0-rc.4",
39
39
  "@babel/core": "7.26.10",
40
40
  "@babel/preset-env": "7.26.9",
41
41
  "@babel/preset-typescript": "7.27.0",