@vercel/flags-core 1.5.0 → 1.5.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/CHANGELOG.md +12 -0
- package/dist/{chunk-D3AZORK2.js → chunk-4B7CLR4J.js} +10 -6
- package/dist/{chunk-D3AZORK2.js.map → chunk-4B7CLR4J.js.map} +1 -1
- package/dist/{chunk-K3VOC24J.cjs → chunk-AXRUQULC.cjs} +10 -6
- package/dist/chunk-AXRUQULC.cjs.map +1 -0
- package/dist/{chunk-WTGXBSWR.js → chunk-ITF6ZJ32.js} +10 -6
- package/dist/{chunk-WTGXBSWR.js.map → chunk-ITF6ZJ32.js.map} +1 -1
- package/dist/{chunk-CSSU7O2G.cjs → chunk-JTIP7QPD.cjs} +10 -6
- package/dist/chunk-JTIP7QPD.cjs.map +1 -0
- package/dist/index.default.cjs +2 -2
- package/dist/index.default.js +1 -1
- package/dist/index.next-js.cjs +2 -2
- package/dist/index.next-js.js +1 -1
- package/dist/openfeature.default.cjs +2 -2
- package/dist/openfeature.default.js +1 -1
- package/dist/openfeature.next-js.cjs +2 -2
- package/dist/openfeature.next-js.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CSSU7O2G.cjs.map +0 -1
- package/dist/chunk-K3VOC24J.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @vercel/flags-core
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#395](https://github.com/vercel/flags/pull/395) [`b0150af`](https://github.com/vercel/flags/commit/b0150af9c8190f0db0efc25409fab89769cab6a7) Thanks [@lucleray](https://github.com/lucleray)! - Reduce log noise from stream reconnects.
|
|
8
|
+
|
|
9
|
+
Retryable stream errors are no longer logged on every failed attempt; the
|
|
10
|
+
underlying error is now surfaced only once retries are exhausted (via the
|
|
11
|
+
existing "Max retry count exceeded" log). The stream/polling initialization
|
|
12
|
+
timeout warnings were also reworded to make clear the client keeps connecting
|
|
13
|
+
in the background while serving fallback values.
|
|
14
|
+
|
|
3
15
|
## 1.5.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -467,7 +467,7 @@ function findWeightedIndex(weights, value, maxValue) {
|
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
// package.json
|
|
470
|
-
var version = "1.5.
|
|
470
|
+
var version = "1.5.1";
|
|
471
471
|
|
|
472
472
|
// src/lib/report-value.ts
|
|
473
473
|
function internalReportValue(key, value, data) {
|
|
@@ -1264,9 +1264,13 @@ async function connectStream(config, callbacks) {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
void (async () => {
|
|
1266
1266
|
let initialDataReceived = false;
|
|
1267
|
+
let lastError;
|
|
1267
1268
|
while (!abortController.signal.aborted) {
|
|
1268
1269
|
if (retryCount > MAX_RETRY_COUNT) {
|
|
1269
|
-
console.error(
|
|
1270
|
+
console.error(
|
|
1271
|
+
"@vercel/flags-core: Max retry count exceeded",
|
|
1272
|
+
lastError ?? "stream closed repeatedly without an error"
|
|
1273
|
+
);
|
|
1270
1274
|
if (!initialDataReceived) {
|
|
1271
1275
|
rejectInit(
|
|
1272
1276
|
new Error("stream: max retry count exceeded before receiving data")
|
|
@@ -1409,7 +1413,7 @@ async function connectStream(config, callbacks) {
|
|
|
1409
1413
|
break;
|
|
1410
1414
|
}
|
|
1411
1415
|
if (!connectionAbort.signal.aborted) {
|
|
1412
|
-
|
|
1416
|
+
lastError = error;
|
|
1413
1417
|
}
|
|
1414
1418
|
onDisconnect?.();
|
|
1415
1419
|
retryCount++;
|
|
@@ -1844,7 +1848,7 @@ var Controller = class {
|
|
|
1844
1848
|
clearTimeout(timeoutId);
|
|
1845
1849
|
if (result === "timeout") {
|
|
1846
1850
|
console.warn(
|
|
1847
|
-
"@vercel/flags-core: Stream initialization timeout, falling back"
|
|
1851
|
+
"@vercel/flags-core: Stream initialization timeout, falling back while continuing to connect in the background"
|
|
1848
1852
|
);
|
|
1849
1853
|
void this.streamSource.start().catch(() => {
|
|
1850
1854
|
});
|
|
@@ -1894,7 +1898,7 @@ var Controller = class {
|
|
|
1894
1898
|
clearTimeout(timeoutId);
|
|
1895
1899
|
if (result === "timeout") {
|
|
1896
1900
|
console.warn(
|
|
1897
|
-
"@vercel/flags-core: Polling initialization timeout, falling back"
|
|
1901
|
+
"@vercel/flags-core: Polling initialization timeout, falling back while continuing to poll in the background"
|
|
1898
1902
|
);
|
|
1899
1903
|
return false;
|
|
1900
1904
|
}
|
|
@@ -2271,4 +2275,4 @@ export {
|
|
|
2271
2275
|
resetDefaultFlagsClient,
|
|
2272
2276
|
createClient
|
|
2273
2277
|
};
|
|
2274
|
-
//# sourceMappingURL=chunk-
|
|
2278
|
+
//# sourceMappingURL=chunk-4B7CLR4J.js.map
|