iCrawl
5d7c59c301
chore: deps
2023-08-22 00:30:08 +02:00
Vlad Frangu
386f206caf
feat: no-de-no-de, now with extra buns ( #9683 )
...
BREAKING CHANGE: The REST and RequestManager classes now extend AsyncEventEmitter
from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
BREAKING CHANGE: DefaultUserAgentAppendix has been adapted to support multiple
different platforms (previously mentioned Deno, Bun, CF Workers, etc)
BREAKING CHANGE: the entry point for `@discordjs/rest` will now differ
in non-node-like environments (CF Workers, etc.)
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com >
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: suneettipirneni <suneettipirneni@icloud.com >
2023-07-17 08:27:57 +02:00
David Malchin
8c782bfd52
fix(WebSocketShard): close errors not being catchable ( #9704 )
...
* fix(WebSocketShard): close errors not being catchable
* fix(WebSocketShard): requested changes
2023-07-15 10:55:05 +00:00
DD
ceab07bec8
refactor(WebSocketShard): throttling error handling ( #9701 )
...
* refactor(WebSocketShard): handle unknown identify errors
* chore: use better abort check
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-12 17:19:11 +00:00
Qjuh
df8b6e9934
fix(WebSocketManager): always cache result of fetchGatewayInformation ( #9611 )
...
* fix(WebSocketManager): always cache result of fetchGatewayInformation
* fix: add comment
2023-05-29 18:45:17 +00:00
DD
4dcc9c50f8
fix(WebSocketShard): handle initial connect being a resume ( #9549 )
...
* fix(WebSocketShard): handle initial connect being a resume
* chore: remove leftover
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-11 17:42:10 +00:00
DD
00da44a120
fix(WebSocketShard): wait a little before reconnecting ( #9517 )
...
* fix(WebSocketShard): wait a little before reconnecting
* chore: leftover comment
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-05 20:14:53 +00:00
iCrawl
48cab844d4
build: switch to bundler moduleResolution
2023-05-01 13:14:13 +02:00
DD
02dfaf1aa2
refactor: abstract identify throttling and correct max_concurrency handling ( #9375 )
...
* refactor: properly support max_concurrency ratelimit keys
* fix: properly block for same key
* chore: export session state
* chore: throttler no longer requires manager
* refactor: abstract throttlers
* chore: proper member order
* chore: remove leftover debug log
* chore: use @link tag in doc comment
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
* chore: suggested changes
* fix(WebSocketShard): cancel identify if the shard closed in the meantime
* refactor(throttlers): support abort signals
* fix: memory leak
* chore: remove leftover
---------
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 20:26:37 +00:00
DD
dcf58d8140
refactor(WebSocketShard): waitForEvent and its error handling ( #9282 )
...
* refactor(WebSocketShard): waitForEvent and its error handling
* chore: remove unnecessary error event
* chore: handle ECONNREFUSED/ECONNRESET
* fix: reset network error check
---------
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-11 11:10:32 +00:00
DD
519825a651
fix(WebSocketShard): don't await #destroy in error bubbling logic ( #9276 )
...
* fix(WebSocketShard): don't await #destroy in error bubbling logic
* fix: properly throw abort errors
* chore: vlad's nit
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-25 12:49:35 +00:00
DD
eb81dc982c
chore(ws): correct order for debug logs when identifying ( #9248 )
...
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:13:56 +00:00
DD
c76b17d3b3
fix(WebSocketShard): don't close in #destroy when status is connecting ( #9254 )
2023-03-20 19:20:48 +00:00
DD
98420826bc
fix(WebSocketShard): cancel initial heartbeat in destroy ( #9244 )
...
* fix(WebSocketShard): cancel initial heartbeat in destroy
* refactor: use try/catch/finally
* chore: add debug log
2023-03-18 19:32:50 +00:00
DD
a99fc64e3f
fix(WebSocketShard): #send race condition due to ready state ( #9226 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:28:10 +00:00
DD
6ecff26ec6
feat(WebSocketShard): heartbeat jitter ( #9223 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:24:35 +00:00
DD
27e0b32c5f
fix(WebSocketShard): wait for hello rather than ready in connect ( #9178 )
2023-02-27 19:37:16 +00:00
DD
9681f34877
fix(WebSocketShard): proper error bubbling ( #9119 )
...
* fix(WebSocketShard): proper error bubbling
* fix(WebSocketShard): proper success signaling from waitForEvent
* refactor(waitForEvent): better error bubbling behavior
* fix(WebSocketShard): still allow the first connect call to reject
* fix(WebSocketShard): handle potential once error in #send
* refactor(WebSocketShard): waitForEvent & bubbleWaitForEventError
* refactor: success signaling
* chore: bump async EE to allow overwriting the error event
2023-02-19 19:28:34 +00:00
DD
5c5a5832b9
refactor(WebSocketManager): passing in strategy ( #9122 )
...
* refactor(WebSocketManager): passing in strategy
* chore: update tests
* chore: requested nits
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-19 18:57:31 +00:00
Lioness100
1ba1f238f0
docs: fix typos ( #9127 )
...
* docs: fix typos
* indicies -> indices
* rename file
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:07:38 +00:00
Synbulat Biishev
8b70f497a1
docs: fix version export ( #9049 )
...
* docs: fix version export
* types: assert `[VI]{{inject}}[/VI]` as string
* types: typo
* Revert "types: typo"
This reverts commit ba983f02be .
* types: typo
I hate my local repo. It can't install deps with `--immutable` and a have weird error on `yarn test`, but the CI passes
2023-01-19 15:56:57 +00:00
DD
05a1cbfe54
fix: ws typo ( #9056 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 00:56:43 +00:00
DD
828a13b526
feat(ws): custom workers ( #9004 )
...
* feat(ws): custom workers
* chore: typo
* refactor(WebSocketShard): expose shard id
* chore: remove outdated readme comment
* chore: nits
* chore: remove unnecessary mutation
* feat: fancier resolution
* chore: remove unnecessary exports
* chore: apply suggestions
* refactor: use range errors
Co-authored-by: Aura Román <kyradiscord@gmail.com >
2023-01-10 17:31:56 +00:00
DD
0ff67d8e7a
feat(ws): metrics ( #9005 )
...
* feat(WebSocketManager): fetch status
* feat(WebSocketShard): heartbeat event
* chore: ci
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 12:00:47 +00:00
Suneet Tipirneni
3160ab0fc7
chore: use generator for range utility ( #8825 )
...
* chore: use generator for range utility
* chore: update doc examples
* chore: fix spelling
* chore: fix typo
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:43:58 +00:00
Suneet Tipirneni
273ba45e27
chore: use satisfies where applicable ( #8884 )
...
* chore: use satisfies where applicable
* chore: remove unneeded eslint ignores
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-16 02:12:38 +00:00
DD
8f552a0e17
refactor(WebSocketShard): identify throttling ( #8888 )
...
* refactor(WebSocketShard): identify throttling
* chore: add worker handling
* refactor: worker handling
* chore: update tests
* chore: use satisfies where applicable
* chore: add informative comment
* chore: apply suggestions
* refactor(SimpleContextFetchingStrategy): support multiple managers
2022-12-02 13:04:09 +00:00
DD
40b504a208
fix(WebSocketShard): send ratelimit handling ( #8887 )
...
* fix(WebSocketShard): send ratelimit handling
* chore: remove unnecessary else
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:58:00 +00:00
Almeida
d587467a38
chore: use @link instead of markdown link in tsdocs ( #8732 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 20:03:35 +00:00
DD
c2b677759b
fix(WebSocketShard): dispatch race condition ( #8731 )
2022-10-10 19:15:04 +02:00
Almeida
02ffce8173
chore: make 'Note to developers' on version constant a regular comment ( #8730 )
...
chore: make 'Note to developers' a regular comment
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 14:42:03 +00:00
Jeroen Claassens
d923d0ab96
build: switch to esbuild-plugin-version-injector for injecting version strings ( #8723 )
2022-10-08 02:54:45 +02:00
Parbez
7af3c3b6f1
fix: ws package.json path ( #8720 )
2022-10-07 19:42:04 +02:00
Julian
a7eab50ee3
fix(WebSocketShard): add ready data parameter to ready event ( #8705 )
2022-10-05 20:39:05 +02:00
Suneet Tipirneni
b2ec865765
feat: add @discordjs/util ( #8591 )
...
* feat: add @discordjs/util
* fix: builders test
* refactor: make rest use lazy for ESM import
* chore: make requested changes
* Apply suggestions from code review
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com >
Co-authored-by: A. Román <kyradiscord@gmail.com >
* chore: make requested changes and add tests
* chore: regen lockfile
* test: add type tests
* chore: push missing files
* chore: make requested changes
* chore: update CI stuff
* chore: fix lockfile
* chore: make requested changes
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com >
Co-authored-by: A. Román <kyradiscord@gmail.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-02 18:00:31 +00:00
Parbez
dbca93098c
chore: remove unused eslint disable comments ( #8595 )
2022-09-08 15:08:04 +02:00
iCrawl
4ffdada4f7
chore: deps
2022-09-04 19:33:57 +02:00
iCrawl
1d460e0434
chore: deps
2022-09-02 21:48:05 +02:00
iCrawl
df46ab8061
build: tsup for better cjs / esm support
2022-09-02 18:08:16 +02:00
iCrawl
3b7ba4062e
chore: fix leftover eslint exceptions
2022-09-01 21:26:09 +02:00
Suneet Tipirneni
edadb9fe5d
refactor: use eslint-config-neon for packages. ( #8579 )
...
Co-authored-by: Noel <buechler.noel@outlook.com >
2022-09-01 20:50:16 +02:00
Suneet Tipirneni
e42fd16369
feat(website): Show constructor information ( #8540 )
2022-08-22 09:45:53 +02:00
Suneet Tipirneni
8028813825
feat(website): render @defaultValue blocks ( #8527 )
...
feat(website): render @defaultValue blocks
2022-08-19 18:24:55 +02:00
Suneet Tipirneni
0f83402985
refactor(website): adjust typography ( #8503 )
2022-08-17 10:17:09 +02:00
DD
acdafe60c7
fix(WebSocketShard#destroy): wait for close and cleanup listeners ( #8479 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:33:00 +00:00
DD
4fd42528fe
fix(WebSocketManager#connect): check if we have enough sessions ( #8481 )
...
* fix(WebSocketManager#connect): check if we have enough sessions
* fix: more useful error message
* fix: tests
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:28:01 +00:00
Suneet Tipirneni
7116647947
feat(website): render tsdoc examples ( #8494 )
2022-08-16 16:33:49 +02:00
iCrawl
193b252672
docs: fence examples in codeblocks
2022-08-14 19:25:25 +02:00
DD
bc06cc638d
feat(WebSocketShard): support new resume url ( #8480 )
2022-08-14 12:01:35 +02:00
SpaceEEC
359f688555
fix(WebSocketShard): always reconnect on disconnected with 1000 ( #8405 )
2022-08-01 13:24:25 +02:00