Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c39bcbb
Convert subscription constructors to use named arguments.
timoxley Aug 7, 2020
19d96f7
Skip decryption integration tests.
timoxley Aug 10, 2020
a73cd6e
Install streamr-client-protocol@5.0.0-beta.16.
timoxley Aug 6, 2020
e812c0c
Update contentType->messageType references.
timoxley Aug 6, 2020
45713f9
Don't mutate options when validating subscribe options.
timoxley Aug 6, 2020
5c9a799
Remove all groupkey/encryption handling in preparation for readding i…
timoxley Aug 10, 2020
8ace256
Move some methods around.
timoxley Aug 11, 2020
9b6a0ea
Refactor publishing logic into src/Publisher.
timoxley Aug 11, 2020
9ead36b
Tidy tests and code for src/Publisher.
timoxley Aug 12, 2020
ca746ce
Remove unnecessary line from AbstractSubscription.
timoxley Aug 12, 2020
f3b5cf1
Refactor resends logic into src/Resender.
timoxley Aug 12, 2020
48089b6
Refactor Subscribe logic into src/Subscriber.
timoxley Aug 12, 2020
4fc1767
Flatten some logic, disable eslint errors for _private access across …
timoxley Aug 12, 2020
ce4e35a
Refactor event handlers into methods.
timoxley Aug 12, 2020
316e4ae
Mildly reorganise StreamrClient constructor.
timoxley Aug 12, 2020
197232e
Linting.
timoxley Aug 12, 2020
42afbf9
Update references from protocol MESSAGE_TYPES to CONTENT_TYPES.
timoxley Sep 8, 2020
7b2f3b7
Update messageType to contentType & more references from protocol MES…
timoxley Sep 8, 2020
8e76994
Fix MESSAGE_TYPES in Connection test.
timoxley Sep 12, 2020
6c28bd6
Prevent flakey dataunion server tests from failing build.
timoxley Sep 14, 2020
bf63496
Fix up flakey test.
timoxley Sep 14, 2020
d068247
Temporarily force-exit tests, this can be removed in next PR that cle…
timoxley Sep 15, 2020
876d2fa
Disable max-classes-per-file eslint rule.
timoxley Aug 19, 2020
fe5ccef
Add SocketConnection class.
timoxley Aug 19, 2020
ea7e3a9
Improve reopening & failure handling.
timoxley Aug 19, 2020
2943ec7
Split reopening logic into SocketConnection subclass.
timoxley Aug 21, 2020
d679bd0
Refactor open/close logic, move no url error to open call to be consi…
timoxley Aug 21, 2020
c2637c8
Convert event handler exceptions to error events. Tidy code coverage.
timoxley Aug 21, 2020
1d62e4e
Simplify SocketConnection.
timoxley Aug 22, 2020
41faba6
Tidy up Connection, s/open/connect.
timoxley Aug 23, 2020
ce60a54
Tune reconnection, finish s/open/connect.
timoxley Aug 24, 2020
369fc69
Move autoconnect logic into connection.
timoxley Aug 25, 2020
e71c566
Isolate open/close functions. Tighten reconnect.
timoxley Sep 1, 2020
0daabdd
Integrate SocketConnection API, pass unit/StreamrClient.test.js.
timoxley Sep 2, 2020
6379344
Remove old Connection.
timoxley Sep 2, 2020
1483c00
Test connect/disconnect in event handlers.
timoxley Sep 3, 2020
79d2d47
Add tests around nextConnection.
timoxley Sep 3, 2020
a24c253
Disable autoConnect if manually disconnected.
timoxley Sep 3, 2020
b74f4c7
Local tests passing for refactored connection integration.
timoxley Sep 8, 2020
e0b6523
Lint, tidy up.
timoxley Sep 8, 2020
f44c0cd
Update messageType to contentType & more references from protocol MES…
timoxley Sep 8, 2020
fd9bc32
Increase Connection test timeout.
timoxley Sep 8, 2020
5902432
Fix browser tests.
timoxley Sep 8, 2020
2bfd3f8
Move Connection into src.
timoxley Sep 10, 2020
6c8220a
Tidy up debug logging.
timoxley Sep 12, 2020
99fea89
Remove unused from Connection.
timoxley Sep 14, 2020
ddabc0b
Tune subscriber logging.
timoxley Sep 15, 2020
2460110
Fix default retry options when options object gets rewritten e.g. in …
timoxley Sep 15, 2020
c978f5f
Fail resend request if error sending.
timoxley Sep 15, 2020
9105acb
Adjust connection error handling to be more consistent about emit/throw.
timoxley Sep 15, 2020
d6f829a
Remove client.handleError, make emit/throw & ignoring of Connection e…
timoxley Sep 15, 2020
2009c5b
Don't throw, only emit errors for unchained async tasks.
timoxley Sep 15, 2020
dc49a36
Disable logging in long resend test.
timoxley Sep 15, 2020
abea2d3
Clean up unused imports.
timoxley Sep 15, 2020
49921e8
Install streamr-client-protocol@5.1.0
timoxley Sep 18, 2020
05064cc
3. Promisify subscribe/unsubscribe methods (#162)
timoxley Nov 24, 2020
4c4e534
Merge pull request #160 from streamr-dev/refactor-connection
timoxley Jan 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
}
],
'prefer-destructuring': 'warn',

'max-classes-per-file': 'off', // javascript is not java
// TODO check all errors/warnings and create separate PR
'promise/always-return': 'warn',
'promise/catch-or-return': 'warn',
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ jobs:
- name: test-integration
run: npm run test-integration

- name: test-flakey
run: npm run test-flakey || echo "::warning::Flakey Tests Failed" && true

streamr-client-testing-tool:
needs: [test, lint]
runs-on: ubuntu-latest
Expand Down
141 changes: 119 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"test": "jest --detectOpenHandles",
"test-unit": "jest test/unit --detectOpenHandles",
"coverage": "jest --coverage",
"test-integration": "jest test/integration",
"test-integration": "jest --forceExit test/integration",
"test-flakey": "jest --forceExit test/flakey",
"test-browser": "node ./test/browser/server.js & node node_modules/nightwatch/bin/nightwatch ./test/browser/browser.js && pkill -f server.js",
"install-example": "cd examples/webpack && npm ci",
"build-example": "cd examples/webpack && npm run build-with-parent"
Expand Down Expand Up @@ -69,14 +70,17 @@
"ethers": "^5.0.12",
"eventemitter3": "^4.0.7",
"lodash.uniqueid": "^4.0.1",
"mem": "^6.1.1",
"node-fetch": "^2.6.1",
"node-webcrypto-ossl": "^2.1.1",
"once": "^1.4.0",
"p-limit": "^3.0.2",
"p-memoize": "^4.0.0",
"promise-memoize": "^1.2.1",
"qs": "^6.9.4",
"quick-lru": "^5.1.1",
"randomstring": "^1.1.5",
"receptacle": "^1.3.2",
"streamr-client-protocol": "^5.0.0",
"streamr-client-protocol": "^5.1.0",
"uuid": "^8.3.0",
"webpack-node-externals": "^2.5.2",
"ws": "^7.3.1"
Expand Down
Loading