Skip to content

Commit

Permalink
Merge branch 'master' into fix/dev-deps-dependabot-alert
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon authored Jun 12, 2024
2 parents e960e3a + e486432 commit 1f73f33
Show file tree
Hide file tree
Showing 20 changed files with 105 additions and 40 deletions.
11 changes: 8 additions & 3 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
changelog:
- date: 2024-06-06
version: v8.2.3
changes:
- type: bug
text: "Fix issue because of which single string sort option wasn't serialized properly."
- date: 2024-06-05
version: v8.2.2
changes:
Expand Down Expand Up @@ -998,7 +1003,7 @@ supported-platforms:
- 'Ubuntu 14.04 and up'
- 'Windows 7 and up'
version: 'Pubnub Javascript for Node'
version: '8.2.2'
version: '8.2.3'
sdks:
- full-name: PubNub Javascript SDK
short-name: Javascript
Expand All @@ -1014,7 +1019,7 @@ sdks:
- distribution-type: source
distribution-repository: GitHub release
package-name: pubnub.js
location: https://github.com/pubnub/javascript/archive/refs/tags/v8.2.2.zip
location: https://github.com/pubnub/javascript/archive/refs/tags/v8.2.3.zip
requires:
- name: 'agentkeepalive'
min-version: '3.5.2'
Expand Down Expand Up @@ -1685,7 +1690,7 @@ sdks:
- distribution-type: library
distribution-repository: GitHub release
package-name: pubnub.js
location: https://github.com/pubnub/javascript/releases/download/v8.2.2/pubnub.8.2.2.js
location: https://github.com/pubnub/javascript/releases/download/v8.2.3/pubnub.8.2.3.js
requires:
- name: 'agentkeepalive'
min-version: '3.5.2'
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v8.2.3
June 06 2024

#### Fixed
- Fix issue because of which single string sort option wasn't serialized properly.

## v8.2.2
June 05 2024

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.2.2.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.8.2.2.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.8.2.3.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.8.2.3.min.js
2. Configure your keys:
Expand Down
38 changes: 31 additions & 7 deletions dist/web/pubnub.js
Original file line number Diff line number Diff line change
Expand Up @@ -3813,7 +3813,7 @@
return base.PubNubFile;
},
get version() {
return '8.2.2';
return '8.2.3';
},
getVersion() {
return this.version;
Expand Down Expand Up @@ -9781,7 +9781,11 @@
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ include: ['status', 'type', ...(include.customFields ? ['custom'] : [])].join(','), count: `${include.totalCount}` }, (filter ? { filter } : {})), ((page === null || page === void 0 ? void 0 : page.next) ? { start: page.next } : {})), ((page === null || page === void 0 ? void 0 : page.prev) ? { end: page.prev } : {})), (limit ? { limit } : {})), (sorting.length ? { sort: sorting } : {}));
}
}
Expand Down Expand Up @@ -9913,7 +9917,11 @@
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = [];
if (include.statusField)
includeFlags.push('status');
Expand Down Expand Up @@ -10008,7 +10016,11 @@
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = ['channel.status', 'channel.type', 'status'];
if (include.customFields)
includeFlags.push('custom');
Expand Down Expand Up @@ -10084,7 +10096,11 @@
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ include: ['status', 'type', ...(include.customFields ? ['custom'] : [])].join(',') }, (include.totalCount !== undefined ? { count: `${include.totalCount}` } : {})), (filter ? { filter } : {})), ((page === null || page === void 0 ? void 0 : page.next) ? { start: page.next } : {})), ((page === null || page === void 0 ? void 0 : page.prev) ? { end: page.prev } : {})), (limit ? { limit } : {})), (sorting.length ? { sort: sorting } : {}));
}
}
Expand Down Expand Up @@ -10333,7 +10349,11 @@
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = [];
if (include.statusField)
includeFlags.push('status');
Expand Down Expand Up @@ -10425,7 +10445,11 @@
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = ['uuid.status', 'uuid.type', 'type'];
if (include.customFields)
includeFlags.push('custom');
Expand Down
2 changes: 1 addition & 1 deletion dist/web/pubnub.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/core/components/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const makeConfiguration = (base, setupCryptoModule) => {
return base.PubNubFile;
},
get version() {
return '8.2.2';
return '8.2.3';
},
getVersion() {
return this.version;
Expand Down
6 changes: 5 additions & 1 deletion lib/core/endpoints/objects/channel/get_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ class GetAllChannelsMetadataRequest extends request_1.AbstractRequest {
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ include: ['status', 'type', ...(include.customFields ? ['custom'] : [])].join(','), count: `${include.totalCount}` }, (filter ? { filter } : {})), ((page === null || page === void 0 ? void 0 : page.next) ? { start: page.next } : {})), ((page === null || page === void 0 ? void 0 : page.prev) ? { end: page.prev } : {})), (limit ? { limit } : {})), (sorting.length ? { sort: sorting } : {}));
}
}
Expand Down
6 changes: 5 additions & 1 deletion lib/core/endpoints/objects/member/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ class GetChannelMembersRequest extends request_1.AbstractRequest {
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = [];
if (include.statusField)
includeFlags.push('status');
Expand Down
6 changes: 5 additions & 1 deletion lib/core/endpoints/objects/member/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ class SetChannelMembersRequest extends request_1.AbstractRequest {
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = ['uuid.status', 'uuid.type', 'type'];
if (include.customFields)
includeFlags.push('custom');
Expand Down
6 changes: 5 additions & 1 deletion lib/core/endpoints/objects/membership/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ class GetUUIDMembershipsRequest extends request_1.AbstractRequest {
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = [];
if (include.statusField)
includeFlags.push('status');
Expand Down
6 changes: 5 additions & 1 deletion lib/core/endpoints/objects/membership/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ class SetUUIDMembershipsRequest extends request_1.AbstractRequest {
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags = ['channel.status', 'channel.type', 'status'];
if (include.customFields)
includeFlags.push('custom');
Expand Down
6 changes: 5 additions & 1 deletion lib/core/endpoints/objects/uuid/get_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ class GetAllUUIDMetadataRequest extends request_1.AbstractRequest {
}
get queryParameters() {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => order !== null ? `${option}:${order}` : option);
let sorting = '';
if (typeof sort === 'string')
sorting = sort;
else
sorting = Object.entries(sort !== null && sort !== void 0 ? sort : {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ include: ['status', 'type', ...(include.customFields ? ['custom'] : [])].join(',') }, (include.totalCount !== undefined ? { count: `${include.totalCount}` } : {})), (filter ? { filter } : {})), ((page === null || page === void 0 ? void 0 : page.next) ? { start: page.next } : {})), ((page === null || page === void 0 ? void 0 : page.prev) ? { end: page.prev } : {})), (limit ? { limit } : {})), (sorting.length ? { sort: sorting } : {}));
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pubnub",
"version": "8.2.2",
"version": "8.2.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const makeConfiguration = (
return base.PubNubFile;
},
get version(): string {
return '8.2.2';
return '8.2.3';
},
getVersion(): string {
return this.version;
Expand Down
7 changes: 4 additions & 3 deletions src/core/endpoints/objects/channel/get_all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ export class GetAllChannelsMetadataRequest<

protected get queryParameters(): Query {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort ?? {}).map(([option, order]) =>
order !== null ? `${option}:${order}` : option,
);
let sorting: string | string[] = '';
if (typeof sort === 'string') sorting = sort;
else
sorting = Object.entries(sort ?? {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));

return {
include: ['status', 'type', ...(include!.customFields ? ['custom'] : [])].join(','),
Expand Down
7 changes: 4 additions & 3 deletions src/core/endpoints/objects/member/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ export class GetChannelMembersRequest<

protected get queryParameters(): Query {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort ?? {}).map(([option, order]) =>
order !== null ? `${option}:${order}` : option,
);
let sorting: string | string[] = '';
if (typeof sort === 'string') sorting = sort;
else
sorting = Object.entries(sort ?? {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags: string[] = [];

if (include!.statusField) includeFlags.push('status');
Expand Down
7 changes: 4 additions & 3 deletions src/core/endpoints/objects/member/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ export class SetChannelMembersRequest<

protected get queryParameters(): Query {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort ?? {}).map(([option, order]) =>
order !== null ? `${option}:${order}` : option,
);
let sorting: string | string[] = '';
if (typeof sort === 'string') sorting = sort;
else
sorting = Object.entries(sort ?? {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags: string[] = ['uuid.status', 'uuid.type', 'type'];

if (include!.customFields) includeFlags.push('custom');
Expand Down
7 changes: 4 additions & 3 deletions src/core/endpoints/objects/membership/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ export class GetUUIDMembershipsRequest<

protected get queryParameters(): Query {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort ?? {}).map(([option, order]) =>
order !== null ? `${option}:${order}` : option,
);
let sorting: string | string[] = '';
if (typeof sort === 'string') sorting = sort;
else
sorting = Object.entries(sort ?? {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags: string[] = [];

if (include!.statusField) includeFlags.push('status');
Expand Down
7 changes: 4 additions & 3 deletions src/core/endpoints/objects/membership/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ export class SetUUIDMembershipsRequest<

protected get queryParameters(): Query {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort ?? {}).map(([option, order]) =>
order !== null ? `${option}:${order}` : option,
);
let sorting: string | string[] = '';
if (typeof sort === 'string') sorting = sort;
else
sorting = Object.entries(sort ?? {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));
const includeFlags: string[] = ['channel.status', 'channel.type', 'status'];

if (include!.customFields) includeFlags.push('custom');
Expand Down
7 changes: 4 additions & 3 deletions src/core/endpoints/objects/uuid/get_all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ export class GetAllUUIDMetadataRequest<

protected get queryParameters(): Query {
const { include, page, filter, sort, limit } = this.parameters;
const sorting = Object.entries(sort ?? {}).map(([option, order]) =>
order !== null ? `${option}:${order}` : option,
);
let sorting: string | string[] = '';
if (typeof sort === 'string') sorting = sort;
else
sorting = Object.entries(sort ?? {}).map(([option, order]) => (order !== null ? `${option}:${order}` : option));

return {
include: ['status', 'type', ...(include!.customFields ? ['custom'] : [])].join(','),
Expand Down

0 comments on commit 1f73f33

Please sign in to comment.