@akinon/next 1.95.0-snapshot-ZERO-3586-20250901140025 → 1.95.0-snapshot-ZERO-3586-20250903094652

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,6 +1,6 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.95.0-snapshot-ZERO-3586-20250901140025
3
+ ## 1.95.0-snapshot-ZERO-3586-20250903094652
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -10,7 +10,7 @@
10
10
  - 28c7ea79: ZERO-3427: Refactor redirect utility to handle undefined URL and improve locale handling
11
11
  - e1aa030d: ZERO-3473: Refactor locale handling to prioritize cookie value for matched locale
12
12
  - 63774a6a: ZERO-3351: Add commerce redirection ignore list functionality and related utility
13
- - 2d9b2b2c9: ZERO-2816: Add segment to headers
13
+ - 2d9b2b2c: ZERO-2816: Add segment to headers
14
14
  - 5e1feca6: Revert "ZERO-3286: Add notFound handling for chunk URLs starting with \_next"
15
15
  - 40a46853: ZERO-3182: Optimize basket update mutation with optimistic update
16
16
  - 5f7edd6: ZERO-3571: Enhance Jest configuration by adding base directory resolution and module name mapping
@@ -20,13 +20,13 @@
20
20
  - f49bb74f: ZERO-3097: Add setCookie to logging in payment redirection middlewares
21
21
  - 0ad91bbd: ZERO-3489: Improve error handling in data fetching across multiple pages and server functions
22
22
  - 143be2b9: ZERO-3457: Crop styles are customizable and logic improved for rendering similar products modal
23
- - e9541a13d: ZERO-2816: Add headers to url
23
+ - e9541a13: ZERO-2816: Add headers to url
24
24
  - 9b7d0de6: ZERO-3393: Improve error handling in checkout middleware to support both object and array error formats
25
25
  - 72fd4d67: ZERO-3084: Fix URL search parameters encoding in default middleware
26
26
  - c53ef7b95: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
27
27
  - a8539c8c: ZERO-3439: Enhance locale handling in middleware and redirect utility
28
28
  - 16aff543: ZERO-3431: Add test script for redirect utility in package.json
29
- - 64699d3ff: ZERO-2761: Fix invalid import for plugin module
29
+ - 64699d3f: ZERO-2761: Fix invalid import for plugin module
30
30
  - 9f8cd3bc: ZERO-3449: AI Search Active Filters & Crop Style changes have been implemented
31
31
  - e974d8e8: ZERO-3406: Fix rc build
32
32
  - 89ce46fc: ZERO-3493: return 404 status code for pz-not-found pages
@@ -35,12 +35,12 @@
35
35
  - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
36
36
  - 8b1d24eb: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
37
37
  - d552629f: ZERO-3182: Refactor basketApi to use invalidatesTags and comment out onQueryStarted logic
38
- - 17f87524e: ZERO-2816: Make the incoming currency lowercase
38
+ - 17f87524: ZERO-2816: Make the incoming currency lowercase
39
39
  - 65d3b862: ZERO-3054: Update headers in appFetch
40
40
  - c39c7000: ZERO-3420: Refactor Modal component
41
41
  - bbe18b9ff: ZERO-2575: Fix build error
42
42
  - 35dfb8f8: ZERO-3363: Refactor URL handling in checkout and redirection middlewares to use url.origin instead of process.env.NEXT_PUBLIC_URL
43
- - 4920742c2: Disable getCachedTranslations
43
+ - 4920742c: Disable getCachedTranslations
44
44
  - b6e5b624: ZERO-3257: Enhance locale middleware to redirect using existing or default locale and support 303 status for POST requests
45
45
  - 0de55738: ZERO-3418: Update remotePatterns hostname to allow all subdomains
46
46
  - 7e56d6b6: ZERO-2841: Update api tagTypes
@@ -59,16 +59,16 @@
59
59
  - f7fd459b: ZERO-3445: Refactor setCookie function to include domain handling and improve cookie string construction
60
60
  - 4de5303c: ZERO-2504: add cookie filter to api client request
61
61
  - dc678c3: ZERO-3523: Enhance redirect tests with dynamic locale handling and settings integration
62
- - f2c92d5c7: ZERO-2816: Update cookie name
62
+ - f2c92d5c: ZERO-2816: Update cookie name
63
63
  - a420947d: ZERO-3517: Fix optional chaining for rawData in error logging for category data handlers
64
- - 7bd3d9928: ZERO-2801: Refactor locale middleware to handle single locale configuration
64
+ - 7bd3d992: ZERO-2801: Refactor locale middleware to handle single locale configuration
65
65
  - acd2afdf: ZERO-3431: Fix import statement for findBaseDir in next-config test
66
66
  - 2d3f1788: ZERO-3417: Enhance FileInput component with additional props for customization
67
67
  - fdd255ee: ZERO-3054: Refactor cache handler to use custom Redis handler and implement key hashing
68
68
  - 49eeebfa: ZERO-2909: Add deleteCollectionItem query to wishlistApi
69
- - 3f9b8d7e7: ZERO-2761: Update plugins.js for akinon-next
69
+ - 3f9b8d7e: ZERO-2761: Update plugins.js for akinon-next
70
70
  - cbdb5c14: ZERO-3448: fix set cookie domain handling for subdomain locale strategy
71
- - 0e82301: ZERO-3531: Add saveSampleProducts endpoint
71
+ - 0e823010: ZERO-3531: Add saveSampleProducts endpoint
72
72
 
73
73
  ## 1.95.0-rc.54
74
74
 
@@ -9,23 +9,8 @@ let zstd;
9
9
  try {
10
10
  const { compress, decompress } = await import('@mongodb-js/zstd');
11
11
  zstd = { compress, decompress, type: 'native' };
12
- console.log(
13
- '[Cache Handler] ✅ Native @mongodb-js/zstd loaded successfully'
14
- );
15
- } catch (error) {
16
- try {
17
- const zstdWasm = await import('@bokuweb/zstd-wasm');
18
- await zstdWasm.init();
19
- zstd = { ...zstdWasm, type: 'wasm' };
20
- console.log('[Cache Handler] ⚠️ Fallback to WASM @bokuweb/zstd-wasm');
21
- } catch (wasmError) {
22
- console.warn(
23
- '[Cache Handler] ❌ Both native and WASM zstd failed to load:',
24
- error.message,
25
- wasmError.message
26
- );
27
- zstd = false;
28
- }
12
+ } catch (_) {
13
+ zstd = false;
29
14
  }
30
15
  })();
31
16
 
@@ -62,14 +47,8 @@ const compressValue = async (value) => {
62
47
  zstdLib.compress.constructor.name === 'AsyncFunction'
63
48
  ) {
64
49
  compressed = await zstdLib.compress(inputBuffer, 3);
65
- console.log(
66
- `[Cache Handler] 🚀 Compressed with native zstd: ${inputBuffer.length} → ${compressed.length} bytes`
67
- );
68
50
  } else {
69
51
  compressed = zstdLib.compress(inputBuffer, 3);
70
- console.log(
71
- `[Cache Handler] 🌐 Compressed with WASM zstd: ${inputBuffer.length} → ${compressed.length} bytes`
72
- );
73
52
  }
74
53
  } else {
75
54
  return {
@@ -156,14 +135,8 @@ const compressValue = async (value) => {
156
135
  zstdLib.compress.constructor.name === 'AsyncFunction'
157
136
  ) {
158
137
  compressed = await zstdLib.compress(inputBuffer, 3);
159
- console.log(
160
- `[Cache Handler] 🚀 Compressed with native zstd: ${inputBuffer.length} → ${compressed.length} bytes`
161
- );
162
138
  } else {
163
139
  compressed = zstdLib.compress(inputBuffer, 3);
164
- console.log(
165
- `[Cache Handler] 🌐 Compressed with WASM zstd: ${inputBuffer.length} → ${compressed.length} bytes`
166
- );
167
140
  }
168
141
  } else {
169
142
  if (
@@ -199,11 +172,7 @@ const compressValue = async (value) => {
199
172
  };
200
173
 
201
174
  return compressedResult;
202
- } catch (error) {
203
- console.warn(
204
- '[Cache Handler] Compression failed, storing uncompressed:',
205
- error.message
206
- );
175
+ } catch (_) {
207
176
  return value;
208
177
  }
209
178
  };
@@ -235,16 +204,10 @@ const decompressValue = async (compressedData) => {
235
204
  compressedBuffer
236
205
  );
237
206
  decompressed = decompressedBuffer.toString('utf8');
238
- console.log(
239
- `[Cache Handler] 🚀 Decompressed with native zstd: ${compressedBuffer.length} → ${decompressedBuffer.length} bytes`
240
- );
241
207
  } else {
242
208
  decompressed = zstdLib
243
209
  .decompress(compressedBuffer)
244
210
  .toString('utf8');
245
- console.log(
246
- `[Cache Handler] 🌐 Decompressed with WASM zstd: ${compressedBuffer.length} → ${decompressed.length} bytes`
247
- );
248
211
  }
249
212
  } else {
250
213
  throw new Error('zstd not available for decompression');
@@ -276,16 +239,10 @@ const decompressValue = async (compressedData) => {
276
239
  compressedBuffer
277
240
  );
278
241
  decompressed = decompressedBuffer.toString('utf8');
279
- console.log(
280
- `[Cache Handler] 🚀 Decompressed with native zstd: ${compressedBuffer.length} → ${decompressedBuffer.length} bytes`
281
- );
282
242
  } else {
283
243
  decompressed = zstdLib
284
244
  .decompress(compressedBuffer)
285
245
  .toString('utf8');
286
- console.log(
287
- `[Cache Handler] 🌐 Decompressed with WASM zstd: ${compressedBuffer.length} → ${decompressed.length} bytes`
288
- );
289
246
  }
290
247
  } else {
291
248
  throw new Error('zstd not available for decompression');
@@ -450,11 +407,7 @@ CacheHandler.onCreation(async () => {
450
407
  return typeof decompressed === 'string'
451
408
  ? JSON.parse(decompressed)
452
409
  : decompressed;
453
- } catch (error) {
454
- console.warn(
455
- '[Cache Handler] Failed to decompress local cache value:',
456
- error.message
457
- );
410
+ } catch (_) {
458
411
  return localResult;
459
412
  }
460
413
  }
@@ -489,26 +442,20 @@ CacheHandler.onCreation(async () => {
489
442
  typeof decompressed === 'string'
490
443
  ? JSON.parse(decompressed)
491
444
  : decompressed;
492
- } catch (error) {
493
- console.warn(
494
- '[Cache Handler] Failed to decompress Redis cache value:',
495
- error.message
496
- );
445
+ } catch (_) {
446
+ return finalResult;
497
447
  }
498
448
  }
499
449
 
500
450
  try {
501
451
  await localHandler.set(vKey, finalResult, context);
502
- } catch (error) {
503
- console.warn(
504
- '[Cache Handler] Failed to sync to local:',
505
- error.message
506
- );
452
+ } catch (_) {
453
+ return finalResult;
507
454
  }
508
455
  return finalResult;
509
456
  }
510
- } catch (error) {
511
- console.warn('[Cache Handler] Redis error:', error.message);
457
+ } catch (_) {
458
+ return undefined;
512
459
  }
513
460
 
514
461
  return undefined;
@@ -527,10 +474,6 @@ CacheHandler.onCreation(async () => {
527
474
  (compressedValue?.__compressed ||
528
475
  compressedValue?.value?.__compressed);
529
476
  } catch (error) {
530
- console.warn(
531
- '[Cache Handler] Compression failed, using original value:',
532
- error.message
533
- );
534
477
  compressedValue = value;
535
478
  shouldUseCompressed = false;
536
479
  }
@@ -557,6 +500,7 @@ CacheHandler.onCreation(async () => {
557
500
  redisSetResult = { status: 'fulfilled' };
558
501
  } catch (error) {
559
502
  redisSetResult = { status: 'rejected', reason: error };
503
+ return redisSetResult;
560
504
  }
561
505
  }
562
506
 
@@ -566,17 +510,8 @@ CacheHandler.onCreation(async () => {
566
510
  localSetResult = { status: 'fulfilled' };
567
511
  } catch (error) {
568
512
  localSetResult = { status: 'rejected', reason: error };
513
+ return localSetResult;
569
514
  }
570
-
571
- const results = [localSetResult, redisSetResult];
572
-
573
- console.warn('SET Results:', {
574
- local: results[0].status,
575
- redis: results[1].status,
576
- localError: results[0].reason?.message,
577
- redisError: results[1].reason?.message,
578
- compressionUsed: shouldUseCompressed
579
- });
580
515
  },
581
516
  delete: async (key, context) => {
582
517
  const vKey = versionKey(key);
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.95.0-snapshot-ZERO-3586-20250901140025",
4
+ "version": "1.95.0-snapshot-ZERO-3586-20250903094652",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -17,7 +17,6 @@
17
17
  "test": "jest"
18
18
  },
19
19
  "dependencies": {
20
- "@bokuweb/zstd-wasm": "^0.0.27",
21
20
  "@mongodb-js/zstd": "^2.0.1",
22
21
  "@neshca/cache-handler": "1.9.0",
23
22
  "@opentelemetry/exporter-trace-otlp-http": "0.46.0",
@@ -36,7 +35,7 @@
36
35
  "set-cookie-parser": "2.6.0"
37
36
  },
38
37
  "devDependencies": {
39
- "@akinon/eslint-plugin-projectzero": "1.95.0-snapshot-ZERO-3586-20250901140025",
38
+ "@akinon/eslint-plugin-projectzero": "1.95.0-snapshot-ZERO-3586-20250903094652",
40
39
  "@babel/core": "7.26.10",
41
40
  "@babel/preset-env": "7.26.9",
42
41
  "@babel/preset-typescript": "7.27.0",