Skip to content

Commit 461face

Browse files
authored
chore: upgrade to RxJS@7 (#163)
1 parent a99a5ed commit 461face

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

apps/integration/src/app/array-of-subscriptions/document-click/document-click.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ArrayOfSubscriptionsComponent } from '../array-of-subscriptions.compone
1010
@Component({
1111
selector: 'app-document-click',
1212
templateUrl: './document-click.component.html',
13-
changeDetection: ChangeDetectionStrategy.OnPush
13+
changeDetection: ChangeDetectionStrategy.OnPush,
1414
})
1515
export class DocumentClickComponent {
1616
clientX$ = new BehaviorSubject<number>(0);
@@ -23,9 +23,9 @@ export class DocumentClickComponent {
2323
const logger = loggerFactory.createLogger('DocumentClickComponent', '#b100aa');
2424

2525
this.subscriptions.push(
26-
fromEvent<KeyboardEvent>(document, 'click')
26+
fromEvent<MouseEvent>(document, 'click')
2727
.pipe(
28-
pluck<KeyboardEvent, number>('clientX'),
28+
pluck('clientX'),
2929
finalize(() => {
3030
logger.log('fromEvent has been unsubscribed');
3131
host.documentClickUnsubscribed$.next(true);

apps/integration/src/app/custom-method/custom-method.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import { NotificationClass, NotificationText } from '../enums/notification.enum'
1111
@Component({
1212
selector: 'app-custom-method',
1313
templateUrl: './custom-method.component.html',
14-
changeDetection: ChangeDetectionStrategy.OnPush
14+
changeDetection: ChangeDetectionStrategy.OnPush,
1515
})
1616
export class CustomMethodComponent implements OnDestroy {
1717
valueFromIntervalService$ = new BehaviorSubject<number>(0);
1818

1919
subscription = fromEvent<MouseEvent>(document, 'mousemove')
2020
.pipe(
2121
debounceTime(200),
22-
pluck<MouseEvent, number>('clientX'),
22+
pluck('clientX'),
2323
finalize(() => this.logger.log('fromEvent has been unsubscribed'))
2424
)
2525
.subscribe(clientX => {

libs/until-destroy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"sideEffects": false,
2626
"peerDependencies": {
2727
"@angular/core": ">=10.0.5",
28-
"rxjs": ">=6.4.0"
28+
"rxjs": "^6.4.0 | ^7.0.0"
2929
}
3030
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"minimist": "^1.2.5",
7878
"ng-packagr": "^12.0.0",
7979
"prettier": "^2.3.1",
80-
"rxjs": "^6.5.2",
80+
"rxjs": "^7.3.0",
8181
"serve": "^12.0.0",
8282
"standard-version": "^9.0.0",
8383
"start-server-and-test": "^1.12.0",
@@ -102,6 +102,7 @@
102102
"tabWidth": 2,
103103
"printWidth": 95,
104104
"endOfLine": "lf",
105-
"singleQuote": true
105+
"singleQuote": true,
106+
"arrowParens": "avoid"
106107
}
107108
}

yarn.lock

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10402,13 +10402,20 @@ [email protected]:
1040210402
resolved "https://registry.yarnpkg.com/rxjs-for-await/-/rxjs-for-await-0.0.2.tgz#26598a1d6167147cc192172970e7eed4e620384b"
1040310403
integrity sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw==
1040410404

10405-
[email protected], rxjs@^6.5.0, rxjs@^6.5.2, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@^6.6.3, rxjs@^6.6.6, rxjs@^6.6.7:
10405+
[email protected], rxjs@^6.5.0, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@^6.6.3, rxjs@^6.6.6, rxjs@^6.6.7:
1040610406
version "6.6.7"
1040710407
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
1040810408
integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==
1040910409
dependencies:
1041010410
tslib "^1.9.0"
1041110411

10412+
rxjs@^7.3.0:
10413+
version "7.3.0"
10414+
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6"
10415+
integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw==
10416+
dependencies:
10417+
tslib "~2.1.0"
10418+
1041210419
[email protected], safe-buffer@~5.1.0, safe-buffer@~5.1.1:
1041310420
version "5.1.2"
1041410421
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
@@ -11615,6 +11622,11 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0:
1161511622
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
1161611623
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
1161711624

11625+
tslib@~2.1.0:
11626+
version "2.1.0"
11627+
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
11628+
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
11629+
1161811630
tsutils@^3.17.1, tsutils@^3.21.0:
1161911631
version "3.21.0"
1162011632
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"

0 commit comments

Comments
 (0)