stitchkit 0.72.0 → 0.72.2
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.
|
@@ -37,9 +37,12 @@ export declare const BoundedAdmissionPolicySchema: z.ZodReadonly<z.ZodObject<{
|
|
|
37
37
|
limit: z.ZodNumber;
|
|
38
38
|
intervalMs: z.ZodNumber;
|
|
39
39
|
}, z.core.$strict>>>;
|
|
40
|
+
limits: z.ZodOptional<z.ZodNever>;
|
|
40
41
|
}, z.core.$strict>, z.ZodObject<{
|
|
41
42
|
maxKeys: z.ZodNumber;
|
|
42
43
|
limits: z.ZodCustom<BoundedAdmissionPerKeyLimitResolver, BoundedAdmissionPerKeyLimitResolver>;
|
|
44
|
+
maxConcurrent: z.ZodOptional<z.ZodNever>;
|
|
45
|
+
rate: z.ZodOptional<z.ZodNever>;
|
|
43
46
|
}, z.core.$strict>]>>;
|
|
44
47
|
}, z.core.$strict>>;
|
|
45
48
|
export type BoundedAdmissionPolicy = z.infer<typeof BoundedAdmissionPolicySchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admission.d.ts","sourceRoot":"","sources":["../../src/application/admission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIhF,eAAO,MAAM,uBAAuB;;;mBAMvB,CAAC;AACd,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,kCAAkC;;;;;;mBAMlC,CAAC;AACd,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG,CAChD,GAAG,EAAE,MAAM,KACR,4BAA4B,CAAC;AAOlC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,gBAAgB;IAC/B,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IAC9C,GAAG,CAAC,CAAC,EACH,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,IAAI,EAAE,CAAC,OAAO,EAAE,0BAA0B,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC7D,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,CAAC,CAAC,CAAC;IACd,aAAa,IAAI,wBAAwB,CAAC;IAC1C,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACpF,KAAK,IAAI,2BAA2B,CAAC;IACrC,WAAW,IAAI,wBAAwB,CAAC;CACzC;AAED,qBAAa,4BAA6B,SAAQ,KAAK;aAEnC,MAAM,EAAE,6BAA6B;aACrC,YAAY,CAAC,EAAE,MAAM;IAFvC,YACkB,MAAM,EAAE,6BAA6B,EACrC,YAAY,CAAC,EAAE,MAAM,YAAA,EAItC;CACF;AAED,qBAAa,yBAA0B,SAAQ,KAAK;aACtB,MAAM,EAAE,WAAW,GAAG,WAAW;IAA7D,YAA4B,MAAM,EAAE,WAAW,GAAG,WAAW,EAK5D;CACF;AAaD,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,GAAG,gBAAgB,CAiTvF"}
|
package/dist/application.js
CHANGED
|
@@ -73,11 +73,14 @@ var BoundedAdmissionPolicySchema = z.object({
|
|
|
73
73
|
z.object({
|
|
74
74
|
maxConcurrent: PositiveSafeIntegerSchema,
|
|
75
75
|
maxKeys: PositiveSafeIntegerSchema,
|
|
76
|
-
rate: BoundedRateBudgetSchema.optional()
|
|
76
|
+
rate: BoundedRateBudgetSchema.optional(),
|
|
77
|
+
limits: z.never().optional()
|
|
77
78
|
}).strict(),
|
|
78
79
|
z.object({
|
|
79
80
|
maxKeys: PositiveSafeIntegerSchema,
|
|
80
|
-
limits: PerKeyLimitResolverSchema
|
|
81
|
+
limits: PerKeyLimitResolverSchema,
|
|
82
|
+
maxConcurrent: z.never().optional(),
|
|
83
|
+
rate: z.never().optional()
|
|
81
84
|
}).strict()
|
|
82
85
|
]).optional()
|
|
83
86
|
}).strict().readonly();
|
|
@@ -168,9 +171,9 @@ function createBoundedAdmission(config) {
|
|
|
168
171
|
const perKey = policy.perKey;
|
|
169
172
|
if (!perKey)
|
|
170
173
|
return;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
const resolver = perKey.limits;
|
|
175
|
+
if (resolver)
|
|
176
|
+
return BoundedAdmissionPerKeyLimitsSchema.parse(resolver(key));
|
|
174
177
|
return BoundedAdmissionPerKeyLimitsSchema.parse({
|
|
175
178
|
maxConcurrent: perKey.maxConcurrent,
|
|
176
179
|
...perKey.rate && { rate: perKey.rate }
|
package/llms-full.txt
CHANGED
|
@@ -9441,6 +9441,30 @@ additive** — adopting it changes nothing in your code. (See
|
|
|
9441
9441
|
So upgrading is: read the `### ⚠️ Breaking changes` of every version *above* your
|
|
9442
9442
|
current one *up to* your target, and apply each snippet.
|
|
9443
9443
|
|
|
9444
|
+
## What your range does, and does not, do for you
|
|
9445
|
+
|
|
9446
|
+
A caret range (`"stitchkit": "^0.71.0"`) is a real gate: it resolves `< 0.72.0`,
|
|
9447
|
+
so a plain `install` picks up every patch — fixes, new API, no code changes —
|
|
9448
|
+
and **never** crosses a minor. Crossing one is always something you chose.
|
|
9449
|
+
|
|
9450
|
+
**An exact pin (`"stitchkit": "0.71.0"`) is a different arrangement, and it is
|
|
9451
|
+
easy to mistake for a safer version of the same one.** It does not opt you out
|
|
9452
|
+
of breaking changes; it opts you out of *every* change, patches included. No
|
|
9453
|
+
install will move you, nothing will warn you, and the gap grows quietly — a
|
|
9454
|
+
project pinned exactly for a few months is typically several minors behind and
|
|
9455
|
+
has had no signal at all that this is so. That is a legitimate choice, but it
|
|
9456
|
+
makes one thing your job rather than the resolver's:
|
|
9457
|
+
|
|
9458
|
+
- **Check deliberately.** `npm view stitchkit version` against your pin, on
|
|
9459
|
+
whatever cadence suits the project. Nothing else will raise it.
|
|
9460
|
+
- **Then upgrade across the whole gap at once**, exactly as below: apply the
|
|
9461
|
+
`### ⚠️ Breaking changes` of every version above your pin up to your target,
|
|
9462
|
+
in order. A pin held across four minors is four migrations, not one, and
|
|
9463
|
+
three of them may be a single snippet each.
|
|
9464
|
+
|
|
9465
|
+
The mechanical part is identical either way. Only the *noticing* differs, and an
|
|
9466
|
+
exact pin moves it onto you.
|
|
9467
|
+
|
|
9444
9468
|
## Released migration: 0.72.0
|
|
9445
9469
|
|
|
9446
9470
|
Nothing you *pass* changed. Both items are about types you read or build, and
|
|
@@ -9462,9 +9486,13 @@ const ceiling =
|
|
|
9462
9486
|
```
|
|
9463
9487
|
|
|
9464
9488
|
A shape carrying members of both branches — `{ maxKeys, maxConcurrent, limits }` —
|
|
9465
|
-
is refused
|
|
9466
|
-
|
|
9467
|
-
|
|
9489
|
+
is refused. **In 0.72.0 and 0.72.1 that refusal came only from
|
|
9490
|
+
`createBoundedAdmission`**, not from `tsc`: an excess-property check against a
|
|
9491
|
+
union admits any property some member declares, so the mixed shape typechecked
|
|
9492
|
+
and threw when the admission was built. From **0.72.2** each branch declares the
|
|
9493
|
+
other's members as `never`, so it is a compile error. Nothing about the runtime
|
|
9494
|
+
changed — both branches always refused it — but on a path your tests do not
|
|
9495
|
+
construct, the earlier versions would have told you in production.
|
|
9468
9496
|
|
|
9469
9497
|
### If you build a snapshot or a status by hand
|
|
9470
9498
|
|
package/package.json
CHANGED