Skip to content

Commit b283e9e

Browse files
authored
Retry policy now applies to all requests and subscription change status emitted (#451)
feat(retry-policy): retry policy now applies to all requests The configured retry policy will be used for any failed request. feat(retry-policy): exponential retry policy used by default for subscribe By default, the SDK is configured to use an exponential retry policy for failed subscribe requests. feat(retry-policy): add `None` retry policy Add type, which should be used to completely disable retries. fix(subscribe): add missing `subscription change` status `PNSubscriptionChangedCategory` will be emitted each time the list of channels and groups is changing. refactor(network): request retries moved to the network Automated request retry has been moved into the network layer to handle all requests (not only subscribed). refactor(retry-policy): add information about which APIs belong to endpoint Add more information about which APIs are related to the endpoints, which can be excluded.
1 parent bee8794 commit b283e9e

File tree

95 files changed

+2190
-2534
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2190
-2534
lines changed

.mocharc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"require": "tsx",
3+
"file": ["test/setup-why.ts"],
34
"spec": "test/**/*.test.ts",
45
"exclude": [
56
"test/dist/*.{js,ts}",
67
"test/feature/*.{js,ts}"
78
],
89
"timeout": 5000,
910
"reporter": "spec"
10-
}
11+
}

.pubnub.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
---
22
changelog:
3+
- date: 2025-04-15
4+
version: v9.5.0
5+
changes:
6+
- type: feature
7+
text: "The configured retry policy will be used for any failed request."
8+
- type: feature
9+
text: "By default, the SDK is configured to use an exponential retry policy for failed subscribe requests."
10+
- type: bug
11+
text: "`PNSubscriptionChangedCategory` will be emitted each time the list of channels and groups is changing."
12+
- type: improvement
13+
text: "Automated request retry has been moved into the network layer to handle all requests (not only subscribed)."
14+
- type: improvement
15+
text: "Properly destroy `PubNub` instance after each test case to make sure that all connections closed and prevent tests from hanging."
316
- date: 2025-04-10
417
version: v9.4.0
518
changes:
@@ -1209,7 +1222,7 @@ supported-platforms:
12091222
- 'Ubuntu 14.04 and up'
12101223
- 'Windows 7 and up'
12111224
version: 'Pubnub Javascript for Node'
1212-
version: '9.4.0'
1225+
version: '9.5.0'
12131226
sdks:
12141227
- full-name: PubNub Javascript SDK
12151228
short-name: Javascript
@@ -1225,7 +1238,7 @@ sdks:
12251238
- distribution-type: source
12261239
distribution-repository: GitHub release
12271240
package-name: pubnub.js
1228-
location: https://github.com/pubnub/javascript/archive/refs/tags/v9.4.0.zip
1241+
location: https://github.com/pubnub/javascript/archive/refs/tags/v9.5.0.zip
12291242
requires:
12301243
- name: 'agentkeepalive'
12311244
min-version: '3.5.2'
@@ -1896,7 +1909,7 @@ sdks:
18961909
- distribution-type: library
18971910
distribution-repository: GitHub release
18981911
package-name: pubnub.js
1899-
location: https://github.com/pubnub/javascript/releases/download/v9.4.0/pubnub.9.4.0.js
1912+
location: https://github.com/pubnub/javascript/releases/download/v9.5.0/pubnub.9.5.0.js
19001913
requires:
19011914
- name: 'agentkeepalive'
19021915
min-version: '3.5.2'

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## v9.5.0
2+
April 15 2025
3+
4+
#### Added
5+
- The configured retry policy will be used for any failed request.
6+
- By default, the SDK is configured to use an exponential retry policy for failed subscribe requests.
7+
8+
#### Fixed
9+
- `PNSubscriptionChangedCategory` will be emitted each time the list of channels and groups is changing.
10+
11+
#### Modified
12+
- Automated request retry has been moved into the network layer to handle all requests (not only subscribed).
13+
- Properly destroy `PubNub` instance after each test case to make sure that all connections closed and prevent tests from hanging.
14+
115
## v9.4.0
216
April 10 2025
317

README.md

+2-2
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.9.4.0.js
31-
* https://cdn.pubnub.com/sdk/javascript/pubnub.9.4.0.min.js
30+
* https://cdn.pubnub.com/sdk/javascript/pubnub.9.5.0.js
31+
* https://cdn.pubnub.com/sdk/javascript/pubnub.9.5.0.min.js
3232
3333
2. Configure your keys:
3434

0 commit comments

Comments
 (0)