@ultimat3/query 19.2.0 → 19.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/query",
3
- "version": "19.2.0",
3
+ "version": "19.3.1",
4
4
  "description": "The query primitive: a policy-checked read, optionally live, with cursor pagination and an incremental matcher",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,10 +35,10 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@ultimat3/cache": "19.2.0",
39
- "@ultimat3/core": "19.2.0",
40
- "@ultimat3/http": "19.2.0",
41
- "@ultimat3/policy": "19.2.0",
42
- "@ultimat3/schema": "19.2.0"
38
+ "@ultimat3/cache": "19.3.1",
39
+ "@ultimat3/core": "19.3.1",
40
+ "@ultimat3/http": "19.3.1",
41
+ "@ultimat3/policy": "19.3.1",
42
+ "@ultimat3/schema": "19.3.1"
43
43
  }
44
44
  }
@@ -62,7 +62,12 @@ const WHOLE_NUMBER = /^\d+$/;
62
62
  * is. Only its shape as a search value is checked: one string, non-empty.
63
63
  */
64
64
  export function pageControlsOf(name: string, values: SearchValues): SplitSearch {
65
- const input: Record<string, string | readonly string[] | undefined> = {};
65
+ // `Object.create(null)`, never `{}`, and the same rule `@ultimat3/http`'s `collectFields`
66
+ // follows: a repeated `?__proto__=a&__proto__=b` arrives as an ARRAY, which is exactly what
67
+ // `Object.prototype.__proto__`'s setter accepts — one assignment and this object's prototype IS
68
+ // that array, so `'length' in input` answers true about a field nobody sent. A null prototype
69
+ // has no such accessor, so the key is ordinary data on the way to the schema.
70
+ const input: Record<string, string | readonly string[] | undefined> = Object.create(null);
66
71
  for (const [key, value] of Object.entries(values)) {
67
72
  if (!PAGE_CONTROL_KEYS.includes(key)) input[key] = value;
68
73
  }