diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7e9b568d..a6628464 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,7 @@ on: push: branches: - master + - '*.x' schedule: - cron: '0 0 * * 0' # Once in a week run tests to check assertions against updated(if any) ably-js package. diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e82794..82d5fcff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v1.14.1...master) +## [Unreleased](https://github.com/laravel/echo/compare/v1.14.2...master) + +## [v1.14.2](https://github.com/laravel/echo/compare/v1.14.1...v1.14.2) - 2022-11-22 + +### Fixed + +- Fix node type issue by @timacdonald in https://github.com/laravel/echo/pull/361 ## [v1.14.1](https://github.com/laravel/echo/compare/v1.14.0...v1.14.1) - 2022-10-25 diff --git a/package.json b/package.json index 12e0cae2..d95daecf 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@babel/preset-env": "^7.16.11", "@rollup/plugin-babel": "^5.3.1", "@types/jest": "^27.4.1", - "@types/node": "^17.0.21", + "@types/node": "^18.11.9", "@typescript-eslint/eslint-plugin": "^5.14.0", "@typescript-eslint/parser": "^5.14.0", "ably": "^1.2.20", diff --git a/src/channel/ably-presence-channel.ts b/src/channel/ably-presence-channel.ts index 9e23628c..ca57d1c8 100644 --- a/src/channel/ably-presence-channel.ts +++ b/src/channel/ably-presence-channel.ts @@ -26,8 +26,8 @@ export class AblyPresenceChannel extends AblyChannel implements PresenceChannel */ here(callback: Function): AblyPresenceChannel { this.channel.presence.subscribe(['enter', 'update', 'leave'], () => - this.channel.presence.get( - (err, members) => callback(members, err) // returns local sync copy of updated members + this.channel.presence.get((err, members) => + callback(members.map(({data}) => data), err) ) ); return this; diff --git a/tests/ably/ably-presence-channel.test.ts b/tests/ably/ably-presence-channel.test.ts index 5c89c352..4b2ab797 100644 --- a/tests/ably/ably-presence-channel.test.ts +++ b/tests/ably/ably-presence-channel.test.ts @@ -52,8 +52,9 @@ describe('AblyPresenceChannel', () => { () => { expect(err).toBeFalsy(); expect(members).toHaveLength(1); - expect(members[0].clientId).toBe('sacOO7@github.com'); - expect(members[0].data).toStrictEqual({ id: 'sacOO7@github.com', name: 'sacOO7' }); + expect(members[0].id).toBe('sacOO7@github.com'); + expect(members[0].name).toBe('sacOO7'); + expect(members[0]).toStrictEqual({ id: 'sacOO7@github.com', name: 'sacOO7' }); }, done, true