Skip to content

Commit

Permalink
release(version): v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
akanass committed Sep 15, 2021
1 parent 979b2b3 commit b0e09b1
Show file tree
Hide file tree
Showing 12 changed files with 2,615 additions and 5,709 deletions.
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)
====

**Copyright (c) 2019 [Nicolas Jessel](https://github.com/njl07)**
**Copyright (c) 2021 [Nicolas Jessel](https://github.com/akanass)**

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -15,7 +15,7 @@ all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ commonjs:
@node ./node_modules/.bin/tsc -p ./tsconfig.build.json
esm2015:
@node ./node_modules/.bin/tsc -p ./tsconfig.build.esm2015.json
esm5:
@node ./node_modules/.bin/tsc -p ./tsconfig.build.esm5.json
clean:
@node ./node_modules/.bin/rimraf ./dist
packaging:
@node ./node_modules/.bin/ts-node ./tools/packaging.ts
browserify:
@node ./node_modules/.bin/ts-node ./tools/init-browser-dir.ts && ./node_modules/.bin/browserify --debug -e ./dist/esm5/index.js -s rsc | ./node_modules/.bin/exorcist ./dist/browser/index.js.map > ./dist/browser/index.js

.PHONY: pretest test coveralls commonjs esm2015 esm5 clean packaging browserify
.PHONY: pretest test coveralls commonjs esm2015 clean packaging
50 changes: 4 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
# Rx-Socket-Client

<div style="overflow:hidden;margin-bottom:20px;">
<div style="float:left;line-height:60px">
<a href="https://travis-ci.org/akanass/rx-socket-client.svg?branch=master">
<img src="https://travis-ci.org/akanass/rx-socket-client.svg?branch=master" alt="build" />
</a>
<a href="https://coveralls.io/github/akanass/rx-socket-client?branch=master">
<img src="https://coveralls.io/repos/github/akanass/rx-socket-client/badge.svg?branch=master" alt="coveralls" />
</a>
<a href="https://david-dm.org/akanass/rx-socket-client">
<img src="https://david-dm.org/akanass/rx-socket-client.svg" alt="dependencies" />
</a>
<a href="https://david-dm.org/akanass/rx-socket-client?type=dev">
<img src="https://david-dm.org/akanass/rx-socket-client/dev-status.svg" alt="devDependencies" />
</a>
</div>
<div style="float:right;">
<a href="https://www.typescriptlang.org/docs/tutorial.html">
<img src="https://cdn-images-1.medium.com/max/800/1*8lKzkDJVWuVbqumysxMRYw.png"
align="right" alt="Typescript logo" width="50" height="50" style="border:none;" />
</a>
<a href="http://reactivex.io/rxjs">
<img src="http://reactivex.io/assets/Rx_Logo_S.png"
align="right" alt="ReactiveX logo" width="50" height="50" style="border:none;" />
</a>
</div>
</div>

Reconnectable websocket client, [RxJS](http://reactivex.io/rxjs) compliant, wrote in full [Typescript](https://www.typescriptlang.org/docs/tutorial.html) | [ES6](https://babeljs.io/docs/learn-es2015/) for client and browser side.

This library is an **enhancement** of [RxJS WebSocketSubject](https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/dom/WebSocketSubject.ts) to add more features and the native support of **Node.js** environment.
Expand All @@ -36,7 +9,6 @@ This library is an **enhancement** of [RxJS WebSocketSubject](https://github.com

* [Installation](#installation)
* [Super simple to use](#super-simple-to-use)
* [Browser compatibility](#browser-compatibility)
* [API in Detail](#api-in-detail)
* [webSocket(urlConfigOrSource)](#websocketurlconfigorsource)
* [.connectionStatus$](#connectionstatus$)
Expand Down Expand Up @@ -96,24 +68,6 @@ socket$.on('event', data => console.log(data)); // will display received data in
socket$.on$('event').subscribe(data => console.log(data)); // will display received data in console if event is fired
```

## Browser compatibility

**Rx-Socket-Client** can be used in your favorite browser to have all features in your own front application.

Just import `browser/index.js` script and enjoy:

```javascript
<script src="node_modules/@akanass/rx-socket-client/browser/index.js" type="application/javascript"></script>
<script type="application/javascript">
const socket$ = rsc.webSocket('ws://127.0.0.1:1235');

// send message
socket$.send('my message from socket');
</script>
```

Browser version is a **standalone** version so you just need to `copy/paste` file from `node_modules/@akanass/rx-socket-client/browser/index.js` when you want to create your bundle and change path to it.

[Back to top](#table-of-contents)

## API in Detail
Expand Down Expand Up @@ -342,6 +296,10 @@ To set up your development environment:

## Change History

* v2.0.0 (2021-09-15)
* Upgrade all packages' versions to move on `rxjs:7.3.0` and delete incompatible packages
* Delete browser single version due to incompatibility
* Documentation
* v1.2.0 (2019-07-18)
* Upgrade all packages' versions
* Migrate tests to [jest](https://jestjs.io/en/) and [ts-jest](https://kulshekhar.github.io/ts-jest/)
Expand Down
File renamed without changes.
151 changes: 70 additions & 81 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,72 @@
{
"name": "@akanass/rx-socket-client",
"version": "1.2.0",
"description": "Reconnectable websocket client with RxJS Subject",
"main": "commonjs/index.js",
"module": "esm5/index.js",
"es2015": "esm2015/index.js",
"types": "index.d.ts",
"private": false,
"scripts": {
"pretest": "make clean && make pretest",
"test": "make test",
"coveralls": "make coveralls",
"clean": "make clean",
"packaging": "make packaging",
"browserify": "make browserify",
"prebuild": "make clean && make pretest && make test",
"build": "make commonjs && make esm2015 && make esm5",
"postbuild": "make packaging && make browserify"
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]:akanass/rx-socket-client.git"
},
"keywords": [
"RxJS",
"Rx",
"ReactiveX",
"Observable",
"Observer",
"Subject",
"Socket",
"WebSocket",
"Streams",
"Async",
"ES2015",
"ES2016",
"ES2017",
"ES6",
"ES7",
"ES8",
"Typescript",
"Browser"
],
"contributors": [
{
"name": "Nicolas Jessel",
"url": "https://github.com/akanass"
}
],
"license": "SEE LICENSE IN https://github.com/akanass/rx-socket-client/blob/master/LICENSE.md",
"bugs": {
"url": "https://github.com/akanass/rx-socket-client/issues"
},
"homepage": "https://github.com/akanass/rx-socket-client#readme",
"dependencies": {
"@types/node": "^12.6.8",
"websocket": "^1.0.29"
},
"devDependencies": {
"@hapiness/core": "^1.6.0",
"@types/fs-extra": "^8.0.0",
"@types/jest": "^24.0.15",
"browserify": "^16.3.0",
"coveralls": "^3.0.5",
"exorcist": "^1.0.1",
"fs-extra": "^8.1.0",
"jest": "^24.8.0",
"rimraf": "^2.6.3",
"rxjs": "^6.5.2",
"rxjs-compat": "^6.5.2",
"ts-jest": "^24.0.2",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"typescript": "^3.5.3"
},
"peerDependencies": {
"rxjs": "^6.5.2"
},
"engines": {
"node": ">=7.0.0"
}
"name": "@akanass/rx-socket-client",
"version": "2.0.0",
"description": "Reconnectable websocket client with RxJS Subject",
"main": "commonjs/index.js",
"module": "esm2015/index.js",
"types": "index.d.ts",
"private": false,
"scripts": {
"pretest": "make clean && make pretest",
"test": "make test",
"coveralls": "make coveralls",
"clean": "make clean",
"packaging": "make packaging",
"prebuild": "make clean",
"build": "make commonjs && make esm2015",
"postbuild": "make packaging"
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]:akanass/rx-socket-client.git"
},
"keywords": [
"RxJS",
"Rx",
"ReactiveX",
"Observable",
"Observer",
"Subject",
"Socket",
"WebSocket",
"Streams",
"Async",
"ES2015",
"ES2016",
"ES2017",
"ES6",
"ES7",
"ES8",
"Typescript",
"Browser"
],
"author": "Nicolas Jessel <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/akanass/rx-socket-client/issues"
},
"homepage": "https://github.com/akanass/rx-socket-client#readme",
"dependencies": {
"@types/node": "^16.9.1",
"websocket": "^1.0.34"
},
"devDependencies": {
"@types/fs-extra": "^9.0.12",
"@types/jest": "^27.0.1",
"coveralls": "^3.1.1",
"fs-extra": "^10.0.0",
"jest": "^27.2.0",
"rimraf": "^3.0.2",
"rxjs": "^7.3.0",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"tslint": "^6.1.3",
"typescript": "^4.4.3"
},
"peerDependencies": {
"rxjs": "^7.3.0"
},
"engines": {
"node": ">=7.0.0"
}
}
Loading

0 comments on commit b0e09b1

Please sign in to comment.