Skip to content

Commit

Permalink
Add the ability to switch transport API (#435)
Browse files Browse the repository at this point in the history
feat(transport): add the ability to switch transport API

For the browser version of PubNub SDK, add the ability to switch between `fetch` and `xhr` APIs
(`transport` configuration option).

fix(event-engine): handshake/receive requests timeout

Fix issue because of which, in Event Engine mode, wrong timeout values have been set for requests
which creates long-poll request.

refactor(request): make sure request cancels on timeout

Refactor `timeout` implementation for `fetch` transport to properly cancel request when the
timeout timer will fire.
  • Loading branch information
parfeon authored Feb 5, 2025
1 parent a204205 commit 07b3418
Show file tree
Hide file tree
Showing 26 changed files with 954 additions and 452 deletions.
15 changes: 12 additions & 3 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
---
changelog:
- date: 2025-02-05
version: v8.8.0
changes:
- type: feature
text: "For the browser version of PubNub SDK, add the ability to switch between `fetch` and `xhr` APIs (`transport` configuration option)."
- type: bug
text: "Fix issue because of which, in Event Engine mode, wrong timeout values have been set for requests which create long-poll request."
- type: improvement
text: "Refactor `timeout` implementation for `fetch` transport to properly cancel request when the timeout timer will fire."
- date: 2025-01-31
version: v8.7.1
changes:
Expand Down Expand Up @@ -1123,7 +1132,7 @@ supported-platforms:
- 'Ubuntu 14.04 and up'
- 'Windows 7 and up'
version: 'Pubnub Javascript for Node'
version: '8.7.1'
version: '8.8.0'
sdks:
- full-name: PubNub Javascript SDK
short-name: Javascript
Expand All @@ -1139,7 +1148,7 @@ sdks:
- distribution-type: source
distribution-repository: GitHub release
package-name: pubnub.js
location: https://github.com/pubnub/javascript/archive/refs/tags/v8.7.1.zip
location: https://github.com/pubnub/javascript/archive/refs/tags/v8.8.0.zip
requires:
- name: 'agentkeepalive'
min-version: '3.5.2'
Expand Down Expand Up @@ -1810,7 +1819,7 @@ sdks:
- distribution-type: library
distribution-repository: GitHub release
package-name: pubnub.js
location: https://github.com/pubnub/javascript/releases/download/v8.7.1/pubnub.8.7.1.js
location: https://github.com/pubnub/javascript/releases/download/v8.8.0/pubnub.8.8.0.js
requires:
- name: 'agentkeepalive'
min-version: '3.5.2'
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v8.8.0
February 05 2025

#### Added
- For the browser version of PubNub SDK, add the ability to switch between `fetch` and `xhr` APIs (`transport` configuration option).

#### Fixed
- Fix issue because of which, in Event Engine mode, wrong timeout values have been set for requests which create long-poll request.

#### Modified
- Refactor `timeout` implementation for `fetch` transport to properly cancel request when the timeout timer will fire.

## v8.7.1
January 31 2025

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Watch [Getting Started with PubNub JS SDK](https://app.dashcam.io/replay/64ee0d2
npm install pubnub
```
* or download one of our builds from our CDN:
* https://cdn.pubnub.com/sdk/javascript/pubnub.8.7.1.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.8.7.1.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.8.8.0.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.8.8.0.min.js
2. Configure your keys:
Expand Down
Loading

0 comments on commit 07b3418

Please sign in to comment.