From b62863ad4139d598a05052ac9c5604e1f2054d2b Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 7 May 2025 14:38:29 -0400 Subject: [PATCH 01/70] Update release.sh --- release.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release.sh b/release.sh index e6833c7c..2a2abb13 100755 --- a/release.sh +++ b/release.sh @@ -93,15 +93,15 @@ echo "" echo "Running release process..." echo "" -# for package_dir in packages/*; do -# if [ -d "$package_dir" ]; then -# echo "Releasing $package_dir" -# cd $package_dir -# pnpm run release -# cd ../.. -# echo "" -# fi -# done +for package_dir in packages/*; do + if [ -d "$package_dir" ]; then + echo "Releasing $package_dir" + cd $package_dir + pnpm run release + cd ../.. + echo "" + fi +done # Echo joke echo "Released! (Released!) (Released!)" From de650d7354cacddf93bf0c8d0439bcee1eca0ea5 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 7 May 2025 14:41:37 -0400 Subject: [PATCH 02/70] wip --- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/package.json b/packages/react/package.json index 14a4caaf..6e6f5cd6 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@laravel/echo-react", "version": "2.1.0", - "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", + "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", "pusher", diff --git a/packages/vue/package.json b/packages/vue/package.json index 3b5a85a1..977352c6 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,7 +1,7 @@ { "name": "@laravel/echo-vue", "version": "2.1.0", - "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", + "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", "pusher", From 420333b1be7ae35677d3bb99cd8891530f8be5ac Mon Sep 17 00:00:00 2001 From: taylorotwell <463230+taylorotwell@users.noreply.github.com> Date: Wed, 7 May 2025 18:57:14 +0000 Subject: [PATCH 03/70] Update CHANGELOG --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82ab886d..fbe341e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.0.2...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.1.0...2.x) + +## [v2.1.0](https://github.com/laravel/echo/compare/v2.0.2...v2.1.0) - 2025-05-07 + +* fixes: unable to build by [@fxnm](https://github.com/fxnm) in https://github.com/laravel/echo/pull/419 +* Update logo by [@iamdavidhill](https://github.com/iamdavidhill) in https://github.com/laravel/echo/pull/421 +* CI Improvements by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/echo/pull/424 +* React/Vue Typescript Hooks by [@tnylea](https://github.com/tnylea) in https://github.com/laravel/echo/pull/422 +* Final hook prep by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/426 +* Added listen to `*`, stronger typing by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/427 ## [v2.0.2](https://github.com/laravel/echo/compare/v2.0.0...v2.0.2) - 2025-02-18 From 672c970a2f26c6c4449ded39247d77e8f4647c90 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 12 May 2025 17:15:11 -0400 Subject: [PATCH 04/70] Update release.sh --- release.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release.sh b/release.sh index 2a2abb13..333520f9 100755 --- a/release.sh +++ b/release.sh @@ -88,6 +88,7 @@ echo "" echo "" echo "Creating git tag: v$new_version" git tag "v$new_version" +git push --tags echo "" echo "Running release process..." From 0f259b9e137b42827b4af607dd6e388f8559811e Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 12 May 2025 17:15:22 -0400 Subject: [PATCH 05/70] Create .prettierrc --- .prettierrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..55ea2b2d --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 4, + "useTabs": false +} From 69a47e9212f550836ab4c742f9e0b15bcc3a1dd4 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 12 May 2025 21:45:49 -0400 Subject: [PATCH 06/70] blank cluster for ably --- packages/laravel-echo/src/echo.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/laravel-echo/src/echo.ts b/packages/laravel-echo/src/echo.ts index 4c2130c1..8d6d7f01 100644 --- a/packages/laravel-echo/src/echo.ts +++ b/packages/laravel-echo/src/echo.ts @@ -69,6 +69,7 @@ export default class Echo { } else if (this.options.broadcaster === "ably") { this.connector = new PusherConnector<"pusher">({ ...this.options, + cluster: "", broadcaster: "pusher", }); } else if (this.options.broadcaster === "socket.io") { From 6954453eaadb1c2b047978f7b19ca15b5f57e543 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 13 May 2025 11:20:37 -0400 Subject: [PATCH 07/70] optional events and listeners --- packages/react/src/hooks/use-echo.ts | 16 ++++----- packages/react/tests/use-echo.test.ts | 43 +++++++++++++++++++++++++ packages/vue/src/composables/useEcho.ts | 12 +++---- packages/vue/tests/useEcho.test.ts | 36 +++++++++++++++++---- 4 files changed, 87 insertions(+), 20 deletions(-) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index 9a839903..ca0bbd83 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -80,8 +80,8 @@ export const useEcho = < TVisibility extends Channel["visibility"] = "private", >( channelName: string, - event: string | string[], - callback: (payload: TPayload) => void, + event: string | string[] = [], + callback: (payload: TPayload) => void = () => {}, dependencies: any[] = [], visibility: TVisibility = "private" as TVisibility, ) => { @@ -173,8 +173,8 @@ export const useEchoPresence = < TDriver extends BroadcastDriver = BroadcastDriver, >( channelName: string, - event: string | string[], - callback: (payload: TPayload) => void, + event: string | string[] = [], + callback: (payload: TPayload) => void = () => {}, dependencies: any[] = [], ) => { return useEcho( @@ -191,8 +191,8 @@ export const useEchoPublic = < TDriver extends BroadcastDriver = BroadcastDriver, >( channelName: string, - event: string | string[], - callback: (payload: TPayload) => void, + event: string | string[] = [], + callback: (payload: TPayload) => void = () => {}, dependencies: any[] = [], ) => { return useEcho( @@ -211,8 +211,8 @@ export const useEchoModel = < >( model: TModel, identifier: string | number, - event: ModelEvents | ModelEvents[], - callback: (payload: ModelPayload) => void, + event: ModelEvents | ModelEvents[] = [], + callback: (payload: ModelPayload) => void = () => {}, dependencies: any[] = [], ) => { return useEcho, TDriver, "private">( diff --git a/packages/react/tests/use-echo.test.ts b/packages/react/tests/use-echo.test.ts index e1849619..96f52de2 100644 --- a/packages/react/tests/use-echo.test.ts +++ b/packages/react/tests/use-echo.test.ts @@ -307,6 +307,15 @@ describe("useEcho hook", async () => { const channel = echoInstance.private(channelName); expect(channel.listen).toHaveBeenCalledTimes(1); }); + + it("events and listeners are optional", async () => { + const channelName = "test-channel"; + + const { result } = renderHook(() => echoModule.useEcho(channelName)); + + expect(result.current).toHaveProperty("channel"); + expect(result.current.channel).not.toBeNull(); + }); }); describe("useEchoModel hook", async () => { @@ -524,6 +533,18 @@ describe("useEchoModel hook", async () => { const channel = echoInstance.private(expectedChannelName); expect(channel.listen).toHaveBeenCalledWith(`.${event}`, mockCallback); }); + + it("events and listeners are optional", async () => { + const model = "App.Models.User.Profile"; + const identifier = "123"; + + const { result } = renderHook(() => + echoModule.useEchoModel(model, identifier), + ); + + expect(result.current).toHaveProperty("channel"); + expect(result.current.channel).not.toBeNull(); + }); }); describe("useEchoPublic hook", async () => { @@ -661,6 +682,17 @@ describe("useEchoPublic hook", async () => { expect(echoInstance.leave).toHaveBeenCalledWith(channelName); }); + + it("events and listeners are optional", async () => { + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoPublic(channelName), + ); + + expect(result.current).toHaveProperty("channel"); + expect(result.current.channel).not.toBeNull(); + }); }); describe("useEchoPresence hook", async () => { @@ -810,4 +842,15 @@ describe("useEchoPresence hook", async () => { expect(echoInstance.leave).toHaveBeenCalledWith(channelName); }); + + it("events and listeners are optional", async () => { + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoPresence(channelName), + ); + + expect(result.current).toHaveProperty("channel"); + expect(result.current.channel).not.toBeNull(); + }); }); diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index 1cf0f8e7..1768c121 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -80,8 +80,8 @@ export const useEcho = < TVisibility extends Channel["visibility"] = "private", >( channelName: string, - event: string | string[], - callback: (payload: TPayload) => void, + event: string | string[] = [], + callback: (payload: TPayload) => void = () => {}, dependencies: any[] = [], visibility: TVisibility = "private" as TVisibility, ) => { @@ -193,8 +193,8 @@ export const useEchoPresence = < TDriver extends BroadcastDriver = BroadcastDriver, >( channelName: string, - event: string | string[], - callback: (payload: TPayload) => void, + event: string | string[] = [], + callback: (payload: TPayload) => void = () => {}, dependencies: any[] = [], ) => { return useEcho( @@ -211,8 +211,8 @@ export const useEchoPublic = < TDriver extends BroadcastDriver = BroadcastDriver, >( channelName: string, - event: string | string[], - callback: (payload: TPayload) => void, + event: string | string[] = [], + callback: (payload: TPayload) => void = () => {}, dependencies: any[] = [], ) => { return useEcho( diff --git a/packages/vue/tests/useEcho.test.ts b/packages/vue/tests/useEcho.test.ts index d90fe647..2c80bcb4 100644 --- a/packages/vue/tests/useEcho.test.ts +++ b/packages/vue/tests/useEcho.test.ts @@ -29,8 +29,8 @@ const getUnConfiguredTestComponent = ( const getTestComponent = ( channelName: string, - event: string | string[], - callback: (data: any) => void, + event: string | string[] | undefined, + callback: ((data: any) => void) | undefined, dependencies: any[] = [], visibility: "private" | "public" = "private", ) => { @@ -58,8 +58,8 @@ const getTestComponent = ( const getPublicTestComponent = ( channelName: string, - event: string | string[], - callback: (data: any) => void, + event: string | string[] | undefined, + callback: ((data: any) => void) | undefined, dependencies: any[] = [], ) => { const TestComponent = defineComponent({ @@ -80,8 +80,8 @@ const getPublicTestComponent = ( const getPresenceTestComponent = ( channelName: string, - event: string | string[], - callback: (data: any) => void, + event: string | string[] | undefined, + callback: ((data: any) => void) | undefined, dependencies: any[] = [], ) => { const TestComponent = defineComponent({ @@ -416,6 +416,14 @@ describe("useEcho hook", async () => { ); }); }); + + it("events and listeners are optional", async () => { + const channelName = "test-channel"; + + wrapper = getTestComponent(channelName, undefined, undefined); + + expect(wrapper.vm.channel).not.toBeNull(); + }); }); describe("useEchoPublic hook", async () => { @@ -538,6 +546,14 @@ describe("useEchoPublic hook", async () => { expect(echoInstance.leave).toHaveBeenCalledWith(channelName); }); + + it("events and listeners are optional", async () => { + const channelName = "test-channel"; + + wrapper = getPublicTestComponent(channelName, undefined, undefined); + + expect(wrapper.vm.channel).not.toBeNull(); + }); }); describe("useEchoPresence hook", async () => { @@ -673,4 +689,12 @@ describe("useEchoPresence hook", async () => { expect(echoInstance.leave).toHaveBeenCalledWith(channelName); }); + + it("events and listeners are optional", async () => { + const channelName = "test-channel"; + + wrapper = getPresenceTestComponent(channelName, undefined, undefined); + + expect(wrapper.vm.channel).not.toBeNull(); + }); }); From 9ef4000e64faac74b6e7dfa3303089164fe23c6a Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 13 May 2025 11:27:39 -0400 Subject: [PATCH 08/70] Update release.sh --- release.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release.sh b/release.sh index 333520f9..e797ff55 100755 --- a/release.sh +++ b/release.sh @@ -106,3 +106,8 @@ done # Echo joke echo "Released! (Released!) (Released!)" + +echo "" + +echo "Release on GitHub:" +echo "https://github.com/laravel/echo/releases/tag/v$new_version" From 8f411bb8345510d47e5a9ba1e39a956d7eebe511 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 13 May 2025 10:34:02 -0500 Subject: [PATCH 09/70] v2.1.1 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index b2a7d6e9..c6954759 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.0", + "version": "2.1.1", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 6e6f5cd6..d3af0ca1 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.0", + "version": "2.1.1", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 977352c6..3a8ffe0f 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.0", + "version": "2.1.1", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From f3219bba522b5daaa9dc7e0c1743969c7dd4e93f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 13 May 2025 10:38:24 -0500 Subject: [PATCH 10/70] v2.1.2 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index c6954759..e90a9dab 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.1", + "version": "2.1.2", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index d3af0ca1..d800bef2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.1", + "version": "2.1.2", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 3a8ffe0f..4ff95078 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.1", + "version": "2.1.2", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 6238cf2836fc12482a459a9a457822df2ec165e1 Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Tue, 13 May 2025 17:01:16 +0000 Subject: [PATCH 11/70] Update CHANGELOG --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbe341e5..d46a4aa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.1.0...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.1.1...2.x) + +## [v2.1.1](https://github.com/laravel/echo/compare/v2.1.0...v2.1.1) - 2025-05-13 + +### What's Changed + +* Fix Ably cluster error by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/429 +* Make events and listeners optional by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/430 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.1.0...v2.1.1 ## [v2.1.0](https://github.com/laravel/echo/compare/v2.0.2...v2.1.0) - 2025-05-07 From 4c338cf49bfb8517982f83bc96499b84486f35ee Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 13 May 2025 15:13:13 -0400 Subject: [PATCH 12/70] fix reverb app key env name --- packages/react/src/config/index.ts | 2 +- packages/react/src/vite-env.d.ts | 2 +- packages/react/vite.config.ts | 4 ++-- packages/vue/src/config/index.ts | 2 +- packages/vue/src/vite-env.d.ts | 2 +- packages/vue/vite.config.ts | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react/src/config/index.ts b/packages/react/src/config/index.ts index 4776d74b..6c3e66be 100644 --- a/packages/react/src/config/index.ts +++ b/packages/react/src/config/index.ts @@ -34,7 +34,7 @@ export const configureEcho = ( const defaults: ConfigDefaults = { reverb: { broadcaster: "reverb", - key: import.meta.env.VITE_REVERB_KEY, + key: import.meta.env.VITE_REVERB_APP_KEY, wsHost: import.meta.env.VITE_REVERB_HOST, wsPort: import.meta.env.VITE_REVERB_PORT, wssPort: import.meta.env.VITE_REVERB_PORT, diff --git a/packages/react/src/vite-env.d.ts b/packages/react/src/vite-env.d.ts index 4fb35ce4..a1968545 100644 --- a/packages/react/src/vite-env.d.ts +++ b/packages/react/src/vite-env.d.ts @@ -7,7 +7,7 @@ interface ImportMetaEnv { readonly VITE_PUSHER_PORT: number; readonly VITE_REVERB_HOST: string; - readonly VITE_REVERB_KEY: string; + readonly VITE_REVERB_APP_KEY: string; readonly VITE_REVERB_PORT: number; readonly VITE_REVERB_SCHEME: string; diff --git a/packages/react/vite.config.ts b/packages/react/vite.config.ts index 1c648dcc..343dcdbf 100644 --- a/packages/react/vite.config.ts +++ b/packages/react/vite.config.ts @@ -42,8 +42,8 @@ const config: UserConfig = (() => { }), ], define: { - "import.meta.env.VITE_REVERB_KEY": - "import.meta.env.VITE_REVERB_KEY", + "import.meta.env.VITE_REVERB_APP_KEY": + "import.meta.env.VITE_REVERB_APP_KEY", "import.meta.env.VITE_REVERB_HOST": "import.meta.env.VITE_REVERB_HOST", "import.meta.env.VITE_REVERB_PORT": diff --git a/packages/vue/src/config/index.ts b/packages/vue/src/config/index.ts index 9f32a544..1d8286e2 100644 --- a/packages/vue/src/config/index.ts +++ b/packages/vue/src/config/index.ts @@ -34,7 +34,7 @@ export const configureEcho = ( const defaults: ConfigDefaults = { reverb: { broadcaster: "reverb", - key: import.meta.env.VITE_REVERB_KEY, + key: import.meta.env.VITE_REVERB_APP_KEY, wsHost: import.meta.env.VITE_REVERB_HOST, wsPort: import.meta.env.VITE_REVERB_PORT, wssPort: import.meta.env.VITE_REVERB_PORT, diff --git a/packages/vue/src/vite-env.d.ts b/packages/vue/src/vite-env.d.ts index 4fb35ce4..a1968545 100644 --- a/packages/vue/src/vite-env.d.ts +++ b/packages/vue/src/vite-env.d.ts @@ -7,7 +7,7 @@ interface ImportMetaEnv { readonly VITE_PUSHER_PORT: number; readonly VITE_REVERB_HOST: string; - readonly VITE_REVERB_KEY: string; + readonly VITE_REVERB_APP_KEY: string; readonly VITE_REVERB_PORT: number; readonly VITE_REVERB_SCHEME: string; diff --git a/packages/vue/vite.config.ts b/packages/vue/vite.config.ts index 06f808c3..00f4d5cf 100644 --- a/packages/vue/vite.config.ts +++ b/packages/vue/vite.config.ts @@ -42,8 +42,8 @@ const config: UserConfig = (() => { }), ], define: { - "import.meta.env.VITE_REVERB_KEY": - "import.meta.env.VITE_REVERB_KEY", + "import.meta.env.VITE_REVERB_APP_KEY": + "import.meta.env.VITE_REVERB_APP_KEY", "import.meta.env.VITE_REVERB_HOST": "import.meta.env.VITE_REVERB_HOST", "import.meta.env.VITE_REVERB_PORT": From 4b3b9ca63ec39f7dbae5e13fa8aa7423ab53ad05 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 13 May 2025 17:15:11 -0500 Subject: [PATCH 13/70] v2.1.3 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index e90a9dab..e20582dc 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.2", + "version": "2.1.3", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index d800bef2..d157b30e 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.2", + "version": "2.1.3", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 4ff95078..b12b2a31 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.2", + "version": "2.1.3", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 61bbfa643160cbf118ef0b029b490eca92d5d8e7 Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Tue, 13 May 2025 22:19:54 +0000 Subject: [PATCH 14/70] Update CHANGELOG --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d46a4aa3..78a2f3f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.1.1...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.1.3...2.x) + +## [v2.1.3](https://github.com/laravel/echo/compare/v2.1.1...v2.1.3) - 2025-05-13 + +### What's Changed + +* Fix Reverb app key env name by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/431 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.1.2...v2.1.3 ## [v2.1.1](https://github.com/laravel/echo/compare/v2.1.0...v2.1.1) - 2025-05-13 From f4f1d76cbc89efc7c802f7b7273a1fdaaea63af9 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 10:09:54 -0400 Subject: [PATCH 15/70] fix window types --- packages/laravel-echo/src/connector/connector.ts | 8 +++----- packages/laravel-echo/tsconfig.json | 2 +- packages/laravel-echo/typings/window.d.ts | 4 +--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/laravel-echo/src/connector/connector.ts b/packages/laravel-echo/src/connector/connector.ts index 3eb2b50d..1741d997 100644 --- a/packages/laravel-echo/src/connector/connector.ts +++ b/packages/laravel-echo/src/connector/connector.ts @@ -1,3 +1,5 @@ +/// + import type { Channel, PresenceChannel } from "../channel"; import type { BroadcastDriver, EchoOptions } from "../echo"; @@ -90,11 +92,7 @@ export abstract class Connector< protected csrfToken(): null | string { let selector; - if ( - typeof window !== "undefined" && - typeof window.Laravel !== "undefined" && - window.Laravel.csrfToken - ) { + if (window?.Laravel?.csrfToken) { return window.Laravel.csrfToken; } diff --git a/packages/laravel-echo/tsconfig.json b/packages/laravel-echo/tsconfig.json index e96a3f49..f53d21f5 100644 --- a/packages/laravel-echo/tsconfig.json +++ b/packages/laravel-echo/tsconfig.json @@ -18,7 +18,7 @@ "emitDecoratorMetadata": true, "esModuleInterop": true, "strict": true, - "typeRoots": ["node_modules/@types"], + "typeRoots": ["node_modules/@types", "./typings"], "lib": ["dom", "es2020"] }, "include": ["./typings/**/*.ts", "./src/**/*.ts"], diff --git a/packages/laravel-echo/typings/window.d.ts b/packages/laravel-echo/typings/window.d.ts index b84c1f77..dcf43166 100644 --- a/packages/laravel-echo/typings/window.d.ts +++ b/packages/laravel-echo/typings/window.d.ts @@ -1,7 +1,5 @@ -import type { io } from "socket.io-client"; import type Pusher from "pusher-js"; - -export {}; +import type { io } from "socket.io-client"; declare global { interface Window { From cdd27d883ad01a7a61e69e1fbf69eae2b765e7aa Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 10:49:16 -0400 Subject: [PATCH 16/70] Update connector.ts --- .../laravel-echo/src/connector/connector.ts | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/packages/laravel-echo/src/connector/connector.ts b/packages/laravel-echo/src/connector/connector.ts index 1741d997..a4673b7f 100644 --- a/packages/laravel-echo/src/connector/connector.ts +++ b/packages/laravel-echo/src/connector/connector.ts @@ -90,25 +90,14 @@ export abstract class Connector< * Extract the CSRF token from the page. */ protected csrfToken(): null | string { - let selector; - - if (window?.Laravel?.csrfToken) { - return window.Laravel.csrfToken; - } - - if (this.options.csrfToken) { - return this.options.csrfToken; - } - - if ( - typeof document !== "undefined" && - typeof document.querySelector === "function" && - (selector = document.querySelector('meta[name="csrf-token"]')) - ) { - return selector.getAttribute("content"); - } - - return null; + return ( + window?.Laravel?.csrfToken ?? + this.options.csrfToken ?? + document + ?.querySelector('meta[name="csrf-token"]') + ?.getAttribute("content") ?? + null + ); } /** From 485c58e7e64a3f320c13d3f24ae26bbe9652bad8 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 10:49:27 -0400 Subject: [PATCH 17/70] Update package.json --- packages/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/package.json b/packages/react/package.json index d157b30e..02b861be 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -8,7 +8,7 @@ "ably", "react" ], - "homepage": "https://github.com/laravel/echotree/2.x/packages/react", + "homepage": "https://github.com/laravel/echo/tree/2.x/packages/react", "repository": { "type": "git", "url": "https://github.com/laravel/echo" From 2cdc569fa37af9435ea2e4c8d95e051cdb40cc8b Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 10:49:38 -0400 Subject: [PATCH 18/70] window and global type fixing --- packages/laravel-echo/package.json | 5 +- .../src/connector/pusher-connector.ts | 2 +- packages/laravel-echo/typings/window.d.ts | 14 ++- pnpm-lock.yaml | 103 ++++++++++++++++++ 4 files changed, 121 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index e20582dc..ceab71f9 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -37,9 +37,11 @@ "@babel/plugin-transform-numeric-separator": "^7.25.9", "@babel/plugin-transform-object-assign": "^7.25.9", "@babel/preset-env": "^7.26.7", + "@types/jquery": "^3.5.32", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^8.21.0", "@typescript-eslint/parser": "^8.21.0", + "axios": "^1.9.0", "eslint": "^9.0.0", "prettier": "^3.5.3", "pusher-js": "^8.0", @@ -48,7 +50,8 @@ "typescript": "^5.7.0", "vite": "^5.0.0", "vite-plugin-dts": "^3.0.0", - "vitest": "^3.1.2" + "vitest": "^3.1.2", + "vue": "^3.5.13" }, "peerDependencies": { "pusher-js": "*", diff --git a/packages/laravel-echo/src/connector/pusher-connector.ts b/packages/laravel-echo/src/connector/pusher-connector.ts index db495de3..6b50b227 100644 --- a/packages/laravel-echo/src/connector/pusher-connector.ts +++ b/packages/laravel-echo/src/connector/pusher-connector.ts @@ -42,7 +42,7 @@ export class PusherConnector< */ channels: Record = {}; - options: PusherOptions; + declare options: PusherOptions; /** * Create a fresh Pusher connection. diff --git a/packages/laravel-echo/typings/window.d.ts b/packages/laravel-echo/typings/window.d.ts index dcf43166..76df6eb1 100644 --- a/packages/laravel-echo/typings/window.d.ts +++ b/packages/laravel-echo/typings/window.d.ts @@ -1,5 +1,8 @@ +import type { JQueryStatic } from "@types/jquery"; +import type { AxiosStatic } from "axios"; import type Pusher from "pusher-js"; import type { io } from "socket.io-client"; +import type { VueElementConstructor } from "vue"; declare global { interface Window { @@ -8,7 +11,16 @@ declare global { }; io?: typeof io; - Pusher?: typeof Pusher; + + Vue?: VueElementConstructor; + axios?: AxiosStatic; + jQuery?: JQueryStatic; + Turbo?: object; } + + const Vue: VueElementConstructor | undefined; + const axios: AxiosStatic | undefined; + const jQuery: JQueryStatic | undefined; + const Turbo: object | undefined; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cdefee7d..5ebcd568 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,6 +34,9 @@ importers: '@babel/preset-env': specifier: ^7.26.7 version: 7.27.1(@babel/core@7.27.1) + '@types/jquery': + specifier: ^3.5.32 + version: 3.5.32 '@types/node': specifier: ^20.0.0 version: 20.17.32 @@ -43,6 +46,9 @@ importers: '@typescript-eslint/parser': specifier: ^8.21.0 version: 8.31.1(eslint@9.25.1)(typescript@5.8.3) + axios: + specifier: ^1.9.0 + version: 1.9.0 eslint: specifier: ^9.0.0 version: 9.25.1 @@ -70,6 +76,9 @@ importers: vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@20.17.32)(jsdom@26.1.0) + vue: + specifier: ^3.5.13 + version: 3.5.13(typescript@5.8.3) packages/react: devDependencies: @@ -1426,6 +1435,9 @@ packages: '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + '@types/jquery@3.5.32': + resolution: {integrity: sha512-b9Xbf4CkMqS02YH8zACqN1xzdxc3cO735Qe5AbSUFmyOiaWAbcpqh9Wna+Uk0vgACvoQHpWDg2rGdHkYPLmCiQ==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -1448,6 +1460,9 @@ packages: '@types/react@19.1.2': resolution: {integrity: sha512-oxLPMytKchWGbnQM9O7D67uPa9paTNxO7jVoNMXgkkErULBPhPARCfkKL9ytcIJJRGjbsVwW4ugJzyFFvm/Tiw==} + '@types/sizzle@2.3.9': + resolution: {integrity: sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w==} + '@typescript-eslint/eslint-plugin@8.31.1': resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1679,10 +1694,16 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axios@1.9.0: + resolution: {integrity: sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==} + babel-plugin-polyfill-corejs2@0.4.13: resolution: {integrity: sha512-3sX/eOms8kd3q2KZ6DAhKPc0dgm525Gqq5NtWKZ7QYYZEv57OQ54KtblzJzH1lQF/eQxO8KjWGIK9IPUJNus5g==} peerDependencies: @@ -1766,6 +1787,10 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} @@ -1856,6 +1881,10 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -1920,6 +1949,10 @@ packages: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -2036,6 +2069,15 @@ packages: flatted@3.3.3: resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + for-each@0.3.5: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} @@ -2044,6 +2086,10 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} + form-data@4.0.2: + resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} + engines: {node: '>= 6'} + fs-extra@11.3.0: resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} engines: {node: '>=14.14'} @@ -2391,6 +2437,14 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + minimatch@3.0.8: resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} @@ -2544,6 +2598,9 @@ packages: proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -4364,6 +4421,10 @@ snapshots: '@types/estree@1.0.7': {} + '@types/jquery@3.5.32': + dependencies: + '@types/sizzle': 2.3.9 + '@types/json-schema@7.0.15': {} '@types/node@20.17.32': @@ -4386,6 +4447,8 @@ snapshots: dependencies: csstype: 3.1.3 + '@types/sizzle@2.3.9': {} + '@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.25.1)(typescript@5.8.3))(eslint@9.25.1)(typescript@5.8.3)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -4701,10 +4764,20 @@ snapshots: assertion-error@2.0.1: {} + asynckit@0.4.0: {} + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.1.0 + axios@1.9.0: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.2 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + babel-plugin-polyfill-corejs2@0.4.13(@babel/core@7.27.1): dependencies: '@babel/compat-data': 7.27.1 @@ -4804,6 +4877,10 @@ snapshots: color-name@1.1.4: {} + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + commander@10.0.1: {} commander@9.5.0: @@ -4897,6 +4974,8 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + delayed-stream@1.0.0: {} + dequal@2.0.3: {} dom-accessibility-api@0.5.16: {} @@ -4964,6 +5043,13 @@ snapshots: dependencies: es-errors: 1.3.0 + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -5141,6 +5227,8 @@ snapshots: flatted@3.3.3: {} + follow-redirects@1.15.9: {} + for-each@0.3.5: dependencies: is-callable: 1.2.7 @@ -5150,6 +5238,13 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + form-data@4.0.2: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + mime-types: 2.1.35 + fs-extra@11.3.0: dependencies: graceful-fs: 4.2.11 @@ -5495,6 +5590,12 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + minimatch@3.0.8: dependencies: brace-expansion: 1.1.11 @@ -5638,6 +5739,8 @@ snapshots: proto-list@1.2.4: {} + proxy-from-env@1.1.0: {} + punycode@2.3.1: {} pusher-js@8.4.0: From 8fdbbbe5f7b42c853756a41698c46b2378975043 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 11:06:58 -0400 Subject: [PATCH 19/70] type fixes and note to eventually remove vue-resource --- packages/laravel-echo/package.json | 3 +-- packages/laravel-echo/src/echo.ts | 22 +++++++++++++++------- packages/laravel-echo/typings/window.d.ts | 7 +++---- pnpm-lock.yaml | 3 --- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index ceab71f9..73dd3ebc 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -50,8 +50,7 @@ "typescript": "^5.7.0", "vite": "^5.0.0", "vite-plugin-dts": "^3.0.0", - "vitest": "^3.1.2", - "vue": "^3.5.13" + "vitest": "^3.1.2" }, "peerDependencies": { "pusher-js": "*", diff --git a/packages/laravel-echo/src/echo.ts b/packages/laravel-echo/src/echo.ts index 8d6d7f01..43d2ddcd 100644 --- a/packages/laravel-echo/src/echo.ts +++ b/packages/laravel-echo/src/echo.ts @@ -1,3 +1,4 @@ +import type { InternalAxiosRequestConfig } from "axios"; import { Channel, NullChannel, @@ -179,7 +180,9 @@ export default class Echo { * send a connections socket id to a Laravel app with a X-Socket-Id header. */ registerInterceptors(): void { - if (typeof Vue === "function" && Vue.http) { + // TODO: This package is deprecated and we should remove it in a future version. + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (Vue?.http) { this.registerVueRequestInterceptor(); } @@ -200,12 +203,15 @@ export default class Echo { * Register a Vue HTTP interceptor to add the X-Socket-ID header. */ registerVueRequestInterceptor(): void { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call Vue.http.interceptors.push( (request: Record, next: CallableFunction) => { if (this.socketId()) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call request.headers.set("X-Socket-ID", this.socketId()); } + // eslint-disable-next-line @typescript-eslint/no-unsafe-call next(); }, ); @@ -215,13 +221,15 @@ export default class Echo { * Register an Axios HTTP interceptor to add the X-Socket-ID header. */ registerAxiosRequestInterceptor(): void { - axios.interceptors.request.use((config: Record) => { - if (this.socketId()) { - config.headers["X-Socket-Id"] = this.socketId(); - } + axios!.interceptors.request.use( + (config: InternalAxiosRequestConfig) => { + if (this.socketId()) { + config.headers["X-Socket-Id"] = this.socketId(); + } - return config; - }); + return config; + }, + ); } /** diff --git a/packages/laravel-echo/typings/window.d.ts b/packages/laravel-echo/typings/window.d.ts index 76df6eb1..fdfb41e2 100644 --- a/packages/laravel-echo/typings/window.d.ts +++ b/packages/laravel-echo/typings/window.d.ts @@ -1,8 +1,7 @@ -import type { JQueryStatic } from "@types/jquery"; import type { AxiosStatic } from "axios"; +import type { JQueryStatic } from "jquery"; import type Pusher from "pusher-js"; import type { io } from "socket.io-client"; -import type { VueElementConstructor } from "vue"; declare global { interface Window { @@ -13,13 +12,13 @@ declare global { io?: typeof io; Pusher?: typeof Pusher; - Vue?: VueElementConstructor; + Vue?: any; axios?: AxiosStatic; jQuery?: JQueryStatic; Turbo?: object; } - const Vue: VueElementConstructor | undefined; + const Vue: any | undefined; const axios: AxiosStatic | undefined; const jQuery: JQueryStatic | undefined; const Turbo: object | undefined; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ebcd568..1b08924f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -76,9 +76,6 @@ importers: vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@20.17.32)(jsdom@26.1.0) - vue: - specifier: ^3.5.13 - version: 3.5.13(typescript@5.8.3) packages/react: devDependencies: From 5cc24d63e83cfbef1b7c58894f716dae1306ac08 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 13:07:55 -0400 Subject: [PATCH 20/70] make event and callback optional for Vue useEchoModel --- packages/vue/src/composables/useEcho.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index 1768c121..6ac5a9c8 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -231,8 +231,8 @@ export const useEchoModel = < >( model: TModel, identifier: string | number, - event: ModelEvents | ModelEvents[], - callback: (payload: ModelPayload) => void, + event: ModelEvents | ModelEvents[] = [], + callback: (payload: ModelPayload) => void = () => {}, dependencies: any[] = [], ) => { return useEcho, TDriver, "private">( From 5750f6632c0fe49625634dd9a22b8fc5f6fd4f57 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 13:39:26 -0400 Subject: [PATCH 21/70] fix channel func immediate availabilty --- packages/react/src/hooks/use-echo.ts | 39 ++++++++++--------------- packages/react/src/types.ts | 9 ------ packages/vue/src/composables/useEcho.ts | 27 +++++------------ packages/vue/src/types.ts | 9 ------ 4 files changed, 24 insertions(+), 60 deletions(-) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index ca0bbd83..a099e7d3 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -4,7 +4,6 @@ import { echo } from "../config"; import type { Channel, ChannelData, - ChannelReturnType, Connection, ModelEvents, ModelPayload, @@ -51,7 +50,7 @@ const leaveChannel = (channel: Channel, leaveAll: boolean): void => { const resolveChannelSubscription = ( channel: Channel, -): Connection | void => { +): Connection => { if (channels[channel.id]) { channels[channel.id].count += 1; @@ -60,12 +59,6 @@ const resolveChannelSubscription = ( const channelSubscription = subscribeToChannel(channel); - if (!channelSubscription) { - // eslint-disable-next-line no-console - console.warn(`Failed to subscribe to channel: ${channel.id}`); - return; - } - channels[channel.id] = { count: 1, connection: channelSubscription, @@ -85,11 +78,6 @@ export const useEcho = < dependencies: any[] = [], visibility: TVisibility = "private" as TVisibility, ) => { - const callbackFunc = useCallback(callback, dependencies); - const subscription = useRef | null>(null); - const listening = useRef(false); - - const events = toArray(event); const channel: Channel = { name: channelName, id: ["private", "presence"].includes(visibility) @@ -98,13 +86,22 @@ export const useEcho = < visibility, }; + const callbackFunc = useCallback(callback, dependencies); + const listening = useRef(false); + const initialized = useRef(false); + const subscription = useRef>( + resolveChannelSubscription(channel), + ); + + const events = toArray(event); + const stopListening = useCallback(() => { if (!listening.current) { return; } events.forEach((e) => { - subscription.current!.stopListening(e, callbackFunc); + subscription.current.stopListening(e, callbackFunc); }); listening.current = false; @@ -116,7 +113,7 @@ export const useEcho = < } events.forEach((e) => { - subscription.current!.listen(e, callbackFunc); + subscription.current.listen(e, callbackFunc); }); listening.current = true; @@ -129,14 +126,11 @@ export const useEcho = < }, dependencies); useEffect(() => { - const channelSubscription = - resolveChannelSubscription(channel); - - if (!channelSubscription) { - return; + if (initialized.current) { + subscription.current = resolveChannelSubscription(channel); } - subscription.current = channelSubscription; + initialized.current = true; listen(); @@ -163,8 +157,7 @@ export const useEcho = < /** * Channel instance */ - channel: () => - subscription.current as ChannelReturnType, + channel: () => subscription.current, }; }; diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index 634b6876..a95b8889 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -28,15 +28,6 @@ export type ModelPayload = { afterCommit: boolean; }; -export type ChannelReturnType< - T extends BroadcastDriver, - V extends Channel["visibility"], -> = V extends "presence" - ? Broadcaster[T]["presence"] - : V extends "private" - ? Broadcaster[T]["private"] - : Broadcaster[T]["public"]; - // eslint-disable-next-line @typescript-eslint/no-unused-vars export type ModelName = T extends `${infer _}.${infer U}` ? ModelName diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index 6ac5a9c8..004e1eb6 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -4,7 +4,6 @@ import { echo } from "../config"; import type { Channel, ChannelData, - ChannelReturnType, Connection, ModelEvents, ModelPayload, @@ -15,7 +14,7 @@ const channels: Record> = {}; const resolveChannelSubscription = ( channel: Channel, -): Connection | null => { +): Connection => { if (channels[channel.id]) { channels[channel.id].count += 1; @@ -24,12 +23,6 @@ const resolveChannelSubscription = ( const channelSubscription = subscribeToChannel(channel); - if (!channelSubscription) { - // eslint-disable-next-line no-console - console.warn(`Failed to subscribe to channel: ${channel.id}`); - return null; - } - channels[channel.id] = { count: 1, connection: channelSubscription, @@ -95,8 +88,6 @@ export const useEcho = < }, ); - let subscription: Connection | null = null; - const events = Array.isArray(event) ? event : [event]; const channel: Channel = { name: channelName, id: ["private", "presence"].includes(visibility) @@ -105,13 +96,11 @@ export const useEcho = < visibility, }; - const setupSubscription = () => { - subscription = resolveChannelSubscription(channel); - - if (!subscription) { - return; - } + const subscription: Connection = + resolveChannelSubscription(channel); + const events = Array.isArray(event) ? event : [event]; + const setupSubscription = () => { listen(); }; @@ -121,7 +110,7 @@ export const useEcho = < } events.forEach((e) => { - subscription!.listen(e, eventCallback.value); + subscription.listen(e, eventCallback.value); }); listening.value = true; @@ -133,7 +122,7 @@ export const useEcho = < } events.forEach((e) => { - subscription!.stopListening(e, eventCallback.value); + subscription.stopListening(e, eventCallback.value); }); listening.value = false; @@ -184,7 +173,7 @@ export const useEcho = < /** * Channel instance */ - channel: () => subscription! as ChannelReturnType, + channel: () => subscription, }; }; diff --git a/packages/vue/src/types.ts b/packages/vue/src/types.ts index 634b6876..a95b8889 100644 --- a/packages/vue/src/types.ts +++ b/packages/vue/src/types.ts @@ -28,15 +28,6 @@ export type ModelPayload = { afterCommit: boolean; }; -export type ChannelReturnType< - T extends BroadcastDriver, - V extends Channel["visibility"], -> = V extends "presence" - ? Broadcaster[T]["presence"] - : V extends "private" - ? Broadcaster[T]["private"] - : Broadcaster[T]["public"]; - // eslint-disable-next-line @typescript-eslint/no-unused-vars export type ModelName = T extends `${infer _}.${infer U}` ? ModelName From 9a98c197acb52b93af28e9faeb3b2e52ac472945 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 13:53:07 -0400 Subject: [PATCH 22/70] jsdom + withoutInterceptors --- packages/laravel-echo/src/echo.ts | 1 + packages/laravel-echo/tests/echo.test.ts | 61 ++++++++++++++---------- packages/laravel-echo/vite.config.ts | 4 ++ 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/packages/laravel-echo/src/echo.ts b/packages/laravel-echo/src/echo.ts index 43d2ddcd..9c34830a 100644 --- a/packages/laravel-echo/src/echo.ts +++ b/packages/laravel-echo/src/echo.ts @@ -356,6 +356,7 @@ type GenericOptions = { host?: string | null; key?: string | null; namespace?: string | false; + withoutInterceptors?: boolean; [key: string]: any; }; diff --git a/packages/laravel-echo/tests/echo.test.ts b/packages/laravel-echo/tests/echo.test.ts index b31ffcf0..1dbf1f8b 100644 --- a/packages/laravel-echo/tests/echo.test.ts +++ b/packages/laravel-echo/tests/echo.test.ts @@ -4,36 +4,47 @@ import Echo from "../src/echo"; describe("Echo", () => { test("it will not throw error for supported driver", () => { - expect(() => new Echo({ broadcaster: "reverb" })).not.toThrow( - "Broadcaster string reverb is not supported.", - ); + expect( + () => + new Echo({ broadcaster: "reverb", withoutInterceptors: true }), + ).not.toThrow("Broadcaster string reverb is not supported."); - expect(() => new Echo({ broadcaster: "pusher" })).not.toThrow( - "Broadcaster string pusher is not supported.", - ); + expect( + () => + new Echo({ broadcaster: "pusher", withoutInterceptors: true }), + ).not.toThrow("Broadcaster string pusher is not supported."); - expect(() => new Echo({ broadcaster: "socket.io" })).not.toThrow( - "Broadcaster string socket.io is not supported.", - ); + expect( + () => + new Echo({ + broadcaster: "socket.io", + withoutInterceptors: true, + }), + ).not.toThrow("Broadcaster string socket.io is not supported."); - expect(() => new Echo({ broadcaster: "null" })).not.toThrow( - "Broadcaster string null is not supported.", - ); - expect(() => new Echo({ broadcaster: NullConnector })).not.toThrow(); - - // eslint-disable-next-line - // @ts-ignore - // eslint-disable-next-line @typescript-eslint/no-empty-function - expect(() => new Echo({ broadcaster: () => {} })).not.toThrow( - "Broadcaster function is not supported.", - ); + expect( + () => new Echo({ broadcaster: "null", withoutInterceptors: true }), + ).not.toThrow("Broadcaster string null is not supported."); + expect( + () => + new Echo({ + broadcaster: NullConnector, + withoutInterceptors: true, + }), + ).not.toThrow(); + expect( + () => + // @ts-ignore + // eslint-disable-next-line @typescript-eslint/no-empty-function + new Echo({ broadcaster: () => {}, withoutInterceptors: true }), + ).not.toThrow("Broadcaster function is not supported."); }); test("it will throw error for unsupported driver", () => { - // eslint-disable-next-line - // @ts-ignore - expect(() => new Echo({ broadcaster: "foo" })).toThrow( - "Broadcaster string foo is not supported.", - ); + expect( + // @ts-ignore + // eslint-disable-next-line + () => new Echo({ broadcaster: "foo", withoutInterceptors: true }), + ).toThrow("Broadcaster string foo is not supported."); }); }); diff --git a/packages/laravel-echo/vite.config.ts b/packages/laravel-echo/vite.config.ts index 099ebdc7..f048f2bf 100644 --- a/packages/laravel-echo/vite.config.ts +++ b/packages/laravel-echo/vite.config.ts @@ -52,6 +52,10 @@ const config: UserConfig = (() => { emptyOutDir: true, ...common, }, + test: { + globals: true, + environment: "jsdom", + }, }; })(); From 37a6cd1cb13b03f675d3b358a997949c47a2a2e7 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 13:58:19 -0400 Subject: [PATCH 23/70] Update echo.ts --- packages/laravel-echo/src/echo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/laravel-echo/src/echo.ts b/packages/laravel-echo/src/echo.ts index 9c34830a..28503d0e 100644 --- a/packages/laravel-echo/src/echo.ts +++ b/packages/laravel-echo/src/echo.ts @@ -182,7 +182,7 @@ export default class Echo { registerInterceptors(): void { // TODO: This package is deprecated and we should remove it in a future version. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (Vue?.http) { + if (typeof Vue !== "undefined" && Vue?.http) { this.registerVueRequestInterceptor(); } From 8d93e15f2f00da50e1fe27ee256dec634a8fe368 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Wed, 14 May 2025 15:16:17 -0400 Subject: [PATCH 24/70] make sure that import.meta.env is defined before using vite var --- packages/react/vite.config.ts | 23 ++++++++++++++++++++++- packages/vue/vite.config.ts | 23 ++++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/packages/react/vite.config.ts b/packages/react/vite.config.ts index 343dcdbf..bbcffdf6 100644 --- a/packages/react/vite.config.ts +++ b/packages/react/vite.config.ts @@ -1,7 +1,27 @@ import { resolve } from "path"; -import { defineConfig, UserConfig } from "vite"; +import { defineConfig, PluginOption, UserConfig } from "vite"; import dts from "vite-plugin-dts"; +const handleEnvVariablesPlugin = (): PluginOption => { + return { + name: "handle-env-variables-plugin", + generateBundle(options, bundle) { + for (const fileName in bundle) { + const file = bundle[fileName]; + + if (file.type === "chunk" && file.fileName.endsWith(".js")) { + const transformedContent = file.code.replace( + /import\.meta\.env\.VITE_([A-Z0-9_]+)/g, + "(typeof import.meta.env !== 'undefined' ? import.meta.env.VITE_$1 : undefined)", + ); + + file.code = transformedContent; + } + } + }, + }; +}; + const config: UserConfig = (() => { const common: Partial = { rollupOptions: { @@ -40,6 +60,7 @@ const config: UserConfig = (() => { rollupTypes: true, include: ["src/**/*.ts"], }), + handleEnvVariablesPlugin(), ], define: { "import.meta.env.VITE_REVERB_APP_KEY": diff --git a/packages/vue/vite.config.ts b/packages/vue/vite.config.ts index 00f4d5cf..5584f069 100644 --- a/packages/vue/vite.config.ts +++ b/packages/vue/vite.config.ts @@ -1,7 +1,27 @@ import { resolve } from "path"; -import { defineConfig, UserConfig } from "vite"; +import { defineConfig, PluginOption, UserConfig } from "vite"; import dts from "vite-plugin-dts"; +const handleEnvVariablesPlugin = (): PluginOption => { + return { + name: "handle-env-variables-plugin", + generateBundle(options, bundle) { + for (const fileName in bundle) { + const file = bundle[fileName]; + + if (file.type === "chunk" && file.fileName.endsWith(".js")) { + const transformedContent = file.code.replace( + /import\.meta\.env\.VITE_([A-Z0-9_]+)/g, + "(typeof import.meta.env !== 'undefined' ? import.meta.env.VITE_$1 : undefined)", + ); + + file.code = transformedContent; + } + } + }, + }; +}; + const config: UserConfig = (() => { const common: Partial = { rollupOptions: { @@ -40,6 +60,7 @@ const config: UserConfig = (() => { rollupTypes: true, include: ["src/**/*.ts"], }), + handleEnvVariablesPlugin(), ], define: { "import.meta.env.VITE_REVERB_APP_KEY": From 4d4e9ddea368eb2f88b8284123200df6255f0a8e Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Thu, 15 May 2025 13:42:03 -0400 Subject: [PATCH 25/70] wip --- packages/react/src/hooks/use-echo.ts | 4 +++- packages/react/src/types.ts | 9 +++++++++ packages/vue/src/composables/useEcho.ts | 3 ++- packages/vue/src/types.ts | 9 +++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index a099e7d3..05ce47a0 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -4,6 +4,7 @@ import { echo } from "../config"; import type { Channel, ChannelData, + ChannelReturnType, Connection, ModelEvents, ModelPayload, @@ -157,7 +158,8 @@ export const useEcho = < /** * Channel instance */ - channel: () => subscription.current, + channel: () => + subscription.current as ChannelReturnType, }; }; diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index a95b8889..320a7121 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -16,6 +16,15 @@ export type Channel = { visibility: "private" | "public" | "presence"; }; +export type ChannelReturnType< + T extends BroadcastDriver, + V extends Channel["visibility"], +> = V extends "presence" + ? Broadcaster[T]["presence"] + : V extends "private" + ? Broadcaster[T]["private"] + : Broadcaster[T]["public"]; + export type ConfigDefaults = Record< O, Broadcaster[O]["options"] diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index 004e1eb6..db2c9035 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -4,6 +4,7 @@ import { echo } from "../config"; import type { Channel, ChannelData, + ChannelReturnType, Connection, ModelEvents, ModelPayload, @@ -173,7 +174,7 @@ export const useEcho = < /** * Channel instance */ - channel: () => subscription, + channel: () => subscription as ChannelReturnType, }; }; diff --git a/packages/vue/src/types.ts b/packages/vue/src/types.ts index a95b8889..320a7121 100644 --- a/packages/vue/src/types.ts +++ b/packages/vue/src/types.ts @@ -16,6 +16,15 @@ export type Channel = { visibility: "private" | "public" | "presence"; }; +export type ChannelReturnType< + T extends BroadcastDriver, + V extends Channel["visibility"], +> = V extends "presence" + ? Broadcaster[T]["presence"] + : V extends "private" + ? Broadcaster[T]["private"] + : Broadcaster[T]["public"]; + export type ConfigDefaults = Record< O, Broadcaster[O]["options"] From a766620f7266566c168e1c2478f86c1c589f5e50 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 15 May 2025 13:03:12 -0500 Subject: [PATCH 26/70] v2.1.4 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 73dd3ebc..bfb1a53f 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.3", + "version": "2.1.4", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 02b861be..a80be836 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.3", + "version": "2.1.4", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index b12b2a31..6176f773 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.3", + "version": "2.1.4", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 453dc845b9650f808b3b4bfe6ae42a2af63bef71 Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Thu, 15 May 2025 18:11:59 +0000 Subject: [PATCH 27/70] Update CHANGELOG --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78a2f3f0..434f3e35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.1.3...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.1.4...2.x) + +## [v2.1.4](https://github.com/laravel/echo/compare/v2.1.3...v2.1.4) - 2025-05-15 + +### What's Changed + +* `channel` is now immediately available by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/435 +* Type fixes in core library by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/434 +* Check for import.meta.env before using Vite environment variables by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/436 +* Fix channel return type by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/437 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.1.3...v2.1.4 ## [v2.1.3](https://github.com/laravel/echo/compare/v2.1.1...v2.1.3) - 2025-05-13 From 02c56a5a8668909828c6fe8210945e30635a2a36 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 3 Jun 2025 09:47:12 -0400 Subject: [PATCH 28/70] revert csrf logic --- .../laravel-echo/src/connector/connector.ts | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/laravel-echo/src/connector/connector.ts b/packages/laravel-echo/src/connector/connector.ts index a4673b7f..bfc40485 100644 --- a/packages/laravel-echo/src/connector/connector.ts +++ b/packages/laravel-echo/src/connector/connector.ts @@ -90,14 +90,26 @@ export abstract class Connector< * Extract the CSRF token from the page. */ protected csrfToken(): null | string { - return ( - window?.Laravel?.csrfToken ?? - this.options.csrfToken ?? - document - ?.querySelector('meta[name="csrf-token"]') - ?.getAttribute("content") ?? - null - ); + if (typeof window !== "undefined" && window.Laravel?.csrfToken) { + return window.Laravel.csrfToken; + } + + if (this.options.csrfToken) { + return this.options.csrfToken; + } + + if ( + typeof document !== "undefined" && + typeof document.querySelector === "function" + ) { + return ( + document + .querySelector('meta[name="csrf-token"]') + ?.getAttribute("content") ?? null + ); + } + + return null; } /** From 9a419b00fc6a75b8f264d59950814a54257050b4 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 3 Jun 2025 14:51:30 -0400 Subject: [PATCH 29/70] use echo notification react --- packages/react/src/hooks/use-echo.ts | 73 ++++++++++++++++++++++++++++ packages/react/src/index.ts | 1 + packages/react/src/types.ts | 2 + 3 files changed, 76 insertions(+) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index 05ce47a0..1bee46b0 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -8,6 +8,7 @@ import type { Connection, ModelEvents, ModelPayload, + Notification, } from "../types"; import { toArray } from "../util"; @@ -163,6 +164,78 @@ export const useEcho = < }; }; +export const useEchoNotification = < + TPayload, + TDriver extends BroadcastDriver = BroadcastDriver, +>( + channelName: string, + callback: (payload: Notification) => void = () => {}, + event: string | string[] = [], + dependencies: any[] = [], +) => { + const result = useEcho, TDriver, "private">( + channelName, + [], + callback, + dependencies, + "private", + ); + + const events = toArray(event); + const listening = useRef(false); + const initialized = useRef(false); + + const cb = useCallback( + (notification: Notification) => { + if (!listening.current) { + return; + } + + if (events.length === 0 || events.includes(notification.type)) { + callback(notification); + } + }, + dependencies.concat(events).concat([callback]), + ); + + const listen = useCallback(() => { + if (listening.current) { + return; + } + + if (!initialized.current) { + result.channel().notification(cb); + } + + listening.current = true; + initialized.current = true; + }, [cb]); + + const stopListening = useCallback(() => { + if (!listening.current) { + return; + } + + listening.current = false; + }, [cb]); + + useEffect(() => { + listen(); + }, dependencies.concat(events)); + + return { + ...result, + /** + * Stop listening for notification events + */ + stopListening, + /** + * Listen for notification events + */ + listen, + }; +}; + export const useEchoPresence = < TPayload, TDriver extends BroadcastDriver = BroadcastDriver, diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index c56e1ccd..8d900c11 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -2,6 +2,7 @@ export { configureEcho, echo } from "./config/index"; export { useEcho, useEchoModel, + useEchoNotification, useEchoPresence, useEchoPublic, } from "./hooks/use-echo"; diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index 320a7121..3b39a401 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -16,6 +16,8 @@ export type Channel = { visibility: "private" | "public" | "presence"; }; +export type Notification = TPayload & { id: string; type: string }; + export type ChannelReturnType< T extends BroadcastDriver, V extends Channel["visibility"], From f4de8d0fc9683861be16c46ce2a68fd6ae76fc34 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 3 Jun 2025 15:35:37 -0400 Subject: [PATCH 30/70] Update use-echo.test.ts --- packages/react/tests/use-echo.test.ts | 259 ++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) diff --git a/packages/react/tests/use-echo.test.ts b/packages/react/tests/use-echo.test.ts index 96f52de2..96d876e2 100644 --- a/packages/react/tests/use-echo.test.ts +++ b/packages/react/tests/use-echo.test.ts @@ -10,6 +10,7 @@ vi.mock("laravel-echo", () => { leaveChannel: vi.fn(), listen: vi.fn(), stopListening: vi.fn(), + notification: vi.fn(), }; const mockPublicChannel = { @@ -854,3 +855,261 @@ describe("useEchoPresence hook", async () => { expect(result.current.channel).not.toBeNull(); }); }); + +describe("useEchoNotification hook", async () => { + let echoModule: typeof import("../src/hooks/use-echo"); + let configModule: typeof import("../src/config/index"); + let echoInstance: Echo<"null">; + + beforeEach(async () => { + vi.resetModules(); + + echoInstance = new Echo({ + broadcaster: "null", + }); + + echoModule = await getEchoModule(); + configModule = await getConfigModule(); + + configModule.configureEcho({ + broadcaster: "null", + }); + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it("subscribes to a private channel and listens for notifications", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + expect(result.current).toHaveProperty("leaveChannel"); + expect(typeof result.current.leave).toBe("function"); + expect(result.current).toHaveProperty("leave"); + expect(typeof result.current.leaveChannel).toBe("function"); + expect(result.current).toHaveProperty("listen"); + expect(typeof result.current.listen).toBe("function"); + expect(result.current).toHaveProperty("stopListening"); + expect(typeof result.current.stopListening).toBe("function"); + }); + + it("sets up a notification listener on a channel", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + expect(echoInstance.private).toHaveBeenCalledWith(channelName); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + }); + + it("handles notification filtering by event type", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + const eventType = "specific-type"; + + renderHook(() => + echoModule.useEchoNotification( + channelName, + mockCallback, + eventType, + ), + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const matchingNotification = { + type: eventType, + data: { message: "test" }, + }; + const nonMatchingNotification = { + type: "other-type", + data: { message: "test" }, + }; + + notificationCallback(matchingNotification); + notificationCallback(nonMatchingNotification); + + expect(mockCallback).toHaveBeenCalledWith(matchingNotification); + expect(mockCallback).toHaveBeenCalledTimes(1); + expect(mockCallback).not.toHaveBeenCalledWith(nonMatchingNotification); + }); + + it("handles multiple notification event types", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + const events = ["type1", "type2"]; + + renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback, events), + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const notification1 = { type: events[0], data: {} }; + const notification2 = { type: events[1], data: {} }; + const notification3 = { type: "type3", data: {} }; + + notificationCallback(notification1); + notificationCallback(notification2); + notificationCallback(notification3); + + expect(mockCallback).toHaveBeenCalledWith(notification1); + expect(mockCallback).toHaveBeenCalledWith(notification2); + expect(mockCallback).toHaveBeenCalledTimes(2); + expect(mockCallback).not.toHaveBeenCalledWith(notification3); + }); + + it("accepts all notifications when no event types specified", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const notification1 = { type: "type1", data: {} }; + const notification2 = { type: "type2", data: {} }; + + notificationCallback(notification1); + notificationCallback(notification2); + + expect(mockCallback).toHaveBeenCalledWith(notification1); + expect(mockCallback).toHaveBeenCalledWith(notification2); + + expect(mockCallback).toHaveBeenCalledTimes(2); + }); + + it("cleans up subscriptions on unmount", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + const { unmount } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + expect(echoInstance.private).toHaveBeenCalledWith(channelName); + + expect(() => unmount()).not.toThrow(); + + expect(echoInstance.leaveChannel).toHaveBeenCalledWith( + `private-${channelName}`, + ); + }); + + it("won't subscribe multiple times to the same channel", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + const { unmount: unmount1 } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + const { unmount: unmount2 } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + expect(echoInstance.private).toHaveBeenCalledTimes(1); + + expect(() => unmount1()).not.toThrow(); + expect(echoInstance.leaveChannel).not.toHaveBeenCalled(); + + expect(() => unmount2()).not.toThrow(); + expect(echoInstance.leaveChannel).toHaveBeenCalledWith( + `private-${channelName}`, + ); + }); + + it("can leave a channel", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + result.current.leaveChannel(); + + expect(echoInstance.leaveChannel).toHaveBeenCalledWith( + `private-${channelName}`, + ); + }); + + it("can leave all channel variations", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + result.current.leave(); + + expect(echoInstance.leave).toHaveBeenCalledWith(channelName); + }); + + it("can manually start and stop listening", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalledTimes(1); + + result.current.stopListening(); + result.current.listen(); + + expect(channel.notification).toHaveBeenCalledTimes(1); + }); + + it("stopListening prevents new notification listeners", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback), + ); + + result.current.stopListening(); + + expect(result.current.stopListening).toBeDefined(); + expect(typeof result.current.stopListening).toBe("function"); + }); + + it("callback and events are optional", async () => { + const channelName = "test-channel"; + + const { result } = renderHook(() => + echoModule.useEchoNotification(channelName), + ); + + expect(result.current).toHaveProperty("channel"); + expect(result.current.channel).not.toBeNull(); + }); +}); From 0ef148f3b9b725da88cfa5dd78031d82f252e5e0 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 3 Jun 2025 15:45:55 -0400 Subject: [PATCH 31/70] echo notification vue --- packages/react/src/hooks/use-echo.ts | 8 +- packages/react/src/types.ts | 5 +- packages/vue/src/composables/useEcho.ts | 70 ++++++ packages/vue/src/index.ts | 1 + packages/vue/src/types.ts | 5 + packages/vue/tests/useEcho.test.ts | 303 ++++++++++++++++++++++++ 6 files changed, 387 insertions(+), 5 deletions(-) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index 1bee46b0..63d316a6 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -2,13 +2,13 @@ import { type BroadcastDriver } from "laravel-echo"; import { useCallback, useEffect, useRef } from "react"; import { echo } from "../config"; import type { + BroadcastNotification, Channel, ChannelData, ChannelReturnType, Connection, ModelEvents, ModelPayload, - Notification, } from "../types"; import { toArray } from "../util"; @@ -169,11 +169,11 @@ export const useEchoNotification = < TDriver extends BroadcastDriver = BroadcastDriver, >( channelName: string, - callback: (payload: Notification) => void = () => {}, + callback: (payload: BroadcastNotification) => void = () => {}, event: string | string[] = [], dependencies: any[] = [], ) => { - const result = useEcho, TDriver, "private">( + const result = useEcho, TDriver, "private">( channelName, [], callback, @@ -186,7 +186,7 @@ export const useEchoNotification = < const initialized = useRef(false); const cb = useCallback( - (notification: Notification) => { + (notification: BroadcastNotification) => { if (!listening.current) { return; } diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index 3b39a401..648ec76a 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -16,7 +16,10 @@ export type Channel = { visibility: "private" | "public" | "presence"; }; -export type Notification = TPayload & { id: string; type: string }; +export type BroadcastNotification = TPayload & { + id: string; + type: string; +}; export type ChannelReturnType< T extends BroadcastDriver, diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index db2c9035..66ce2eb6 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -2,6 +2,7 @@ import { type BroadcastDriver } from "laravel-echo"; import { onMounted, onUnmounted, ref, watch } from "vue"; import { echo } from "../config"; import type { + BroadcastNotification, Channel, ChannelData, ChannelReturnType, @@ -178,6 +179,75 @@ export const useEcho = < }; }; +export const useEchoNotification = < + TPayload, + TDriver extends BroadcastDriver = BroadcastDriver, +>( + channelName: string, + callback: (payload: BroadcastNotification) => void = () => {}, + event: string | string[] = [], + dependencies: any[] = [], +) => { + const result = useEcho, TDriver, "private">( + channelName, + [], + callback, + dependencies, + "private", + ); + + const events = toArray(event); + let listening = false; + let initialized = false; + + const cb = (notification: BroadcastNotification) => { + if (!listening) { + return; + } + + if (events.length === 0 || events.includes(notification.type)) { + callback(notification); + } + }; + + const listen = () => { + if (listening) { + return; + } + + if (!initialized) { + result.channel().notification(cb); + } + + listening = true; + initialized = true; + }; + + const stopListening = () => { + if (!listening) { + return; + } + + listening = false; + }; + + onMounted(() => { + listen(); + }); + + return { + ...result, + /** + * Stop listening for notification events + */ + stopListening, + /** + * Listen for notification events + */ + listen, + }; +}; + export const useEchoPresence = < TPayload, TDriver extends BroadcastDriver = BroadcastDriver, diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index 8010ab3e..ec443c79 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -1,6 +1,7 @@ export { useEcho, useEchoModel, + useEchoNotification, useEchoPresence, useEchoPublic, } from "./composables/useEcho"; diff --git a/packages/vue/src/types.ts b/packages/vue/src/types.ts index 320a7121..648ec76a 100644 --- a/packages/vue/src/types.ts +++ b/packages/vue/src/types.ts @@ -16,6 +16,11 @@ export type Channel = { visibility: "private" | "public" | "presence"; }; +export type BroadcastNotification = TPayload & { + id: string; + type: string; +}; + export type ChannelReturnType< T extends BroadcastDriver, V extends Channel["visibility"], diff --git a/packages/vue/tests/useEcho.test.ts b/packages/vue/tests/useEcho.test.ts index 2c80bcb4..33382054 100644 --- a/packages/vue/tests/useEcho.test.ts +++ b/packages/vue/tests/useEcho.test.ts @@ -4,6 +4,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { defineComponent } from "vue"; import { useEcho, + useEchoNotification, useEchoPresence, useEchoPublic, } from "../src/composables/useEcho"; @@ -100,11 +101,39 @@ const getPresenceTestComponent = ( return mount(TestComponent); }; +const getNotificationTestComponent = ( + channelName: string, + callback: ((data: any) => void) | undefined, + event: string | string[] | undefined, + dependencies: any[] = [], +) => { + const TestComponent = defineComponent({ + setup() { + configureEcho({ + broadcaster: "null", + }); + + return { + ...useEchoNotification( + channelName, + callback, + event, + dependencies, + ), + }; + }, + template: "
", + }); + + return mount(TestComponent); +}; + vi.mock("laravel-echo", () => { const mockPrivateChannel = { leaveChannel: vi.fn(), listen: vi.fn(), stopListening: vi.fn(), + notification: vi.fn(), }; const mockPublicChannel = { @@ -698,3 +727,277 @@ describe("useEchoPresence hook", async () => { expect(wrapper.vm.channel).not.toBeNull(); }); }); + +describe("useEchoNotification hook", async () => { + let echoInstance: Echo<"null">; + let wrapper: ReturnType; + + beforeEach(async () => { + vi.resetModules(); + + echoInstance = new Echo({ + broadcaster: "null", + }); + }); + + afterEach(() => { + wrapper.unmount(); + vi.clearAllMocks(); + }); + + it("subscribes to a private channel and listens for notifications", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + expect(wrapper.vm).toHaveProperty("leaveChannel"); + expect(typeof wrapper.vm.leaveChannel).toBe("function"); + + expect(wrapper.vm).toHaveProperty("leave"); + expect(typeof wrapper.vm.leave).toBe("function"); + + expect(wrapper.vm).toHaveProperty("listen"); + expect(typeof wrapper.vm.listen).toBe("function"); + + expect(wrapper.vm).toHaveProperty("stopListening"); + expect(typeof wrapper.vm.stopListening).toBe("function"); + }); + + it("sets up a notification listener on a channel", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + expect(echoInstance.private).toHaveBeenCalledWith(channelName); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + }); + + it("handles notification filtering by event type", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + const eventType = "specific-type"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + eventType, + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const matchingNotification = { + type: eventType, + data: { message: "test" }, + }; + const nonMatchingNotification = { + type: "other-type", + data: { message: "test" }, + }; + + notificationCallback(matchingNotification); + notificationCallback(nonMatchingNotification); + + expect(mockCallback).toHaveBeenCalledWith(matchingNotification); + expect(mockCallback).toHaveBeenCalledTimes(1); + expect(mockCallback).not.toHaveBeenCalledWith(nonMatchingNotification); + }); + + it("handles multiple notification event types", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + const events = ["type1", "type2"]; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + events, + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const notification1 = { type: events[0], data: {} }; + const notification2 = { type: events[1], data: {} }; + const notification3 = { type: "type3", data: {} }; + + notificationCallback(notification1); + notificationCallback(notification2); + notificationCallback(notification3); + + expect(mockCallback).toHaveBeenCalledWith(notification1); + expect(mockCallback).toHaveBeenCalledWith(notification2); + expect(mockCallback).toHaveBeenCalledTimes(2); + expect(mockCallback).not.toHaveBeenCalledWith(notification3); + }); + + it("accepts all notifications when no event types specified", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const notification1 = { type: "type1", data: {} }; + const notification2 = { type: "type2", data: {} }; + + notificationCallback(notification1); + notificationCallback(notification2); + + expect(mockCallback).toHaveBeenCalledWith(notification1); + expect(mockCallback).toHaveBeenCalledWith(notification2); + expect(mockCallback).toHaveBeenCalledTimes(2); + }); + + it("cleans up subscriptions on unmount", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + expect(echoInstance.private).toHaveBeenCalledWith(channelName); + + wrapper.unmount(); + + expect(echoInstance.leaveChannel).toHaveBeenCalledWith( + `private-${channelName}`, + ); + }); + + it("won't subscribe multiple times to the same channel", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + const wrapper2 = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + expect(echoInstance.private).toHaveBeenCalledTimes(1); + + wrapper.unmount(); + expect(echoInstance.leaveChannel).not.toHaveBeenCalled(); + + wrapper2.unmount(); + expect(echoInstance.leaveChannel).toHaveBeenCalledWith( + `private-${channelName}`, + ); + }); + + it("can leave a channel", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + wrapper.vm.leaveChannel(); + + expect(echoInstance.leaveChannel).toHaveBeenCalledWith( + `private-${channelName}`, + ); + }); + + it("can leave all channel variations", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + wrapper.vm.leave(); + + expect(echoInstance.leave).toHaveBeenCalledWith(channelName); + }); + + it("can manually start and stop listening", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalledTimes(1); + + wrapper.vm.stopListening(); + wrapper.vm.listen(); + + expect(channel.notification).toHaveBeenCalledTimes(1); + }); + + it("stopListening prevents new notification listeners", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + undefined, + ); + + wrapper.vm.stopListening(); + + expect(wrapper.vm.stopListening).toBeDefined(); + expect(typeof wrapper.vm.stopListening).toBe("function"); + }); + + it("callback and events are optional", async () => { + const channelName = "test-channel"; + + wrapper = getNotificationTestComponent( + channelName, + undefined, + undefined, + ); + + expect(wrapper.vm.channel).not.toBeNull(); + }); +}); From 6f56305ae15d56ca7100e2d94996d4f5d3f3bd70 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 3 Jun 2025 15:59:43 -0400 Subject: [PATCH 32/70] handle dotted and slashed notification types --- packages/react/src/hooks/use-echo.ts | 21 +++++++++++--- packages/react/tests/use-echo.test.ts | 29 +++++++++++++++++++ packages/vue/src/composables/useEcho.ts | 29 ++++++++++++------- packages/vue/tests/useEcho.test.ts | 37 +++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 14 deletions(-) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index 63d316a6..800e13e9 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -181,7 +181,17 @@ export const useEchoNotification = < "private", ); - const events = toArray(event); + const events = useRef( + toArray(event) + .map((e) => { + if (e.includes(".")) { + return [e, e.replace(/\./g, "\\")]; + } + + return [e, e.replace(/\\/g, ".")]; + }) + .flat(), + ); const listening = useRef(false); const initialized = useRef(false); @@ -191,11 +201,14 @@ export const useEchoNotification = < return; } - if (events.length === 0 || events.includes(notification.type)) { + if ( + events.current.length === 0 || + events.current.includes(notification.type) + ) { callback(notification); } }, - dependencies.concat(events).concat([callback]), + dependencies.concat(events.current).concat([callback]), ); const listen = useCallback(() => { @@ -221,7 +234,7 @@ export const useEchoNotification = < useEffect(() => { listen(); - }, dependencies.concat(events)); + }, dependencies.concat(events.current)); return { ...result, diff --git a/packages/react/tests/use-echo.test.ts b/packages/react/tests/use-echo.test.ts index 96d876e2..698c85f4 100644 --- a/packages/react/tests/use-echo.test.ts +++ b/packages/react/tests/use-echo.test.ts @@ -977,6 +977,35 @@ describe("useEchoNotification hook", async () => { expect(mockCallback).not.toHaveBeenCalledWith(notification3); }); + it("handles dotted and slashed notification event types", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + const events = [ + "App.Notifications.First", + "App\\Notifications\\Second", + ]; + + renderHook(() => + echoModule.useEchoNotification(channelName, mockCallback, events), + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const notification1 = { type: "App\\Notifications\\First", data: {} }; + const notification2 = { type: "App\\Notifications\\Second", data: {} }; + + notificationCallback(notification1); + notificationCallback(notification2); + + expect(mockCallback).toHaveBeenCalledWith(notification1); + expect(mockCallback).toHaveBeenCalledWith(notification2); + expect(mockCallback).toHaveBeenCalledTimes(2); + }); + it("accepts all notifications when no event types specified", async () => { const mockCallback = vi.fn(); const channelName = "test-channel"; diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index 66ce2eb6..b906c7f7 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -196,12 +196,21 @@ export const useEchoNotification = < "private", ); - const events = toArray(event); - let listening = false; - let initialized = false; + const events = toArray(event) + .map((e) => { + if (e.includes(".")) { + return [e, e.replace(/\./g, "\\")]; + } + + return [e, e.replace(/\\/g, ".")]; + }) + .flat(); + + const listening = ref(false); + const initialized = ref(false); const cb = (notification: BroadcastNotification) => { - if (!listening) { + if (!listening.value) { return; } @@ -211,24 +220,24 @@ export const useEchoNotification = < }; const listen = () => { - if (listening) { + if (listening.value) { return; } - if (!initialized) { + if (!initialized.value) { result.channel().notification(cb); } - listening = true; - initialized = true; + listening.value = true; + initialized.value = true; }; const stopListening = () => { - if (!listening) { + if (!listening.value) { return; } - listening = false; + listening.value = false; }; onMounted(() => { diff --git a/packages/vue/tests/useEcho.test.ts b/packages/vue/tests/useEcho.test.ts index 33382054..98998fc6 100644 --- a/packages/vue/tests/useEcho.test.ts +++ b/packages/vue/tests/useEcho.test.ts @@ -849,6 +849,43 @@ describe("useEchoNotification hook", async () => { expect(mockCallback).not.toHaveBeenCalledWith(notification3); }); + it("handles dotted and slashed notification event types", async () => { + const mockCallback = vi.fn(); + const channelName = "test-channel"; + const events = [ + "App.Notifications.First", + "App\\Notifications\\Second", + ]; + + wrapper = getNotificationTestComponent( + channelName, + mockCallback, + events, + ); + + const channel = echoInstance.private(channelName); + expect(channel.notification).toHaveBeenCalled(); + + const notificationCallback = vi.mocked(channel.notification).mock + .calls[0][0]; + + const notification1 = { + type: "App\\Notifications\\First", + data: {}, + }; + const notification2 = { + type: "App\\Notifications\\Second", + data: {}, + }; + + notificationCallback(notification1); + notificationCallback(notification2); + + expect(mockCallback).toHaveBeenCalledWith(notification1); + expect(mockCallback).toHaveBeenCalledWith(notification2); + expect(mockCallback).toHaveBeenCalledTimes(2); + }); + it("accepts all notifications when no event types specified", async () => { const mockCallback = vi.fn(); const channelName = "test-channel"; From d52316c821083ca2804ee64e49e28edcc61ef24f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 3 Jun 2025 15:48:23 -0500 Subject: [PATCH 33/70] v2.1.5 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index bfb1a53f..4b3a327f 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.4", + "version": "2.1.5", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index a80be836..94eba43e 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.4", + "version": "2.1.5", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 6176f773..3d0e85b6 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.4", + "version": "2.1.5", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From c350847b4448b1c75c1e7d490c0e019e3546b8cd Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Tue, 3 Jun 2025 21:08:07 +0000 Subject: [PATCH 34/70] Update CHANGELOG --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 434f3e35..7ae0155a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.1.4...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.1.5...2.x) + +## [v2.1.5](https://github.com/laravel/echo/compare/v2.1.4...v2.1.5) - 2025-06-03 + +### What's Changed + +* Revert CSRF logic by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/442 +* Added useEchoNotification hook by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/443 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.1.4...v2.1.5 ## [v2.1.4](https://github.com/laravel/echo/compare/v2.1.3...v2.1.4) - 2025-05-15 From 33b7d12d7f5202ae7a580f4a87f3a8f2187b6c6d Mon Sep 17 00:00:00 2001 From: electron Date: Mon, 16 Jun 2025 16:27:58 +0300 Subject: [PATCH 35/70] Fix subscriptions not being restored on reconnect (#446) Starting from Socket IO 3.x connection state events are triggered only by socket manager Co-authored-by: electron93 <1076914+electron93@users.noreply.github.com> --- packages/laravel-echo/src/connector/socketio-connector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/laravel-echo/src/connector/socketio-connector.ts b/packages/laravel-echo/src/connector/socketio-connector.ts index da127f83..7316c139 100644 --- a/packages/laravel-echo/src/connector/socketio-connector.ts +++ b/packages/laravel-echo/src/connector/socketio-connector.ts @@ -46,7 +46,7 @@ export class SocketIoConnector extends Connector< this.options as Partial, ); - this.socket.on("reconnect", () => { + this.socket.io.on("reconnect", () => { Object.values(this.channels).forEach((channel) => { channel.subscribe(); }); From 43232edf228bbb368c1d03416c0083b75964d00e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 17 Jun 2025 12:08:34 -0500 Subject: [PATCH 36/70] v2.1.6 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 4b3a327f..d926527e 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.5", + "version": "2.1.6", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 94eba43e..de2b4012 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.5", + "version": "2.1.6", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 3d0e85b6..7b85f93d 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.5", + "version": "2.1.6", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From fb3253e9961cf256d8f4fbc567fd0392beb46bb5 Mon Sep 17 00:00:00 2001 From: taylorotwell <463230+taylorotwell@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:09:46 +0000 Subject: [PATCH 37/70] Update CHANGELOG --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ae0155a..9710144d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.1.5...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.1.6...2.x) + +## [v2.1.6](https://github.com/laravel/echo/compare/v2.1.5...v2.1.6) - 2025-06-17 + +* Fix subscriptions not being restored on reconnect by [@electron93](https://github.com/electron93) in https://github.com/laravel/echo/pull/446 ## [v2.1.5](https://github.com/laravel/echo/compare/v2.1.4...v2.1.5) - 2025-06-03 From 851f239c4f0299629f129a5d704f8122f3c58fff Mon Sep 17 00:00:00 2001 From: Hendrik Heil Date: Fri, 18 Jul 2025 13:15:46 +0200 Subject: [PATCH 38/70] feat(vue): allow checking if echo is configured --- packages/vue/src/config/index.ts | 2 ++ packages/vue/src/index.ts | 2 +- packages/vue/tests/config.test.ts | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/vue/src/config/index.ts b/packages/vue/src/config/index.ts index 1d8286e2..beb4ec59 100644 --- a/packages/vue/src/config/index.ts +++ b/packages/vue/src/config/index.ts @@ -23,6 +23,8 @@ const getEchoInstance = (): Echo => { return echoInstance as Echo; }; +export const isEchoConfigured = () => echoConfig !== null; + /** * Configure the Echo instance with sensible defaults. * diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index ec443c79..1e80a59c 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -5,4 +5,4 @@ export { useEchoPresence, useEchoPublic, } from "./composables/useEcho"; -export { configureEcho, echo } from "./config/index"; +export { configureEcho, echo, isEchoConfigured } from "./config/index"; diff --git a/packages/vue/tests/config.test.ts b/packages/vue/tests/config.test.ts index 7a18b2c6..a7ce0392 100644 --- a/packages/vue/tests/config.test.ts +++ b/packages/vue/tests/config.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { configureEcho, echo } from "../src/config"; + describe("echo helper", async () => { beforeEach(() => { @@ -11,14 +11,30 @@ describe("echo helper", async () => { }); it("throws error when Echo is not configured", async () => { + const { echo } = await import("../src/config"); + expect(() => echo()).toThrow("Echo has not been configured"); }); it("creates Echo instance with proper configuration", async () => { + const { configureEcho, echo } = await import("../src/config"); + configureEcho({ broadcaster: "null", }); expect(echo()).toBeDefined(); }); + + it("checks if Echo is configured", async () => { + const { configureEcho, isEchoConfigured } = await import("../src/config"); + + expect(isEchoConfigured()).toBe(false); + + configureEcho({ + broadcaster: "null", + }); + + expect(isEchoConfigured()).toBe(true); + }); }); From aa720f3204c917003085e992d04136f6fba394e5 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Fri, 18 Jul 2025 13:39:46 -0400 Subject: [PATCH 39/70] isEchoConfigured -> echoIsConfigured + react --- packages/react/src/config/index.ts | 2 ++ packages/react/src/index.ts | 2 +- packages/react/tests/config.test.ts | 21 +++++++++++++++++++-- packages/vue/src/config/index.ts | 2 +- packages/vue/src/index.ts | 2 +- packages/vue/tests/config.test.ts | 8 ++++---- 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/packages/react/src/config/index.ts b/packages/react/src/config/index.ts index 6c3e66be..d2405287 100644 --- a/packages/react/src/config/index.ts +++ b/packages/react/src/config/index.ts @@ -82,3 +82,5 @@ export const configureEcho = ( export const echo = (): Echo => getEchoInstance(); + +export const echoIsConfigured = () => echoConfig !== null; diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 8d900c11..f9f034b2 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -1,4 +1,4 @@ -export { configureEcho, echo } from "./config/index"; +export { configureEcho, echo, echoIsConfigured } from "./config/index"; export { useEcho, useEchoModel, diff --git a/packages/react/tests/config.test.ts b/packages/react/tests/config.test.ts index e32d85f4..e3c776ad 100644 --- a/packages/react/tests/config.test.ts +++ b/packages/react/tests/config.test.ts @@ -1,16 +1,19 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; -import { configureEcho, echo } from "../src"; -describe("echo helper", async () => { +describe("echo helper", () => { beforeEach(() => { vi.resetModules(); }); it("throws error when Echo is not configured", async () => { + const { echo } = await import("../src/config"); + expect(() => echo()).toThrow("Echo has not been configured"); }); it("creates Echo instance with proper configuration", async () => { + const { configureEcho, echo } = await import("../src/config"); + configureEcho({ broadcaster: "null", }); @@ -18,4 +21,18 @@ describe("echo helper", async () => { expect(echo()).toBeDefined(); expect(echo().options.broadcaster).toBe("null"); }); + + it("checks if Echo is configured", async () => { + const { configureEcho, echoIsConfigured } = await import( + "../src/config" + ); + + expect(echoIsConfigured()).toBe(false); + + configureEcho({ + broadcaster: "null", + }); + + expect(echoIsConfigured()).toBe(true); + }); }); diff --git a/packages/vue/src/config/index.ts b/packages/vue/src/config/index.ts index beb4ec59..ac19eccd 100644 --- a/packages/vue/src/config/index.ts +++ b/packages/vue/src/config/index.ts @@ -23,7 +23,7 @@ const getEchoInstance = (): Echo => { return echoInstance as Echo; }; -export const isEchoConfigured = () => echoConfig !== null; +export const echoIsConfigured = () => echoConfig !== null; /** * Configure the Echo instance with sensible defaults. diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index 1e80a59c..22c9e2da 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -5,4 +5,4 @@ export { useEchoPresence, useEchoPublic, } from "./composables/useEcho"; -export { configureEcho, echo, isEchoConfigured } from "./config/index"; +export { configureEcho, echo, echoIsConfigured } from "./config/index"; diff --git a/packages/vue/tests/config.test.ts b/packages/vue/tests/config.test.ts index a7ce0392..ed1022c4 100644 --- a/packages/vue/tests/config.test.ts +++ b/packages/vue/tests/config.test.ts @@ -1,6 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; - describe("echo helper", async () => { beforeEach(() => { vi.resetModules(); @@ -27,14 +26,15 @@ describe("echo helper", async () => { }); it("checks if Echo is configured", async () => { - const { configureEcho, isEchoConfigured } = await import("../src/config"); + const { configureEcho, echoIsConfigured: echoIsConfigured } = + await import("../src/config"); - expect(isEchoConfigured()).toBe(false); + expect(echoIsConfigured()).toBe(false); configureEcho({ broadcaster: "null", }); - expect(isEchoConfigured()).toBe(true); + expect(echoIsConfigured()).toBe(true); }); }); From a743a9d6bbdecb9f20552cf1b9fc6c0025310a05 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 22 Jul 2025 10:50:33 -0500 Subject: [PATCH 40/70] v2.1.7 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index d926527e..5cab2f47 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.6", + "version": "2.1.7", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index de2b4012..f2d0c72f 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.6", + "version": "2.1.7", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 7b85f93d..f48a45e1 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.6", + "version": "2.1.7", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 54031916b74ab00fdc789fb9a39624f92e5b2474 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 7 Aug 2025 12:43:26 -0500 Subject: [PATCH 41/70] v2.2.0 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 5cab2f47..f8403eb7 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.1.7", + "version": "2.2.0", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index f2d0c72f..16bcf303 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.1.7", + "version": "2.2.0", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index f48a45e1..97cc751e 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.1.7", + "version": "2.2.0", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 254542efe6d2310bf8919bf43a23c668a7279337 Mon Sep 17 00:00:00 2001 From: taylorotwell <463230+taylorotwell@users.noreply.github.com> Date: Thu, 7 Aug 2025 17:44:31 +0000 Subject: [PATCH 42/70] Update CHANGELOG --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9710144d..25881415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.1.6...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.2.0...2.x) + +## [v2.2.0](https://github.com/laravel/echo/compare/v2.1.6...v2.2.0) - 2025-08-07 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.1.7...v2.2.0 ## [v2.1.6](https://github.com/laravel/echo/compare/v2.1.5...v2.1.6) - 2025-06-17 From a549f808e29a9819fb3ebd6a426ada5cbee48302 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 20:35:29 -0500 Subject: [PATCH 43/70] Bump vite from 5.4.19 to 5.4.20 (#451) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.19 to 5.4.20. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.20/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.20/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 5.4.20 dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- pnpm-lock.yaml | 488 +++++++++++++++-------------- 3 files changed, 258 insertions(+), 234 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index f8403eb7..52704b10 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -48,7 +48,7 @@ "socket.io-client": "^4.0", "tslib": "^2.8.1", "typescript": "^5.7.0", - "vite": "^5.0.0", + "vite": "^5.4.20", "vite-plugin-dts": "^3.0.0", "vitest": "^3.1.2" }, diff --git a/packages/react/package.json b/packages/react/package.json index 16bcf303..db36c4a2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -56,7 +56,7 @@ "socket.io-client": "^4.0", "tslib": "^2.8.1", "typescript": "^5.7.0", - "vite": "^5.1.0", + "vite": "^5.4.20", "vite-plugin-dts": "^3.7.0", "vitest": "^3.1.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b08924f..52acf304 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,11 +68,11 @@ importers: specifier: ^5.7.0 version: 5.8.3 vite: - specifier: ^5.0.0 - version: 5.4.19(@types/node@20.17.32) + specifier: ^5.4.20 + version: 5.4.20(@types/node@20.17.32) vite-plugin-dts: specifier: ^3.0.0 - version: 3.9.1(@types/node@20.17.32)(rollup@4.40.1)(typescript@5.8.3)(vite@5.4.19(@types/node@20.17.32)) + version: 3.9.1(@types/node@20.17.32)(rollup@4.50.1)(typescript@5.8.3)(vite@5.4.20(@types/node@20.17.32)) vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@20.17.32)(jsdom@26.1.0) @@ -158,11 +158,11 @@ importers: specifier: ^5.7.0 version: 5.8.3 vite: - specifier: ^5.1.0 - version: 5.4.19(@types/node@20.17.32) + specifier: ^5.4.20 + version: 5.4.20(@types/node@20.17.32) vite-plugin-dts: specifier: ^3.7.0 - version: 3.9.1(@types/node@20.17.32)(rollup@4.40.1)(typescript@5.8.3)(vite@5.4.19(@types/node@20.17.32)) + version: 3.9.1(@types/node@20.17.32)(rollup@4.50.1)(typescript@5.8.3)(vite@5.4.20(@types/node@20.17.32)) vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@20.17.32)(jsdom@26.1.0) @@ -235,10 +235,10 @@ importers: version: 5.8.3 vite: specifier: ^6.3.3 - version: 6.3.4(@types/node@22.15.3) + version: 6.3.6(@types/node@22.15.3) vite-plugin-dts: specifier: ^4.5.3 - version: 4.5.3(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)) + version: 4.5.3(@types/node@22.15.3)(rollup@4.50.1)(typescript@5.8.3)(vite@6.3.6(@types/node@22.15.3)) vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@22.15.3)(jsdom@26.1.0) @@ -819,8 +819,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.3': - resolution: {integrity: sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==} + '@esbuild/aix-ppc64@0.25.9': + resolution: {integrity: sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -831,8 +831,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.3': - resolution: {integrity: sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==} + '@esbuild/android-arm64@0.25.9': + resolution: {integrity: sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -843,8 +843,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.3': - resolution: {integrity: sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==} + '@esbuild/android-arm@0.25.9': + resolution: {integrity: sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -855,8 +855,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.3': - resolution: {integrity: sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==} + '@esbuild/android-x64@0.25.9': + resolution: {integrity: sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -867,8 +867,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.3': - resolution: {integrity: sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==} + '@esbuild/darwin-arm64@0.25.9': + resolution: {integrity: sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -879,8 +879,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.3': - resolution: {integrity: sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==} + '@esbuild/darwin-x64@0.25.9': + resolution: {integrity: sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -891,8 +891,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.3': - resolution: {integrity: sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==} + '@esbuild/freebsd-arm64@0.25.9': + resolution: {integrity: sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -903,8 +903,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.3': - resolution: {integrity: sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==} + '@esbuild/freebsd-x64@0.25.9': + resolution: {integrity: sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -915,8 +915,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.3': - resolution: {integrity: sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==} + '@esbuild/linux-arm64@0.25.9': + resolution: {integrity: sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -927,8 +927,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.3': - resolution: {integrity: sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==} + '@esbuild/linux-arm@0.25.9': + resolution: {integrity: sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -939,8 +939,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.3': - resolution: {integrity: sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==} + '@esbuild/linux-ia32@0.25.9': + resolution: {integrity: sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -951,8 +951,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.3': - resolution: {integrity: sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==} + '@esbuild/linux-loong64@0.25.9': + resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -963,8 +963,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.3': - resolution: {integrity: sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==} + '@esbuild/linux-mips64el@0.25.9': + resolution: {integrity: sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -975,8 +975,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.3': - resolution: {integrity: sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==} + '@esbuild/linux-ppc64@0.25.9': + resolution: {integrity: sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -987,8 +987,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.3': - resolution: {integrity: sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==} + '@esbuild/linux-riscv64@0.25.9': + resolution: {integrity: sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -999,8 +999,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.3': - resolution: {integrity: sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==} + '@esbuild/linux-s390x@0.25.9': + resolution: {integrity: sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -1011,14 +1011,14 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.3': - resolution: {integrity: sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==} + '@esbuild/linux-x64@0.25.9': + resolution: {integrity: sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.3': - resolution: {integrity: sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==} + '@esbuild/netbsd-arm64@0.25.9': + resolution: {integrity: sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -1029,14 +1029,14 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.3': - resolution: {integrity: sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==} + '@esbuild/netbsd-x64@0.25.9': + resolution: {integrity: sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.3': - resolution: {integrity: sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==} + '@esbuild/openbsd-arm64@0.25.9': + resolution: {integrity: sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -1047,20 +1047,26 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.3': - resolution: {integrity: sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==} + '@esbuild/openbsd-x64@0.25.9': + resolution: {integrity: sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] + '@esbuild/openharmony-arm64@0.25.9': + resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.3': - resolution: {integrity: sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==} + '@esbuild/sunos-x64@0.25.9': + resolution: {integrity: sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -1071,8 +1077,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.3': - resolution: {integrity: sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==} + '@esbuild/win32-arm64@0.25.9': + resolution: {integrity: sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -1083,8 +1089,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.3': - resolution: {integrity: sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==} + '@esbuild/win32-ia32@0.25.9': + resolution: {integrity: sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -1095,8 +1101,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.3': - resolution: {integrity: sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==} + '@esbuild/win32-x64@0.25.9': + resolution: {integrity: sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -1235,103 +1241,108 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.40.1': - resolution: {integrity: sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==} + '@rollup/rollup-android-arm-eabi@4.50.1': + resolution: {integrity: sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.40.1': - resolution: {integrity: sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==} + '@rollup/rollup-android-arm64@4.50.1': + resolution: {integrity: sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.40.1': - resolution: {integrity: sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==} + '@rollup/rollup-darwin-arm64@4.50.1': + resolution: {integrity: sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.40.1': - resolution: {integrity: sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==} + '@rollup/rollup-darwin-x64@4.50.1': + resolution: {integrity: sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.40.1': - resolution: {integrity: sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==} + '@rollup/rollup-freebsd-arm64@4.50.1': + resolution: {integrity: sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.40.1': - resolution: {integrity: sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==} + '@rollup/rollup-freebsd-x64@4.50.1': + resolution: {integrity: sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.40.1': - resolution: {integrity: sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==} + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': + resolution: {integrity: sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.40.1': - resolution: {integrity: sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==} + '@rollup/rollup-linux-arm-musleabihf@4.50.1': + resolution: {integrity: sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.40.1': - resolution: {integrity: sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==} + '@rollup/rollup-linux-arm64-gnu@4.50.1': + resolution: {integrity: sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.40.1': - resolution: {integrity: sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==} + '@rollup/rollup-linux-arm64-musl@4.50.1': + resolution: {integrity: sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.40.1': - resolution: {integrity: sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': + resolution: {integrity: sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': - resolution: {integrity: sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==} + '@rollup/rollup-linux-ppc64-gnu@4.50.1': + resolution: {integrity: sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.40.1': - resolution: {integrity: sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==} + '@rollup/rollup-linux-riscv64-gnu@4.50.1': + resolution: {integrity: sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.40.1': - resolution: {integrity: sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==} + '@rollup/rollup-linux-riscv64-musl@4.50.1': + resolution: {integrity: sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.40.1': - resolution: {integrity: sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==} + '@rollup/rollup-linux-s390x-gnu@4.50.1': + resolution: {integrity: sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.40.1': - resolution: {integrity: sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==} + '@rollup/rollup-linux-x64-gnu@4.50.1': + resolution: {integrity: sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.40.1': - resolution: {integrity: sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==} + '@rollup/rollup-linux-x64-musl@4.50.1': + resolution: {integrity: sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.40.1': - resolution: {integrity: sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==} + '@rollup/rollup-openharmony-arm64@4.50.1': + resolution: {integrity: sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.50.1': + resolution: {integrity: sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.40.1': - resolution: {integrity: sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==} + '@rollup/rollup-win32-ia32-msvc@4.50.1': + resolution: {integrity: sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.40.1': - resolution: {integrity: sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==} + '@rollup/rollup-win32-x64-msvc@4.50.1': + resolution: {integrity: sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==} cpu: [x64] os: [win32] @@ -1432,6 +1443,9 @@ packages: '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@types/jquery@3.5.32': resolution: {integrity: sha512-b9Xbf4CkMqS02YH8zACqN1xzdxc3cO735Qe5AbSUFmyOiaWAbcpqh9Wna+Uk0vgACvoQHpWDg2rGdHkYPLmCiQ==} @@ -1955,8 +1969,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.25.3: - resolution: {integrity: sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==} + esbuild@0.25.9: + resolution: {integrity: sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==} engines: {node: '>=18'} hasBin: true @@ -2575,8 +2589,8 @@ packages: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} - postcss@8.5.3: - resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} + postcss@8.5.6: + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: @@ -2674,8 +2688,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.40.1: - resolution: {integrity: sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==} + rollup@4.50.1: + resolution: {integrity: sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2962,8 +2976,8 @@ packages: vite: optional: true - vite@5.4.19: - resolution: {integrity: sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==} + vite@5.4.20: + resolution: {integrity: sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -2993,8 +3007,8 @@ packages: terser: optional: true - vite@6.3.4: - resolution: {integrity: sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==} + vite@6.3.6: + resolution: {integrity: sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -3915,145 +3929,148 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/aix-ppc64@0.25.3': + '@esbuild/aix-ppc64@0.25.9': optional: true '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm64@0.25.3': + '@esbuild/android-arm64@0.25.9': optional: true '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-arm@0.25.3': + '@esbuild/android-arm@0.25.9': optional: true '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/android-x64@0.25.3': + '@esbuild/android-x64@0.25.9': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.25.3': + '@esbuild/darwin-arm64@0.25.9': optional: true '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/darwin-x64@0.25.3': + '@esbuild/darwin-x64@0.25.9': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.25.3': + '@esbuild/freebsd-arm64@0.25.9': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.25.3': + '@esbuild/freebsd-x64@0.25.9': optional: true '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm64@0.25.3': + '@esbuild/linux-arm64@0.25.9': optional: true '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-arm@0.25.3': + '@esbuild/linux-arm@0.25.9': optional: true '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-ia32@0.25.3': + '@esbuild/linux-ia32@0.25.9': optional: true '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-loong64@0.25.3': + '@esbuild/linux-loong64@0.25.9': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-mips64el@0.25.3': + '@esbuild/linux-mips64el@0.25.9': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-ppc64@0.25.3': + '@esbuild/linux-ppc64@0.25.9': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.25.3': + '@esbuild/linux-riscv64@0.25.9': optional: true '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-s390x@0.25.3': + '@esbuild/linux-s390x@0.25.9': optional: true '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-x64@0.25.3': + '@esbuild/linux-x64@0.25.9': optional: true - '@esbuild/netbsd-arm64@0.25.3': + '@esbuild/netbsd-arm64@0.25.9': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.25.3': + '@esbuild/netbsd-x64@0.25.9': optional: true - '@esbuild/openbsd-arm64@0.25.3': + '@esbuild/openbsd-arm64@0.25.9': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.25.3': + '@esbuild/openbsd-x64@0.25.9': + optional: true + + '@esbuild/openharmony-arm64@0.25.9': optional: true '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.25.3': + '@esbuild/sunos-x64@0.25.9': optional: true '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.25.3': + '@esbuild/win32-arm64@0.25.9': optional: true '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-ia32@0.25.3': + '@esbuild/win32-ia32@0.25.9': optional: true '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.25.3': + '@esbuild/win32-x64@0.25.9': optional: true '@eslint-community/eslint-utils@4.6.1(eslint@9.25.1)': @@ -4226,72 +4243,75 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/pluginutils@5.1.4(rollup@4.40.1)': + '@rollup/pluginutils@5.1.4(rollup@4.50.1)': dependencies: '@types/estree': 1.0.7 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.40.1 + rollup: 4.50.1 + + '@rollup/rollup-android-arm-eabi@4.50.1': + optional: true - '@rollup/rollup-android-arm-eabi@4.40.1': + '@rollup/rollup-android-arm64@4.50.1': optional: true - '@rollup/rollup-android-arm64@4.40.1': + '@rollup/rollup-darwin-arm64@4.50.1': optional: true - '@rollup/rollup-darwin-arm64@4.40.1': + '@rollup/rollup-darwin-x64@4.50.1': optional: true - '@rollup/rollup-darwin-x64@4.40.1': + '@rollup/rollup-freebsd-arm64@4.50.1': optional: true - '@rollup/rollup-freebsd-arm64@4.40.1': + '@rollup/rollup-freebsd-x64@4.50.1': optional: true - '@rollup/rollup-freebsd-x64@4.40.1': + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.40.1': + '@rollup/rollup-linux-arm-musleabihf@4.50.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.40.1': + '@rollup/rollup-linux-arm64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.40.1': + '@rollup/rollup-linux-arm64-musl@4.50.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.40.1': + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.40.1': + '@rollup/rollup-linux-ppc64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': + '@rollup/rollup-linux-riscv64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.40.1': + '@rollup/rollup-linux-riscv64-musl@4.50.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.40.1': + '@rollup/rollup-linux-s390x-gnu@4.50.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.40.1': + '@rollup/rollup-linux-x64-gnu@4.50.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.40.1': + '@rollup/rollup-linux-x64-musl@4.50.1': optional: true - '@rollup/rollup-linux-x64-musl@4.40.1': + '@rollup/rollup-openharmony-arm64@4.50.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.40.1': + '@rollup/rollup-win32-arm64-msvc@4.50.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.40.1': + '@rollup/rollup-win32-ia32-msvc@4.50.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.40.1': + '@rollup/rollup-win32-x64-msvc@4.50.1': optional: true '@rushstack/node-core-library@4.0.2(@types/node@20.17.32)': @@ -4418,6 +4438,8 @@ snapshots: '@types/estree@1.0.7': {} + '@types/estree@1.0.8': {} + '@types/jquery@3.5.32': dependencies: '@types/sizzle': 2.3.9 @@ -4530,21 +4552,21 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.1.2(vite@5.4.19(@types/node@20.17.32))': + '@vitest/mocker@3.1.2(vite@5.4.20(@types/node@20.17.32))': dependencies: '@vitest/spy': 3.1.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.19(@types/node@20.17.32) + vite: 5.4.20(@types/node@20.17.32) - '@vitest/mocker@3.1.2(vite@5.4.19(@types/node@22.15.3))': + '@vitest/mocker@3.1.2(vite@5.4.20(@types/node@22.15.3))': dependencies: '@vitest/spy': 3.1.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.19(@types/node@22.15.3) + vite: 5.4.20(@types/node@22.15.3) '@vitest/pretty-format@3.1.2': dependencies: @@ -4618,7 +4640,7 @@ snapshots: '@vue/shared': 3.5.13 estree-walker: 2.0.2 magic-string: 0.30.17 - postcss: 8.5.3 + postcss: 8.5.6 source-map-js: 1.2.1 '@vue/compiler-ssr@3.5.13': @@ -5073,33 +5095,34 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.25.3: + esbuild@0.25.9: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.3 - '@esbuild/android-arm': 0.25.3 - '@esbuild/android-arm64': 0.25.3 - '@esbuild/android-x64': 0.25.3 - '@esbuild/darwin-arm64': 0.25.3 - '@esbuild/darwin-x64': 0.25.3 - '@esbuild/freebsd-arm64': 0.25.3 - '@esbuild/freebsd-x64': 0.25.3 - '@esbuild/linux-arm': 0.25.3 - '@esbuild/linux-arm64': 0.25.3 - '@esbuild/linux-ia32': 0.25.3 - '@esbuild/linux-loong64': 0.25.3 - '@esbuild/linux-mips64el': 0.25.3 - '@esbuild/linux-ppc64': 0.25.3 - '@esbuild/linux-riscv64': 0.25.3 - '@esbuild/linux-s390x': 0.25.3 - '@esbuild/linux-x64': 0.25.3 - '@esbuild/netbsd-arm64': 0.25.3 - '@esbuild/netbsd-x64': 0.25.3 - '@esbuild/openbsd-arm64': 0.25.3 - '@esbuild/openbsd-x64': 0.25.3 - '@esbuild/sunos-x64': 0.25.3 - '@esbuild/win32-arm64': 0.25.3 - '@esbuild/win32-ia32': 0.25.3 - '@esbuild/win32-x64': 0.25.3 + '@esbuild/aix-ppc64': 0.25.9 + '@esbuild/android-arm': 0.25.9 + '@esbuild/android-arm64': 0.25.9 + '@esbuild/android-x64': 0.25.9 + '@esbuild/darwin-arm64': 0.25.9 + '@esbuild/darwin-x64': 0.25.9 + '@esbuild/freebsd-arm64': 0.25.9 + '@esbuild/freebsd-x64': 0.25.9 + '@esbuild/linux-arm': 0.25.9 + '@esbuild/linux-arm64': 0.25.9 + '@esbuild/linux-ia32': 0.25.9 + '@esbuild/linux-loong64': 0.25.9 + '@esbuild/linux-mips64el': 0.25.9 + '@esbuild/linux-ppc64': 0.25.9 + '@esbuild/linux-riscv64': 0.25.9 + '@esbuild/linux-s390x': 0.25.9 + '@esbuild/linux-x64': 0.25.9 + '@esbuild/netbsd-arm64': 0.25.9 + '@esbuild/netbsd-x64': 0.25.9 + '@esbuild/openbsd-arm64': 0.25.9 + '@esbuild/openbsd-x64': 0.25.9 + '@esbuild/openharmony-arm64': 0.25.9 + '@esbuild/sunos-x64': 0.25.9 + '@esbuild/win32-arm64': 0.25.9 + '@esbuild/win32-ia32': 0.25.9 + '@esbuild/win32-x64': 0.25.9 escalade@3.2.0: {} @@ -5174,7 +5197,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 esutils@2.0.3: {} @@ -5718,7 +5741,7 @@ snapshots: possible-typed-array-names@1.1.0: {} - postcss@8.5.3: + postcss@8.5.6: dependencies: nanoid: 3.3.11 picocolors: 1.1.1 @@ -5811,30 +5834,31 @@ snapshots: reusify@1.1.0: {} - rollup@4.40.1: + rollup@4.50.1: dependencies: - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.40.1 - '@rollup/rollup-android-arm64': 4.40.1 - '@rollup/rollup-darwin-arm64': 4.40.1 - '@rollup/rollup-darwin-x64': 4.40.1 - '@rollup/rollup-freebsd-arm64': 4.40.1 - '@rollup/rollup-freebsd-x64': 4.40.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.40.1 - '@rollup/rollup-linux-arm-musleabihf': 4.40.1 - '@rollup/rollup-linux-arm64-gnu': 4.40.1 - '@rollup/rollup-linux-arm64-musl': 4.40.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.40.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.40.1 - '@rollup/rollup-linux-riscv64-gnu': 4.40.1 - '@rollup/rollup-linux-riscv64-musl': 4.40.1 - '@rollup/rollup-linux-s390x-gnu': 4.40.1 - '@rollup/rollup-linux-x64-gnu': 4.40.1 - '@rollup/rollup-linux-x64-musl': 4.40.1 - '@rollup/rollup-win32-arm64-msvc': 4.40.1 - '@rollup/rollup-win32-ia32-msvc': 4.40.1 - '@rollup/rollup-win32-x64-msvc': 4.40.1 + '@rollup/rollup-android-arm-eabi': 4.50.1 + '@rollup/rollup-android-arm64': 4.50.1 + '@rollup/rollup-darwin-arm64': 4.50.1 + '@rollup/rollup-darwin-x64': 4.50.1 + '@rollup/rollup-freebsd-arm64': 4.50.1 + '@rollup/rollup-freebsd-x64': 4.50.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.50.1 + '@rollup/rollup-linux-arm-musleabihf': 4.50.1 + '@rollup/rollup-linux-arm64-gnu': 4.50.1 + '@rollup/rollup-linux-arm64-musl': 4.50.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.50.1 + '@rollup/rollup-linux-ppc64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-musl': 4.50.1 + '@rollup/rollup-linux-s390x-gnu': 4.50.1 + '@rollup/rollup-linux-x64-gnu': 4.50.1 + '@rollup/rollup-linux-x64-musl': 4.50.1 + '@rollup/rollup-openharmony-arm64': 4.50.1 + '@rollup/rollup-win32-arm64-msvc': 4.50.1 + '@rollup/rollup-win32-ia32-msvc': 4.50.1 + '@rollup/rollup-win32-x64-msvc': 4.50.1 fsevents: 2.3.3 rrweb-cssom@0.8.0: {} @@ -6084,7 +6108,7 @@ snapshots: debug: 4.4.0 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 5.4.19(@types/node@20.17.32) + vite: 5.4.20(@types/node@20.17.32) transitivePeerDependencies: - '@types/node' - less @@ -6102,7 +6126,7 @@ snapshots: debug: 4.4.0 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 5.4.19(@types/node@22.15.3) + vite: 5.4.20(@types/node@22.15.3) transitivePeerDependencies: - '@types/node' - less @@ -6114,10 +6138,10 @@ snapshots: - supports-color - terser - vite-plugin-dts@3.9.1(@types/node@20.17.32)(rollup@4.40.1)(typescript@5.8.3)(vite@5.4.19(@types/node@20.17.32)): + vite-plugin-dts@3.9.1(@types/node@20.17.32)(rollup@4.50.1)(typescript@5.8.3)(vite@5.4.20(@types/node@20.17.32)): dependencies: '@microsoft/api-extractor': 7.43.0(@types/node@20.17.32) - '@rollup/pluginutils': 5.1.4(rollup@4.40.1) + '@rollup/pluginutils': 5.1.4(rollup@4.50.1) '@vue/language-core': 1.8.27(typescript@5.8.3) debug: 4.4.0 kolorist: 1.8.0 @@ -6125,16 +6149,16 @@ snapshots: typescript: 5.8.3 vue-tsc: 1.8.27(typescript@5.8.3) optionalDependencies: - vite: 5.4.19(@types/node@20.17.32) + vite: 5.4.20(@types/node@20.17.32) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-dts@4.5.3(@types/node@22.15.3)(rollup@4.40.1)(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)): + vite-plugin-dts@4.5.3(@types/node@22.15.3)(rollup@4.50.1)(typescript@5.8.3)(vite@6.3.6(@types/node@22.15.3)): dependencies: '@microsoft/api-extractor': 7.52.5(@types/node@22.15.3) - '@rollup/pluginutils': 5.1.4(rollup@4.40.1) + '@rollup/pluginutils': 5.1.4(rollup@4.50.1) '@volar/typescript': 2.4.13 '@vue/language-core': 2.2.0(typescript@5.8.3) compare-versions: 6.1.1 @@ -6144,37 +6168,37 @@ snapshots: magic-string: 0.30.17 typescript: 5.8.3 optionalDependencies: - vite: 6.3.4(@types/node@22.15.3) + vite: 6.3.6(@types/node@22.15.3) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite@5.4.19(@types/node@20.17.32): + vite@5.4.20(@types/node@20.17.32): dependencies: esbuild: 0.21.5 - postcss: 8.5.3 - rollup: 4.40.1 + postcss: 8.5.6 + rollup: 4.50.1 optionalDependencies: '@types/node': 20.17.32 fsevents: 2.3.3 - vite@5.4.19(@types/node@22.15.3): + vite@5.4.20(@types/node@22.15.3): dependencies: esbuild: 0.21.5 - postcss: 8.5.3 - rollup: 4.40.1 + postcss: 8.5.6 + rollup: 4.50.1 optionalDependencies: '@types/node': 22.15.3 fsevents: 2.3.3 - vite@6.3.4(@types/node@22.15.3): + vite@6.3.6(@types/node@22.15.3): dependencies: - esbuild: 0.25.3 + esbuild: 0.25.9 fdir: 6.4.4(picomatch@4.0.2) picomatch: 4.0.2 - postcss: 8.5.3 - rollup: 4.40.1 + postcss: 8.5.6 + rollup: 4.50.1 tinyglobby: 0.2.13 optionalDependencies: '@types/node': 22.15.3 @@ -6183,7 +6207,7 @@ snapshots: vitest@3.1.2(@types/node@20.17.32)(jsdom@26.1.0): dependencies: '@vitest/expect': 3.1.2 - '@vitest/mocker': 3.1.2(vite@5.4.19(@types/node@20.17.32)) + '@vitest/mocker': 3.1.2(vite@5.4.20(@types/node@20.17.32)) '@vitest/pretty-format': 3.1.2 '@vitest/runner': 3.1.2 '@vitest/snapshot': 3.1.2 @@ -6200,7 +6224,7 @@ snapshots: tinyglobby: 0.2.13 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 5.4.19(@types/node@20.17.32) + vite: 5.4.20(@types/node@20.17.32) vite-node: 3.1.2(@types/node@20.17.32) why-is-node-running: 2.3.0 optionalDependencies: @@ -6220,7 +6244,7 @@ snapshots: vitest@3.1.2(@types/node@22.15.3)(jsdom@26.1.0): dependencies: '@vitest/expect': 3.1.2 - '@vitest/mocker': 3.1.2(vite@5.4.19(@types/node@22.15.3)) + '@vitest/mocker': 3.1.2(vite@5.4.20(@types/node@22.15.3)) '@vitest/pretty-format': 3.1.2 '@vitest/runner': 3.1.2 '@vitest/snapshot': 3.1.2 @@ -6237,7 +6261,7 @@ snapshots: tinyglobby: 0.2.13 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 5.4.19(@types/node@22.15.3) + vite: 5.4.20(@types/node@22.15.3) vite-node: 3.1.2(@types/node@22.15.3) why-is-node-running: 2.3.0 optionalDependencies: From 1d1d20ae6b4076f7d5b20296021b1ba8319628d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 08:33:47 -0500 Subject: [PATCH 44/70] Bump axios from 1.9.0 to 1.12.0 (#452) Bumps [axios](https://github.com/axios/axios) from 1.9.0 to 1.12.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.9.0...v1.12.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.12.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/laravel-echo/package.json | 2 +- pnpm-lock.yaml | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 52704b10..a7d34750 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -41,7 +41,7 @@ "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^8.21.0", "@typescript-eslint/parser": "^8.21.0", - "axios": "^1.9.0", + "axios": "^1.12.0", "eslint": "^9.0.0", "prettier": "^3.5.3", "pusher-js": "^8.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52acf304..47afee82 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,8 +47,8 @@ importers: specifier: ^8.21.0 version: 8.31.1(eslint@9.25.1)(typescript@5.8.3) axios: - specifier: ^1.9.0 - version: 1.9.0 + specifier: ^1.12.0 + version: 1.12.0 eslint: specifier: ^9.0.0 version: 9.25.1 @@ -1712,8 +1712,8 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axios@1.9.0: - resolution: {integrity: sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==} + axios@1.12.0: + resolution: {integrity: sha512-oXTDccv8PcfjZmPGlWsPSwtOJCZ/b6W5jAMCNcfwJbCzDckwG0jrYJFaWH1yvivfCXjVzV/SPDEhMB3Q+DSurg==} babel-plugin-polyfill-corejs2@0.4.13: resolution: {integrity: sha512-3sX/eOms8kd3q2KZ6DAhKPc0dgm525Gqq5NtWKZ7QYYZEv57OQ54KtblzJzH1lQF/eQxO8KjWGIK9IPUJNus5g==} @@ -2080,8 +2080,8 @@ packages: flatted@3.3.3: resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} - follow-redirects@1.15.9: - resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + follow-redirects@1.15.11: + resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -2097,8 +2097,8 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} - form-data@4.0.2: - resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} + form-data@4.0.4: + resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==} engines: {node: '>= 6'} fs-extra@11.3.0: @@ -4789,10 +4789,10 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 - axios@1.9.0: + axios@1.12.0: dependencies: - follow-redirects: 1.15.9 - form-data: 4.0.2 + follow-redirects: 1.15.11 + form-data: 4.0.4 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug @@ -5247,7 +5247,7 @@ snapshots: flatted@3.3.3: {} - follow-redirects@1.15.9: {} + follow-redirects@1.15.11: {} for-each@0.3.5: dependencies: @@ -5258,11 +5258,12 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - form-data@4.0.2: + form-data@4.0.4: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 es-set-tostringtag: 2.1.0 + hasown: 2.0.2 mime-types: 2.1.35 fs-extra@11.3.0: From fa40700169c9dff72647bc11e9e342407bf423f3 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 22 Sep 2025 11:21:37 -0400 Subject: [PATCH 45/70] publish in ci --- .github/workflows/publish.yml | 40 ++++++++++++ packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- release.sh | 99 ++++++++++++++++++------------ 5 files changed, 104 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..70e6e7cb --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,40 @@ +name: Publish Packages + +on: + release: + types: [released] + +permissions: + id-token: write # Required for OIDC + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + strategy: + matrix: + adapter: ["laravel-echo", "react", "vue"] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 10 + + - uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org" + cache: pnpm + + # Ensure npm 11.5.1 or later is installed + - name: Update npm + run: npm install -g npm@latest + + - name: Install dependencies + run: pnpm install + + - name: "Publish ${{ matrix.adapter }} to npm" + run: cd ./packages/${{ matrix.adapter }} && pnpm run build && pnpm run release diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index a7d34750..7bf98ec7 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -24,7 +24,7 @@ "build": "vite build && FORMAT=iife vite build", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", - "release": "vitest --run && git push --follow-tags && pnpm publish", + "release": "vitest --run && npm publish", "test": "vitest", "format": "prettier --write ." }, diff --git a/packages/react/package.json b/packages/react/package.json index db36c4a2..6738f6c2 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -25,7 +25,7 @@ "build": "vite build && FORMAT=iife vite build", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", - "release": "vitest --run && git push --follow-tags && pnpm publish", + "release": "vitest --run && npm publish", "test": "vitest", "format": "prettier --write ." }, diff --git a/packages/vue/package.json b/packages/vue/package.json index 97cc751e..619a9862 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -25,7 +25,7 @@ "build": "vite build && FORMAT=iife vite build", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", - "release": "vitest --run && git push --follow-tags && pnpm publish", + "release": "vitest --run && npm publish", "test": "vitest", "format": "prettier --write ." }, diff --git a/release.sh b/release.sh index e797ff55..caf73f86 100755 --- a/release.sh +++ b/release.sh @@ -1,4 +1,21 @@ #!/bin/bash +set -euo pipefail + +REPO="laravel/echo" +BRANCH="2.x" + +# Ensure we are on correct branch and the working tree is clean +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +if [ "$CURRENT_BRANCH" != "$BRANCH" ]; then + echo "Error: must be on $BRANCH branch (current: $CURRENT_BRANCH)" >&2 + exit 1 +fi + +if [ -n "$(git status --porcelain)" ]; then + echo "Error: working tree is not clean. Commit or stash changes before releasing." >&2 + git status --porcelain + exit 1 +fi get_current_version() { local package_json=$1 @@ -20,12 +37,6 @@ get_package_name() { fi } -if [ -n "$(git status --porcelain)" ]; then - echo "Error: There are uncommitted changes in the working directory" - echo "Please commit or stash these changes before proceeding" - exit 1 -fi - update_version() { local package_dir=$1 local version_type=$2 @@ -47,16 +58,43 @@ update_version() { esac } -echo "Starting package version management..." +if [ -n "$(git status --porcelain)" ]; then + echo "Error: There are uncommitted changes in the working directory" + echo "Please commit or stash these changes before proceeding" + exit 1 +fi -root_package_json="packages/laravel-echo/package.json" -current_version=$(get_current_version "$root_package_json") +git pull + +ROOT_PACKAGE_JSON="packages/react/package.json" +CURRENT_VERSION=$(get_current_version "$ROOT_PACKAGE_JSON") echo "" -echo "Current version: $current_version" +echo "Current version: $CURRENT_VERSION" echo "" -read -p "Update version? (patch/minor/major): " version_type -echo "" +echo "Select version bump type:" +echo "1) patch (bug fixes)" +echo "2) minor (new features)" +echo "3) major (breaking changes)" +echo + +read -p "Enter your choice (1-3): " choice + +case $choice in + 1) + RELEASE_TYPE="patch" + ;; + 2) + RELEASE_TYPE="minor" + ;; + 3) + RELEASE_TYPE="major" + ;; + *) + echo "❌ Invalid choice. Exiting." + exit 1 + ;; +esac for package_dir in packages/*; do if [ -d "$package_dir" ]; then @@ -64,7 +102,7 @@ for package_dir in packages/*; do cd $package_dir - update_version "$package_dir" "$version_type" + update_version "$package_dir" "$RELEASE_TYPE" cd ../.. @@ -72,42 +110,27 @@ for package_dir in packages/*; do fi done -new_version=$(get_current_version "$root_package_json") +NEW_VERSION=$(get_current_version "$ROOT_PACKAGE_JSON") +TAG="v$NEW_VERSION" echo "Updating lock file..." pnpm i +echo "" echo "Staging package.json files..." git add "**/package.json" echo "" -echo "Committing version changes..." -git commit -m "v$new_version" -echo "" - -echo "" -echo "Creating git tag: v$new_version" -git tag "v$new_version" +git commit -m "$TAG" +git tag -a "$TAG" -m "$TAG" +git push git push --tags -echo "" -echo "Running release process..." -echo "" +gh release create "$TAG" --generate-notes -for package_dir in packages/*; do - if [ -d "$package_dir" ]; then - echo "Releasing $package_dir" - cd $package_dir - pnpm run release - cd ../.. - echo "" - fi -done +echo "" +echo "✅ Release $TAG completed successfully, publishing kicked off in CI." +echo "🔗 https://github.com/$REPO/releases/tag/$TAG" # Echo joke echo "Released! (Released!) (Released!)" - -echo "" - -echo "Release on GitHub:" -echo "https://github.com/laravel/echo/releases/tag/v$new_version" From c686deed79ceb70262b5768dd9da620b989ff772 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 22 Sep 2025 12:16:48 -0400 Subject: [PATCH 46/70] fix pnpm publishing --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 7bf98ec7..98f7c377 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -24,7 +24,7 @@ "build": "vite build && FORMAT=iife vite build", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", - "release": "vitest --run && npm publish", + "release": "vitest --run && pnpm publish --no-git-checks", "test": "vitest", "format": "prettier --write ." }, diff --git a/packages/react/package.json b/packages/react/package.json index 6738f6c2..97aa02fb 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -25,7 +25,7 @@ "build": "vite build && FORMAT=iife vite build", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", - "release": "vitest --run && npm publish", + "release": "vitest --run && pnpm publish --no-git-checks", "test": "vitest", "format": "prettier --write ." }, diff --git a/packages/vue/package.json b/packages/vue/package.json index 619a9862..c355f413 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -25,7 +25,7 @@ "build": "vite build && FORMAT=iife vite build", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", - "release": "vitest --run && npm publish", + "release": "vitest --run && pnpm publish --no-git-checks", "test": "vitest", "format": "prettier --write ." }, From b96c3d50d55a43f6e643664d33ba34c2cb7b864a Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 22 Sep 2025 13:19:50 -0400 Subject: [PATCH 47/70] v2.2.1 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 98f7c377..58af1db3 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.2.0", + "version": "2.2.1", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 97aa02fb..dba970aa 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.2.0", + "version": "2.2.1", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index c355f413..222f2d7b 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.2.0", + "version": "2.2.1", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 1f306c46b00e437c7e2d20990a0c2beb436425a7 Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Mon, 22 Sep 2025 17:20:11 +0000 Subject: [PATCH 48/70] Update CHANGELOG --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25881415..4d150831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.2.0...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.2.1...2.x) + +## [v2.2.1](https://github.com/laravel/echo/compare/v2.2.0...v2.2.1) - 2025-09-22 + +### What's Changed + +* Bump vite from 5.4.19 to 5.4.20 by [@dependabot](https://github.com/dependabot)[bot] in https://github.com/laravel/echo/pull/451 +* Bump axios from 1.9.0 to 1.12.0 by [@dependabot](https://github.com/dependabot)[bot] in https://github.com/laravel/echo/pull/452 +* Publish in CI by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/455 +* Fix PNPM publishing by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/456 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.2.0...v2.2.1 ## [v2.2.0](https://github.com/laravel/echo/compare/v2.1.6...v2.2.0) - 2025-08-07 From 71219b86588d426253a47427b5e973517c0dfd99 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 22 Sep 2025 13:22:52 -0400 Subject: [PATCH 49/70] Update publish.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 70e6e7cb..90586f3b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,4 +37,4 @@ jobs: run: pnpm install - name: "Publish ${{ matrix.adapter }} to npm" - run: cd ./packages/${{ matrix.adapter }} && pnpm run build && pnpm run release + run: pnpm -r --filter ./packages/laravel-echo --filter ./packages/${{ matrix.adapter }} build && pnpm run release From 3e1df1fdb4e87384340bc060a1c8a6a66a0d11c7 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 22 Sep 2025 13:23:18 -0400 Subject: [PATCH 50/70] v2.2.2 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 58af1db3..03e56529 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.2.1", + "version": "2.2.2", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index dba970aa..682b5fc6 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.2.1", + "version": "2.2.2", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 222f2d7b..fbe0e24d 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.2.1", + "version": "2.2.2", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From a592bd1312cf53ac54a71c469135d5243e0b96a7 Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Mon, 22 Sep 2025 17:23:39 +0000 Subject: [PATCH 51/70] Update CHANGELOG --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d150831..88cd43cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.2.1...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.2.2...2.x) + +## [v2.2.2](https://github.com/laravel/echo/compare/v2.2.1...v2.2.2) - 2025-09-22 + +### What's Changed + +* Fix publish workflow by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/457 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.2.1...v2.2.2 ## [v2.2.1](https://github.com/laravel/echo/compare/v2.2.0...v2.2.1) - 2025-09-22 From f41316ec8645504fa7e387b561c4c8de9d573569 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 22 Sep 2025 13:25:00 -0400 Subject: [PATCH 52/70] Update publish.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 90586f3b..284be15a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,4 +37,4 @@ jobs: run: pnpm install - name: "Publish ${{ matrix.adapter }} to npm" - run: pnpm -r --filter ./packages/laravel-echo --filter ./packages/${{ matrix.adapter }} build && pnpm run release + run: pnpm -r --filter ./packages/laravel-echo --filter ./packages/${{ matrix.adapter }} build && cd ./packages/${{ matrix.adapter }} && pnpm run release From c4c4dc928fb03d9baac65cb1166e28ef963ff779 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Mon, 22 Sep 2025 13:25:15 -0400 Subject: [PATCH 53/70] v2.2.3 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 03e56529..f4c24305 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.2.2", + "version": "2.2.3", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 682b5fc6..6bae5309 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.2.2", + "version": "2.2.3", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index fbe0e24d..abc25871 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.2.2", + "version": "2.2.3", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 7b3693c1396179ba673b4a52d5379c21058873c4 Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Mon, 22 Sep 2025 17:25:32 +0000 Subject: [PATCH 54/70] Update CHANGELOG --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88cd43cc..5b7ded81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.2.2...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.2.3...2.x) + +## [v2.2.3](https://github.com/laravel/echo/compare/v2.2.2...v2.2.3) - 2025-09-22 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.2.2...v2.2.3 ## [v2.2.2](https://github.com/laravel/echo/compare/v2.2.1...v2.2.2) - 2025-09-22 From e25f0a714a17258302b1392deff9edf6ef074d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thore=20S=C3=BCnert?= Date: Thu, 25 Sep 2025 17:39:21 +0200 Subject: [PATCH 55/70] Add stopListeningForNotification --- packages/laravel-echo/src/channel/channel.ts | 10 ++++++++++ packages/react/src/hooks/use-echo.ts | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/laravel-echo/src/channel/channel.ts b/packages/laravel-echo/src/channel/channel.ts index 45e574f6..fc2d9d71 100644 --- a/packages/laravel-echo/src/channel/channel.ts +++ b/packages/laravel-echo/src/channel/channel.ts @@ -37,6 +37,16 @@ export abstract class Channel { */ abstract stopListening(event: string, callback?: CallableFunction): this; + + /** + * Listen for an event on the channel instance. + */ + stopListeningForNotification(callback: CallableFunction): this { + return this.stopListening( + ".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated", + callback, + ); + } /** * Stop listening for a whisper event on the channel instance. */ diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index 800e13e9..0a6b268f 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -193,7 +193,6 @@ export const useEchoNotification = < .flat(), ); const listening = useRef(false); - const initialized = useRef(false); const cb = useCallback( (notification: BroadcastNotification) => { @@ -216,12 +215,9 @@ export const useEchoNotification = < return; } - if (!initialized.current) { - result.channel().notification(cb); - } + result.channel().notification(cb); listening.current = true; - initialized.current = true; }, [cb]); const stopListening = useCallback(() => { @@ -229,11 +225,15 @@ export const useEchoNotification = < return; } + result.channel().stopListeningForNotification(cb); + listening.current = false; }, [cb]); useEffect(() => { listen(); + + return () => stopListening(); }, dependencies.concat(events.current)); return { From 5fb5af497154ae0f616a39430ba9940257f92f6e Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Fri, 26 Sep 2025 12:28:58 -0400 Subject: [PATCH 56/70] wip --- packages/laravel-echo/src/channel/channel.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/laravel-echo/src/channel/channel.ts b/packages/laravel-echo/src/channel/channel.ts index fc2d9d71..0fd50094 100644 --- a/packages/laravel-echo/src/channel/channel.ts +++ b/packages/laravel-echo/src/channel/channel.ts @@ -10,6 +10,12 @@ export abstract class Channel { */ options: EchoOptionsWithDefaults; + /** + * The name for Broadcast Notification Created events. + */ + notificationCreatedEvent: string = + ".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"; + /** * Listen for an event on the channel instance. */ @@ -26,10 +32,7 @@ export abstract class Channel { * Listen for an event on the channel instance. */ notification(callback: CallableFunction): this { - return this.listen( - ".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated", - callback, - ); + return this.listen(this.notificationCreatedEvent, callback); } /** @@ -37,16 +40,13 @@ export abstract class Channel { */ abstract stopListening(event: string, callback?: CallableFunction): this; - /** - * Listen for an event on the channel instance. + * Stop listening for notification events on the channel instance. */ stopListeningForNotification(callback: CallableFunction): this { - return this.stopListening( - ".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated", - callback, - ); + return this.stopListening(this.notificationCreatedEvent, callback); } + /** * Stop listening for a whisper event on the channel instance. */ From eb0a42f39b9fe31c492ff78a636f8ff57b45d204 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Fri, 26 Sep 2025 12:38:03 -0400 Subject: [PATCH 57/70] wip --- packages/react/src/hooks/use-echo.ts | 6 +++++- packages/react/tests/use-echo.test.ts | 1 + packages/vue/src/composables/useEcho.ts | 1 + packages/vue/tests/useEcho.test.ts | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index 0a6b268f..2697aa9e 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -193,6 +193,7 @@ export const useEchoNotification = < .flat(), ); const listening = useRef(false); + const initialized = useRef(false); const cb = useCallback( (notification: BroadcastNotification) => { @@ -215,9 +216,12 @@ export const useEchoNotification = < return; } - result.channel().notification(cb); + if (!initialized.current) { + result.channel().notification(cb); + } listening.current = true; + initialized.current = true; }, [cb]); const stopListening = useCallback(() => { diff --git a/packages/react/tests/use-echo.test.ts b/packages/react/tests/use-echo.test.ts index 698c85f4..b547ac82 100644 --- a/packages/react/tests/use-echo.test.ts +++ b/packages/react/tests/use-echo.test.ts @@ -11,6 +11,7 @@ vi.mock("laravel-echo", () => { listen: vi.fn(), stopListening: vi.fn(), notification: vi.fn(), + stopListeningForNotification: vi.fn(), }; const mockPublicChannel = { diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index b906c7f7..cabdf873 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -237,6 +237,7 @@ export const useEchoNotification = < return; } + result.channel().stopListeningForNotification(cb); listening.value = false; }; diff --git a/packages/vue/tests/useEcho.test.ts b/packages/vue/tests/useEcho.test.ts index 98998fc6..6d97a27c 100644 --- a/packages/vue/tests/useEcho.test.ts +++ b/packages/vue/tests/useEcho.test.ts @@ -134,6 +134,7 @@ vi.mock("laravel-echo", () => { listen: vi.fn(), stopListening: vi.fn(), notification: vi.fn(), + stopListeningForNotification: vi.fn(), }; const mockPublicChannel = { From 4157613c8c437a84dc4b3d04512c12c61944244d Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Fri, 26 Sep 2025 12:46:06 -0400 Subject: [PATCH 58/70] wip --- packages/react/tests/use-echo.test.ts | 6 +++++- packages/vue/src/composables/useEcho.ts | 4 ++++ packages/vue/tests/useEcho.test.ts | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/react/tests/use-echo.test.ts b/packages/react/tests/use-echo.test.ts index b547ac82..e545b548 100644 --- a/packages/react/tests/use-echo.test.ts +++ b/packages/react/tests/use-echo.test.ts @@ -1041,10 +1041,11 @@ describe("useEchoNotification hook", async () => { echoModule.useEchoNotification(channelName, mockCallback), ); - expect(echoInstance.private).toHaveBeenCalledWith(channelName); + const channel = echoInstance.private(channelName); expect(() => unmount()).not.toThrow(); + expect(channel.stopListeningForNotification).toHaveBeenCalled(); expect(echoInstance.leaveChannel).toHaveBeenCalledWith( `private-${channelName}`, ); @@ -1113,8 +1114,11 @@ describe("useEchoNotification hook", async () => { expect(channel.notification).toHaveBeenCalledTimes(1); result.current.stopListening(); + expect(channel.stopListeningForNotification).toHaveBeenCalled(); + result.current.listen(); + // notification should still only be called once due to initialized check expect(channel.notification).toHaveBeenCalledTimes(1); }); diff --git a/packages/vue/src/composables/useEcho.ts b/packages/vue/src/composables/useEcho.ts index cabdf873..a50d0354 100644 --- a/packages/vue/src/composables/useEcho.ts +++ b/packages/vue/src/composables/useEcho.ts @@ -245,6 +245,10 @@ export const useEchoNotification = < listen(); }); + onUnmounted(() => { + stopListening(); + }); + return { ...result, /** diff --git a/packages/vue/tests/useEcho.test.ts b/packages/vue/tests/useEcho.test.ts index 6d97a27c..5c9c8efb 100644 --- a/packages/vue/tests/useEcho.test.ts +++ b/packages/vue/tests/useEcho.test.ts @@ -924,10 +924,11 @@ describe("useEchoNotification hook", async () => { undefined, ); - expect(echoInstance.private).toHaveBeenCalledWith(channelName); + const channel = echoInstance.private(channelName); wrapper.unmount(); + expect(channel.stopListeningForNotification).toHaveBeenCalled(); expect(echoInstance.leaveChannel).toHaveBeenCalledWith( `private-${channelName}`, ); From f9b5b65c33c7c49f2d9b4311221a05c2ab848356 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Fri, 26 Sep 2025 12:55:11 -0400 Subject: [PATCH 59/70] add dev commands --- package.json | 3 ++- packages/laravel-echo/package.json | 1 + packages/react/package.json | 1 + packages/vue/package.json | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d381878c..8b9bb131 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "lint": "pnpm -r --if-present run lint", "format": "pnpm -r --if-present run format", "compile": "pnpm -r --if-present run compile", - "declarations": "pnpm -r --if-present run declarations" + "declarations": "pnpm -r --if-present run declarations", + "dev": "pnpm -r --parallel --filter './packages/*' dev" } } diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index f4c24305..1c027f98 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -22,6 +22,7 @@ "types": "dist/echo.d.ts", "scripts": { "build": "vite build && FORMAT=iife vite build", + "dev": "vite dev", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", "release": "vitest --run && pnpm publish --no-git-checks", diff --git a/packages/react/package.json b/packages/react/package.json index 6bae5309..2b0b526b 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -23,6 +23,7 @@ "types": "dist/index.d.ts", "scripts": { "build": "vite build && FORMAT=iife vite build", + "dev": "vite dev", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", "release": "vitest --run && pnpm publish --no-git-checks", diff --git a/packages/vue/package.json b/packages/vue/package.json index abc25871..28a64baf 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -23,6 +23,7 @@ "types": "dist/index.d.ts", "scripts": { "build": "vite build && FORMAT=iife vite build", + "dev": "vite dev", "lint": "eslint --config eslint.config.mjs \"src/**/*.ts\"", "prepublish": "pnpm run build", "release": "vitest --run && pnpm publish --no-git-checks", From 587169841418efb48e4e00019057a5d096bfe832 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Fri, 26 Sep 2025 12:55:14 -0400 Subject: [PATCH 60/70] Create CONTRIBUTING.md --- CONTRIBUTING.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..c4757a46 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Contributing + +Thank you for your interest in contributing to Laravel Echo! Your contributions help make this project better for everyone. + +Echo is maintained as a monorepo using [pnpm workspaces](https://pnpm.io/workspaces). Below you'll find an overview of the repository and how to get your development environment running. + +> **Note:** You'll need **pnpm version 10 or higher**. If you're unsure which version you have, run `pnpm -v`. + +## Repository Overview + +``` +echo/ +├── packages/ +│ ├── laravel-echo/ Core library +│ ├── react/ React hooks +│ │ └── tests/ React tests +│ └── vue/ Vue hooks +│ └── tests/ Vue Tests +``` + +## Getting Started + +Clone the repository and install the dependencies: + +```sh +git clone https://github.com/laravel/echo.git echo +cd echo +pnpm install +``` + +Then, start the development environment: + +```sh +pnpm dev +``` + +This builds the core library and of the package variants, and starts a file watcher that will automatically rebuild each package when changes are made. + +If you prefer, you can also start individual watchers from each package directory. For example: + +```sh +cd packages/laravel-echo && pnpm dev +cd packages/react && pnpm dev +cd packages/vue && pnpm dev +``` + +> **Note:** The core package (`packages/laravel-echo`) must always be running, as all adapters depend on it. + +## Running Tests + +Run all tests: + +```sh +pnpm test +``` + +Run the test suite for a specific adapter: + +```sh +cd packages/laravel-echo && pnpm test +cd packages/react && pnpm test +cd packages/vue && pnpm test +``` From 6a29af53458aa562d8ccc2ac7bb669a8490e8218 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Fri, 26 Sep 2025 12:56:52 -0400 Subject: [PATCH 61/70] v2.2.4 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 1c027f98..6588ca96 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.2.3", + "version": "2.2.4", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 2b0b526b..a43e1255 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.2.3", + "version": "2.2.4", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 28a64baf..6649124a 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.2.3", + "version": "2.2.4", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 61e1895bf3271caeafd506479a798d68eb5e947d Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:57:39 +0000 Subject: [PATCH 62/70] Update CHANGELOG --- CHANGELOG.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b7ded81..1088a928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.2.3...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.2.4...2.x) + +## [v2.2.4](https://github.com/laravel/echo/compare/v2.2.3...v2.2.4) - 2025-09-26 + +### What's Changed + +* Add stopListeningForNotification by [@thoresuenert](https://github.com/thoresuenert) in https://github.com/laravel/echo/pull/459 +* Added contribution guide and dev commands by [@joetannenbaum](https://github.com/joetannenbaum) in https://github.com/laravel/echo/pull/460 + +### New Contributors + +* [@thoresuenert](https://github.com/thoresuenert) made their first contribution in https://github.com/laravel/echo/pull/459 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.2.3...v2.2.4 ## [v2.2.3](https://github.com/laravel/echo/compare/v2.2.2...v2.2.3) - 2025-09-22 From c4c32001328f7aa758478216ac99b862c41dc024 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Oct 2025 10:33:11 -0400 Subject: [PATCH 63/70] Bump vite from 5.4.20 to 5.4.21 (#462) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.20 to 5.4.21. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.21/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 5.4.21 dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- pnpm-lock.yaml | 471 +++++++++++++++-------------- 3 files changed, 242 insertions(+), 233 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 6588ca96..590b9992 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -49,7 +49,7 @@ "socket.io-client": "^4.0", "tslib": "^2.8.1", "typescript": "^5.7.0", - "vite": "^5.4.20", + "vite": "^5.4.21", "vite-plugin-dts": "^3.0.0", "vitest": "^3.1.2" }, diff --git a/packages/react/package.json b/packages/react/package.json index a43e1255..25a8f7fb 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -57,7 +57,7 @@ "socket.io-client": "^4.0", "tslib": "^2.8.1", "typescript": "^5.7.0", - "vite": "^5.4.20", + "vite": "^5.4.21", "vite-plugin-dts": "^3.7.0", "vitest": "^3.1.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 47afee82..f44dae97 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,11 +68,11 @@ importers: specifier: ^5.7.0 version: 5.8.3 vite: - specifier: ^5.4.20 - version: 5.4.20(@types/node@20.17.32) + specifier: ^5.4.21 + version: 5.4.21(@types/node@20.17.32) vite-plugin-dts: specifier: ^3.0.0 - version: 3.9.1(@types/node@20.17.32)(rollup@4.50.1)(typescript@5.8.3)(vite@5.4.20(@types/node@20.17.32)) + version: 3.9.1(@types/node@20.17.32)(rollup@4.52.5)(typescript@5.8.3)(vite@5.4.21(@types/node@20.17.32)) vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@20.17.32)(jsdom@26.1.0) @@ -158,11 +158,11 @@ importers: specifier: ^5.7.0 version: 5.8.3 vite: - specifier: ^5.4.20 - version: 5.4.20(@types/node@20.17.32) + specifier: ^5.4.21 + version: 5.4.21(@types/node@20.17.32) vite-plugin-dts: specifier: ^3.7.0 - version: 3.9.1(@types/node@20.17.32)(rollup@4.50.1)(typescript@5.8.3)(vite@5.4.20(@types/node@20.17.32)) + version: 3.9.1(@types/node@20.17.32)(rollup@4.52.5)(typescript@5.8.3)(vite@5.4.21(@types/node@20.17.32)) vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@20.17.32)(jsdom@26.1.0) @@ -235,10 +235,10 @@ importers: version: 5.8.3 vite: specifier: ^6.3.3 - version: 6.3.6(@types/node@22.15.3) + version: 6.4.1(@types/node@22.15.3) vite-plugin-dts: specifier: ^4.5.3 - version: 4.5.3(@types/node@22.15.3)(rollup@4.50.1)(typescript@5.8.3)(vite@6.3.6(@types/node@22.15.3)) + version: 4.5.3(@types/node@22.15.3)(rollup@4.52.5)(typescript@5.8.3)(vite@6.4.1(@types/node@22.15.3)) vitest: specifier: ^3.1.2 version: 3.1.2(@types/node@22.15.3)(jsdom@26.1.0) @@ -819,8 +819,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.9': - resolution: {integrity: sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==} + '@esbuild/aix-ppc64@0.25.11': + resolution: {integrity: sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -831,8 +831,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.9': - resolution: {integrity: sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==} + '@esbuild/android-arm64@0.25.11': + resolution: {integrity: sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -843,8 +843,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.9': - resolution: {integrity: sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==} + '@esbuild/android-arm@0.25.11': + resolution: {integrity: sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -855,8 +855,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.9': - resolution: {integrity: sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==} + '@esbuild/android-x64@0.25.11': + resolution: {integrity: sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -867,8 +867,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.9': - resolution: {integrity: sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==} + '@esbuild/darwin-arm64@0.25.11': + resolution: {integrity: sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -879,8 +879,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.9': - resolution: {integrity: sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==} + '@esbuild/darwin-x64@0.25.11': + resolution: {integrity: sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -891,8 +891,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.9': - resolution: {integrity: sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==} + '@esbuild/freebsd-arm64@0.25.11': + resolution: {integrity: sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -903,8 +903,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.9': - resolution: {integrity: sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==} + '@esbuild/freebsd-x64@0.25.11': + resolution: {integrity: sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -915,8 +915,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.9': - resolution: {integrity: sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==} + '@esbuild/linux-arm64@0.25.11': + resolution: {integrity: sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -927,8 +927,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.9': - resolution: {integrity: sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==} + '@esbuild/linux-arm@0.25.11': + resolution: {integrity: sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -939,8 +939,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.9': - resolution: {integrity: sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==} + '@esbuild/linux-ia32@0.25.11': + resolution: {integrity: sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -951,8 +951,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.9': - resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==} + '@esbuild/linux-loong64@0.25.11': + resolution: {integrity: sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -963,8 +963,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.9': - resolution: {integrity: sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==} + '@esbuild/linux-mips64el@0.25.11': + resolution: {integrity: sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -975,8 +975,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.9': - resolution: {integrity: sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==} + '@esbuild/linux-ppc64@0.25.11': + resolution: {integrity: sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -987,8 +987,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.9': - resolution: {integrity: sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==} + '@esbuild/linux-riscv64@0.25.11': + resolution: {integrity: sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -999,8 +999,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.9': - resolution: {integrity: sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==} + '@esbuild/linux-s390x@0.25.11': + resolution: {integrity: sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -1011,14 +1011,14 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.9': - resolution: {integrity: sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==} + '@esbuild/linux-x64@0.25.11': + resolution: {integrity: sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.9': - resolution: {integrity: sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==} + '@esbuild/netbsd-arm64@0.25.11': + resolution: {integrity: sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -1029,14 +1029,14 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.9': - resolution: {integrity: sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==} + '@esbuild/netbsd-x64@0.25.11': + resolution: {integrity: sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.9': - resolution: {integrity: sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==} + '@esbuild/openbsd-arm64@0.25.11': + resolution: {integrity: sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -1047,14 +1047,14 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.9': - resolution: {integrity: sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==} + '@esbuild/openbsd-x64@0.25.11': + resolution: {integrity: sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.9': - resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==} + '@esbuild/openharmony-arm64@0.25.11': + resolution: {integrity: sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] @@ -1065,8 +1065,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.9': - resolution: {integrity: sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==} + '@esbuild/sunos-x64@0.25.11': + resolution: {integrity: sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -1077,8 +1077,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.9': - resolution: {integrity: sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==} + '@esbuild/win32-arm64@0.25.11': + resolution: {integrity: sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -1089,8 +1089,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.9': - resolution: {integrity: sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==} + '@esbuild/win32-ia32@0.25.11': + resolution: {integrity: sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -1101,8 +1101,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.9': - resolution: {integrity: sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==} + '@esbuild/win32-x64@0.25.11': + resolution: {integrity: sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -1241,108 +1241,113 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.50.1': - resolution: {integrity: sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==} + '@rollup/rollup-android-arm-eabi@4.52.5': + resolution: {integrity: sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.50.1': - resolution: {integrity: sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==} + '@rollup/rollup-android-arm64@4.52.5': + resolution: {integrity: sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.50.1': - resolution: {integrity: sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==} + '@rollup/rollup-darwin-arm64@4.52.5': + resolution: {integrity: sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.50.1': - resolution: {integrity: sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==} + '@rollup/rollup-darwin-x64@4.52.5': + resolution: {integrity: sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.50.1': - resolution: {integrity: sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==} + '@rollup/rollup-freebsd-arm64@4.52.5': + resolution: {integrity: sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.50.1': - resolution: {integrity: sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==} + '@rollup/rollup-freebsd-x64@4.52.5': + resolution: {integrity: sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.50.1': - resolution: {integrity: sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==} + '@rollup/rollup-linux-arm-gnueabihf@4.52.5': + resolution: {integrity: sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.50.1': - resolution: {integrity: sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==} + '@rollup/rollup-linux-arm-musleabihf@4.52.5': + resolution: {integrity: sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.50.1': - resolution: {integrity: sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==} + '@rollup/rollup-linux-arm64-gnu@4.52.5': + resolution: {integrity: sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.50.1': - resolution: {integrity: sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==} + '@rollup/rollup-linux-arm64-musl@4.52.5': + resolution: {integrity: sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.50.1': - resolution: {integrity: sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==} + '@rollup/rollup-linux-loong64-gnu@4.52.5': + resolution: {integrity: sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.50.1': - resolution: {integrity: sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==} + '@rollup/rollup-linux-ppc64-gnu@4.52.5': + resolution: {integrity: sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.50.1': - resolution: {integrity: sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==} + '@rollup/rollup-linux-riscv64-gnu@4.52.5': + resolution: {integrity: sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.50.1': - resolution: {integrity: sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==} + '@rollup/rollup-linux-riscv64-musl@4.52.5': + resolution: {integrity: sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.50.1': - resolution: {integrity: sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==} + '@rollup/rollup-linux-s390x-gnu@4.52.5': + resolution: {integrity: sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.50.1': - resolution: {integrity: sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==} + '@rollup/rollup-linux-x64-gnu@4.52.5': + resolution: {integrity: sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.50.1': - resolution: {integrity: sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==} + '@rollup/rollup-linux-x64-musl@4.52.5': + resolution: {integrity: sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==} cpu: [x64] os: [linux] - '@rollup/rollup-openharmony-arm64@4.50.1': - resolution: {integrity: sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==} + '@rollup/rollup-openharmony-arm64@4.52.5': + resolution: {integrity: sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.50.1': - resolution: {integrity: sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==} + '@rollup/rollup-win32-arm64-msvc@4.52.5': + resolution: {integrity: sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.50.1': - resolution: {integrity: sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==} + '@rollup/rollup-win32-ia32-msvc@4.52.5': + resolution: {integrity: sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.50.1': - resolution: {integrity: sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==} + '@rollup/rollup-win32-x64-gnu@4.52.5': + resolution: {integrity: sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.52.5': + resolution: {integrity: sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==} cpu: [x64] os: [win32] @@ -1969,8 +1974,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.25.9: - resolution: {integrity: sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==} + esbuild@0.25.11: + resolution: {integrity: sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==} engines: {node: '>=18'} hasBin: true @@ -2688,8 +2693,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.50.1: - resolution: {integrity: sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==} + rollup@4.52.5: + resolution: {integrity: sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2976,8 +2981,8 @@ packages: vite: optional: true - vite@5.4.20: - resolution: {integrity: sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==} + vite@5.4.21: + resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -3007,8 +3012,8 @@ packages: terser: optional: true - vite@6.3.6: - resolution: {integrity: sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==} + vite@6.4.1: + resolution: {integrity: sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -3929,148 +3934,148 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/aix-ppc64@0.25.9': + '@esbuild/aix-ppc64@0.25.11': optional: true '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm64@0.25.9': + '@esbuild/android-arm64@0.25.11': optional: true '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-arm@0.25.9': + '@esbuild/android-arm@0.25.11': optional: true '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/android-x64@0.25.9': + '@esbuild/android-x64@0.25.11': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.25.9': + '@esbuild/darwin-arm64@0.25.11': optional: true '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/darwin-x64@0.25.9': + '@esbuild/darwin-x64@0.25.11': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.25.9': + '@esbuild/freebsd-arm64@0.25.11': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.25.9': + '@esbuild/freebsd-x64@0.25.11': optional: true '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm64@0.25.9': + '@esbuild/linux-arm64@0.25.11': optional: true '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-arm@0.25.9': + '@esbuild/linux-arm@0.25.11': optional: true '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-ia32@0.25.9': + '@esbuild/linux-ia32@0.25.11': optional: true '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-loong64@0.25.9': + '@esbuild/linux-loong64@0.25.11': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-mips64el@0.25.9': + '@esbuild/linux-mips64el@0.25.11': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-ppc64@0.25.9': + '@esbuild/linux-ppc64@0.25.11': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.25.9': + '@esbuild/linux-riscv64@0.25.11': optional: true '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-s390x@0.25.9': + '@esbuild/linux-s390x@0.25.11': optional: true '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-x64@0.25.9': + '@esbuild/linux-x64@0.25.11': optional: true - '@esbuild/netbsd-arm64@0.25.9': + '@esbuild/netbsd-arm64@0.25.11': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.25.9': + '@esbuild/netbsd-x64@0.25.11': optional: true - '@esbuild/openbsd-arm64@0.25.9': + '@esbuild/openbsd-arm64@0.25.11': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.25.9': + '@esbuild/openbsd-x64@0.25.11': optional: true - '@esbuild/openharmony-arm64@0.25.9': + '@esbuild/openharmony-arm64@0.25.11': optional: true '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.25.9': + '@esbuild/sunos-x64@0.25.11': optional: true '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.25.9': + '@esbuild/win32-arm64@0.25.11': optional: true '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-ia32@0.25.9': + '@esbuild/win32-ia32@0.25.11': optional: true '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.25.9': + '@esbuild/win32-x64@0.25.11': optional: true '@eslint-community/eslint-utils@4.6.1(eslint@9.25.1)': @@ -4243,75 +4248,78 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/pluginutils@5.1.4(rollup@4.50.1)': + '@rollup/pluginutils@5.1.4(rollup@4.52.5)': dependencies: '@types/estree': 1.0.7 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.50.1 + rollup: 4.52.5 + + '@rollup/rollup-android-arm-eabi@4.52.5': + optional: true - '@rollup/rollup-android-arm-eabi@4.50.1': + '@rollup/rollup-android-arm64@4.52.5': optional: true - '@rollup/rollup-android-arm64@4.50.1': + '@rollup/rollup-darwin-arm64@4.52.5': optional: true - '@rollup/rollup-darwin-arm64@4.50.1': + '@rollup/rollup-darwin-x64@4.52.5': optional: true - '@rollup/rollup-darwin-x64@4.50.1': + '@rollup/rollup-freebsd-arm64@4.52.5': optional: true - '@rollup/rollup-freebsd-arm64@4.50.1': + '@rollup/rollup-freebsd-x64@4.52.5': optional: true - '@rollup/rollup-freebsd-x64@4.50.1': + '@rollup/rollup-linux-arm-gnueabihf@4.52.5': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.50.1': + '@rollup/rollup-linux-arm-musleabihf@4.52.5': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.50.1': + '@rollup/rollup-linux-arm64-gnu@4.52.5': optional: true - '@rollup/rollup-linux-arm64-gnu@4.50.1': + '@rollup/rollup-linux-arm64-musl@4.52.5': optional: true - '@rollup/rollup-linux-arm64-musl@4.50.1': + '@rollup/rollup-linux-loong64-gnu@4.52.5': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.50.1': + '@rollup/rollup-linux-ppc64-gnu@4.52.5': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.50.1': + '@rollup/rollup-linux-riscv64-gnu@4.52.5': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.50.1': + '@rollup/rollup-linux-riscv64-musl@4.52.5': optional: true - '@rollup/rollup-linux-riscv64-musl@4.50.1': + '@rollup/rollup-linux-s390x-gnu@4.52.5': optional: true - '@rollup/rollup-linux-s390x-gnu@4.50.1': + '@rollup/rollup-linux-x64-gnu@4.52.5': optional: true - '@rollup/rollup-linux-x64-gnu@4.50.1': + '@rollup/rollup-linux-x64-musl@4.52.5': optional: true - '@rollup/rollup-linux-x64-musl@4.50.1': + '@rollup/rollup-openharmony-arm64@4.52.5': optional: true - '@rollup/rollup-openharmony-arm64@4.50.1': + '@rollup/rollup-win32-arm64-msvc@4.52.5': optional: true - '@rollup/rollup-win32-arm64-msvc@4.50.1': + '@rollup/rollup-win32-ia32-msvc@4.52.5': optional: true - '@rollup/rollup-win32-ia32-msvc@4.50.1': + '@rollup/rollup-win32-x64-gnu@4.52.5': optional: true - '@rollup/rollup-win32-x64-msvc@4.50.1': + '@rollup/rollup-win32-x64-msvc@4.52.5': optional: true '@rushstack/node-core-library@4.0.2(@types/node@20.17.32)': @@ -4552,21 +4560,21 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.1.2(vite@5.4.20(@types/node@20.17.32))': + '@vitest/mocker@3.1.2(vite@5.4.21(@types/node@20.17.32))': dependencies: '@vitest/spy': 3.1.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.20(@types/node@20.17.32) + vite: 5.4.21(@types/node@20.17.32) - '@vitest/mocker@3.1.2(vite@5.4.20(@types/node@22.15.3))': + '@vitest/mocker@3.1.2(vite@5.4.21(@types/node@22.15.3))': dependencies: '@vitest/spy': 3.1.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.20(@types/node@22.15.3) + vite: 5.4.21(@types/node@22.15.3) '@vitest/pretty-format@3.1.2': dependencies: @@ -5095,34 +5103,34 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.25.9: + esbuild@0.25.11: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.9 - '@esbuild/android-arm': 0.25.9 - '@esbuild/android-arm64': 0.25.9 - '@esbuild/android-x64': 0.25.9 - '@esbuild/darwin-arm64': 0.25.9 - '@esbuild/darwin-x64': 0.25.9 - '@esbuild/freebsd-arm64': 0.25.9 - '@esbuild/freebsd-x64': 0.25.9 - '@esbuild/linux-arm': 0.25.9 - '@esbuild/linux-arm64': 0.25.9 - '@esbuild/linux-ia32': 0.25.9 - '@esbuild/linux-loong64': 0.25.9 - '@esbuild/linux-mips64el': 0.25.9 - '@esbuild/linux-ppc64': 0.25.9 - '@esbuild/linux-riscv64': 0.25.9 - '@esbuild/linux-s390x': 0.25.9 - '@esbuild/linux-x64': 0.25.9 - '@esbuild/netbsd-arm64': 0.25.9 - '@esbuild/netbsd-x64': 0.25.9 - '@esbuild/openbsd-arm64': 0.25.9 - '@esbuild/openbsd-x64': 0.25.9 - '@esbuild/openharmony-arm64': 0.25.9 - '@esbuild/sunos-x64': 0.25.9 - '@esbuild/win32-arm64': 0.25.9 - '@esbuild/win32-ia32': 0.25.9 - '@esbuild/win32-x64': 0.25.9 + '@esbuild/aix-ppc64': 0.25.11 + '@esbuild/android-arm': 0.25.11 + '@esbuild/android-arm64': 0.25.11 + '@esbuild/android-x64': 0.25.11 + '@esbuild/darwin-arm64': 0.25.11 + '@esbuild/darwin-x64': 0.25.11 + '@esbuild/freebsd-arm64': 0.25.11 + '@esbuild/freebsd-x64': 0.25.11 + '@esbuild/linux-arm': 0.25.11 + '@esbuild/linux-arm64': 0.25.11 + '@esbuild/linux-ia32': 0.25.11 + '@esbuild/linux-loong64': 0.25.11 + '@esbuild/linux-mips64el': 0.25.11 + '@esbuild/linux-ppc64': 0.25.11 + '@esbuild/linux-riscv64': 0.25.11 + '@esbuild/linux-s390x': 0.25.11 + '@esbuild/linux-x64': 0.25.11 + '@esbuild/netbsd-arm64': 0.25.11 + '@esbuild/netbsd-x64': 0.25.11 + '@esbuild/openbsd-arm64': 0.25.11 + '@esbuild/openbsd-x64': 0.25.11 + '@esbuild/openharmony-arm64': 0.25.11 + '@esbuild/sunos-x64': 0.25.11 + '@esbuild/win32-arm64': 0.25.11 + '@esbuild/win32-ia32': 0.25.11 + '@esbuild/win32-x64': 0.25.11 escalade@3.2.0: {} @@ -5835,31 +5843,32 @@ snapshots: reusify@1.1.0: {} - rollup@4.50.1: + rollup@4.52.5: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.50.1 - '@rollup/rollup-android-arm64': 4.50.1 - '@rollup/rollup-darwin-arm64': 4.50.1 - '@rollup/rollup-darwin-x64': 4.50.1 - '@rollup/rollup-freebsd-arm64': 4.50.1 - '@rollup/rollup-freebsd-x64': 4.50.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.50.1 - '@rollup/rollup-linux-arm-musleabihf': 4.50.1 - '@rollup/rollup-linux-arm64-gnu': 4.50.1 - '@rollup/rollup-linux-arm64-musl': 4.50.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.50.1 - '@rollup/rollup-linux-ppc64-gnu': 4.50.1 - '@rollup/rollup-linux-riscv64-gnu': 4.50.1 - '@rollup/rollup-linux-riscv64-musl': 4.50.1 - '@rollup/rollup-linux-s390x-gnu': 4.50.1 - '@rollup/rollup-linux-x64-gnu': 4.50.1 - '@rollup/rollup-linux-x64-musl': 4.50.1 - '@rollup/rollup-openharmony-arm64': 4.50.1 - '@rollup/rollup-win32-arm64-msvc': 4.50.1 - '@rollup/rollup-win32-ia32-msvc': 4.50.1 - '@rollup/rollup-win32-x64-msvc': 4.50.1 + '@rollup/rollup-android-arm-eabi': 4.52.5 + '@rollup/rollup-android-arm64': 4.52.5 + '@rollup/rollup-darwin-arm64': 4.52.5 + '@rollup/rollup-darwin-x64': 4.52.5 + '@rollup/rollup-freebsd-arm64': 4.52.5 + '@rollup/rollup-freebsd-x64': 4.52.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.52.5 + '@rollup/rollup-linux-arm-musleabihf': 4.52.5 + '@rollup/rollup-linux-arm64-gnu': 4.52.5 + '@rollup/rollup-linux-arm64-musl': 4.52.5 + '@rollup/rollup-linux-loong64-gnu': 4.52.5 + '@rollup/rollup-linux-ppc64-gnu': 4.52.5 + '@rollup/rollup-linux-riscv64-gnu': 4.52.5 + '@rollup/rollup-linux-riscv64-musl': 4.52.5 + '@rollup/rollup-linux-s390x-gnu': 4.52.5 + '@rollup/rollup-linux-x64-gnu': 4.52.5 + '@rollup/rollup-linux-x64-musl': 4.52.5 + '@rollup/rollup-openharmony-arm64': 4.52.5 + '@rollup/rollup-win32-arm64-msvc': 4.52.5 + '@rollup/rollup-win32-ia32-msvc': 4.52.5 + '@rollup/rollup-win32-x64-gnu': 4.52.5 + '@rollup/rollup-win32-x64-msvc': 4.52.5 fsevents: 2.3.3 rrweb-cssom@0.8.0: {} @@ -6109,7 +6118,7 @@ snapshots: debug: 4.4.0 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 5.4.20(@types/node@20.17.32) + vite: 5.4.21(@types/node@20.17.32) transitivePeerDependencies: - '@types/node' - less @@ -6127,7 +6136,7 @@ snapshots: debug: 4.4.0 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 5.4.20(@types/node@22.15.3) + vite: 5.4.21(@types/node@22.15.3) transitivePeerDependencies: - '@types/node' - less @@ -6139,10 +6148,10 @@ snapshots: - supports-color - terser - vite-plugin-dts@3.9.1(@types/node@20.17.32)(rollup@4.50.1)(typescript@5.8.3)(vite@5.4.20(@types/node@20.17.32)): + vite-plugin-dts@3.9.1(@types/node@20.17.32)(rollup@4.52.5)(typescript@5.8.3)(vite@5.4.21(@types/node@20.17.32)): dependencies: '@microsoft/api-extractor': 7.43.0(@types/node@20.17.32) - '@rollup/pluginutils': 5.1.4(rollup@4.50.1) + '@rollup/pluginutils': 5.1.4(rollup@4.52.5) '@vue/language-core': 1.8.27(typescript@5.8.3) debug: 4.4.0 kolorist: 1.8.0 @@ -6150,16 +6159,16 @@ snapshots: typescript: 5.8.3 vue-tsc: 1.8.27(typescript@5.8.3) optionalDependencies: - vite: 5.4.20(@types/node@20.17.32) + vite: 5.4.21(@types/node@20.17.32) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-dts@4.5.3(@types/node@22.15.3)(rollup@4.50.1)(typescript@5.8.3)(vite@6.3.6(@types/node@22.15.3)): + vite-plugin-dts@4.5.3(@types/node@22.15.3)(rollup@4.52.5)(typescript@5.8.3)(vite@6.4.1(@types/node@22.15.3)): dependencies: '@microsoft/api-extractor': 7.52.5(@types/node@22.15.3) - '@rollup/pluginutils': 5.1.4(rollup@4.50.1) + '@rollup/pluginutils': 5.1.4(rollup@4.52.5) '@volar/typescript': 2.4.13 '@vue/language-core': 2.2.0(typescript@5.8.3) compare-versions: 6.1.1 @@ -6169,37 +6178,37 @@ snapshots: magic-string: 0.30.17 typescript: 5.8.3 optionalDependencies: - vite: 6.3.6(@types/node@22.15.3) + vite: 6.4.1(@types/node@22.15.3) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite@5.4.20(@types/node@20.17.32): + vite@5.4.21(@types/node@20.17.32): dependencies: esbuild: 0.21.5 postcss: 8.5.6 - rollup: 4.50.1 + rollup: 4.52.5 optionalDependencies: '@types/node': 20.17.32 fsevents: 2.3.3 - vite@5.4.20(@types/node@22.15.3): + vite@5.4.21(@types/node@22.15.3): dependencies: esbuild: 0.21.5 postcss: 8.5.6 - rollup: 4.50.1 + rollup: 4.52.5 optionalDependencies: '@types/node': 22.15.3 fsevents: 2.3.3 - vite@6.3.6(@types/node@22.15.3): + vite@6.4.1(@types/node@22.15.3): dependencies: - esbuild: 0.25.9 + esbuild: 0.25.11 fdir: 6.4.4(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.6 - rollup: 4.50.1 + rollup: 4.52.5 tinyglobby: 0.2.13 optionalDependencies: '@types/node': 22.15.3 @@ -6208,7 +6217,7 @@ snapshots: vitest@3.1.2(@types/node@20.17.32)(jsdom@26.1.0): dependencies: '@vitest/expect': 3.1.2 - '@vitest/mocker': 3.1.2(vite@5.4.20(@types/node@20.17.32)) + '@vitest/mocker': 3.1.2(vite@5.4.21(@types/node@20.17.32)) '@vitest/pretty-format': 3.1.2 '@vitest/runner': 3.1.2 '@vitest/snapshot': 3.1.2 @@ -6225,7 +6234,7 @@ snapshots: tinyglobby: 0.2.13 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 5.4.20(@types/node@20.17.32) + vite: 5.4.21(@types/node@20.17.32) vite-node: 3.1.2(@types/node@20.17.32) why-is-node-running: 2.3.0 optionalDependencies: @@ -6245,7 +6254,7 @@ snapshots: vitest@3.1.2(@types/node@22.15.3)(jsdom@26.1.0): dependencies: '@vitest/expect': 3.1.2 - '@vitest/mocker': 3.1.2(vite@5.4.20(@types/node@22.15.3)) + '@vitest/mocker': 3.1.2(vite@5.4.21(@types/node@22.15.3)) '@vitest/pretty-format': 3.1.2 '@vitest/runner': 3.1.2 '@vitest/snapshot': 3.1.2 @@ -6262,7 +6271,7 @@ snapshots: tinyglobby: 0.2.13 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 5.4.20(@types/node@22.15.3) + vite: 5.4.21(@types/node@22.15.3) vite-node: 3.1.2(@types/node@22.15.3) why-is-node-running: 2.3.0 optionalDependencies: From ad183650160091a3e976c2cea3d809eb9649d982 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 31 Oct 2025 15:13:14 +0100 Subject: [PATCH 64/70] Add callback to memorize leave function. --- packages/react/src/hooks/use-echo.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react/src/hooks/use-echo.ts b/packages/react/src/hooks/use-echo.ts index 2697aa9e..0ab2a268 100644 --- a/packages/react/src/hooks/use-echo.ts +++ b/packages/react/src/hooks/use-echo.ts @@ -127,6 +127,10 @@ export const useEcho = < leaveChannel(channel, leaveAll); }, dependencies); + const leave = useCallback(() => { + tearDown(true); + }, dependencies); + useEffect(() => { if (initialized.current) { subscription.current = resolveChannelSubscription(channel); @@ -147,7 +151,7 @@ export const useEcho = < /** * Leave the channel and also its associated private and presence channels */ - leave: () => tearDown(true), + leave, /** * Stop listening for event(s) without leaving the channel */ From 56129a06f0b52d36737b384521c4344fe4bac1a3 Mon Sep 17 00:00:00 2001 From: Willem-Jaap Date: Tue, 4 Nov 2025 14:59:53 +0100 Subject: [PATCH 65/70] feat: add broadcaster type inference to constructor --- packages/laravel-echo/src/echo.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/laravel-echo/src/echo.ts b/packages/laravel-echo/src/echo.ts index 28503d0e..93dcb35b 100644 --- a/packages/laravel-echo/src/echo.ts +++ b/packages/laravel-echo/src/echo.ts @@ -40,7 +40,7 @@ export default class Echo { /** * Create a new class instance. */ - constructor(options: EchoOptions) { + constructor(options: EchoOptions & { broadcaster: T }) { this.options = options; this.connect(); @@ -287,7 +287,7 @@ export type Broadcaster = { encrypted: PusherEncryptedPrivateChannel<"reverb">; presence: PusherPresenceChannel<"reverb">; options: GenericOptions<"reverb"> & - Partial, "cluster">>; + Partial, "cluster">>; }; pusher: { connector: PusherConnector<"pusher">; @@ -340,8 +340,8 @@ type GenericOptions = { * The broadcast connector. */ broadcaster: TBroadcaster extends "function" - ? Constructor> - : TBroadcaster; + ? Constructor> + : TBroadcaster; auth?: { headers: Record; From 3b8a7507be58f8db9dbf4fce1d76e8fd40c12d32 Mon Sep 17 00:00:00 2001 From: Willem-Jaap Date: Tue, 4 Nov 2025 15:02:29 +0100 Subject: [PATCH 66/70] style: format consistently --- packages/laravel-echo/src/echo.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/src/echo.ts b/packages/laravel-echo/src/echo.ts index 93dcb35b..ddfd99de 100644 --- a/packages/laravel-echo/src/echo.ts +++ b/packages/laravel-echo/src/echo.ts @@ -287,7 +287,7 @@ export type Broadcaster = { encrypted: PusherEncryptedPrivateChannel<"reverb">; presence: PusherPresenceChannel<"reverb">; options: GenericOptions<"reverb"> & - Partial, "cluster">>; + Partial, "cluster">>; }; pusher: { connector: PusherConnector<"pusher">; @@ -340,8 +340,8 @@ type GenericOptions = { * The broadcast connector. */ broadcaster: TBroadcaster extends "function" - ? Constructor> - : TBroadcaster; + ? Constructor> + : TBroadcaster; auth?: { headers: Record; From 26aa580656bf5fe9fcc79b8b58c7dbe15d85a8e7 Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:48:19 +0000 Subject: [PATCH 67/70] Update CHANGELOG --- CHANGELOG.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1088a928..b4168dff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.2.4...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.2.5...2.x) + +## [v2.2.5](https://github.com/laravel/echo/compare/v2.2.4...v2.2.5) - 2025-10-31 + +### What's Changed + +* Bump vite from 5.4.20 to 5.4.21 by [@dependabot](https://github.com/dependabot)[bot] in https://github.com/laravel/echo/pull/462 +* Add callback to memorize leave function. by [@AntonGreger](https://github.com/AntonGreger) in https://github.com/laravel/echo/pull/464 + +### New Contributors + +* [@AntonGreger](https://github.com/AntonGreger) made their first contribution in https://github.com/laravel/echo/pull/464 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.2.4...v2.2.5 ## [v2.2.4](https://github.com/laravel/echo/compare/v2.2.3...v2.2.4) - 2025-09-26 From fd8ec0e5542312914620dec9205b5401c8f67e82 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 4 Nov 2025 11:35:35 -0500 Subject: [PATCH 68/70] v2.2.5 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 590b9992..6191871d 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.2.4", + "version": "2.2.5", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 25a8f7fb..2690b5c1 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.2.4", + "version": "2.2.5", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 6649124a..35340e86 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.2.4", + "version": "2.2.5", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From dbf712406717decb26fce0e657ddc4d4bb9bcfb9 Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 4 Nov 2025 11:40:08 -0500 Subject: [PATCH 69/70] v2.2.6 --- packages/laravel-echo/package.json | 2 +- packages/react/package.json | 2 +- packages/vue/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/laravel-echo/package.json b/packages/laravel-echo/package.json index 6191871d..b9ae7fb6 100644 --- a/packages/laravel-echo/package.json +++ b/packages/laravel-echo/package.json @@ -1,6 +1,6 @@ { "name": "laravel-echo", - "version": "2.2.5", + "version": "2.2.6", "description": "Laravel Echo library for beautiful Pusher and Socket.IO integration", "keywords": [ "laravel", diff --git a/packages/react/package.json b/packages/react/package.json index 2690b5c1..d6813553 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-react", - "version": "2.2.5", + "version": "2.2.6", "description": "React hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", diff --git a/packages/vue/package.json b/packages/vue/package.json index 35340e86..b44f2ebf 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@laravel/echo-vue", - "version": "2.2.5", + "version": "2.2.6", "description": "Vue hooks for seamless integration with Laravel Echo.", "keywords": [ "laravel", From 2362bd3a88862ab559487a1980a53649fe3f7a7e Mon Sep 17 00:00:00 2001 From: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:40:29 +0000 Subject: [PATCH 70/70] Update CHANGELOG --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4168dff..b0b5e09e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ # Release Notes -## [Unreleased](https://github.com/laravel/echo/compare/v2.2.5...2.x) +## [Unreleased](https://github.com/laravel/echo/compare/v2.2.6...2.x) + +## [v2.2.6](https://github.com/laravel/echo/compare/v2.2.5...v2.2.6) - 2025-11-04 + +### What's Changed + +* feat: add broadcaster type inference to constructor by [@Willem-Jaap](https://github.com/Willem-Jaap) in https://github.com/laravel/echo/pull/465 + +### New Contributors + +* [@Willem-Jaap](https://github.com/Willem-Jaap) made their first contribution in https://github.com/laravel/echo/pull/465 + +**Full Changelog**: https://github.com/laravel/echo/compare/v2.2.5...v2.2.6 ## [v2.2.5](https://github.com/laravel/echo/compare/v2.2.4...v2.2.5) - 2025-10-31