Skip to content

Commit 41e7052

Browse files
Merge pull request #64 from cristiammercado/develop
Support for Angular v20
2 parents c02649e + cbae52d commit 41e7052

31 files changed

+2486
-3101
lines changed

.circleci/config.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
version: 2.1
22

33
orbs:
4-
node: circleci/node@7.0.0
5-
browser-tools: circleci/browser-tools@1.5.0
4+
node: circleci/node@7.1.0
5+
browser-tools: circleci/browser-tools@2.1.2
66

77
jobs:
88
build:
99
docker:
1010
- image: cimg/node:lts-browsers
1111
resource_class: large
1212
steps:
13-
- browser-tools/install-chrome
14-
- browser-tools/install-chromedriver
13+
- browser-tools/install_chrome
14+
- browser-tools/install_chromedriver
1515
- checkout
1616
- restore_cache:
1717
keys:
1818
- v1-npm-deps-{{ checksum "package-lock.json" }}
1919
- v1-npm-deps-
20+
- run:
21+
name: Check install
22+
command: |
23+
google-chrome --version
24+
chromedriver --version
2025
- run:
2126
name: Install dependencies
2227
command: npm install

.vscode/extensions.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2025 Cristiam Mercado
3+
Copyright (c) 2021 - 2025 Cristiam Mercado
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RxJS-based message/event bus service for Angular apps inspired by [NgRadio](http
1313

1414
| Angular version | ng-event-bus version |
1515
|-----------------|----------------------|
16+
| 20.x | 9.x.x |
1617
| 19.x | 8.x.x |
1718
| 18.x | 7.x.x |
1819
| 17.x | 6.x.x |
@@ -30,7 +31,7 @@ First, import it:
3031

3132
`import { NgEventBus } from 'ng-event-bus';`
3233

33-
Then, inject it as a service (do not forget about providers) in your Angular application:
34+
Then, inject it as a service (remember about providers) in your Angular application:
3435

3536
```
3637
import { NgEventBus } from 'ng-event-bus';
@@ -52,7 +53,7 @@ Since you have `NgEventBus` instance in your app, you can use these methods for
5253

5354
* `this.eventBus.cast(key, data)` - send a message to event bus.
5455

55-
* `this.eventBus.on(pattern)` - returns observable you can subscribe to listen events.
56+
* `this.eventBus.on(pattern)` - returns observable you can subscribe to listen to events.
5657

5758
Where:
5859

@@ -98,8 +99,8 @@ this.eventBus.on('**').subscribe((meta: MetaData) => {
9899
When you subscribe to the observable, you can optionally get an instance of `MetaData` class. This instance contains information related to the emission of the event through the bus. The properties of this instance are:
99100

100101
- `id`: A unique identifier of the message sent through the events bus.
101-
- `key`: Original key associated to the message.
102-
- `data`: Data associated to message. It's optional.
102+
- `key`: Original key associated with the message.
103+
- `data`: Data associated with a message. It's optional.
103104
- `timestamp`: Time in milliseconds in which the message was generated.
104105

105106
```
@@ -152,13 +153,13 @@ These strings will match:
152153

153154
### Need to unsubscribe (observable)?
154155

155-
Yes, in the normal scenario usage it's necessary you unsubscribe from the observable to avoid memory leaks. That happens because the library exposes an infinite observable. That's no exactly related to the library, but in the way in which the observables work in RxJS.
156+
Yes, in the normal scenario usage it's necessary you unsubscribe from the observable to avoid memory leaks. That happens because the library exposes an infinite observable. That's not exactly related to the library, but in the way in which the observables work in RxJS.
156157

157-
However, there are ways that you don't need to unsubscribe, for example if you use `.first()` in the pipe of the observable because using this method would turn it into a finite observable (It would apply in your case if you're just waiting for a one-time event).
158+
However, there are ways that you don't need to unsubscribe, for example, if you use `.first()` in the pipe of the observable because using this method would turn it into a finite observable (It would apply in your case if you're just waiting for a one-time event).
158159

159160
I recommend you to read this [stackoverflow answer](https://stackoverflow.com/questions/50629357/rxjs-angular-unsubscribe-from-subjects/50633482#50633482) about a similar question.
160161

161-
## Release history & changelog
162+
## Release history and changelog
162163

163164
See the [Releases](https://github.com/cristiammercado/ng-event-bus/releases) page for a list of all releases, including changes.
164165

angular.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,8 @@
112112
}
113113
}
114114
}
115+
},
116+
"cli": {
117+
"analytics": false
115118
}
116119
}

dist/ng-event-bus/fesm2022/ng-event-bus.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { filter, map } from 'rxjs/operators';
77
*
88
* @author Cristiam Mercado
99
* @since 2.0.0
10-
* @version 8.0.0
10+
* @version 9.0.0
1111
*/
1212
class MetaData {
1313
/**
@@ -47,7 +47,7 @@ class MetaData {
4747
return this._timestamp;
4848
}
4949
/**
50-
* Generates UUID version 4. The solution above uses Math.random() for brevity, however Math.random() is not
50+
* Generates UUID version 4. The solution above uses Math.random() for brevity, however, Math.random() is not
5151
* guaranteed to be a high-quality RNG.
5252
*
5353
* @return UUID version 4.
@@ -66,7 +66,7 @@ class MetaData {
6666
*
6767
* @author Cristiam Mercado
6868
* @since 2.0.0
69-
* @version 8.0.0
69+
* @version 9.0.0
7070
*/
7171
class NgEventBus {
7272
/**

0 commit comments

Comments
 (0)