@ops-ai/react-router-toggly 1.5.1 → 1.5.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.
- package/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/dist/client.cjs +8 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +8 -1
- package/dist/client.js.map +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.js.map +1 -1
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 1.5.2
|
|
2
|
+
|
|
3
|
+
2026-11-08
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- The browser client unwraps `evaluated-signed` `{ defs }` envelopes before
|
|
7
|
+
storing flags. A bare flag map still works. Previously the signed envelope
|
|
8
|
+
was stored as the flag map, so flag keys never matched [OPS-2064].
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- `engines.node` floor raised from `>=18` to `>=22` (Node 18 and 20 are EOL).
|
|
12
|
+
- CI unit matrix is Node 22 / 24 / 26; packed RR7 and RR8 hosts run on Node 24.
|
|
13
|
+
- Packed hosts pin React Router 7.18.5 + React 18 and React Router 8.5.1 + React 19.3.1.
|
|
14
|
+
- Non-breaking dependency bumps within existing major ranges (`typescript` 5.9,
|
|
15
|
+
`ts-jest`, `@grpc/*`, `@ops-ai/toggly-*` patches/minors, `ws`).
|
|
16
|
+
|
|
17
|
+
### Tests
|
|
18
|
+
- Added mocked HTTP API-contract evaluation coverage for `definitions-signed`
|
|
19
|
+
(local server eval) and `evaluated-signed` (browser client) response shapes,
|
|
20
|
+
including a `{ defs }` envelope and a bare flag map.
|
|
21
|
+
|
|
1
22
|
## 1.5.1
|
|
2
23
|
|
|
3
24
|
2026-10-15
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ npm install @ops-ai/react-router-toggly react-router react react-dom
|
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
Peers: `react-router ^7 || ^8`, `react` / `react-dom ^18 || ^19`. Optional:
|
|
67
|
-
`@react-router/node`. Requires Node `>=
|
|
67
|
+
`@react-router/node`. Requires Node `>=22`.
|
|
68
68
|
|
|
69
69
|
## Quick start
|
|
70
70
|
|
package/dist/client.cjs
CHANGED
|
@@ -84,6 +84,13 @@ function buildDefinitionsUrl(config, context) {
|
|
|
84
84
|
function parseVariantDefsPayload(parsed) {
|
|
85
85
|
return togglySignedDefs.asVariantDefsRecord(togglySignedDefs.unwrapDefsPayload(parsed));
|
|
86
86
|
}
|
|
87
|
+
function parseEvaluatedFlagsPayload(parsed) {
|
|
88
|
+
const body = togglySignedDefs.unwrapDefsPayload(parsed);
|
|
89
|
+
if (!body || typeof body !== "object" || Array.isArray(body)) {
|
|
90
|
+
return {};
|
|
91
|
+
}
|
|
92
|
+
return body;
|
|
93
|
+
}
|
|
87
94
|
function variantDefsToFlags(defs) {
|
|
88
95
|
const out = {};
|
|
89
96
|
for (const key of Object.keys(defs)) {
|
|
@@ -547,7 +554,7 @@ function TogglyProviderOwner({
|
|
|
547
554
|
return newFlags2;
|
|
548
555
|
}
|
|
549
556
|
variantsRef.current = null;
|
|
550
|
-
const newFlags = payload
|
|
557
|
+
const newFlags = parseEvaluatedFlagsPayload(payload);
|
|
551
558
|
logger.debug(`Fetched ${Object.keys(newFlags).length} flags.`);
|
|
552
559
|
return newFlags;
|
|
553
560
|
} catch (error) {
|