@akinon/next 1.95.0-snapshot-ZERO-3586-20250901142729 → 1.95.0-snapshot-ZERO-3586-20250908105610
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 +10 -10
- package/lib/cache-handler.mjs +11 -44
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
-
## 1.95.0-snapshot-ZERO-3586-
|
|
3
|
+
## 1.95.0-snapshot-ZERO-3586-20250908105610
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
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
|
-
-
|
|
71
|
+
- 0e823010: ZERO-3531: Add saveSampleProducts endpoint
|
|
72
72
|
|
|
73
73
|
## 1.95.0-rc.54
|
|
74
74
|
|
package/lib/cache-handler.mjs
CHANGED
|
@@ -9,14 +9,7 @@ let zstd;
|
|
|
9
9
|
try {
|
|
10
10
|
const { compress, decompress } = await import('@mongodb-js/zstd');
|
|
11
11
|
zstd = { compress, decompress, type: 'native' };
|
|
12
|
-
|
|
13
|
-
'[Cache Handler] ✅ Native @mongodb-js/zstd loaded successfully'
|
|
14
|
-
);
|
|
15
|
-
} catch (error) {
|
|
16
|
-
console.warn(
|
|
17
|
-
'[Cache Handler] ❌ @mongodb-js/zstd failed to load, fallback to uncompressed:',
|
|
18
|
-
error.message
|
|
19
|
-
);
|
|
12
|
+
} catch (_) {
|
|
20
13
|
zstd = false;
|
|
21
14
|
}
|
|
22
15
|
})();
|
|
@@ -179,11 +172,7 @@ const compressValue = async (value) => {
|
|
|
179
172
|
};
|
|
180
173
|
|
|
181
174
|
return compressedResult;
|
|
182
|
-
} catch (
|
|
183
|
-
console.warn(
|
|
184
|
-
'[Cache Handler] Compression failed, storing uncompressed:',
|
|
185
|
-
error.message
|
|
186
|
-
);
|
|
175
|
+
} catch (_) {
|
|
187
176
|
return value;
|
|
188
177
|
}
|
|
189
178
|
};
|
|
@@ -418,11 +407,7 @@ CacheHandler.onCreation(async () => {
|
|
|
418
407
|
return typeof decompressed === 'string'
|
|
419
408
|
? JSON.parse(decompressed)
|
|
420
409
|
: decompressed;
|
|
421
|
-
} catch (
|
|
422
|
-
console.warn(
|
|
423
|
-
'[Cache Handler] Failed to decompress local cache value:',
|
|
424
|
-
error.message
|
|
425
|
-
);
|
|
410
|
+
} catch (_) {
|
|
426
411
|
return localResult;
|
|
427
412
|
}
|
|
428
413
|
}
|
|
@@ -457,26 +442,20 @@ CacheHandler.onCreation(async () => {
|
|
|
457
442
|
typeof decompressed === 'string'
|
|
458
443
|
? JSON.parse(decompressed)
|
|
459
444
|
: decompressed;
|
|
460
|
-
} catch (
|
|
461
|
-
|
|
462
|
-
'[Cache Handler] Failed to decompress Redis cache value:',
|
|
463
|
-
error.message
|
|
464
|
-
);
|
|
445
|
+
} catch (_) {
|
|
446
|
+
return finalResult;
|
|
465
447
|
}
|
|
466
448
|
}
|
|
467
449
|
|
|
468
450
|
try {
|
|
469
451
|
await localHandler.set(vKey, finalResult, context);
|
|
470
|
-
} catch (
|
|
471
|
-
|
|
472
|
-
'[Cache Handler] Failed to sync to local:',
|
|
473
|
-
error.message
|
|
474
|
-
);
|
|
452
|
+
} catch (_) {
|
|
453
|
+
return finalResult;
|
|
475
454
|
}
|
|
476
455
|
return finalResult;
|
|
477
456
|
}
|
|
478
|
-
} catch (
|
|
479
|
-
|
|
457
|
+
} catch (_) {
|
|
458
|
+
return undefined;
|
|
480
459
|
}
|
|
481
460
|
|
|
482
461
|
return undefined;
|
|
@@ -495,10 +474,6 @@ CacheHandler.onCreation(async () => {
|
|
|
495
474
|
(compressedValue?.__compressed ||
|
|
496
475
|
compressedValue?.value?.__compressed);
|
|
497
476
|
} catch (error) {
|
|
498
|
-
console.warn(
|
|
499
|
-
'[Cache Handler] Compression failed, using original value:',
|
|
500
|
-
error.message
|
|
501
|
-
);
|
|
502
477
|
compressedValue = value;
|
|
503
478
|
shouldUseCompressed = false;
|
|
504
479
|
}
|
|
@@ -525,6 +500,7 @@ CacheHandler.onCreation(async () => {
|
|
|
525
500
|
redisSetResult = { status: 'fulfilled' };
|
|
526
501
|
} catch (error) {
|
|
527
502
|
redisSetResult = { status: 'rejected', reason: error };
|
|
503
|
+
return redisSetResult;
|
|
528
504
|
}
|
|
529
505
|
}
|
|
530
506
|
|
|
@@ -534,17 +510,8 @@ CacheHandler.onCreation(async () => {
|
|
|
534
510
|
localSetResult = { status: 'fulfilled' };
|
|
535
511
|
} catch (error) {
|
|
536
512
|
localSetResult = { status: 'rejected', reason: error };
|
|
513
|
+
return localSetResult;
|
|
537
514
|
}
|
|
538
|
-
|
|
539
|
-
const results = [localSetResult, redisSetResult];
|
|
540
|
-
|
|
541
|
-
console.warn('SET Results:', {
|
|
542
|
-
local: results[0].status,
|
|
543
|
-
redis: results[1].status,
|
|
544
|
-
localError: results[0].reason?.message,
|
|
545
|
-
redisError: results[1].reason?.message,
|
|
546
|
-
compressionUsed: shouldUseCompressed
|
|
547
|
-
});
|
|
548
515
|
},
|
|
549
516
|
delete: async (key, context) => {
|
|
550
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-
|
|
4
|
+
"version": "1.95.0-snapshot-ZERO-3586-20250908105610",
|
|
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.95.0-snapshot-ZERO-3586-
|
|
38
|
+
"@akinon/eslint-plugin-projectzero": "1.95.0-snapshot-ZERO-3586-20250908105610",
|
|
39
39
|
"@babel/core": "7.26.10",
|
|
40
40
|
"@babel/preset-env": "7.26.9",
|
|
41
41
|
"@babel/preset-typescript": "7.27.0",
|