Skip to content

Commit 4316fca

Browse files
committed
fix conflicts
2 parents 18d454b + abca3c7 commit 4316fca

File tree

7 files changed

+112
-5
lines changed

7 files changed

+112
-5
lines changed

.github/ISSUE_TEMPLATE/1_Bug_report.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ about: "Report something that's broken. Please ensure your Laravel version is st
1616

1717

1818
### Steps To Reproduce:
19+
20+
<!-- If possible, please provide a GitHub repository to demonstrate your issue -->
21+
<!-- laravel new bug-report --github="--public" -->
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '44 23 * * 1'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'javascript' ]
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33+
# Learn more:
34+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v1
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v1

.github/workflows/tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88

99
jobs:
1010
tests:
11-
12-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1312

1413
steps:
1514
- name: Checkout code

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Release Notes
22

3-
## [Unreleased](https://github.com/laravel/echo/compare/v1.9.0...master)
3+
## [Unreleased](https://github.com/laravel/echo/compare/v1.10.0...master)
4+
5+
6+
## [v1.10.0 (2020-12-19)](https://github.com/laravel/echo/compare/v1.9.0...v1.10.0)
7+
8+
### Added
9+
- Add optional callback argument to `stopListening()` ([#292](https://github.com/laravel/echo/pull/292))
410

511

612
## [v1.9.0 (2020-10-13)](https://github.com/laravel/echo/compare/v1.8.1...v1.9.0)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"keywords": [
66
"laravel",
77
"pusher",
8-
"socket.io"
8+
"ably"
99
],
1010
"homepage": "https://github.com/laravel/echo",
1111
"repository": {

src/channel/pusher-channel.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,25 @@ export class PusherChannel extends Channel {
6767
return this;
6868
}
6969

70+
/**
71+
* Listen for all events on the channel instance.
72+
*/
73+
listenToAll(callback: Function): PusherChannel {
74+
this.subscription.bind_global((event, data) => {
75+
if (event.startsWith('pusher:')) {
76+
return;
77+
}
78+
79+
let namespace = this.options.namespace.replace(/\./g, '\\');
80+
81+
let formattedEvent = event.startsWith(namespace) ? event.substring(namespace.length + 1) : '.' + event;
82+
83+
callback(formattedEvent, data);
84+
});
85+
86+
return this;
87+
}
88+
7089
/**
7190
* Stop listening for an event on the channel instance.
7291
*/
@@ -80,6 +99,19 @@ export class PusherChannel extends Channel {
8099
return this;
81100
}
82101

102+
/**
103+
* Stop listening for all events on the channel instance.
104+
*/
105+
stopListeningToAll(callback?: Function): PusherChannel {
106+
if (callback) {
107+
this.subscription.unbind_global(callback);
108+
} else {
109+
this.subscription.unbind_global();
110+
}
111+
112+
return this;
113+
}
114+
83115
/**
84116
* Register a callback to be called anytime a subscription succeeds.
85117
*/

src/channel/socketio-channel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class SocketIoChannel extends Channel {
113113
on(event: string, callback: Function): SocketIoChannel {
114114
this.listeners[event] = this.listeners[event] || [];
115115

116-
if (! this.events[event]) {
116+
if (!this.events[event]) {
117117
this.events[event] = (channel, data) => {
118118
if (this.name === channel && this.listeners[event]) {
119119
this.listeners[event].forEach((cb) => cb(data));

0 commit comments

Comments
 (0)