Skip to content

Commit 4fb39e9

Browse files
PubNub SDK v10.2.0 release.
1 parent 0954665 commit 4fb39e9

File tree

10 files changed

+41
-34
lines changed

10 files changed

+41
-34
lines changed

.pubnub.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
changelog:
3+
- date: 2025-10-29
4+
version: v10.2.0
5+
changes:
6+
- type: feature
7+
text: "Add a zero-based `offset` index parameter to be used together with `limit` for `here now` pagination."
38
- date: 2025-09-30
49
version: v10.1.0
510
changes:
@@ -1349,7 +1354,7 @@ supported-platforms:
13491354
- 'Ubuntu 14.04 and up'
13501355
- 'Windows 7 and up'
13511356
version: 'Pubnub Javascript for Node'
1352-
version: '10.1.0'
1357+
version: '10.2.0'
13531358
sdks:
13541359
- full-name: PubNub Javascript SDK
13551360
short-name: Javascript
@@ -1365,7 +1370,7 @@ sdks:
13651370
- distribution-type: source
13661371
distribution-repository: GitHub release
13671372
package-name: pubnub.js
1368-
location: https://github.com/pubnub/javascript/archive/refs/tags/v10.1.0.zip
1373+
location: https://github.com/pubnub/javascript/archive/refs/tags/v10.2.0.zip
13691374
requires:
13701375
- name: 'agentkeepalive'
13711376
min-version: '3.5.2'
@@ -2036,7 +2041,7 @@ sdks:
20362041
- distribution-type: library
20372042
distribution-repository: GitHub release
20382043
package-name: pubnub.js
2039-
location: https://github.com/pubnub/javascript/releases/download/v10.1.0/pubnub.10.1.0.js
2044+
location: https://github.com/pubnub/javascript/releases/download/v10.2.0/pubnub.10.2.0.js
20402045
requires:
20412046
- name: 'agentkeepalive'
20422047
min-version: '3.5.2'

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v10.2.0
2+
October 29 2025
3+
4+
#### Added
5+
- Add a zero-based `offset` index parameter to be used together with `limit` for `here now` pagination.
6+
17
## v10.1.0
28
September 30 2025
39

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

dist/web/pubnub.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5436,7 +5436,7 @@
54365436
return base.PubNubFile;
54375437
},
54385438
get version() {
5439-
return '10.1.0';
5439+
return '10.2.0';
54405440
},
54415441
getVersion() {
54425442
return this.version;
@@ -11445,18 +11445,15 @@
1144511445
*/
1144611446
class HereNowRequest extends AbstractRequest {
1144711447
constructor(parameters) {
11448-
var _a, _b, _c;
11449-
var _d, _e, _f;
11448+
var _a, _b, _c, _d;
11449+
var _e, _f, _g, _h;
1145011450
super();
1145111451
this.parameters = parameters;
1145211452
// Apply defaults.
11453-
(_a = (_d = this.parameters).queryParameters) !== null && _a !== void 0 ? _a : (_d.queryParameters = {});
11454-
(_b = (_e = this.parameters).includeUUIDs) !== null && _b !== void 0 ? _b : (_e.includeUUIDs = INCLUDE_UUID$1);
11455-
(_c = (_f = this.parameters).includeState) !== null && _c !== void 0 ? _c : (_f.includeState = INCLUDE_STATE);
11456-
if (this.parameters.limit)
11457-
this.parameters.limit = Math.min(this.parameters.limit, MAXIMUM_COUNT);
11458-
else
11459-
this.parameters.limit = MAXIMUM_COUNT;
11453+
(_a = (_e = this.parameters).queryParameters) !== null && _a !== void 0 ? _a : (_e.queryParameters = {});
11454+
(_b = (_f = this.parameters).includeUUIDs) !== null && _b !== void 0 ? _b : (_f.includeUUIDs = INCLUDE_UUID$1);
11455+
(_c = (_g = this.parameters).includeState) !== null && _c !== void 0 ? _c : (_g.includeState = INCLUDE_STATE);
11456+
(_d = (_h = this.parameters).limit) !== null && _d !== void 0 ? _d : (_h.limit = MAXIMUM_COUNT);
1146011457
}
1146111458
operation() {
1146211459
const { channels = [], channelGroups = [] } = this.parameters;
@@ -11517,8 +11514,8 @@
1151711514
return path;
1151811515
}
1151911516
get queryParameters() {
11520-
const { channelGroups, includeUUIDs, includeState, limit, queryParameters } = this.parameters;
11521-
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (this.operation() === RequestOperation$1.PNHereNowOperation ? { limit } : {})), (!includeUUIDs ? { disable_uuids: '1' } : {})), ((includeState !== null && includeState !== void 0 ? includeState : false) ? { state: '1' } : {})), (channelGroups && channelGroups.length > 0 ? { 'channel-group': channelGroups.join(',') } : {})), queryParameters);
11517+
const { channelGroups, includeUUIDs, includeState, limit, offset, queryParameters } = this.parameters;
11518+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (this.operation() === RequestOperation$1.PNHereNowOperation ? { limit } : {})), (this.operation() === RequestOperation$1.PNHereNowOperation && (offset !== null && offset !== void 0 ? offset : 0 > 0) ? { offset } : {})), (!includeUUIDs ? { disable_uuids: '1' } : {})), ((includeState !== null && includeState !== void 0 ? includeState : false) ? { state: '1' } : {})), (channelGroups && channelGroups.length > 0 ? { 'channel-group': channelGroups.join(',') } : {})), queryParameters);
1152211519
}
1152311520
}
1152411521

dist/web/pubnub.min.js

Lines changed: 1 addition & 1 deletion
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.1.0';
171+
return '10.2.0';
172172
},
173173
getVersion() {
174174
return this.version;

lib/core/endpoints/presence/here_now.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,15 @@ const MAXIMUM_COUNT = 1000;
4545
*/
4646
class HereNowRequest extends request_1.AbstractRequest {
4747
constructor(parameters) {
48-
var _a, _b, _c;
49-
var _d, _e, _f;
48+
var _a, _b, _c, _d;
49+
var _e, _f, _g, _h;
5050
super();
5151
this.parameters = parameters;
5252
// Apply defaults.
53-
(_a = (_d = this.parameters).queryParameters) !== null && _a !== void 0 ? _a : (_d.queryParameters = {});
54-
(_b = (_e = this.parameters).includeUUIDs) !== null && _b !== void 0 ? _b : (_e.includeUUIDs = INCLUDE_UUID);
55-
(_c = (_f = this.parameters).includeState) !== null && _c !== void 0 ? _c : (_f.includeState = INCLUDE_STATE);
56-
if (this.parameters.limit)
57-
this.parameters.limit = Math.min(this.parameters.limit, MAXIMUM_COUNT);
58-
else
59-
this.parameters.limit = MAXIMUM_COUNT;
53+
(_a = (_e = this.parameters).queryParameters) !== null && _a !== void 0 ? _a : (_e.queryParameters = {});
54+
(_b = (_f = this.parameters).includeUUIDs) !== null && _b !== void 0 ? _b : (_f.includeUUIDs = INCLUDE_UUID);
55+
(_c = (_g = this.parameters).includeState) !== null && _c !== void 0 ? _c : (_g.includeState = INCLUDE_STATE);
56+
(_d = (_h = this.parameters).limit) !== null && _d !== void 0 ? _d : (_h.limit = MAXIMUM_COUNT);
6057
}
6158
operation() {
6259
const { channels = [], channelGroups = [] } = this.parameters;
@@ -117,8 +114,8 @@ class HereNowRequest extends request_1.AbstractRequest {
117114
return path;
118115
}
119116
get queryParameters() {
120-
const { channelGroups, includeUUIDs, includeState, limit, queryParameters } = this.parameters;
121-
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (this.operation() === operations_1.default.PNHereNowOperation ? { limit } : {})), (!includeUUIDs ? { disable_uuids: '1' } : {})), ((includeState !== null && includeState !== void 0 ? includeState : false) ? { state: '1' } : {})), (channelGroups && channelGroups.length > 0 ? { 'channel-group': channelGroups.join(',') } : {})), queryParameters);
117+
const { channelGroups, includeUUIDs, includeState, limit, offset, queryParameters } = this.parameters;
118+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (this.operation() === operations_1.default.PNHereNowOperation ? { limit } : {})), (this.operation() === operations_1.default.PNHereNowOperation && (offset !== null && offset !== void 0 ? offset : 0 > 0) ? { offset } : {})), (!includeUUIDs ? { disable_uuids: '1' } : {})), ((includeState !== null && includeState !== void 0 ? includeState : false) ? { state: '1' } : {})), (channelGroups && channelGroups.length > 0 ? { 'channel-group': channelGroups.join(',') } : {})), queryParameters);
122119
}
123120
}
124121
exports.HereNowRequest = HereNowRequest;

lib/types/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7185,11 +7185,13 @@ declare namespace PubNub {
71857185
/**
71867186
* Limit the number of results returned.
71877187
*
7188-
* **Important:** Maximum value is `1000` users per request.
7189-
*
71907188
* @default `1000`.
71917189
*/
71927190
limit?: number;
7191+
/**
7192+
* Zero-based starting index for pagination.
7193+
*/
7194+
offset?: number;
71937195
/**
71947196
* Additional query parameters.
71957197
*/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pubnub",
3-
"version": "10.1.0",
3+
"version": "10.2.0",
44
"author": "PubNub <support@pubnub.com>",
55
"description": "Publish & Subscribe Real-time Messaging with PubNub",
66
"scripts": {

src/core/components/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export const makeConfiguration = (
236236
return base.PubNubFile;
237237
},
238238
get version(): string {
239-
return '10.1.0';
239+
return '10.2.0';
240240
},
241241
getVersion(): string {
242242
return this.version;

0 commit comments

Comments
 (0)