From 55c8fc8aba5dfb5ff3c66a11946f85ec631b1d41 Mon Sep 17 00:00:00 2001 From: enisdenjo Date: Thu, 10 Dec 2020 14:17:06 +0100 Subject: [PATCH 1/6] perf(client): Await timeouts only in recursive connects --- src/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 72e06c25..95bd37b1 100644 --- a/src/client.ts +++ b/src/client.ts @@ -288,7 +288,9 @@ export function createClient(options: ClientOptions): Client { } // if recursive call, wait a bit for socket change - await new Promise((resolve) => setTimeout(resolve, callDepth * 50)); + if (callDepth) { + await new Promise((resolve) => setTimeout(resolve, callDepth * 50)); + } // socket already exists. can be ready or pending, check and behave accordingly if (state.socket) { From d66cf3a47599a461e80fa7b62d78a85b939cced8 Mon Sep 17 00:00:00 2001 From: enisdenjo Date: Thu, 10 Dec 2020 14:32:06 +0100 Subject: [PATCH 2/6] chore(deps): update --- package.json | 20 +-- yarn.lock | 497 ++++++++++++++++++++++++--------------------------- 2 files changed, 241 insertions(+), 276 deletions(-) diff --git a/package.json b/package.json index f03593a3..4c377d83 100644 --- a/package.json +++ b/package.json @@ -51,33 +51,33 @@ "graphql": ">=0.11 <=15" }, "devDependencies": { - "@babel/core": "^7.12.9", + "@babel/core": "^7.12.10", "@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", "@babel/plugin-proposal-object-rest-spread": "^7.12.1", "@babel/plugin-proposal-optional-chaining": "^7.12.7", - "@babel/preset-env": "^7.12.7", + "@babel/preset-env": "^7.12.10", "@babel/preset-typescript": "^7.12.7", "@rollup/plugin-typescript": "^8.0.0", "@semantic-release/changelog": "^5.0.1", "@semantic-release/git": "^9.0.0", - "@types/jest": "^26.0.16", + "@types/jest": "^26.0.18", "@types/ws": "^7.4.0", - "@typescript-eslint/eslint-plugin": "^4.9.0", - "@typescript-eslint/parser": "^4.9.0", + "@typescript-eslint/eslint-plugin": "^4.9.1", + "@typescript-eslint/parser": "^4.9.1", "babel-jest": "^26.6.3", - "eslint": "^7.14.0", - "eslint-config-prettier": "^6.15.0", + "eslint": "^7.15.0", + "eslint-config-prettier": "^7.0.0", "eslint-plugin-prettier": "^3.2.0", "graphql": "^15.4.0", "jest": "^26.6.3", "prettier": "^2.2.1", - "rollup": "^2.34.1", + "rollup": "^2.34.2", "rollup-plugin-terser": "^7.0.2", "semantic-release": "^17.3.0", "typedoc": "^0.19.2", - "typedoc-plugin-markdown": "^3.0.11", + "typedoc-plugin-markdown": "^3.1.0", "typescript": "^4.1.2", - "ws": "^7.4.0" + "ws": "^7.4.1" } } diff --git a/yarn.lock b/yarn.lock index a6759cc3..5ebd9ecd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,47 +21,46 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.9, @babel/core@npm:^7.7.5": - version: 7.12.9 - resolution: "@babel/core@npm:7.12.9" +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.7.5": + version: 7.12.10 + resolution: "@babel/core@npm:7.12.10" dependencies: "@babel/code-frame": ^7.10.4 - "@babel/generator": ^7.12.5 + "@babel/generator": ^7.12.10 "@babel/helper-module-transforms": ^7.12.1 "@babel/helpers": ^7.12.5 - "@babel/parser": ^7.12.7 + "@babel/parser": ^7.12.10 "@babel/template": ^7.12.7 - "@babel/traverse": ^7.12.9 - "@babel/types": ^7.12.7 + "@babel/traverse": ^7.12.10 + "@babel/types": ^7.12.10 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.1 json5: ^2.1.2 lodash: ^4.17.19 - resolve: ^1.3.2 semver: ^5.4.1 source-map: ^0.5.0 - checksum: beefb9f490cfff7cafc02e5a11148297a71260ee18f5fdf6e14bf5694bc28431eec3813a91d0f0fc8c6122c5133d90d3261dadf45cb914d7d340a5b3077fd9bd + checksum: 4d7b892764009b80ac36b193ee37dd27a04244113dfa7510a937e81999e4b0f8ad3237f809792975abab5e07b44a7f7c36bb21e6f9957cdf54cd91cbf149c411 languageName: node linkType: hard -"@babel/generator@npm:^7.12.5": - version: 7.12.5 - resolution: "@babel/generator@npm:7.12.5" +"@babel/generator@npm:^7.12.10": + version: 7.12.10 + resolution: "@babel/generator@npm:7.12.10" dependencies: - "@babel/types": ^7.12.5 + "@babel/types": ^7.12.10 jsesc: ^2.5.1 source-map: ^0.5.0 - checksum: 7706cb3d29060e6dfcdbc982ded9a02f0bda36329cc35aabc6b3f9f30ef7b3b3bcaba51c24714663f3ea9529994cd3461ab8a664b26398208b9b9a96476bf43c + checksum: ddd59efc33e328c6b2c042d14d86b6d8e391bf6512195cce62361bfaf1b74ed15f98b69223b9bc33ac4b1e33557c31675bcc1fb8255de640f1506c7a6e88be2a languageName: node linkType: hard "@babel/helper-annotate-as-pure@npm:^7.10.4": - version: 7.10.4 - resolution: "@babel/helper-annotate-as-pure@npm:7.10.4" + version: 7.12.10 + resolution: "@babel/helper-annotate-as-pure@npm:7.12.10" dependencies: - "@babel/types": ^7.10.4 - checksum: 535cdf631e1e6c0bfd6820d2509c69373e2f48148505ddc2325ce8fe85302dc5681d6f6fd41261cacc458a0431edeff7c6115056144b80b02c10e111d2941c36 + "@babel/types": ^7.12.10 + checksum: d237f38b6a57704dc2a4b98d41cd1744ca12a3ee66b085c348c1ce0d93320f004510c69ab600f9ed1bd7b3737e21d39196cd7c5eb51bc07806699e98319bcbbf languageName: node linkType: hard @@ -148,11 +147,11 @@ __metadata: linkType: hard "@babel/helper-get-function-arity@npm:^7.10.4": - version: 7.10.4 - resolution: "@babel/helper-get-function-arity@npm:7.10.4" + version: 7.12.10 + resolution: "@babel/helper-get-function-arity@npm:7.12.10" dependencies: - "@babel/types": ^7.10.4 - checksum: 4f0ddd43405e5a43c0638ddeb9fd6fc562ce8f338983ae603d4824ce4b586c2ca2fbc0ca93864357ba3a28f699029653749c6b49ec8576cb512ab0f404500999 + "@babel/types": ^7.12.10 + checksum: 5c645ed43c320e207bdc46006f5ffc05a090e6ef639a84be324e6acba311b4e2d5213305137142bd1fb17d957d8b528e0b34362da6d9e2504a6496af17954090 languageName: node linkType: hard @@ -201,11 +200,11 @@ __metadata: linkType: hard "@babel/helper-optimise-call-expression@npm:^7.10.4": - version: 7.12.7 - resolution: "@babel/helper-optimise-call-expression@npm:7.12.7" + version: 7.12.10 + resolution: "@babel/helper-optimise-call-expression@npm:7.12.10" dependencies: - "@babel/types": ^7.12.7 - checksum: 105a32f5603b872d51e237cd2d3e25191369685f2054d5af0b77a1a6fea6bd4bc00a891ca029f5a3aec80f14855e61a624744c13223ce53ec1a433b218834a24 + "@babel/types": ^7.12.10 + checksum: e96f37e943016688993f31736c92010a78db7c46dd8cf5aa67e50f8244e91172589555670bcebc3c0e715d6738cac3d70e9dff25f03982488a142e2f60e0c44b languageName: node linkType: hard @@ -314,12 +313,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.7": - version: 7.12.7 - resolution: "@babel/parser@npm:7.12.7" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.10, @babel/parser@npm:^7.12.7": + version: 7.12.10 + resolution: "@babel/parser@npm:7.12.10" bin: parser: ./bin/babel-parser.js - checksum: 12daf20ffe364116f94a50411d02e42144439b66f9948f2e84950ac943e75cfb1f61dbc14f01c9c037f112e3deefd2f9779b6a213fb9c9b6a506066c6527a665 + checksum: b21b51c2c5b6da559b70337a9fa0cf77da52f9ba70755bed5e41d04fa4b7d043a51a58ff6c0cb110ff80f5e204310afec0596dd8f841542ac3c41d6a1cf0bd0d languageName: node linkType: hard @@ -990,14 +989,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.12.1": - version: 7.12.1 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.12.1" +"@babel/plugin-transform-typeof-symbol@npm:^7.12.10": + version: 7.12.10 + resolution: "@babel/plugin-transform-typeof-symbol@npm:7.12.10" dependencies: "@babel/helper-plugin-utils": ^7.10.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 73bb34cb448ae2e953b36c8d0283c73b7979577ca470fccae036a0b7b2a8e9b266a377878495f9a5dea1b42b5b33f6f234dc08675600f1ae5e557e73f64bdc48 + checksum: 74f29d897134b513c7e62a61258a32088ba26cbe6431c41f8f52318dc223b1f2626f229eb91550074c0d40157bdf47376a6ffed918b32b9b7f323a4aa7c19ad0 languageName: node linkType: hard @@ -1037,9 +1036,9 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.12.7": - version: 7.12.7 - resolution: "@babel/preset-env@npm:7.12.7" +"@babel/preset-env@npm:^7.12.10": + version: 7.12.10 + resolution: "@babel/preset-env@npm:7.12.10" dependencies: "@babel/compat-data": ^7.12.7 "@babel/helper-compilation-targets": ^7.12.5 @@ -1100,16 +1099,16 @@ __metadata: "@babel/plugin-transform-spread": ^7.12.1 "@babel/plugin-transform-sticky-regex": ^7.12.7 "@babel/plugin-transform-template-literals": ^7.12.1 - "@babel/plugin-transform-typeof-symbol": ^7.12.1 + "@babel/plugin-transform-typeof-symbol": ^7.12.10 "@babel/plugin-transform-unicode-escapes": ^7.12.1 "@babel/plugin-transform-unicode-regex": ^7.12.1 "@babel/preset-modules": ^0.1.3 - "@babel/types": ^7.12.7 - core-js-compat: ^3.7.0 + "@babel/types": ^7.12.10 + core-js-compat: ^3.8.0 semver: ^5.5.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 46113b6b4e3997bacaac09cc77ce5a0d01b1f8a8b31eaca03ecaae372815baf5bc77e021e2be4e56314a328122b8792f784ff06e6ee1b2cc8dd560886a0931e7 + checksum: 1fe64a0943dac09eb0f19cdea8af8a9906e2ae65cacef3ad33847a012392b92d51c3152697da906e8397a3a1b9fa773bd28c05e54091078099d0193abf8d7d66 languageName: node linkType: hard @@ -1161,31 +1160,31 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.10.4, @babel/traverse@npm:^7.12.1, @babel/traverse@npm:^7.12.5, @babel/traverse@npm:^7.12.9": - version: 7.12.9 - resolution: "@babel/traverse@npm:7.12.9" +"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.10.4, @babel/traverse@npm:^7.12.1, @babel/traverse@npm:^7.12.10, @babel/traverse@npm:^7.12.5": + version: 7.12.10 + resolution: "@babel/traverse@npm:7.12.10" dependencies: "@babel/code-frame": ^7.10.4 - "@babel/generator": ^7.12.5 + "@babel/generator": ^7.12.10 "@babel/helper-function-name": ^7.10.4 "@babel/helper-split-export-declaration": ^7.11.0 - "@babel/parser": ^7.12.7 - "@babel/types": ^7.12.7 + "@babel/parser": ^7.12.10 + "@babel/types": ^7.12.10 debug: ^4.1.0 globals: ^11.1.0 lodash: ^4.17.19 - checksum: 6797d3f42d3d27ba596c864c76b81a234a6df3c3079bf03207bdef56bff866e001135a271b114d9869ab78984f4408cb7252940ca0986ca40f2281b1626a5391 + checksum: 63e8500aed71da6fba8058751298c3bc1b54628585fb27047cbf2c0ed66df03f19e6b0fa9a8809bbb5131c27464b4ce950753479ef4333759fe5a400ae954956 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.10.4, @babel/types@npm:^7.10.5, @babel/types@npm:^7.11.0, @babel/types@npm:^7.12.1, @babel/types@npm:^7.12.5, @babel/types@npm:^7.12.7, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.12.7 - resolution: "@babel/types@npm:7.12.7" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.10.4, @babel/types@npm:^7.10.5, @babel/types@npm:^7.11.0, @babel/types@npm:^7.12.1, @babel/types@npm:^7.12.10, @babel/types@npm:^7.12.5, @babel/types@npm:^7.12.7, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.12.10 + resolution: "@babel/types@npm:7.12.10" dependencies: "@babel/helper-validator-identifier": ^7.10.4 lodash: ^4.17.19 to-fast-properties: ^2.0.0 - checksum: 153635079722927a7ac35ae6c10d091e9f86fcf8411c56a2bff17befc20f53b3c1883f67f33b59d8896d65f4aed7e9aa535d24262838d0a8250f2e2ef0d9327f + checksum: 4f791b6788397d38eba9d4ee7e019e2f88ab337ae331da69d6f4d5d5b26d40c25a47a92f2b0c2025cf856455728fa9d9a79bb046f6f998c491375453822ae2ea languageName: node linkType: hard @@ -1208,9 +1207,9 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^0.2.1": - version: 0.2.1 - resolution: "@eslint/eslintrc@npm:0.2.1" +"@eslint/eslintrc@npm:^0.2.2": + version: 0.2.2 + resolution: "@eslint/eslintrc@npm:0.2.2" dependencies: ajv: ^6.12.4 debug: ^4.1.1 @@ -1222,7 +1221,7 @@ __metadata: lodash: ^4.17.19 minimatch: ^3.0.4 strip-json-comments: ^3.1.1 - checksum: 99310cddf0f1abb2de4b5278293db6e2639445aab4e525f3c5f5b3b8ad53a59d6003a306954fb7ad15edd2f8a02b658d43418fa8b52ae2d07e074b24d991de2a + checksum: 049c98898934100aa5ad4912242ecbec136454787c00776a236e5321c73176dbc813917445a3d50d230a5a84531a99ec0e2885dd7a6838be68b46b6720fa1459 languageName: node linkType: hard @@ -1489,8 +1488,8 @@ __metadata: linkType: hard "@octokit/core@npm:^3.2.3": - version: 3.2.3 - resolution: "@octokit/core@npm:3.2.3" + version: 3.2.4 + resolution: "@octokit/core@npm:3.2.4" dependencies: "@octokit/auth-token": ^2.4.4 "@octokit/graphql": ^4.5.8 @@ -1498,7 +1497,7 @@ __metadata: "@octokit/types": ^6.0.3 before-after-hook: ^2.1.0 universal-user-agent: ^6.0.0 - checksum: d82af359c44c2ed31c97a2c93d4dfa979a242af20741d8aa7c25b0ddd17dc086f121d424dca39fc8c43399619ffe5a573e076aef07a1b891aa938dc5c1ec3e02 + checksum: fb76c14bfdd934daa00f2d015a2d7af41ead2c50fe7359fa8283a140f833a28a6a23d2b3c541dc92d06aa69aea34d4c3d3aeea2eb8628bdaf899b19693f235c9 languageName: node linkType: hard @@ -1524,10 +1523,10 @@ __metadata: languageName: node linkType: hard -"@octokit/openapi-types@npm:^1.2.0": - version: 1.2.2 - resolution: "@octokit/openapi-types@npm:1.2.2" - checksum: 8f36c71dc942bbab3e0170bd4cc6b55b64edfa93cb84b60dc0ffbc3dc396cb57d78432e7efe2170cd8b12cae3edf6888104878b5243b64395b98c3cd3516c349 +"@octokit/openapi-types@npm:^2.0.0": + version: 2.0.0 + resolution: "@octokit/openapi-types@npm:2.0.0" + checksum: 5dba467708d45cd43979da80c9229d9b102368ef2cd68d546811bc61f3fc84bf412fb8b619ab776fc60db33b5e4997047128e7b0676c5a86f22c6d0db4220859 languageName: node linkType: hard @@ -1551,13 +1550,15 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-rest-endpoint-methods@npm:4.3.1": - version: 4.3.1 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:4.3.1" +"@octokit/plugin-rest-endpoint-methods@npm:4.4.1": + version: 4.4.1 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:4.4.1" dependencies: - "@octokit/types": ^6.0.3 + "@octokit/types": ^6.1.0 deprecation: ^2.3.1 - checksum: 0745f132f3ce346c955bb5f8dfcb80fda32e4537d26d4efaa72c4b6dcfab4dca37b13cb9c4713a6b18203b69ded43ac4bfc294aa6564591c5e2be1bf5c5faca0 + peerDependencies: + "@octokit/core": ">=3" + checksum: a19bca83c674aa217cd57063b9b39f140dcc0c55698bf7bae33618098909d32a6ea7cb20729436467e8d0b6b80cc5a98930f984366bd9b05ac1c0eb53b2e13a8 languageName: node linkType: hard @@ -1589,24 +1590,24 @@ __metadata: linkType: hard "@octokit/rest@npm:^18.0.0": - version: 18.0.11 - resolution: "@octokit/rest@npm:18.0.11" + version: 18.0.12 + resolution: "@octokit/rest@npm:18.0.12" dependencies: "@octokit/core": ^3.2.3 "@octokit/plugin-paginate-rest": ^2.6.2 "@octokit/plugin-request-log": ^1.0.2 - "@octokit/plugin-rest-endpoint-methods": 4.3.1 - checksum: 4643e1a72682e66db0ab1b9fa77d93db31245cb81da90378fa3ef0ba1df91a82bf5fffd6fbc000823a8aee652707e62cc6b83b4349670c2b8dbb3637fcbaace8 + "@octokit/plugin-rest-endpoint-methods": 4.4.1 + checksum: 79219bff3e21a216cab5c883ed843e99d9ff1d5b12992e11feb6650a13763c6b1651580e05ce40d1ab52f4c5ae91895081688f39ec7d67979077aeaad401f546 languageName: node linkType: hard -"@octokit/types@npm:^6.0.0, @octokit/types@npm:^6.0.1, @octokit/types@npm:^6.0.3": - version: 6.0.3 - resolution: "@octokit/types@npm:6.0.3" +"@octokit/types@npm:^6.0.0, @octokit/types@npm:^6.0.1, @octokit/types@npm:^6.0.3, @octokit/types@npm:^6.1.0": + version: 6.1.1 + resolution: "@octokit/types@npm:6.1.1" dependencies: - "@octokit/openapi-types": ^1.2.0 + "@octokit/openapi-types": ^2.0.0 "@types/node": ">= 8" - checksum: e78afc0edaec6c6fd25195f8e974534127d7a1bd597ea397db248594da3c86776921ff86d8d998e8efe42405b8286888fb51030c358d2f40b4af0ade859aad50 + checksum: ae2a161040f32f8d2032cd4b6a2ba3d1c1ae12c4383b2e519083e0e6ba65c26b645d563c8ec40371756f35bffe05822a3c6376c4266938ffe5815f1a2bf9c852 languageName: node linkType: hard @@ -1820,11 +1821,11 @@ __metadata: linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.4, @types/babel__traverse@npm:^7.0.6": - version: 7.0.16 - resolution: "@types/babel__traverse@npm:7.0.16" + version: 7.11.0 + resolution: "@types/babel__traverse@npm:7.11.0" dependencies: "@babel/types": ^7.3.0 - checksum: 72b7530a634d8ef742b0c23567971fa2e18d80e703d08a4b588a98ded8ae1007c1f92e72290d32e1a6ff529bfa82635b58b78d99956e7d03cdc336509a44427d + checksum: cfb83f1633aafbd447008caf6d40d188a7318ac64d64beaa469dd6d35f72c8298869a6668f082e1116fecf1425654ed0a3dc7fccdc2e18c803b0a7b44f88bec0 languageName: node linkType: hard @@ -1869,13 +1870,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^26.0.16": - version: 26.0.16 - resolution: "@types/jest@npm:26.0.16" +"@types/jest@npm:^26.0.18": + version: 26.0.18 + resolution: "@types/jest@npm:26.0.18" dependencies: jest-diff: ^26.0.0 pretty-format: ^26.0.0 - checksum: 0c94186cdff943479d9ca169abc412617042eceb5427fc1394d1e23c18a99b61ba502ce4cf9160e8bc400606e9f36cc1cae91f36e329db85c623201efdc1b8f2 + checksum: 942433a3bebfcc88f0d7e9662ef2157826e8018b0c30191f9ca56bc75703652e614c5019d8bc43950abacf304777204e35d968a6e28a35ad98d9f1bdb9442390 languageName: node linkType: hard @@ -1903,9 +1904,9 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:>= 8": - version: 14.14.10 - resolution: "@types/node@npm:14.14.10" - checksum: b793aa15e8c08df50d0f77dc0fe7a93bc2e09bfa5a424841d4dba045d6ae8503b7ffe89b773ffe197c9b637c898bb22e78442e21ff4b33414d35160d9c3f8a9b + version: 14.14.12 + resolution: "@types/node@npm:14.14.12" + checksum: def4a93f6ba9ea5ccbed7b403988b5e888dcde27c9d00f3f487500a26a36e13826e294fabc6d01ce563059d3567f27ea8c458edc39b502e38659c5154667602b languageName: node linkType: hard @@ -1978,12 +1979,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^4.9.0": - version: 4.9.0 - resolution: "@typescript-eslint/eslint-plugin@npm:4.9.0" +"@typescript-eslint/eslint-plugin@npm:^4.9.1": + version: 4.9.1 + resolution: "@typescript-eslint/eslint-plugin@npm:4.9.1" dependencies: - "@typescript-eslint/experimental-utils": 4.9.0 - "@typescript-eslint/scope-manager": 4.9.0 + "@typescript-eslint/experimental-utils": 4.9.1 + "@typescript-eslint/scope-manager": 4.9.1 debug: ^4.1.1 functional-red-black-tree: ^1.0.1 regexpp: ^3.0.0 @@ -1995,66 +1996,66 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 47bb12cc6684fc2db0622f84186f3e45ea2082e92a5fe58dba7dd882c07a23d55251becd5ca6d90c11defdf793b7d48821afe086fdeaa32aff0f875fca18e98d + checksum: 8de2705aaf40252c16e0408e3eee5e04c2048608ab2a3e3a40d65057e7abd185c7fad33b3d586836dd670452ec008edcbb00055a565ce86e6621f3ea71f6ef24 languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:4.9.0": - version: 4.9.0 - resolution: "@typescript-eslint/experimental-utils@npm:4.9.0" +"@typescript-eslint/experimental-utils@npm:4.9.1": + version: 4.9.1 + resolution: "@typescript-eslint/experimental-utils@npm:4.9.1" dependencies: "@types/json-schema": ^7.0.3 - "@typescript-eslint/scope-manager": 4.9.0 - "@typescript-eslint/types": 4.9.0 - "@typescript-eslint/typescript-estree": 4.9.0 + "@typescript-eslint/scope-manager": 4.9.1 + "@typescript-eslint/types": 4.9.1 + "@typescript-eslint/typescript-estree": 4.9.1 eslint-scope: ^5.0.0 eslint-utils: ^2.0.0 peerDependencies: eslint: "*" - checksum: 72e4677e62e183f45aecfde9726d8cd9e4bb469e437d671713472612b90cd56f44d8d99885849262c0cb538d0152e367aff852fa520e7ead9043db07fea4de34 + checksum: fee1f272addbcd453a8f477cd31bb62c6f445b0e7b642e99cb134aa3cfc72a691e51e5aacc5b70cc6f8f18d234f4c8bf1772d3abc683befa0d82f1efd6474cd0 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^4.9.0": - version: 4.9.0 - resolution: "@typescript-eslint/parser@npm:4.9.0" +"@typescript-eslint/parser@npm:^4.9.1": + version: 4.9.1 + resolution: "@typescript-eslint/parser@npm:4.9.1" dependencies: - "@typescript-eslint/scope-manager": 4.9.0 - "@typescript-eslint/types": 4.9.0 - "@typescript-eslint/typescript-estree": 4.9.0 + "@typescript-eslint/scope-manager": 4.9.1 + "@typescript-eslint/types": 4.9.1 + "@typescript-eslint/typescript-estree": 4.9.1 debug: ^4.1.1 peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 6986d818dd4efd387ff2235556d8ccb8a88598241b48231bf5fc02a54c1aa56c6e030c2a1f738bdeb53a97242b25e8621cb5dbcc902100701196a0b55315464b + checksum: 61fc1b3e9bfd5056b46337bbea333eb0b86391232ff63669a4e5c08766e041f2cf05ab769374a1b8fde25728646e5b4441d992476cc66abab2a72289cdabfc5a languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:4.9.0": - version: 4.9.0 - resolution: "@typescript-eslint/scope-manager@npm:4.9.0" +"@typescript-eslint/scope-manager@npm:4.9.1": + version: 4.9.1 + resolution: "@typescript-eslint/scope-manager@npm:4.9.1" dependencies: - "@typescript-eslint/types": 4.9.0 - "@typescript-eslint/visitor-keys": 4.9.0 - checksum: 855d9b3f4a1b110ca849680073d52d4a27e5364e68bc2b5aed25df3abb8c8b78eadbc6e2f893c3d564a0db5c154e1263fd243d6a19ce3c44808c11470cda7160 + "@typescript-eslint/types": 4.9.1 + "@typescript-eslint/visitor-keys": 4.9.1 + checksum: 352c9c2dd8057210376a65aa753e330d3b6ed670a8686905acbd81d118062d4f0a5043b28bedf6340d6e29a386b58c8e9bee7732fca1d21fdab69dea1554b9db languageName: node linkType: hard -"@typescript-eslint/types@npm:4.9.0": - version: 4.9.0 - resolution: "@typescript-eslint/types@npm:4.9.0" - checksum: 86205959cd6b15acde66d5244c6c62daef24a91441935fc5a08bfcfd26dd2281974b6557b956c6d43115e1db614edb61ef32a48ca1cca5d0262d9f021e4341e0 +"@typescript-eslint/types@npm:4.9.1": + version: 4.9.1 + resolution: "@typescript-eslint/types@npm:4.9.1" + checksum: e7c5094ce054e2443c4304b6fa35cae8937ffa04f32b0f32db71738671e0ec94a54f29e820745079067fdafa0061a58846b5cde4390f0a9804d5ca7075e89f76 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:4.9.0": - version: 4.9.0 - resolution: "@typescript-eslint/typescript-estree@npm:4.9.0" +"@typescript-eslint/typescript-estree@npm:4.9.1": + version: 4.9.1 + resolution: "@typescript-eslint/typescript-estree@npm:4.9.1" dependencies: - "@typescript-eslint/types": 4.9.0 - "@typescript-eslint/visitor-keys": 4.9.0 + "@typescript-eslint/types": 4.9.1 + "@typescript-eslint/visitor-keys": 4.9.1 debug: ^4.1.1 globby: ^11.0.1 is-glob: ^4.0.1 @@ -2064,17 +2065,17 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 2a6cab56c79b012b1309c3e1e8a4cd47042a7fe89cc1951cb093665e05607a56a5bb81f6d2f97bd2677f42b4e519234dac4ff5328ac34898b73edb0679b9e255 + checksum: cb5ce82696ac4d7d8ce63a54dd522511d3231193d07be44b2456d9f22890c6cdbb03e531ec889629081d9e4a2c322566424246da02e2d82c80625eb346b91006 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:4.9.0": - version: 4.9.0 - resolution: "@typescript-eslint/visitor-keys@npm:4.9.0" +"@typescript-eslint/visitor-keys@npm:4.9.1": + version: 4.9.1 + resolution: "@typescript-eslint/visitor-keys@npm:4.9.1" dependencies: - "@typescript-eslint/types": 4.9.0 + "@typescript-eslint/types": 4.9.1 eslint-visitor-keys: ^2.0.0 - checksum: 3ec390141d478707ed03a3eb04366c14dcfab3a4f93747a221068c0a69678e217bb99fbbbead28d960624328d09a8a1d2614c38baa6da5ae1ca73ab8369f219f + checksum: 1b059e2ffd0432f588d13160a8f7d64dff30a8727e0c3c5c0235db1be8b13f08544b2eab8374157b8fbc77ad8f58e768ae3c5266d61275f275dc2cda8aad6717 languageName: node linkType: hard @@ -2114,7 +2115,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.2.0": +"acorn-jsx@npm:^5.3.1": version: 5.3.1 resolution: "acorn-jsx@npm:5.3.1" peerDependencies: @@ -2683,18 +2684,18 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.14.5, browserslist@npm:^4.14.7": - version: 4.15.0 - resolution: "browserslist@npm:4.15.0" +"browserslist@npm:^4.14.5, browserslist@npm:^4.15.0": + version: 4.16.0 + resolution: "browserslist@npm:4.16.0" dependencies: - caniuse-lite: ^1.0.30001164 + caniuse-lite: ^1.0.30001165 colorette: ^1.2.1 - electron-to-chromium: ^1.3.612 + electron-to-chromium: ^1.3.621 escalade: ^3.1.1 node-releases: ^1.1.67 bin: browserslist: cli.js - checksum: d8c222ad064cc3911e5cbff6e3feae53e87dc7b1b2ba347ff9b6a5bda76d7d29a230993f56457a4a0b83849d163ae07946bfe0389175998817aaefed428fab68 + checksum: 5385f3dfb1bd1d321093a88c758a5429b55e5f4c76abd91ce865729cfcaa45dc1a54e934e2a8400aca7200f1b9993b1e147bea9fe0fa6704a968b230abd4f277 languageName: node linkType: hard @@ -2831,10 +2832,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001164": - version: 1.0.30001164 - resolution: "caniuse-lite@npm:1.0.30001164" - checksum: ac2213c81b4a406e71795fe13834ea716d4f2c98935631289d6c7c3a421d5984f8535c90bd533c353f07f03d17ad6661b6eed10286a0647cc7f7d7affa79ed54 +"caniuse-lite@npm:^1.0.30001165": + version: 1.0.30001165 + resolution: "caniuse-lite@npm:1.0.30001165" + checksum: f01ea7f22389b403feb86790b4815437b816aeab685a177ab20297aa7f4447c8d9242ed544738003c7a6f03e302f7dde808171ccd0940659fd62c34f53452cbd languageName: node linkType: hard @@ -2873,7 +2874,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.0.0, chalk@npm:^2.0.1, chalk@npm:^2.3.2": +"chalk@npm:^2.0.0, chalk@npm:^2.0.1, chalk@npm:^2.3.2, chalk@npm:^2.4.1": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -2996,11 +2997,12 @@ __metadata: linkType: hard "cli-table@npm:^0.3.1": - version: 0.3.1 - resolution: "cli-table@npm:0.3.1" + version: 0.3.4 + resolution: "cli-table@npm:0.3.4" dependencies: - colors: 1.0.3 - checksum: 887b0cf31b94db7ed71ab27e24a4856951a2642d5df20aa5b807fa9fe76c905132262080231b92be13277e5d5297e9d58e1208e2ecf4635071a36e36b9e4d533 + chalk: ^2.4.1 + string-width: ^4.2.0 + checksum: 812fb01d072ebf86257f106741448a26f32ec7d2453acd1c105093f15359d3afef97571ef9bf02ea382abb4da09ba8555444246bb0fd37eab7ae6b0a4f0acc0b languageName: node linkType: hard @@ -3124,13 +3126,6 @@ __metadata: languageName: node linkType: hard -"colors@npm:1.0.3": - version: 1.0.3 - resolution: "colors@npm:1.0.3" - checksum: d5b1f35612744af0c24b1f80ec3bb8dccfb4a8441a1883d470295ac81ae8aef6f437ae05662595c1e0c98af27e1ad4e90ccd87f1a124cfc2b7953524f55fc951 - languageName: node - linkType: hard - "colors@npm:^1.1.2": version: 1.4.0 resolution: "colors@npm:1.4.0" @@ -3318,13 +3313,13 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.7.0": - version: 3.8.0 - resolution: "core-js-compat@npm:3.8.0" +"core-js-compat@npm:^3.8.0": + version: 3.8.1 + resolution: "core-js-compat@npm:3.8.1" dependencies: - browserslist: ^4.14.7 + browserslist: ^4.15.0 semver: 7.0.0 - checksum: e0278c0e64334bdd5a7e13cc49830585dd194d0d4f84322c9fe3cb30ab7f23396374cf499fe02f8e4817470b51e3b35d533e67045a0f67ed391995f013f17a83 + checksum: 964ad886a9f55399d2f33350d15f4653bfd24cb6de04606c515d0266be4101a1f435bab9a6d76b249de5f573aecb230a98468d6a8141743019abab5edd4d4281 languageName: node linkType: hard @@ -3473,14 +3468,14 @@ __metadata: linkType: hard "debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1": - version: 4.3.1 - resolution: "debug@npm:4.3.1" + version: 4.3.2 + resolution: "debug@npm:4.3.2" dependencies: ms: 2.1.2 peerDependenciesMeta: supports-color: optional: true - checksum: 0d41ba5177510e8b388dfd7df143ab0f9312e4abdaba312595461511dac88e9ef8101939d33b4e6d37e10341af6a5301082e4d7d6f3deb4d57bc05fc7d296fad + checksum: 5543570879e2274f6725d4285a034d6e0822d35faefc6f55965933fb440e8c21eb3a0bef934e66f4b6b491f898ee2de37cab980e9d4fd61372136c19d3ce4527 languageName: node linkType: hard @@ -3779,10 +3774,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.3.612": - version: 1.3.614 - resolution: "electron-to-chromium@npm:1.3.614" - checksum: a82e0c407db33e74758fc36b25042a6c5f0d6c82a3899dbf069bb1ec5863a8cb2368d7c4f69aa0aa6d2cd858ac0154d2e3d6208bc7953e3d40295cacb39d6d82 +"electron-to-chromium@npm:^1.3.621": + version: 1.3.621 + resolution: "electron-to-chromium@npm:1.3.621" + checksum: 572d1da6d7b867c7332e10182c35539aee2f89e2c5b2bf5733069db5f446d00b97404ca158895def4f5b914fdfd2d2b74be07b29f0e8f382a8c25236fbd9d2c3 languageName: node linkType: hard @@ -3965,16 +3960,14 @@ __metadata: languageName: node linkType: hard -"eslint-config-prettier@npm:^6.15.0": - version: 6.15.0 - resolution: "eslint-config-prettier@npm:6.15.0" - dependencies: - get-stdin: ^6.0.0 +"eslint-config-prettier@npm:^7.0.0": + version: 7.0.0 + resolution: "eslint-config-prettier@npm:7.0.0" peerDependencies: - eslint: ">=3.14.1" + eslint: ">=7.0.0" bin: - eslint-config-prettier-check: bin/cli.js - checksum: a790bc61699e43a2edc5453488576cd977fad3b3cf99c129c10760ce6970d422923fddf80b65b2b10a93c00af0180a854e4b7824cc268e5957826cbe5b969e90 + eslint-config-prettier: bin/cli.js + checksum: b7c543080e32829dba5f3db970c5f3c3b47f1de8df89b4226105afbecae561e026b6fe9f2cb16bf08ab1a6f1f544d9303c9c8c0919cbb51a9d2c8a640779624a languageName: node linkType: hard @@ -4023,12 +4016,12 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^7.14.0": - version: 7.14.0 - resolution: "eslint@npm:7.14.0" +"eslint@npm:^7.15.0": + version: 7.15.0 + resolution: "eslint@npm:7.15.0" dependencies: "@babel/code-frame": ^7.0.0 - "@eslint/eslintrc": ^0.2.1 + "@eslint/eslintrc": ^0.2.2 ajv: ^6.10.0 chalk: ^4.0.0 cross-spawn: ^7.0.2 @@ -4038,10 +4031,10 @@ __metadata: eslint-scope: ^5.1.1 eslint-utils: ^2.1.0 eslint-visitor-keys: ^2.0.0 - espree: ^7.3.0 + espree: ^7.3.1 esquery: ^1.2.0 esutils: ^2.0.2 - file-entry-cache: ^5.0.1 + file-entry-cache: ^6.0.0 functional-red-black-tree: ^1.0.1 glob-parent: ^5.0.0 globals: ^12.1.0 @@ -4066,18 +4059,18 @@ __metadata: v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: 6c1c9ae3cd1ec1c9238a92380049509e9c18fecfb4c9982d4f4d49ec681ec7a2cbc04bbd354ddf10588727f143a158c7a0a82b2fd662197f554bd435cfdb250f + checksum: e5b2d18d9869f7460858b4462ab45f65f5b43a7a3d94ffdbfdcaab4bcfd3d12af21cca70fde939b994f7cd6e5a71ef229a891f66916968521d9266ef50c996ef languageName: node linkType: hard -"espree@npm:^7.3.0": - version: 7.3.0 - resolution: "espree@npm:7.3.0" +"espree@npm:^7.3.0, espree@npm:^7.3.1": + version: 7.3.1 + resolution: "espree@npm:7.3.1" dependencies: acorn: ^7.4.0 - acorn-jsx: ^5.2.0 + acorn-jsx: ^5.3.1 eslint-visitor-keys: ^1.3.0 - checksum: dd2543c293e091532f3d6eda4a09ae49039ac65e69bc072aec952a5db6eb23eeee7617e99cde11414367104208c2dec13f709bbede0528d4f6854ce5cb734960 + checksum: ff8e0f73939e1e76529b630cba65b6128e4d18ed7bf0b16af62022cadc73ddb950c7e5aa629cca74e8abebdf76f6dcd1cf873dbc819f10599827c6019e2f8e91 languageName: node linkType: hard @@ -4378,12 +4371,12 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^5.0.1": - version: 5.0.1 - resolution: "file-entry-cache@npm:5.0.1" +"file-entry-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "file-entry-cache@npm:6.0.0" dependencies: - flat-cache: ^2.0.1 - checksum: 7140588becf15f05ee956cfb359b5f23e0c73acbbd38ad14c7a76a0097342e6bfc0a8151cd2e481ea3cbb735190ba9a0df4b69055ebb5b0389c62339b1a2f86b + flat-cache: ^3.0.4 + checksum: aec91f60f903a61f6edd8591f574692a36e054a99f7b1e280823316fde7d487aaf9a0b59db59387c6e071c10ce0e40771f8472067ebe746fe3b7f095f0877be0 languageName: node linkType: hard @@ -4452,21 +4445,20 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^2.0.1": - version: 2.0.1 - resolution: "flat-cache@npm:2.0.1" +"flat-cache@npm:^3.0.4": + version: 3.0.4 + resolution: "flat-cache@npm:3.0.4" dependencies: - flatted: ^2.0.0 - rimraf: 2.6.3 - write: 1.0.3 - checksum: a36ba407553064be4a571cdee4021a50290f6179a0827df1d076a2e33cd84e543d0274cb15dbeb551c2ae6d53e611e3c02564a93f0d527563d0f560be7a14b0d + flatted: ^3.1.0 + rimraf: ^3.0.2 + checksum: 72d86ccdf840e70227168a20bb908db8bc382360f0b241efd4c2e5cf2d17a7d566c0849dc4c5d2e8e6d7838e052539dcc319f0cf295c0bb9f47b71844c1de78d languageName: node linkType: hard -"flatted@npm:^2.0.0": - version: 2.0.2 - resolution: "flatted@npm:2.0.2" - checksum: a3e5fb71ad3c4f0661cd3899864812bcf3f64bdf6aa5f33f967c9c2a8a5f0c7219707e864c0602115fef40e093415f76a43e77afd0a86990904e2217ddb44eb4 +"flatted@npm:^3.1.0": + version: 3.1.0 + resolution: "flatted@npm:3.1.0" + checksum: 9afe453c0b3d138884b637b41b27f3822e3dd6e9d413c4c02029b14d7b8e2cf03d631bbfbef3196a2176882b333c84dd2f42b174d7e5022429c13583afda9a1f languageName: node linkType: hard @@ -4707,13 +4699,6 @@ __metadata: languageName: node linkType: hard -"get-stdin@npm:^6.0.0": - version: 6.0.0 - resolution: "get-stdin@npm:6.0.0" - checksum: b51d664838aef7f8353dc57371ce59cea54d8d584fec015a9d89d24561e95b97806d5b5ba120bc81574c9ed63cb3e210176ffa0ff9263c7e7ba4d56d0fe54913 - languageName: node - linkType: hard - "get-stream@npm:^3.0.0": version: 3.0.0 resolution: "get-stream@npm:3.0.0" @@ -4868,34 +4853,34 @@ __metadata: version: 0.0.0-use.local resolution: "graphql-ws@workspace:." dependencies: - "@babel/core": ^7.12.9 + "@babel/core": ^7.12.10 "@babel/plugin-proposal-class-properties": ^7.12.1 "@babel/plugin-proposal-nullish-coalescing-operator": ^7.12.1 "@babel/plugin-proposal-object-rest-spread": ^7.12.1 "@babel/plugin-proposal-optional-chaining": ^7.12.7 - "@babel/preset-env": ^7.12.7 + "@babel/preset-env": ^7.12.10 "@babel/preset-typescript": ^7.12.7 "@rollup/plugin-typescript": ^8.0.0 "@semantic-release/changelog": ^5.0.1 "@semantic-release/git": ^9.0.0 - "@types/jest": ^26.0.16 + "@types/jest": ^26.0.18 "@types/ws": ^7.4.0 - "@typescript-eslint/eslint-plugin": ^4.9.0 - "@typescript-eslint/parser": ^4.9.0 + "@typescript-eslint/eslint-plugin": ^4.9.1 + "@typescript-eslint/parser": ^4.9.1 babel-jest: ^26.6.3 - eslint: ^7.14.0 - eslint-config-prettier: ^6.15.0 + eslint: ^7.15.0 + eslint-config-prettier: ^7.0.0 eslint-plugin-prettier: ^3.2.0 graphql: ^15.4.0 jest: ^26.6.3 prettier: ^2.2.1 - rollup: ^2.34.1 + rollup: ^2.34.2 rollup-plugin-terser: ^7.0.2 semantic-release: ^17.3.0 typedoc: ^0.19.2 - typedoc-plugin-markdown: ^3.0.11 + typedoc-plugin-markdown: ^3.1.0 typescript: ^4.1.2 - ws: ^7.4.0 + ws: ^7.4.1 peerDependencies: graphql: ">=0.11 <=15" languageName: unknown @@ -5034,9 +5019,9 @@ __metadata: linkType: hard "highlight.js@npm:^10.2.0": - version: 10.4.0 - resolution: "highlight.js@npm:10.4.0" - checksum: df3778043137b223a02fd00878803527154d396b15dce49ee4509e37a21b27d436a812e038b9399ad2ac9dff473828ab74c7a7a84402284bdc635f29a9c8fc3a + version: 10.4.1 + resolution: "highlight.js@npm:10.4.1" + checksum: 067a8cc822a4bfe3ae9cab8b827a64e059052b27606fcc91f06304b2518e0b8c6ff8875b19f2989ff329f1f07f5989dd52aee67eae005d63c77591ca08e419ec languageName: node linkType: hard @@ -5293,9 +5278,9 @@ __metadata: linkType: hard "ini@npm:^1.3.4, ini@npm:^1.3.5, ini@npm:~1.3.0": - version: 1.3.5 - resolution: "ini@npm:1.3.5" - checksum: 304a78d1e0ec49c6dc316b6a21bee5340ba85159c6581235b26a4cf27e2bac5f66f2c8f0e074ceaf3c48085f89fb974691cbf812df2128d2d74c5ef726d1b19a + version: 1.3.7 + resolution: "ini@npm:1.3.7" + checksum: cf00289cb43d8de635d907c202f7dd8650d8228c322b501c089c4f52ea78dc21ebc38b07c4f37b532f52eba110d11b71f32bc22173097ca0e9c8521575688d7c languageName: node linkType: hard @@ -5561,9 +5546,9 @@ __metadata: linkType: hard "is-negative-zero@npm:^2.0.0": - version: 2.0.0 - resolution: "is-negative-zero@npm:2.0.0" - checksum: 87ddefbdf75c2a7cfe0bed4b01b91617972316639eec6baafdef751b66b2668513f0d48138cdcae4edd29e817111f8b156722211cf8f6415e0623c6c253049d9 + version: 2.0.1 + resolution: "is-negative-zero@npm:2.0.1" + checksum: e2160af9a6fad7027bbd513e1efe9a99c780bb6af688e61e6b71084b5893f976241ca081e1ed8c18222d391ea3c1c0771cd23ab322be107150b66faf03d6ecbd languageName: node linkType: hard @@ -6305,14 +6290,14 @@ __metadata: linkType: hard "js-yaml@npm:^3.13.1": - version: 3.14.0 - resolution: "js-yaml@npm:3.14.0" + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" dependencies: argparse: ^1.0.7 esprima: ^4.0.0 bin: js-yaml: bin/js-yaml.js - checksum: 2eb95464e5263aedc20ae2d9280f0e29b00adab15ece080ec42473d7055efaab24b904108644d115f687efe05a5bde02972b883aafa93607c4c108f667a56fa7 + checksum: 46b61f889796a20d16b0b64580a01b6a02b2e45c1a2744906346da54d07e14cde764e887ab6d1512d8b2541c63711bd4b75859c28eb99605baf59fa173fc38c2 languageName: node linkType: hard @@ -9108,7 +9093,7 @@ __metadata: languageName: node linkType: hard -"resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.3.2": +"resolve@^1.1.6, resolve@^1.10.0, resolve@^1.17.0, resolve@^1.18.1": version: 1.19.0 resolution: "resolve@npm:1.19.0" dependencies: @@ -9118,7 +9103,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#builtin, resolve@patch:resolve@^1.10.0#builtin, resolve@patch:resolve@^1.17.0#builtin, resolve@patch:resolve@^1.18.1#builtin, resolve@patch:resolve@^1.3.2#builtin": +"resolve@patch:resolve@^1.1.6#builtin, resolve@patch:resolve@^1.10.0#builtin, resolve@patch:resolve@^1.17.0#builtin, resolve@patch:resolve@^1.18.1#builtin": version: 1.19.0 resolution: "resolve@patch:resolve@npm%3A1.19.0#builtin::version=1.19.0&hash=3388aa" dependencies: @@ -9156,17 +9141,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:2.6.3": - version: 2.6.3 - resolution: "rimraf@npm:2.6.3" - dependencies: - glob: ^7.1.3 - bin: - rimraf: ./bin.js - checksum: c9ce1854f19327606934558f4729b0f7aa7b9f1a3e7ca292d56261cce1074e20b0a0b16689166da6d8ab24ed9c30f7c71fba0df38e1d37f0233b6f48307c5c7a - languageName: node - linkType: hard - "rimraf@npm:^2.5.2, rimraf@npm:^2.5.4, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3, rimraf@npm:^2.7.1": version: 2.7.1 resolution: "rimraf@npm:2.7.1" @@ -9203,9 +9177,9 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^2.34.1": - version: 2.34.1 - resolution: "rollup@npm:2.34.1" +"rollup@npm:^2.34.2": + version: 2.34.2 + resolution: "rollup@npm:2.34.2" dependencies: fsevents: ~2.1.2 dependenciesMeta: @@ -9213,7 +9187,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 1e714afe5e5ae78696f66072035c9b10a69af547b3793db3bab62e9a0fe9f0b0c2b1090b00d9be420104247465319ed78ce73f2f7fc235a9305ce6cabf8a9e3c + checksum: d1baf78ea29d561a88d2d19ffdf324b62177b916373f35953cec635fbd10184ba44d75bca36cc6a317477a9c439b43e287151bbde4b2bf20c8ef96feb60e1207 languageName: node linkType: hard @@ -10474,14 +10448,14 @@ __metadata: languageName: node linkType: hard -"typedoc-plugin-markdown@npm:^3.0.11": - version: 3.0.11 - resolution: "typedoc-plugin-markdown@npm:3.0.11" +"typedoc-plugin-markdown@npm:^3.1.0": + version: 3.1.0 + resolution: "typedoc-plugin-markdown@npm:3.1.0" dependencies: handlebars: ^4.7.6 peerDependencies: - typedoc: ">=0.19.0" - checksum: cc8f4e63e6dc9d81c21ab223997385bdc6323ac6b8043562b8ad14abb4911d1a3ee0865cfe18b24608d91715338ec84ed46f2d15cc28497dc8d223356822414a + typedoc: ">=0.19.0 < 0.20.0" + checksum: 77484200da39f88a70b3858694aff5ecee656339608112871f9951cb7de35c6259b8dc814a1be9222dc7258e7cfc5695442d698c6f9fcf616793c1cacdc339fd languageName: node linkType: hard @@ -10765,11 +10739,11 @@ typescript@^4.1.2: linkType: hard "uuid@npm:^8.3.0": - version: 8.3.1 - resolution: "uuid@npm:8.3.1" + version: 8.3.2 + resolution: "uuid@npm:8.3.2" bin: uuid: dist/bin/uuid - checksum: 6a5d07c5564614271237d8bbc5c1c72abf056343e91af8f67a8e6d29957a1a061f347b8425a1e499af32f5a8f0039c44d200dff663b9a8090c51a7f7b5031534 + checksum: aed2bcef341f95635f308fea8831fb9038b18c485fe7e71feb89d2e05602dfecad0cb6f2246fae096d4da425cca6e8a71056f28abd97ad98cf770a2018853248 languageName: node linkType: hard @@ -11030,18 +11004,9 @@ typescript@^4.1.2: languageName: node linkType: hard -"write@npm:1.0.3": - version: 1.0.3 - resolution: "write@npm:1.0.3" - dependencies: - mkdirp: ^0.5.1 - checksum: e8f8fddefea3eaaf4c8bacf072161f82d5e05c5fb8f003e1bae52673b94b88a4954d97688c7403a20301d2f6e9f61363b1affe74286b499b39bc0c42f17a56cb - languageName: node - linkType: hard - -"ws@npm:^7.2.3, ws@npm:^7.4.0": - version: 7.4.0 - resolution: "ws@npm:7.4.0" +"ws@npm:^7.2.3, ws@npm:^7.4.1": + version: 7.4.1 + resolution: "ws@npm:7.4.1" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -11050,7 +11015,7 @@ typescript@^4.1.2: optional: true utf-8-validate: optional: true - checksum: 67c0f3b86d89c20e337b0bd712e0a2752068eadc0cf13c024d0532c18d073381ced485fb114a636998327a82c34d83720f4ceb7632395c0cb9580ce221177fd8 + checksum: 32b4f83bfeeca2b98d31c2d11c87a11c6e83f9285937e4a8267eb0ccaba479952a70c8b2ba39d0304236043c37a9bdf45cf2e5a1c28f19a77838e4e0b7f37593 languageName: node linkType: hard From d1415605dfe73175a0a6dfc074dab20d2dd4ae48 Mon Sep 17 00:00:00 2001 From: enisdenjo Date: Thu, 10 Dec 2020 14:34:30 +0100 Subject: [PATCH 3/6] docs: retryWait arg explanation --- docs/interfaces/_client_.clientoptions.md | 2 ++ src/client.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/interfaces/_client_.clientoptions.md b/docs/interfaces/_client_.clientoptions.md index 95914b5d..7c702837 100644 --- a/docs/interfaces/_client_.clientoptions.md +++ b/docs/interfaces/_client_.clientoptions.md @@ -117,6 +117,8 @@ ___ Control the wait time between retries. You may implement your own strategy by timing the resolution of the returned promise with the retries count. +`retries` argument counts actual connection attempts, so it will begin with +0 after the first retryable disconnect. **`default`** Randomised exponential backoff diff --git a/src/client.ts b/src/client.ts index 95bd37b1..b59a2650 100644 --- a/src/client.ts +++ b/src/client.ts @@ -104,6 +104,8 @@ export interface ClientOptions { /** * Control the wait time between retries. You may implement your own strategy * by timing the resolution of the returned promise with the retries count. + * `retries` argument counts actual connection attempts, so it will begin with + * 0 after the first retryable disconnect. * * @default Randomised exponential backoff */ From 1dd579e53aa6dd413328ea373410b9f90e35ca6b Mon Sep 17 00:00:00 2001 From: enisdenjo Date: Thu, 10 Dec 2020 14:34:46 +0100 Subject: [PATCH 4/6] docs: generate --- docs/interfaces/_client_.client.md | 10 +++++----- docs/interfaces/_client_.clientoptions.md | 6 +++--- .../interfaces/_message_.connectionackmessage.md | 2 +- .../_message_.connectioninitmessage.md | 2 +- docs/interfaces/_message_.subscribepayload.md | 2 +- docs/interfaces/_server_.context.md | 6 +++--- docs/interfaces/_server_.server.md | 2 +- docs/interfaces/_server_.serveroptions.md | 16 ++++++++-------- docs/interfaces/_server_.websocket.md | 12 ++++++------ docs/interfaces/_types_.disposable.md | 2 +- docs/interfaces/_types_.sink.md | 2 +- docs/modules/_client_.md | 4 ++-- docs/modules/_message_.md | 6 +++--- docs/modules/_server_.md | 8 ++++---- docs/modules/_use_ws_.md | 4 ++-- 15 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/interfaces/_client_.client.md b/docs/interfaces/_client_.client.md index 7ca54134..2d7aed72 100644 --- a/docs/interfaces/_client_.client.md +++ b/docs/interfaces/_client_.client.md @@ -25,7 +25,7 @@ ### dispose -• **dispose**: () => void \| Promise\ +• **dispose**: () => void \| Promise *Inherited from [Disposable](_types_.disposable.md).[dispose](_types_.disposable.md#dispose)* @@ -35,7 +35,7 @@ Dispose of the instance and clear up resources. ### on -▸ **on**\(`event`: E, `listener`: [EventListener](../modules/_client_.md#eventlistener)\): function +▸ **on**(`event`: E, `listener`: [EventListener](../modules/_client_.md#eventlistener)): function Listens on the client which dispatches events about the socket state. @@ -50,7 +50,7 @@ Name | Type | Name | Type | ------ | ------ | `event` | E | -`listener` | [EventListener](../modules/_client_.md#eventlistener)\ | +`listener` | [EventListener](../modules/_client_.md#eventlistener) | **Returns:** function @@ -58,7 +58,7 @@ ___ ### subscribe -▸ **subscribe**\(`payload`: [SubscribePayload](_message_.subscribepayload.md), `sink`: [Sink](_types_.sink.md)\): function +▸ **subscribe**(`payload`: [SubscribePayload](_message_.subscribepayload.md), `sink`: [Sink](_types_.sink.md)): function Subscribes through the WebSocket following the config parameters. It uses the `sink` to emit received data or errors. Returns a _cleanup_ @@ -75,6 +75,6 @@ Name | Default | Name | Type | ------ | ------ | `payload` | [SubscribePayload](_message_.subscribepayload.md) | -`sink` | [Sink](_types_.sink.md)\ | +`sink` | [Sink](_types_.sink.md) | **Returns:** function diff --git a/docs/interfaces/_client_.clientoptions.md b/docs/interfaces/_client_.clientoptions.md index 7c702837..72a71e8d 100644 --- a/docs/interfaces/_client_.clientoptions.md +++ b/docs/interfaces/_client_.clientoptions.md @@ -28,7 +28,7 @@ Configuration used for the GraphQL over WebSocket client. ### connectionParams -• `Optional` **connectionParams**: Record\ \| () => Promise\> \| Record\ +• `Optional` **connectionParams**: Record \| () => Promise\> \| Record Optional parameters, passed through the `payload` field with the `ConnectionInit` message, that the client specifies when establishing a connection with the server. You can use this @@ -81,7 +81,7 @@ ___ ### on -• `Optional` **on**: Partial\<{}> +• `Optional` **on**: Partial<{}\> Register listeners before initialising the client. This way you can ensure to catch all client relevant emitted events. @@ -113,7 +113,7 @@ ___ ### retryWait -• `Optional` **retryWait**: undefined \| (retries: number) => Promise\ +• `Optional` **retryWait**: undefined \| (retries: number) => Promise Control the wait time between retries. You may implement your own strategy by timing the resolution of the returned promise with the retries count. diff --git a/docs/interfaces/_message_.connectionackmessage.md b/docs/interfaces/_message_.connectionackmessage.md index f310f338..14c5add1 100644 --- a/docs/interfaces/_message_.connectionackmessage.md +++ b/docs/interfaces/_message_.connectionackmessage.md @@ -19,7 +19,7 @@ ### payload -• `Optional` `Readonly` **payload**: Record\ +• `Optional` `Readonly` **payload**: Record ___ diff --git a/docs/interfaces/_message_.connectioninitmessage.md b/docs/interfaces/_message_.connectioninitmessage.md index c4f03973..8bb35c99 100644 --- a/docs/interfaces/_message_.connectioninitmessage.md +++ b/docs/interfaces/_message_.connectioninitmessage.md @@ -19,7 +19,7 @@ ### payload -• `Optional` `Readonly` **payload**: Record\ +• `Optional` `Readonly` **payload**: Record ___ diff --git a/docs/interfaces/_message_.subscribepayload.md b/docs/interfaces/_message_.subscribepayload.md index fd0bbe63..34e4fc89 100644 --- a/docs/interfaces/_message_.subscribepayload.md +++ b/docs/interfaces/_message_.subscribepayload.md @@ -32,4 +32,4 @@ ___ ### variables -• `Optional` `Readonly` **variables**: Record\ \| null +• `Optional` `Readonly` **variables**: Record \| null diff --git a/docs/interfaces/_server_.context.md b/docs/interfaces/_server_.context.md index b3ac4db2..0a83eb67 100644 --- a/docs/interfaces/_server_.context.md +++ b/docs/interfaces/_server_.context.md @@ -2,7 +2,7 @@ > [Globals](../README.md) / ["server"](../modules/_server_.md) / Context -# Interface: Context\ +# Interface: Context ## Type parameters @@ -49,7 +49,7 @@ ___ ### connectionParams -• `Optional` `Readonly` **connectionParams**: Readonly\> +• `Optional` `Readonly` **connectionParams**: Readonly\> The parameters passed during the connection initialisation. @@ -66,7 +66,7 @@ ___ ### subscriptions -• `Readonly` **subscriptions**: Record\<[ID](../modules/_types_.md#id), AsyncIterator\> +• `Readonly` **subscriptions**: Record<[ID](../modules/_types_.md#id), AsyncIterator\> Holds the active subscriptions for this context. Subscriptions are for **streaming operations only**, diff --git a/docs/interfaces/_server_.server.md b/docs/interfaces/_server_.server.md index 5adefb02..4f7d5287 100644 --- a/docs/interfaces/_server_.server.md +++ b/docs/interfaces/_server_.server.md @@ -2,7 +2,7 @@ > [Globals](../README.md) / ["server"](../modules/_server_.md) / Server -# Interface: Server\ +# Interface: Server ## Type parameters diff --git a/docs/interfaces/_server_.serveroptions.md b/docs/interfaces/_server_.serveroptions.md index df6756eb..d7953db9 100644 --- a/docs/interfaces/_server_.serveroptions.md +++ b/docs/interfaces/_server_.serveroptions.md @@ -2,7 +2,7 @@ > [Globals](../README.md) / ["server"](../modules/_server_.md) / ServerOptions -# Interface: ServerOptions\ +# Interface: ServerOptions ## Type parameters @@ -53,7 +53,7 @@ ___ ### context -• `Optional` **context**: [GraphQLExecutionContextValue](../modules/_server_.md#graphqlexecutioncontextvalue) \| (ctx: [Context](_server_.context.md)\, message: [SubscribeMessage](_message_.subscribemessage.md), args: ExecutionArgs) => Promise\<[GraphQLExecutionContextValue](../modules/_server_.md#graphqlexecutioncontextvalue)> \| [GraphQLExecutionContextValue](../modules/_server_.md#graphqlexecutioncontextvalue) +• `Optional` **context**: [GraphQLExecutionContextValue](../modules/_server_.md#graphqlexecutioncontextvalue) \| (ctx: [Context](_server_.context.md), message: [SubscribeMessage](_message_.subscribemessage.md), args: ExecutionArgs) => Promise<[GraphQLExecutionContextValue](../modules/_server_.md#graphqlexecutioncontextvalue)\> \| [GraphQLExecutionContextValue](../modules/_server_.md#graphqlexecutioncontextvalue) A value which is provided to every resolver and holds important contextual information like the currently @@ -85,7 +85,7 @@ ___ ### onComplete -• `Optional` **onComplete**: undefined \| (ctx: [Context](_server_.context.md)\, message: [CompleteMessage](_message_.completemessage.md)) => Promise\ \| void +• `Optional` **onComplete**: undefined \| (ctx: [Context](_server_.context.md), message: [CompleteMessage](_message_.completemessage.md)) => Promise \| void The complete callback is executed after the operation has completed right before sending @@ -103,7 +103,7 @@ ___ ### onConnect -• `Optional` **onConnect**: undefined \| (ctx: [Context](_server_.context.md)\) => Promise\ \| boolean \| void> \| Record\ \| boolean \| void +• `Optional` **onConnect**: undefined \| (ctx: [Context](_server_.context.md)) => Promise \| boolean \| void\> \| Record \| boolean \| void Is the connection callback called when the client requests the connection initialisation @@ -132,7 +132,7 @@ ___ ### onError -• `Optional` **onError**: undefined \| (ctx: [Context](_server_.context.md)\, message: [ErrorMessage](_message_.errormessage.md), errors: readonly GraphQLError[]) => Promise\ \| readonly GraphQLError[] \| void +• `Optional` **onError**: undefined \| (ctx: [Context](_server_.context.md), message: [ErrorMessage](_message_.errormessage.md), errors: readonly GraphQLError[]) => Promise \| readonly GraphQLError[] \| void Executed after an error occured right before it has been dispatched to the client. @@ -150,7 +150,7 @@ ___ ### onNext -• `Optional` **onNext**: undefined \| (ctx: [Context](_server_.context.md)\, message: [NextMessage](_message_.nextmessage.md), args: ExecutionArgs, result: ExecutionResult) => Promise\ \| ExecutionResult \| void +• `Optional` **onNext**: undefined \| (ctx: [Context](_server_.context.md), message: [NextMessage](_message_.nextmessage.md), args: ExecutionArgs, result: ExecutionResult) => Promise \| ExecutionResult \| void Executed after an operation has emitted a result right before that result has been sent to the client. Results from both @@ -169,7 +169,7 @@ ___ ### onOperation -• `Optional` **onOperation**: undefined \| (ctx: [Context](_server_.context.md)\, message: [SubscribeMessage](_message_.subscribemessage.md), args: ExecutionArgs, result: [OperationResult](../modules/_server_.md#operationresult)) => Promise\<[OperationResult](../modules/_server_.md#operationresult) \| void> \| [OperationResult](../modules/_server_.md#operationresult) \| void +• `Optional` **onOperation**: undefined \| (ctx: [Context](_server_.context.md), message: [SubscribeMessage](_message_.subscribemessage.md), args: ExecutionArgs, result: [OperationResult](../modules/_server_.md#operationresult)) => Promise<[OperationResult](../modules/_server_.md#operationresult) \| void\> \| [OperationResult](../modules/_server_.md#operationresult) \| void Executed after the operation call resolves. For streaming operations, triggering this callback does not necessarely @@ -194,7 +194,7 @@ ___ ### onSubscribe -• `Optional` **onSubscribe**: undefined \| (ctx: [Context](_server_.context.md)\, message: [SubscribeMessage](_message_.subscribemessage.md)) => Promise\ \| ExecutionArgs \| readonly GraphQLError[] \| void +• `Optional` **onSubscribe**: undefined \| (ctx: [Context](_server_.context.md), message: [SubscribeMessage](_message_.subscribemessage.md)) => Promise \| ExecutionArgs \| readonly GraphQLError[] \| void The subscribe callback executed right after acknowledging the request before any payload diff --git a/docs/interfaces/_server_.websocket.md b/docs/interfaces/_server_.websocket.md index b333d583..29467681 100644 --- a/docs/interfaces/_server_.websocket.md +++ b/docs/interfaces/_server_.websocket.md @@ -33,7 +33,7 @@ to validate agains the supported ones. ### close -▸ **close**(`code`: number, `reason`: string): Promise\ \| void +▸ **close**(`code`: number, `reason`: string): Promise \| void Closes the socket gracefully. Will always provide the appropriate code and close reason. @@ -48,13 +48,13 @@ Name | Type | `code` | number | `reason` | string | -**Returns:** Promise\ \| void +**Returns:** Promise \| void ___ ### onMessage -▸ **onMessage**(`cb`: (data: string) => Promise\): void +▸ **onMessage**(`cb`: (data: string) => Promise): void Called when message is received. The library requires the data to be a `string`. @@ -72,7 +72,7 @@ to your clients however you wish. Name | Type | ------ | ------ | -`cb` | (data: string) => Promise\ | +`cb` | (data: string) => Promise | **Returns:** void @@ -80,7 +80,7 @@ ___ ### send -▸ **send**(`data`: string): Promise\ \| void +▸ **send**(`data`: string): Promise \| void Sends a message through the socket. Will always provide a `string` message. @@ -98,4 +98,4 @@ Name | Type | ------ | ------ | `data` | string | -**Returns:** Promise\ \| void +**Returns:** Promise \| void diff --git a/docs/interfaces/_types_.disposable.md b/docs/interfaces/_types_.disposable.md index f9b20e4a..90015f65 100644 --- a/docs/interfaces/_types_.disposable.md +++ b/docs/interfaces/_types_.disposable.md @@ -20,6 +20,6 @@ ### dispose -• **dispose**: () => void \| Promise\ +• **dispose**: () => void \| Promise Dispose of the instance and clear up resources. diff --git a/docs/interfaces/_types_.sink.md b/docs/interfaces/_types_.sink.md index a733dfac..50b4fc31 100644 --- a/docs/interfaces/_types_.sink.md +++ b/docs/interfaces/_types_.sink.md @@ -2,7 +2,7 @@ > [Globals](../README.md) / ["types"](../modules/_types_.md) / Sink -# Interface: Sink\ +# Interface: Sink A representation of any set of values over any amount of time. diff --git a/docs/modules/_client_.md b/docs/modules/_client_.md index 8fc36aaf..43129db7 100644 --- a/docs/modules/_client_.md +++ b/docs/modules/_client_.md @@ -58,7 +58,7 @@ ___ ### EventConnectedListener -Ƭ **EventConnectedListener**: (socket: unknown, payload?: Record\) => void +Ƭ **EventConnectedListener**: (socket: unknown, payload?: Record) => void The first argument is actually the `WebSocket`, but to avoid bundling DOM typings because the client can run in Node env too, @@ -83,7 +83,7 @@ ___ ### EventListener -Ƭ **EventListener**\: E *extends* EventConnecting ? EventConnectingListener : E *extends* EventConnected ? EventConnectedListener : E *extends* EventClosed ? EventClosedListener : never +Ƭ **EventListener**: E *extends* EventConnecting ? EventConnectingListener : E *extends* EventConnected ? EventConnectedListener : E *extends* EventClosed ? EventClosedListener : never #### Type parameters: diff --git a/docs/modules/_message_.md b/docs/modules/_message_.md index 70025154..c29460fa 100644 --- a/docs/modules/_message_.md +++ b/docs/modules/_message_.md @@ -34,7 +34,7 @@ ### Message -Ƭ **Message**\: T *extends* ConnectionAck ? ConnectionAckMessage : T *extends* ConnectionInit ? ConnectionInitMessage : T *extends* Subscribe ? SubscribeMessage : T *extends* Next ? NextMessage : T *extends* Error ? ErrorMessage : T *extends* Complete ? CompleteMessage : never +Ƭ **Message**: T *extends* ConnectionAck ? ConnectionAckMessage : T *extends* ConnectionInit ? ConnectionInitMessage : T *extends* Subscribe ? SubscribeMessage : T *extends* Next ? NextMessage : T *extends* Error ? ErrorMessage : T *extends* Complete ? CompleteMessage : never #### Type parameters: @@ -78,7 +78,7 @@ ___ ### stringifyMessage -▸ **stringifyMessage**\(`msg`: [Message](_message_.md#message)\): string +▸ **stringifyMessage**(`msg`: [Message](_message_.md#message)): string Stringifies a valid message ready to be sent through the socket. @@ -92,6 +92,6 @@ Name | Type | Name | Type | ------ | ------ | -`msg` | [Message](_message_.md#message)\ | +`msg` | [Message](_message_.md#message) | **Returns:** string diff --git a/docs/modules/_server_.md b/docs/modules/_server_.md index 467a5770..01691fdd 100644 --- a/docs/modules/_server_.md +++ b/docs/modules/_server_.md @@ -39,13 +39,13 @@ ___ ### OperationResult -Ƭ **OperationResult**: Promise\ \| ExecutionResult> \| AsyncIterableIterator\ \| ExecutionResult +Ƭ **OperationResult**: Promise \| ExecutionResult\> \| AsyncIterableIterator \| ExecutionResult ## Functions ### makeServer -▸ **makeServer**\(`options`: [ServerOptions](../interfaces/_server_.serveroptions.md)\): [Server](../interfaces/_server_.server.md)\ +▸ **makeServer**(`options`: [ServerOptions](../interfaces/_server_.serveroptions.md)): [Server](../interfaces/_server_.server.md) Makes a Protocol complient WebSocket GraphQL server. The server is actually an API which is to be used with your favourite WebSocket @@ -63,6 +63,6 @@ Name | Default | Name | Type | ------ | ------ | -`options` | [ServerOptions](../interfaces/_server_.serveroptions.md)\ | +`options` | [ServerOptions](../interfaces/_server_.serveroptions.md) | -**Returns:** [Server](../interfaces/_server_.server.md)\ +**Returns:** [Server](../interfaces/_server_.server.md) diff --git a/docs/modules/_use_ws_.md b/docs/modules/_use_ws_.md index 88819f70..ee98e744 100644 --- a/docs/modules/_use_ws_.md +++ b/docs/modules/_use_ws_.md @@ -18,7 +18,7 @@ ### useServer -▸ **useServer**(`options`: [ServerOptions](../interfaces/_server_.serveroptions.md)\<[Extra](../interfaces/_use_ws_.extra.md)>, `ws`: WebSocketServer, `keepAlive?`: number): [Disposable](../interfaces/_types_.disposable.md) +▸ **useServer**(`options`: [ServerOptions](../interfaces/_server_.serveroptions.md)<[Extra](../interfaces/_use_ws_.extra.md)\>, `ws`: WebSocketServer, `keepAlive?`: number): [Disposable](../interfaces/_types_.disposable.md) Use the server on a [ws](https://github.com/websockets/ws) ws server. This is a basic starter, feel free to copy the code over and adjust it to your needs @@ -27,7 +27,7 @@ This is a basic starter, feel free to copy the code over and adjust it to your n Name | Type | Default value | ------ | ------ | ------ | -`options` | [ServerOptions](../interfaces/_server_.serveroptions.md)\<[Extra](../interfaces/_use_ws_.extra.md)> | - | +`options` | [ServerOptions](../interfaces/_server_.serveroptions.md)<[Extra](../interfaces/_use_ws_.extra.md)\> | - | `ws` | WebSocketServer | - | `keepAlive` | number | 12 * 1000 | From 7db45c113cdd7d511fa7923503e6c13c13d57747 Mon Sep 17 00:00:00 2001 From: enisdenjo Date: Thu, 10 Dec 2020 14:41:26 +0100 Subject: [PATCH 5/6] docs(recipe): use healthcheck retry example [skip ci] --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d7749363..133e64dc 100644 --- a/README.md +++ b/README.md @@ -448,21 +448,21 @@ const link = new WebSocketLink({ ```typescript import { createClient } from 'graphql-ws'; +import { waitForHealthy } from 'my-servers'; + +const url = 'wss://i.want.retry/control/graphql'; const client = createClient({ - url: 'wss://i.want.retry/control/graphql', - // this is the default - retryWait: async function randomisedExponentialBackoff(retries: number) { - let retryDelay = 1000; // start with 1s delay - for (let i = 0; i < retries; i++) { - retryDelay *= 2; // square `retries` times - } + url, + retryWait: async function waitForServerHealthyBeforeRetry() { + // if you have a server healthcheck, you can wait for it to become + // healthy before retrying after an abrupt disconnect (most commonly a restart) + await waitForHealthy(url); + + // after the server becomes ready, wait for a second + random 0-3s timeout + // (avoid DDoSing yourself) and try connecting again await new Promise((resolve) => - setTimeout( - // resolve pending promise with added random timeout from 300ms to 3s - resolve, - retryDelay + Math.floor(Math.random() * (3000 - 300) + 300), - ), + setTimeout(resolve, 1000 + Math.random() * 3000), ); }, }); From bf1b5373521f91faccc52f9eb3a80705e8f32a8e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 10 Dec 2020 13:44:38 +0000 Subject: [PATCH 6/6] =?UTF-8?q?chore(release):=20=F0=9F=8E=89=203.0.1=20[s?= =?UTF-8?q?kip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [3.0.1](https://github.com/enisdenjo/graphql-ws/compare/v3.0.0...v3.0.1) (2020-12-10) ### Performance Improvements * **client:** Await timeouts only in recursive connects ([55c8fc8](https://github.com/enisdenjo/graphql-ws/commit/55c8fc8aba5dfb5ff3c66a11946f85ec631b1d41)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad14609..cd1f8c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [3.0.1](https://github.com/enisdenjo/graphql-ws/compare/v3.0.0...v3.0.1) (2020-12-10) + + +### Performance Improvements + +* **client:** Await timeouts only in recursive connects ([55c8fc8](https://github.com/enisdenjo/graphql-ws/commit/55c8fc8aba5dfb5ff3c66a11946f85ec631b1d41)) + # [3.0.0](https://github.com/enisdenjo/graphql-ws/compare/v2.0.1...v3.0.0) (2020-12-09) diff --git a/package.json b/package.json index 4c377d83..0e1c3e6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "graphql-ws", - "version": "3.0.0", + "version": "3.0.1", "description": "Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client", "keywords": [ "protocol",