Skip to content

Commit 9c94118

Browse files
authored
Merge branch 'master' into CLEN-3287
2 parents cd73f80 + 1d2ee43 commit 9c94118

25 files changed

Lines changed: 314 additions & 77 deletions

.coderabbit.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
language: en-US
44

55
reviews:
6-
# Review draft PRs so we get early feedback
7-
drafts: true
8-
96
# Enable high-level summary of changes
10-
high_level_summary: true
7+
high_level_summary: false
118

129
# Add a poem... just kidding, disable it
1310
poem: false
@@ -83,6 +80,10 @@ reviews:
8380
chat:
8481
auto_reply: true
8582

83+
knowledge_base:
84+
mcp:
85+
usage: enabled
86+
8687
# Path filters - ignore generated/vendored/build output
8788
path_filters:
8889
# Build outputs
@@ -93,13 +94,6 @@ path_filters:
9394
# Dependencies
9495
- "!node_modules/**"
9596

96-
# Unrelated working directories (not part of the SDK source)
97-
- "!dataSync/**"
98-
- "!new-dataSync/**"
99-
- "!demo-app/**"
100-
- "!loan_quote/**"
101-
- "!docs/**"
102-
10397
# Lock files - too noisy, low review value
10498
- "!package-lock.json"
10599

.pubnub.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
---
22
changelog:
3+
- date: 2026-04-20
4+
version: v11.0.0
5+
changes:
6+
- type: feature
7+
text: "BREAKING CHANGES: Subscription now uses the event engine workflow by default and automatically restores subscriptions after reconnect."
8+
- type: improvement
9+
text: "Drop `maximumRetry` validation caps for linear/exponential policies."
310
- date: 2026-03-16
411
version: v10.2.9
512
changes:
@@ -1399,7 +1406,7 @@ supported-platforms:
13991406
- 'Ubuntu 14.04 and up'
14001407
- 'Windows 7 and up'
14011408
version: 'Pubnub Javascript for Node'
1402-
version: '10.2.9'
1409+
version: '11.0.0'
14031410
sdks:
14041411
- full-name: PubNub Javascript SDK
14051412
short-name: Javascript
@@ -1415,7 +1422,7 @@ sdks:
14151422
- distribution-type: source
14161423
distribution-repository: GitHub release
14171424
package-name: pubnub.js
1418-
location: https://github.com/pubnub/javascript/archive/refs/tags/v10.2.9.zip
1425+
location: https://github.com/pubnub/javascript/archive/refs/tags/v11.0.0.zip
14191426
requires:
14201427
- name: 'agentkeepalive'
14211428
min-version: '3.5.2'
@@ -2086,7 +2093,7 @@ sdks:
20862093
- distribution-type: library
20872094
distribution-repository: GitHub release
20882095
package-name: pubnub.js
2089-
location: https://github.com/pubnub/javascript/releases/download/v10.2.9/pubnub.10.2.9.js
2096+
location: https://github.com/pubnub/javascript/releases/download/v11.0.0/pubnub.11.0.0.js
20902097
requires:
20912098
- name: 'agentkeepalive'
20922099
min-version: '3.5.2'

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## v11.0.0
2+
April 20 2026
3+
4+
#### Added
5+
- **BREAKING CHANGES**: Subscription now uses the event engine workflow by default and automatically restores subscriptions after reconnect.
6+
7+
#### Modified
8+
- Drop `maximumRetry` validation caps for linear/exponential policies.
9+
110
## v10.2.9
211
March 16 2026
312

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Watch [Getting Started with PubNub JS SDK](https://app.dashcam.io/replay/64ee0d2
2727
npm install pubnub
2828
```
2929
* or download one of our builds from our CDN:
30-
* https://cdn.pubnub.com/sdk/javascript/pubnub.10.2.9.js
31-
* https://cdn.pubnub.com/sdk/javascript/pubnub.10.2.9.min.js
30+
* https://cdn.pubnub.com/sdk/javascript/pubnub.11.0.0.js
31+
* https://cdn.pubnub.com/sdk/javascript/pubnub.11.0.0.min.js
3232
3333
2. Configure your keys:
3434

dist/web/pubnub.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4068,7 +4068,7 @@
40684068
/**
40694069
* Whether PubNub client should catch up subscription after network issues.
40704070
*/
4071-
const RESTORE = false;
4071+
const RESTORE = true;
40724072
/**
40734073
* Whether network availability change should be announced with `PNNetworkDownCategory` and
40744074
* `PNNetworkUpCategory` state or not.
@@ -4089,7 +4089,7 @@
40894089
/**
40904090
* Whether subscription event engine should be used or not.
40914091
*/
4092-
const ENABLE_EVENT_ENGINE = false;
4092+
const ENABLE_EVENT_ENGINE = true;
40934093
/**
40944094
* Whether configured user presence state should be maintained by the PubNub client or not.
40954095
*/
@@ -4991,8 +4991,6 @@
49914991
validate() {
49924992
if (this.delay < 2)
49934993
throw new Error('Delay can not be set less than 2 seconds for retry');
4994-
if (this.maximumRetry > 10)
4995-
throw new Error('Maximum retry for linear retry policy can not be more than 10');
49964994
},
49974995
};
49984996
}
@@ -5017,10 +5015,6 @@
50175015
validate() {
50185016
if (this.minimumDelay < 2)
50195017
throw new Error('Minimum delay can not be set less than 2 seconds for retry');
5020-
else if (this.maximumDelay > 150)
5021-
throw new Error('Maximum delay can not be set more than 150 seconds for' + ' retry');
5022-
else if (this.maximumRetry > 6)
5023-
throw new Error('Maximum retry for exponential retry policy can not be more than 6');
50245018
},
50255019
};
50265020
}
@@ -5438,7 +5432,7 @@
54385432
return base.PubNubFile;
54395433
},
54405434
get version() {
5441-
return '10.2.9';
5435+
return '11.0.0';
54425436
},
54435437
getVersion() {
54445438
return this.version;
@@ -9307,6 +9301,7 @@
93079301
category: StatusCategory$1.PNConnectedCategory,
93089302
affectedChannels: context.channels.slice(0),
93099303
affectedChannelGroups: context.groups.slice(0),
9304+
operation: RequestOperation$1.PNSubscribeOperation,
93109305
currentTimetoken: !!((_d = context.cursor) === null || _d === void 0 ? void 0 : _d.timetoken) ? (_e = context.cursor) === null || _e === void 0 ? void 0 : _e.timetoken : payload.timetoken,
93119306
}),
93129307
]);
@@ -9464,7 +9459,7 @@
94649459
return UnsubscribedState.with(undefined, [
94659460
emitStatus(Object.assign({ category: !payload.isOffline
94669461
? StatusCategory$1.PNDisconnectedCategory
9467-
: StatusCategory$1.PNDisconnectedUnexpectedlyCategory }, (errorCategory ? { error: errorCategory } : {}))),
9462+
: StatusCategory$1.PNDisconnectedUnexpectedlyCategory, operation: RequestOperation$1.PNUnsubscribeOperation }, (errorCategory ? { error: errorCategory } : {}))),
94689463
]);
94699464
}
94709465
return ReceivingState.with({
@@ -9510,20 +9505,29 @@
95109505
var _a;
95119506
if (!event.payload.isOffline) {
95129507
return ReceiveStoppedState.with(Object.assign({}, context), [
9513-
emitStatus({ category: StatusCategory$1.PNDisconnectedCategory }),
9508+
emitStatus({
9509+
category: StatusCategory$1.PNDisconnectedCategory,
9510+
operation: RequestOperation$1.PNSubscribeOperation,
9511+
}),
95149512
]);
95159513
}
95169514
else {
95179515
const errorReason = PubNubAPIError.create(new Error('Network connection error')).toPubNubError(RequestOperation$1.PNSubscribeOperation);
95189516
return ReceiveFailedState.with(Object.assign(Object.assign({}, context), { reason: errorReason }), [
95199517
emitStatus({
95209518
category: StatusCategory$1.PNDisconnectedUnexpectedlyCategory,
9519+
operation: RequestOperation$1.PNSubscribeOperation,
95219520
error: (_a = errorReason.status) === null || _a === void 0 ? void 0 : _a.category,
95229521
}),
95239522
]);
95249523
}
95259524
});
9526-
ReceivingState.on(unsubscribeAll.type, (_) => UnsubscribedState.with(undefined, [emitStatus({ category: StatusCategory$1.PNDisconnectedCategory })]));
9525+
ReceivingState.on(unsubscribeAll.type, (_) => UnsubscribedState.with(undefined, [
9526+
emitStatus({
9527+
category: StatusCategory$1.PNDisconnectedCategory,
9528+
operation: RequestOperation$1.PNUnsubscribeOperation,
9529+
}),
9530+
]));
95279531

95289532
/**
95299533
* Subscribe Event Engine effects dispatcher.

dist/web/pubnub.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/components/configuration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const makeConfiguration = (base, setupCryptoModule) => {
168168
return base.PubNubFile;
169169
},
170170
get version() {
171-
return '10.2.9';
171+
return '11.0.0';
172172
},
173173
getVersion() {
174174
return this.version;

lib/core/components/retry-policy.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ class RetryPolicy {
153153
validate() {
154154
if (this.delay < 2)
155155
throw new Error('Delay can not be set less than 2 seconds for retry');
156-
if (this.maximumRetry > 10)
157-
throw new Error('Maximum retry for linear retry policy can not be more than 10');
158156
},
159157
};
160158
}
@@ -179,10 +177,6 @@ class RetryPolicy {
179177
validate() {
180178
if (this.minimumDelay < 2)
181179
throw new Error('Minimum delay can not be set less than 2 seconds for retry');
182-
else if (this.maximumDelay > 150)
183-
throw new Error('Maximum delay can not be set more than 150 seconds for' + ' retry');
184-
else if (this.maximumRetry > 6)
185-
throw new Error('Maximum retry for exponential retry policy can not be more than 6');
186180
},
187181
};
188182
}

lib/core/interfaces/configuration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const USE_SSL = true;
1616
/**
1717
* Whether PubNub client should catch up subscription after network issues.
1818
*/
19-
const RESTORE = false;
19+
const RESTORE = true;
2020
/**
2121
* Whether network availability change should be announced with `PNNetworkDownCategory` and
2222
* `PNNetworkUpCategory` state or not.
@@ -37,7 +37,7 @@ const FILE_PUBLISH_RETRY_LIMIT = 5;
3737
/**
3838
* Whether subscription event engine should be used or not.
3939
*/
40-
const ENABLE_EVENT_ENGINE = false;
40+
const ENABLE_EVENT_ENGINE = true;
4141
/**
4242
* Whether configured user presence state should be maintained by the PubNub client or not.
4343
*/

lib/event-engine/states/handshaking.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ exports.HandshakingState.on(events_1.handshakeSuccess.type, (context, { payload
5656
category: categories_1.default.PNConnectedCategory,
5757
affectedChannels: context.channels.slice(0),
5858
affectedChannelGroups: context.groups.slice(0),
59+
operation: operations_1.default.PNSubscribeOperation,
5960
currentTimetoken: !!((_d = context.cursor) === null || _d === void 0 ? void 0 : _d.timetoken) ? (_e = context.cursor) === null || _e === void 0 ? void 0 : _e.timetoken : payload.timetoken,
6061
}),
6162
]);

0 commit comments

Comments
 (0)