@akinon/next 2.0.24-beta.0 → 2.0.24

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
- ## 2.0.24-beta.0
3
+ ## 2.0.24
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - cbbbfd75: ZERO-4376: Bootstrap beta cycle (next-main pre-release motor)
7
+ - d38a29a: ZERO-4522 follow-up: rewrite normalize-search-params to avoid Set / Object.entries iteration so the helper compiles under the older brand tsconfig targets (es5) that consume @akinon/next sources via transpilePackages. Behavior is unchanged.
8
8
 
9
9
  ## 2.0.23
10
10
 
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": "2.0.24-beta.0",
4
+ "version": "2.0.24",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -36,7 +36,7 @@
36
36
  "set-cookie-parser": "2.6.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@akinon/eslint-plugin-projectzero": "2.0.24-beta.0",
39
+ "@akinon/eslint-plugin-projectzero": "2.0.24",
40
40
  "@babel/core": "7.26.10",
41
41
  "@babel/preset-env": "7.26.9",
42
42
  "@babel/preset-typescript": "7.27.0",
@@ -24,18 +24,29 @@ export const normalizeSearchParams = (
24
24
  if (!searchParams) return undefined;
25
25
 
26
26
  if (searchParams instanceof URLSearchParams) {
27
+ // Use URLSearchParams.forEach so the helper compiles cleanly under the
28
+ // older brand tsconfig targets (es5) that consume @akinon/next sources via
29
+ // transpilePackages — iterating Set/Map directly would require
30
+ // downlevelIteration / es2015.
27
31
  const out: Record<string, string | string[]> = {};
28
- for (const key of new Set(searchParams.keys())) {
29
- const all = searchParams.getAll(key);
30
- out[key] = all.length > 1 ? all : all[0];
31
- }
32
+ searchParams.forEach((value, key) => {
33
+ const existing = out[key];
34
+ if (existing === undefined) {
35
+ out[key] = value;
36
+ } else if (Array.isArray(existing)) {
37
+ existing.push(value);
38
+ } else {
39
+ out[key] = [existing, value];
40
+ }
41
+ });
32
42
  return out;
33
43
  }
34
44
 
35
45
  // Plain object — drop undefined values so cache key serialization is stable
36
46
  // across calls that omit some keys.
37
47
  const out: Record<string, string | string[]> = {};
38
- for (const [key, value] of Object.entries(searchParams)) {
48
+ for (const key of Object.keys(searchParams)) {
49
+ const value = searchParams[key];
39
50
  if (value !== undefined) out[key] = value;
40
51
  }
41
52
  return out;