@sdxc/structured-fields 2026.10.16 → 2026.10.25

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.
Files changed (2) hide show
  1. package/README.md +6 -6
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -25,8 +25,8 @@ Results are [`@sdxc/result`](https://www.npmjs.com/package/@sdxc/result) values,
25
25
  import { setField, stringify } from "@sdxc/structured-fields";
26
26
 
27
27
  let headers = new Headers();
28
- setField(headers, "RateLimit", { limit: 10, remaining: 0, reset: 7 }, "dictionary");
29
- // RateLimit: limit=10, remaining=0, reset=7
28
+ setField(headers, "RateLimit", [{ value: "default", params: { r: 0, t: 7 } }], "list");
29
+ // RateLimit: "default";r=0;t=7
30
30
 
31
31
  stringify({ value: 10, params: { w: 60 } }, "item"); // success: "10;w=60"
32
32
  ```
@@ -259,11 +259,11 @@ and write it unconditionally.
259
259
  ```typescript
260
260
  import { setField } from "@sdxc/structured-fields";
261
261
 
262
- let quota: Record<string, number> = {};
263
- if (limit !== null) quota.limit = limit;
264
- if (remaining !== null) quota.remaining = remaining;
262
+ let priority: Record<string, number | boolean> = {};
263
+ if (urgency !== null) priority.u = urgency;
264
+ if (incremental) priority.i = true;
265
265
 
266
- setField(headers, "RateLimit", quota, "dictionary");
266
+ setField(headers, "Priority", priority, "dictionary");
267
267
  ```
268
268
 
269
269
  ## Pattern: Branch On Why A Field Failed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdxc/structured-fields",
3
- "version": "2026.10.16",
3
+ "version": "2026.10.25",
4
4
  "description": "Parse and serialize RFC 9651 structured HTTP field values",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,9 +13,9 @@
13
13
  "@standard-schema/spec": "^1.1.0"
14
14
  },
15
15
  "peerDependencies": {
16
- "remix": "3.0.0"
16
+ "remix": "3.1.0"
17
17
  },
18
- "gitHead": "1e547d8431568f5ed9bdb079ca3046c936240fde",
18
+ "gitHead": "1440b969c0a3e3808dfcee3f17d2ef43915f32a8",
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },