@akinon/next 1.93.0-snapshot-ZERO-3586-20250827093151 → 1.93.0-snapshot-ZERO-3586-20250827113246

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,10 +1,10 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.93.0-snapshot-ZERO-3586-20250827093151
3
+ ## 1.93.0-snapshot-ZERO-3586-20250827113246
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - 5dfeea04: ZERO-2801: Revert ZERO-2801
7
+ - 5dfeea04a: ZERO-2801: Revert ZERO-2801
8
8
  - 823d82f9: ZERO-3393: Enhance error handling in checkout middleware to ensure errors are checked for existence before processing
9
9
  - 412f0e2: ZERO-3586: Enhance caching functionality by adding support for compressed data storage and retrieval, along with a new method for setting multiple key-value pairs.
10
10
  - 28c7ea79: ZERO-3427: Refactor redirect utility to handle undefined URL and improve locale handling
@@ -46,10 +46,10 @@
46
46
  - bbe18b9ff: ZERO-2575: Fix build error
47
47
  - 17bfadc4: ZERO-3275: Disable OpenTelemetry monitoring in production environment
48
48
  - 35dfb8f8: ZERO-3363: Refactor URL handling in checkout and redirection middlewares to use url.origin instead of process.env.NEXT_PUBLIC_URL
49
- - 4920742c: Disable getCachedTranslations
49
+ - 4920742c2: Disable getCachedTranslations
50
50
  - b6e5b624: ZERO-3257: Enhance locale middleware to redirect using existing or default locale and support 303 status for POST requests
51
51
  - 0de55738: ZERO-3418: Update remotePatterns hostname to allow all subdomains
52
- - 7e56d6b6: ZERO-2841: Update api tagTypes
52
+ - 7e56d6b6b: ZERO-2841: Update api tagTypes
53
53
  - dfaceffd: ZERO-3356: Add useLoyaltyAvailability hook and update checkout state management
54
54
  - 86642cf: ZERO-3531: Add saveSampleProducts endpoint and update URLs in checkout
55
55
  - d99a6a7d: ZERO-3457: Fixed the settings prop and made sure everything is customizable.
@@ -143,7 +143,8 @@ export const getProductData = async ({
143
143
  headers
144
144
  }),
145
145
  {
146
- expire: 300
146
+ expire: 300,
147
+ compressed: true
147
148
  }
148
149
  );
149
150
  };
@@ -155,17 +155,15 @@ CacheHandler.onCreation(async () => {
155
155
 
156
156
  const localHandler = createLruHandler(CACHE_CONFIG.lru);
157
157
 
158
- // Pre-compute version prefix if exists
159
- const versionPrefix = CACHE_CONFIG.version ? `${CACHE_CONFIG.version}:` : '';
158
+ const CACHE_VERSION = 'v2';
159
+ const versionPrefix = `${CACHE_VERSION}_`;
160
160
 
161
161
  // Create optimized functions for each scenario
162
- const versionKeyString = versionPrefix
163
- ? (key) => `${versionPrefix}${key}`
164
- : (key) => key;
165
-
166
- const versionKeyObject = versionPrefix
167
- ? (key) => ({ ...key, key: `${versionPrefix}${key.key}` })
168
- : (key) => key;
162
+ const versionKeyString = (key) => `${versionPrefix}${key}`;
163
+ const versionKeyObject = (key) => ({
164
+ ...key,
165
+ key: `${versionPrefix}${key.key}`
166
+ });
169
167
 
170
168
  // Main version key function that routes to optimized paths
171
169
  const versionKey = (key) => {
package/lib/cache.ts CHANGED
@@ -436,7 +436,9 @@ export class Cache {
436
436
 
437
437
  let decompressed: Buffer;
438
438
  try {
439
- decompressed = Buffer.from(zstd.decompress(new Uint8Array(compressedBuffer)));
439
+ decompressed = Buffer.from(
440
+ zstd.decompress(new Uint8Array(compressedBuffer))
441
+ );
440
442
  } catch (error) {
441
443
  logger.debug(
442
444
  'Failed to decompress with zstd, trying fallback methods',
@@ -447,7 +449,7 @@ export class Cache {
447
449
  const { gunzip } = await import('zlib');
448
450
  const { promisify } = await import('util');
449
451
  const gunzipAsync = promisify(gunzip);
450
- decompressed = await gunzipAsync(compressedBuffer);
452
+ decompressed = await gunzipAsync(compressedBuffer as any);
451
453
  logger.debug('Successfully decompressed with gzip fallback', {
452
454
  key
453
455
  });
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.93.0-snapshot-ZERO-3586-20250827093151",
4
+ "version": "1.93.0-snapshot-ZERO-3586-20250827113246",
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.93.0-snapshot-ZERO-3586-20250827093151",
38
+ "@akinon/eslint-plugin-projectzero": "1.93.0-snapshot-ZERO-3586-20250827113246",
39
39
  "@babel/core": "7.26.10",
40
40
  "@babel/preset-env": "7.26.9",
41
41
  "@babel/preset-typescript": "7.27.0",