Skip to content

Commit c34cad4

Browse files
committed
support rxjs 7
1 parent e399adf commit c34cad4

File tree

5 files changed

+1379
-1847
lines changed

5 files changed

+1379
-1847
lines changed

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
- 2021/07/19 - 9.0.0
4+
- Support rxjs 7
35
- 2020/03/20 - 8.0.1
46
- Ensure `close` is called even when the `open` event is not received.
57
- 2019/09/22 - 8.0.0

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rxjs-websockets",
3-
"version": "8.0.1",
4-
"description": "rxjs 6 websockets library",
3+
"version": "9.0.0",
4+
"description": "rxjs 7 websockets library",
55
"author": "insidewhy <[email protected]>",
66
"license": "ISC",
77
"repository": {
@@ -42,21 +42,21 @@
4242
"jest-watch": "yarn jest --watch"
4343
},
4444
"peerDependencies": {
45-
"rxjs": "^6.1.0"
45+
"rxjs": "^7.0.0"
4646
},
4747
"devDependencies": {
48-
"@types/jest": "25.2.1",
49-
"@typescript-eslint/eslint-plugin": "2.34.0",
50-
"@typescript-eslint/parser": "2.34.0",
51-
"concurrently": "5.1.0",
52-
"eslint": "6.8.0",
53-
"eslint-config-prettier": "6.12.0",
54-
"husky": "4.2.5",
55-
"jest": "27.0.4",
56-
"prettier": "2.0.4",
57-
"pretty-quick": "3.0.2",
48+
"@types/jest": "26.0.24",
49+
"@typescript-eslint/eslint-plugin": "4.28.3",
50+
"@typescript-eslint/parser": "4.28.3",
51+
"concurrently": "6.2.0",
52+
"eslint": "7.31.0",
53+
"eslint-config-prettier": "8.3.0",
54+
"husky": "7.0.1",
55+
"jest": "27.0.6",
56+
"prettier": "2.3.2",
57+
"pretty-quick": "3.1.1",
5858
"rimraf": "3.0.2",
59-
"rxjs": "6.6.3",
60-
"typescript": "4.0.3"
59+
"rxjs": "^7.2.0",
60+
"typescript": "4.3.5"
6161
}
6262
}

readme.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ npm install -S rxjs-websockets
2424
yarn add rxjs-websockets
2525
```
2626

27+
For rxjs 6 support, rxjs-websockets 8 is needed.
28+
29+
```bash
30+
npm install -S rxjs-websockets@8
31+
# or
32+
yarn add rxjs-websockets@8
33+
```
34+
2735
## Changelog
2836

2937
[Changelog here](changelog.md)
@@ -155,10 +163,11 @@ function makeJsonWebSocketObservable(
155163
): Observable<unknown> {
156164
const socket$ = makeWebSocketObservable<string>(url, options)
157165
return socket$.pipe(
158-
map((getResponses: GetWebSocketReponses<string>) => (input$: Observable<object>) =>
159-
getResponses(input$.pipe(map((request) => JSON.stringify(request)))).pipe(
160-
map((response) => JSON.parse(response)),
161-
),
166+
map(
167+
(getResponses: GetWebSocketReponses<string>) => (input$: Observable<object>) =>
168+
getResponses(input$.pipe(map((request) => JSON.stringify(request)))).pipe(
169+
map((response) => JSON.parse(response)),
170+
),
162171
),
163172
)
164173
}

src/index.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { TestScheduler } from 'rxjs/testing'
2-
import { of } from 'rxjs'
2+
import { of, throwError } from 'rxjs'
33
import { delay, catchError, switchMap } from 'rxjs/operators'
4-
import { throwError } from 'rxjs/internal/observable/throwError'
54

65
import connect, { normalClosureMessage, WebSocketLike } from '.'
76

0 commit comments

Comments
 (0)