Compare commits

..

10 commits

Author SHA1 Message Date
0f0dbee7de Merge branch 'develop' into feature/258-fix-tests
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-18 18:47:50 +00:00
b42652c509 Update dependency undici to v6 (#416)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [undici](https://undici.nodejs.org) ([source](https://github.com/nodejs/undici)) | resolutions | major | [`^5.28.3` -> `^6.0.0`](https://renovatebot.com/diffs/npm/undici/5.28.3/6.9.0) |

---

### Release Notes

<details>
<summary>nodejs/undici (undici)</summary>

### [`v6.9.0`](https://github.com/nodejs/undici/releases/tag/v6.9.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.8.0...v6.9.0)

#### What's Changed

-   feat: add new dispatch compose by [@&#8203;metcoder95](https://github.com/metcoder95) in https://github.com/nodejs/undici/pull/2826
-   ci: add macos-latest to test-matrix by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2952
-   types: align RequestInit.body type with lib.dom.ts by [@&#8203;jdufresne](https://github.com/jdufresne) in https://github.com/nodejs/undici/pull/2956
-   ci: pin versions of github actions by [@&#8203;UlisesGascon](https://github.com/UlisesGascon) in https://github.com/nodejs/undici/pull/2957
-   fetch: improve output for FormData, Response, Request by [@&#8203;mertcanaltin](https://github.com/mertcanaltin) in https://github.com/nodejs/undici/pull/2955
-   perf: optimize collectASequenceOfBytes by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2958

#### New Contributors

-   [@&#8203;jdufresne](https://github.com/jdufresne) made their first contribution in https://github.com/nodejs/undici/pull/2956
-   [@&#8203;UlisesGascon](https://github.com/UlisesGascon) made their first contribution in https://github.com/nodejs/undici/pull/2957

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.8.0...v6.9.0

### [`v6.8.0`](https://github.com/nodejs/undici/releases/tag/v6.8.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.7.1...v6.8.0)

#### What's Changed

-   fix: send correct SNI for proxy connections by [@&#8203;chrros95](https://github.com/chrros95) in https://github.com/nodejs/undici/pull/2939
-   build(deps): bump node from `8bf9240` to `7bfef1d` in /build by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2937
-   fetch: improve util.inspect output for web specifications by [@&#8203;mertcanaltin](https://github.com/mertcanaltin) in https://github.com/nodejs/undici/pull/2938
-   ci: fix broken ci on windows and node v21 because of libuv bug by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2941
-   perf: improve getResolveErrorBodyCallback by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2940
-   fix: don't assign kAgent twice by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2942
-   perf: dump immediatly if known size exceeds limit by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2882
-   build(deps): bump node from `7bfef1d` to `4999fa1` in /build by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2946
-   try to fix windows failure by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2950
-   perf: improve parsing form-data by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2944

#### New Contributors

-   [@&#8203;chrros95](https://github.com/chrros95) made their first contribution in https://github.com/nodejs/undici/pull/2939

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.7.1...v6.8.0

### [`v6.7.1`](https://github.com/nodejs/undici/releases/tag/v6.7.1)

[Compare Source](https://github.com/nodejs/undici/compare/v6.7.0...v6.7.1)

#### What's Changed

-   fetch: use EOL of os-module by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2915
-   ci: only send codecov from ubuntu and node by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2914
-   tests: improve skip for unix.js tests, remove skipped tests by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2916
-   chore: fix typo in isHistoryNavigation comments by [@&#8203;kachick](https://github.com/kachick) in https://github.com/nodejs/undici/pull/2920
-   fix(benchmark): set body correctly by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2918
-   chore: increase test coverage to 100% for /lib/api/api-request.js by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2912
-   fix: chunksDecode cuts off 3 characters at the end if having BOM by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2922
-   docs: clarify URI parsing behavior of ProxyAgent constructor by [@&#8203;rossilor95](https://github.com/rossilor95) in https://github.com/nodejs/undici/pull/2893
-   implement sync formdata parser by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2911
-   Fix docs links and add examples to sidebar by [@&#8203;tastypackets](https://github.com/tastypackets) in https://github.com/nodejs/undici/pull/2895
-   doc: update diagnostics channel request headers type change by [@&#8203;jessezhang91](https://github.com/jessezhang91) in https://github.com/nodejs/undici/pull/2925
-   perf: optimize getResolveErrorBodyCallback by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2921
-   override request dispatcher from init by [@&#8203;matthieusieben](https://github.com/matthieusieben) in https://github.com/nodejs/undici/pull/2928
-   add busboy tests by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2924
-   fix(benchmark): make it fair by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2929
-   Revert "chore: remove no-simd wasm" by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2935
-   build(deps): bump node from `d3271e4` to `8bf9240` in /build by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2936
-   Flip link between docs and README by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2933

#### New Contributors

-   [@&#8203;kachick](https://github.com/kachick) made their first contribution in https://github.com/nodejs/undici/pull/2920
-   [@&#8203;tastypackets](https://github.com/tastypackets) made their first contribution in https://github.com/nodejs/undici/pull/2895
-   [@&#8203;jessezhang91](https://github.com/jessezhang91) made their first contribution in https://github.com/nodejs/undici/pull/2925
-   [@&#8203;matthieusieben](https://github.com/matthieusieben) made their first contribution in https://github.com/nodejs/undici/pull/2928

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.7.0...v6.7.1

### [`v6.7.0`](https://github.com/nodejs/undici/releases/tag/v6.7.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.6.2...v6.7.0)

#### What's Changed

-   test: remove t.diagnostics() calls in push-dont-push.js test by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2715
-   fix: fix flaky debug test by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2714
-   fix: HTTP2 tweaks by [@&#8203;metcoder95](https://github.com/metcoder95) in https://github.com/nodejs/undici/pull/2711
-   test: improve cookie tests by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2693
-   test: response.url after redirect is set to target url by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2716
-   chore: remove mocha and chai by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2696
-   test: replace t.pass with t.ok by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2721
-   perf: remove redundant operation in FormData by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2726
-   Add support for passing iterable objects as headers by [@&#8203;JaoodxD](https://github.com/JaoodxD) in https://github.com/nodejs/undici/pull/2708
-   chore: refine esbuild & node detection by [@&#8203;mochaaP](https://github.com/mochaaP) in https://github.com/nodejs/undici/pull/2677
-   chore: rephrase some comments by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2717
-   test: replace t.type with t.ok and instanceof by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2720
-   remove useless options in web streams by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2729
-   Let's add superagent to the benchmark. closes [#&#8203;2730](https://github.com/nodejs/undici/issues/2730) by [@&#8203;eddienubes](https://github.com/eddienubes) in https://github.com/nodejs/undici/pull/2731
-   convert node build to latin1 by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2673
-   simplify formData body parsing by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2735
-   chore: migrate a batch of tests to node test runner no. 1 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2719
-   chore: migrate a batch of tests to node test runner no. 2 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2737
-   chore: migrate a batch of tests to node test runner no. 4 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2739
-   chore: migrate a batch of tests to node test runner no. 5 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2740
-   chore: migrate a batch of tests to node test runner no. 3 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2738
-   chore: migrate a batch of tests to node test runner no. 6 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2741
-   chore: migrate a batch of tests to node test runner no. 8 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2744
-   chore: migrate a batch of tests to node test runner no. 7 by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2742
-   build(deps-dev): bump cronometro from 2.0.2 to 3.0.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2749
-   perf: always use the same prototype Iterator by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2743
-   chore: migrate a batch of tests to node test runner no. 9, remove tap by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2746
-   chore: remove usage of http-errors in proxy example by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2753
-   fix: dont ship wasm files of llhttp via npm by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2752
-   fix: handle request body as late as possible by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2734
-   perf(tree): avoid recursive calls by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2755
-   docs: fix favicon by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2758
-   chore: use mermaid engine and mermaid in markdown by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2759
-   chore: remove sinon dev dependency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2767
-   tests: skip test/node-test/debug on node 21.6.2 and windows by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2765
-   chore: improve usage of skip in tests by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2761
-   feat: improve mock error breadcrumbs by [@&#8203;rossilor95](https://github.com/rossilor95) in https://github.com/nodejs/undici/pull/2774
-   expose MessageEvent in fetch bundle by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2770
-   test: always exit with 0 when running in Node's Daily WPT Report CI job by [@&#8203;panva](https://github.com/panva) in https://github.com/nodejs/undici/pull/2778
-   fix: add node prefix for util to fix issue in env with min version node 18 by [@&#8203;riderx](https://github.com/riderx) in https://github.com/nodejs/undici/pull/2775
-   perf: improve perf of parseRawHeaders by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2781
-   fix: make mock-agent.js test more resilient by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2780
-   chore: make some test run even without internet connection by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2786
-   mock: improve validateReplyParameters by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2783
-   perf: improve TernarySearchTree by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2782
-   fix: convert HeadersInit to sequence/dictionary correctly by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2784
-   chore: improve getFieldValue by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2785
-   Add RetryHandler to sidebar by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2797
-   Add RetryAgent by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2798
-   build(deps): bump step-security/harden-runner from 2.6.0 to 2.7.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2690
-   build(deps): bump actions/checkout from 4.1.0 to 4.1.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2393
-   build(deps): bump actions/upload-artifact from 3.1.3 to 4.3.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2799
-   build(deps): bump node from 20-alpine to 21-alpine in /build by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2803
-   perf: improve sort algorithm by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2756
-   refactor: move web stuff into their own folder by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2793
-   `s/ dispactgher/dispatcher/` by [@&#8203;steveluscher](https://github.com/steveluscher) in https://github.com/nodejs/undici/pull/2807
-   Use paralellelRequests instead of connections to calculate req/sec in benchmarks by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2800
-   Split out documentation into separate directory by [@&#8203;Ethan-Arrowood](https://github.com/Ethan-Arrowood) in https://github.com/nodejs/undici/pull/2788
-   build(deps): bump fastify/github-action-merge-dependabot from 3.9.1 to 3.10.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2820
-   build(deps): bump actions/dependency-review-action from 4.0.0 to 4.1.3 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2821
-   build(deps): bump github/codeql-action from 3.23.2 to 3.24.4 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2818
-   build(deps): bump actions/setup-node from 4.0.1 to 4.0.2 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2819
-   fix: move CNAME and .nojekyll to root by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2822
-   remove all fetchParam event handlers by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2823
-   feat: refactor ProxyAgent constructor to also accept single URL argument by [@&#8203;rossilor95](https://github.com/rossilor95) in https://github.com/nodejs/undici/pull/2810
-   fix: isCTLExcludingHtab by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2790
-   refactor: move files into logical folders by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2813
-   refactor: move fixed-queeu to dispatcher and rm node folder by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2827
-   chore: create package.json in benchmarks by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2766
-   build(deps): bump github/codeql-action from 3.24.4 to 3.24.5 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2829
-   chore: use lts for pubish types workflow by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2830
-   add dispatcher option to Request by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2831
-   fix url referrer wpt by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2832
-   refactor: remove own sort logic by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2834
-   fix(fetch): prevent crash when `fetch` is aborted with `null` as the `AbortSignal's` `reason` by [@&#8203;steveluscher](https://github.com/steveluscher) in https://github.com/nodejs/undici/pull/2833
-   refactor: avoid http2 dynamic dispatch in socket handlers by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2839
-   build(deps-dev): bump proxy from 1.0.2 to 2.1.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2137
-   perf(tree): reduce overhead of build TernarySearchTree by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2840
-   webidl: implement resizable arraybuffer checks by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2094
-   websocket server only needs to reply with a single subprotocol by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2845
-   unite webidl stringification by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2843
-   fix: deflake connect-timeout test by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2851
-   fix: coverage reporting by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2763
-   fix: pipelining logic is not relevant for h2 by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2850
-   processBody doesn't need to return a promise by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2858
-   refactor: split client into client-h1/h2 by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2848
-   ci: fix concurrency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2862
-   perf: improve performance of isValidSubprotocol by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2861
-   perf: reuse TextDecoder instance by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2863
-   chore: restructure benchmarks, use kebab-case by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2864
-   cookies: improve perf of toIMFDate by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2867
-   cookies: fix validateCookiePath by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2866
-   refactor: move out more h2 from core client by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2860
-   mock: improve test coverage of buildHeadersFromArray by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2872
-   fix: remove broken build request hack by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2874
-   chore: filenames should use kebab-case by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2873
-   refactor: split out last h1 specific code from core by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2876
-   fix: make pipelining limit work for h2 by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2875
-   fix: http2 doesn't have pipelining queue by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2878
-   fix: minor connect cleanup by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2877
-   Request headers types by [@&#8203;JaoodxD](https://github.com/JaoodxD) in https://github.com/nodejs/undici/pull/2879
-   ci: remove concurrency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2880
-   fix: prefer queueMicrotask by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2881
-   chore: remove no-simd wasm by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2871
-   cookies: improve validateCookieValue by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2883
-   cookies: improve validateCookieName by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2884
-   Properly parse set-cookie header using http2 by [@&#8203;jeanp413](https://github.com/jeanp413) in https://github.com/nodejs/undici/pull/2886
-   doc deprecate bodymixin.formData by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2892
-   perf: optimize check invalid field-vchar by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2889
-   build(deps): bump github/codeql-action from 3.24.5 to 3.24.6 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2897
-   fix issue 2898 by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2900
-   tests: ignore catch block when requiring crypto module by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2901
-   websocket: remove dead code in parseCloseBody by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2902
-   fix: tests dont need process.exit by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2909
-   chore: remove proxyquire by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2906
-   chore: remove import-fresh as devDependency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2908
-   perf(headers): a single set-cookie by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2903
-   websocket: improve .close() by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2865
-   feat: add sending data benchmark by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2905
-   ci: integrate workflows into nodejs.yml by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2899

#### New Contributors

-   [@&#8203;JaoodxD](https://github.com/JaoodxD) made their first contribution in https://github.com/nodejs/undici/pull/2708
-   [@&#8203;eddienubes](https://github.com/eddienubes) made their first contribution in https://github.com/nodejs/undici/pull/2731
-   [@&#8203;riderx](https://github.com/riderx) made their first contribution in https://github.com/nodejs/undici/pull/2775
-   [@&#8203;steveluscher](https://github.com/steveluscher) made their first contribution in https://github.com/nodejs/undici/pull/2807
-   [@&#8203;jeanp413](https://github.com/jeanp413) made their first contribution in https://github.com/nodejs/undici/pull/2886

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.6.2...v6.7.0

### [`v6.6.2`](https://github.com/nodejs/undici/releases/tag/v6.6.2)

[Compare Source](https://github.com/nodejs/undici/compare/v6.6.1...v6.6.2)

#### What's Changed

-   fix: webidl.brandcheck non strict should throw by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2683
-   fix: expose EventSource for nodejs by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2645
-   test: more information from debug tests by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2695
-   Fix broken test on linux by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2699
-   fix: fix the linux patch by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2703
-   test(wpt): mark timed out tests as 'failed' by [@&#8203;rossilor95](https://github.com/rossilor95) in https://github.com/nodejs/undici/pull/2644
-   build(deps-dev): bump borp from 0.5.0 to 0.9.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2702
-   perf: use insertion sort algorithm by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2706
-   fix: run node tests on merge by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2707

#### New Contributors

-   [@&#8203;rossilor95](https://github.com/rossilor95) made their first contribution in https://github.com/nodejs/undici/pull/2644

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.6.1...v6.6.2

### [`v6.6.1`](https://github.com/nodejs/undici/releases/tag/v6.6.1)

[Compare Source](https://github.com/nodejs/undici/compare/v6.6.0...v6.6.1)

#### ⚠️ Security Release ⚠️

Fixes:

-   [CVE-2024-24750, Backpressure request ignored in fetch()](https://github.com/nodejs/undici/security/advisories/GHSA-9f24-jqhm-jfcw)
-   [CVE-2024-24758 Proxy-Authorization header not cleared on cross-origin redirect in fetch](https://github.com/nodejs/undici/security/advisories/GHSA-3787-6prv-h9w3)

#### What's Changed

-   fix: flaky debug test by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2687
-   build(deps): bump github/codeql-action from 3.22.12 to 3.23.2 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2688
-   build(deps): bump actions/dependency-review-action from 3.1.0 to 4.0.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2689
-   fix: ci pipeline warnings by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2685
-   perf: optimize Iterator by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2692

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.6.0...v6.6.1

### [`v6.6.0`](https://github.com/nodejs/undici/releases/tag/v6.6.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.5.0...v6.6.0)

#### What's Changed

-   add webSocket example by [@&#8203;mertcanaltin](https://github.com/mertcanaltin) in https://github.com/nodejs/undici/pull/2626
-   chore: remove atomic-sleep as dev dependency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2648
-   chore: remove semver as dev dependency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2646
-   chore: remove table as dev dependency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2649
-   chore: remove delay as dev dependency by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2647
-   chore: reduce noise in test-logs test/issue-2349.js by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2655
-   chore: fix faketimer warning in test/request-timeout.js by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2656
-   chore: reduce noise in test logs test/client-node-max-header-size.js by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2654
-   refactor: use fromInnerResponse by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2635
-   fix: support deflate raw responses by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2650
-   Support building for externally shared js builtins by [@&#8203;mochaaP](https://github.com/mochaaP) in https://github.com/nodejs/undici/pull/2643
-   fix: typo clampAndCoarsenConnectionTimingInfo by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2653
-   chore: use 'node:'-prefix for requiring node core modules by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2662
-   build(deps-dev): bump husky from 8.0.3 to 9.0.7 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2667
-   build(deps-dev): bump cronometro from 1.2.0 to 2.0.2 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2668
-   remove timers/promises import by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2665
-   chore: fix various codesmells by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2669
-   chore: remove this alias in agent.js by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2671
-   chore: use optional chaining by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2666
-   chore: small perf improvements by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2661
-   implement spec changes from a while ago by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2676
-   websocket: fix close when no closing code is received by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2680
-   fix: make ci less flaky by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2684

#### New Contributors

-   [@&#8203;mochaaP](https://github.com/mochaaP) made their first contribution in https://github.com/nodejs/undici/pull/2643

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.5.0...v6.6.0

### [`v6.5.0`](https://github.com/nodejs/undici/releases/tag/v6.5.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.4.0...v6.5.0)

#### What's Changed

-   build(deps-dev): bump jsdom from 23.2.0 to 24.0.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2632
-   feat: Implement EventSource by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2608
-   fix: readable body by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2642

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.4.0...v6.5.0

### [`v6.4.0`](https://github.com/nodejs/undici/releases/tag/v6.4.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.3.0...v6.4.0)

#### What's Changed

-   refactor: version cleanup by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2605
-   cacheStorage: separate matchAll logic by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2599
-   cleanup index by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2598
-   feat: port `balanced-pool`, `ca-fingerprint`, `client-abort` tests to `node:test` by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2584
-   ci: unpin nodejs workflow version by [@&#8203;dominykas](https://github.com/dominykas) in https://github.com/nodejs/undici/pull/2434
-   test([#&#8203;2600](https://github.com/nodejs/undici/issues/2600)): Flaky debug test by [@&#8203;metcoder95](https://github.com/metcoder95) in https://github.com/nodejs/undici/pull/2607
-   fix: h2 hang issue with empty body by [@&#8203;timursevimli](https://github.com/timursevimli) in https://github.com/nodejs/undici/pull/2601
-   Fix tests for Node.js v21 by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2609
-   perf(cache): avoid Request and Response initialization by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2610
-   Add more libraries to benchmarks by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2614
-   feat: port `client-connect`, `client-dispatch`, `client-errors` test to `node:test` by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2591
-   exit with 1 if WPT runner has unexpected errors by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2621
-   Fix tests for Node.js v20.11.0 by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2618
-   fix(mock-agent): split set-cookie by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2619
-   feat: implement throwOnMaxRedirect option for RedirectHandler by [@&#8203;mertcanaltin](https://github.com/mertcanaltin) in https://github.com/nodejs/undici/pull/2563
-   test: fix flaky debug test by [@&#8203;metcoder95](https://github.com/metcoder95) in https://github.com/nodejs/undici/pull/2613
-   fix: hide statusOutput if empty in handleRunnerCompletion by [@&#8203;Uzlopak](https://github.com/Uzlopak) in https://github.com/nodejs/undici/pull/2624
-   docs: Fix typo in Debug.md by [@&#8203;Skn0tt](https://github.com/Skn0tt) in https://github.com/nodejs/undici/pull/2625
-   fix(cache): set AbortSignal by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2612
-   Use correct http Agent for node-fetch, axios, got and request by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2629

#### New Contributors

-   [@&#8203;timursevimli](https://github.com/timursevimli) made their first contribution in https://github.com/nodejs/undici/pull/2601
-   [@&#8203;mertcanaltin](https://github.com/mertcanaltin) made their first contribution in https://github.com/nodejs/undici/pull/2563
-   [@&#8203;Skn0tt](https://github.com/Skn0tt) made their first contribution in https://github.com/nodejs/undici/pull/2625

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.3.0...v6.4.0

### [`v6.3.0`](https://github.com/nodejs/undici/releases/tag/v6.3.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.2.1...v6.3.0)

#### What's Changed

-   Clear all timeout on destroy and close by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2535
-   ConnectOptions should include 'origin' field by [@&#8203;dvoytenko](https://github.com/dvoytenko) in https://github.com/nodejs/undici/pull/2532
-   perf: avoid toLowerCase call by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2537
-   revert [`a1a8136`](https://github.com/nodejs/undici/commit/a1a8136) by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2539
-   docs: add Util to sidebar by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2529
-   fix: call explicitly unregister by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2534
-   fix: check the content-type of invalid formData by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2541
-   Add request examples. by [@&#8203;autopulated](https://github.com/autopulated) in https://github.com/nodejs/undici/pull/2380
-   fix(HTTP/2): handle consumption of aborted request by [@&#8203;metcoder95](https://github.com/metcoder95) in https://github.com/nodejs/undici/pull/2387
-   chore: update tst test by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2538
-   fix(fetch): do not abort fetch on redirect by [@&#8203;angelyan](https://github.com/angelyan) in https://github.com/nodejs/undici/pull/2545
-   drop verifyVersion in scripts by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2549
-   types: remove unused Client and Pool types by [@&#8203;RafaelGSS](https://github.com/RafaelGSS) in https://github.com/nodejs/undici/pull/2557
-   lib: fix Host header when CONNECT ProxyAgent by [@&#8203;RafaelGSS](https://github.com/RafaelGSS) in https://github.com/nodejs/undici/pull/2556
-   feat: port cookies tests to node runner by [@&#8203;pmarchini](https://github.com/pmarchini) in https://github.com/nodejs/undici/pull/2547
-   feat: port webidl tests to node test runner by [@&#8203;ilteoood](https://github.com/ilteoood) in https://github.com/nodejs/undici/pull/2554
-   perf: Improve percentDecode by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2562
-   Fix parseHashWithOptions regex by [@&#8203;flapenna](https://github.com/flapenna) in https://github.com/nodejs/undici/pull/2561
-   feat: port diagnostic-channel tests to node test runner by [@&#8203;ilteoood](https://github.com/ilteoood) in https://github.com/nodejs/undici/pull/2559
-   feat: port websocket tests to node test runner by [@&#8203;ilteoood](https://github.com/ilteoood) in https://github.com/nodejs/undici/pull/2553
-   build(deps-dev): bump tsd from 0.29.0 to 0.30.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2551
-   build(deps): bump actions/setup-node from 4.0.0 to 4.0.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2572
-   build(deps): bump github/codeql-action from 2.22.5 to 3.22.12 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/nodejs/undici/pull/2574
-   Update `@matteo.collina/tspl` to 0.1.1 by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2576
-   mark wpt as failing by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2581
-   feat: port `abort-controller.js` tests to `node:test` runner by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2564
-   fix data url test by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2580
-   feat: port `async_hooks.js` tests to `node:test` runner by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2568
-   feat: port `agent.js` tests to `node:test` runner by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2566
-   feat: port `abort-event-emitter.js` tests to `node:test` runnner by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2565
-   feat: port first half of fetch tests to node test runner by [@&#8203;anurag-roy](https://github.com/anurag-roy) in https://github.com/nodejs/undici/pull/2569
-   perf: bypass method validation by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2583
-   fetch: warn when using patch method by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2577
-   feat: port `autoselectfamily.js` tests to `node:test` runner by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2570
-   feat: port remaining fetch tests to node test runner by [@&#8203;anurag-roy](https://github.com/anurag-roy) in https://github.com/nodejs/undici/pull/2587
-   fix: use isArrayBuffer instead of isAnyArrayBuffer by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2586
-   Feat/migrate tests to node runner by [@&#8203;pmarchini](https://github.com/pmarchini) in https://github.com/nodejs/undici/pull/2593
-   abort request with reason if one is provided by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2592
-   feat: port tst test to node test runner by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2595
-   feat([#&#8203;2191](https://github.com/nodejs/undici/issues/2191)): Add support for `NODE_DEBUG` by [@&#8203;metcoder95](https://github.com/metcoder95) in https://github.com/nodejs/undici/pull/2585
-   cacheStorage: fix bugs make wpts pass by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2596
-   fix: non-object error in abort throws bad error by [@&#8203;atlowChemi](https://github.com/atlowChemi) in https://github.com/nodejs/undici/pull/2597
-   fix: add test helper for closing server as promise by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) in https://github.com/nodejs/undici/pull/2604

#### New Contributors

-   [@&#8203;dvoytenko](https://github.com/dvoytenko) made their first contribution in https://github.com/nodejs/undici/pull/2532
-   [@&#8203;autopulated](https://github.com/autopulated) made their first contribution in https://github.com/nodejs/undici/pull/2380
-   [@&#8203;angelyan](https://github.com/angelyan) made their first contribution in https://github.com/nodejs/undici/pull/2545
-   [@&#8203;pmarchini](https://github.com/pmarchini) made their first contribution in https://github.com/nodejs/undici/pull/2547
-   [@&#8203;ilteoood](https://github.com/ilteoood) made their first contribution in https://github.com/nodejs/undici/pull/2554
-   [@&#8203;flapenna](https://github.com/flapenna) made their first contribution in https://github.com/nodejs/undici/pull/2561
-   [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki) made their first contribution in https://github.com/nodejs/undici/pull/2576
-   [@&#8203;anurag-roy](https://github.com/anurag-roy) made their first contribution in https://github.com/nodejs/undici/pull/2569

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.2.1...v6.3.0

### [`v6.2.1`](https://github.com/nodejs/undici/releases/tag/v6.2.1)

[Compare Source](https://github.com/nodejs/undici/compare/v6.2.0...v6.2.1)

#### What's Changed

-   perf: use tree by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2528
-   chore: reduce dependencies by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2533
-   Remove timers in agent.js by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2536

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.2.0...v6.2.1

### [`v6.2.0`](https://github.com/nodejs/undici/releases/tag/v6.2.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.1.0...v6.2.0)

#### What's Changed

-   Remove FinalizationRegistry from Agent by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2530

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.1.0...v6.2.0

### [`v6.1.0`](https://github.com/nodejs/undici/releases/tag/v6.1.0)

[Compare Source](https://github.com/nodejs/undici/compare/v6.0.1...v6.1.0)

#### What's Changed

-   fix: more sensible stack trace from dump error by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2503
-   refactor: remove some node compat by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2502
-   refactor: version cleanup by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2507
-   perf(fetch): Improve fetch of detaurl by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2479
-   feat: expose parseHeader by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2511
-   perf(fetch): optimize call `dispatch` by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2493
-   perf(util/parseHeaders): If the header name is buffer by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2501
-   perf: twice faster method check by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2495
-   refactor: remove Error.captureStackTrace by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2509
-   perf: Improve processHeader by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2513
-   perf: reduce `String#toLowerCase` call by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2516
-   perf: optimize consumeEnd by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2510
-   perf: reduce tst built time by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2517
-   feat: allow customization of build environment by [@&#8203;khardix](https://github.com/khardix) in https://github.com/nodejs/undici/pull/2403
-   fix: clear cache by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2519
-   feat: Add resource timing entries for connection, request and response by [@&#8203;ToshB](https://github.com/ToshB) in https://github.com/nodejs/undici/pull/2481
-   Call fg.unregister() after a dispatcher is done, adds UNDICI_NO_FG to… by [@&#8203;mcollina](https://github.com/mcollina) in https://github.com/nodejs/undici/pull/2527
-   feat: expose headerNameToString by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2525

#### New Contributors

-   [@&#8203;khardix](https://github.com/khardix) made their first contribution in https://github.com/nodejs/undici/pull/2403

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.0.1...v6.1.0

### [`v6.0.1`](https://github.com/nodejs/undici/releases/tag/v6.0.1)

[Compare Source](https://github.com/nodejs/undici/compare/v6.0.0...v6.0.1)

#### What's Changed

-   fix: stream error timings by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2497

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.0.0...v6.0.1

### [`v6.0.0`](https://github.com/nodejs/undici/releases/tag/v6.0.0)

[Compare Source](https://github.com/nodejs/undici/compare/v5.28.3...v6.0.0)

#### What's Changed

-   16 eol by [@&#8203;ronag](https://github.com/ronag) in https://github.com/nodejs/undici/pull/2480
-   update spec & wpts by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2482
-   version cleanup by [@&#8203;KhafraDev](https://github.com/KhafraDev) in https://github.com/nodejs/undici/pull/2483
-   perf: avoid Response initialization by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2489
-   perf: optimize `parseHeaders` by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2492
-   chore: fix typo by [@&#8203;tsctx](https://github.com/tsctx) in https://github.com/nodejs/undici/pull/2490
-   feat: print attempted addresses on ConnectTimeoutError by [@&#8203;fengmk2](https://github.com/fengmk2) in https://github.com/nodejs/undici/pull/2494
-   Expose HTTP errors that are not meant to be retried by [@&#8203;MzUgM](https://github.com/MzUgM) in https://github.com/nodejs/undici/pull/2496

**Full Changelog**: https://github.com/nodejs/undici/compare/v5.28.2...v6.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/416
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-03-18 18:44:06 +00:00
d5442b5a14 Update dependency dotenv to v16.4.5 (#411)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [dotenv](https://github.com/motdotla/dotenv) | dependencies | patch | [`16.4.1` -> `16.4.5`](https://renovatebot.com/diffs/npm/dotenv/16.4.1/16.4.5) |

---

### Release Notes

<details>
<summary>motdotla/dotenv (dotenv)</summary>

### [`v16.4.5`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1645-2024-02-19)

[Compare Source](https://github.com/motdotla/dotenv/compare/v16.4.4...v16.4.5)

##### Changed

-   🐞 fix recent regression when using `path` option. return to historical behavior: do not attempt to auto find `.env` if `path` set. (regression was introduced in `16.4.3`) [#&#8203;814](https://github.com/motdotla/dotenv/pull/814)

### [`v16.4.4`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1644-2024-02-13)

[Compare Source](https://github.com/motdotla/dotenv/compare/v16.4.3...v16.4.4)

##### Changed

-   🐞 Replaced chaining operator `?.` with old school `&&` (fixing node 12 failures) [#&#8203;812](https://github.com/motdotla/dotenv/pull/812)

### [`v16.4.3`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1643-2024-02-12)

[Compare Source](https://github.com/motdotla/dotenv/compare/v16.4.2...v16.4.3)

##### Changed

-   Fixed processing of multiple files in `options.path` [#&#8203;805](https://github.com/motdotla/dotenv/pull/805)

### [`v16.4.2`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1642-2024-02-10)

[Compare Source](https://github.com/motdotla/dotenv/compare/v16.4.1...v16.4.2)

##### Changed

-   Changed funding link in package.json to [`dotenvx.com`](https://dotenvx.com)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/411
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-03-18 18:43:01 +00:00
3f1bf12731 Update dependency @types/jest to v29.5.12 (#409)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | dependencies | patch | [`29.5.11` -> `29.5.12`](https://renovatebot.com/diffs/npm/@types%2fjest/29.5.11/29.5.12) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/409
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-03-18 18:41:55 +00:00
33c69d2c31 Update dependency ts-jest to v29.1.2 (#400)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ts-jest](https://kulshekhar.github.io/ts-jest) ([source](https://github.com/kulshekhar/ts-jest)) | dependencies | patch | [`29.1.1` -> `29.1.2`](https://renovatebot.com/diffs/npm/ts-jest/29.1.1/29.1.2) |

---

### Release Notes

<details>
<summary>kulshekhar/ts-jest (ts-jest)</summary>

### [`v29.1.2`](https://github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2912-2024-01-22)

[Compare Source](https://github.com/kulshekhar/ts-jest/compare/v29.1.1...v29.1.2)

##### Bug Fixes

-   calculated cache key based on `supportsStaticESM` ([a5d6f2d](a5d6f2d4f4))
-   correct error handling in `processAsync` ([e7be4bf](e7be4bf6a8)), closes [#&#8203;4207](https://github.com/kulshekhar/ts-jest/issues/4207)
-   use `Config.ProjectConfig` ([918312b](918312bee2)), closes [#&#8203;4028](https://github.com/kulshekhar/ts-jest/issues/4028)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/400
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-03-18 18:40:36 +00:00
cca34a476c Merge branch 'main' into develop
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 18:27:57 +00:00
ad2e4d8f9b v3.2.1
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 18:26:37 +00:00
c83a2329cc 3.2.1 2024-03-01 18:26:31 +00:00
5f054b02a5 Add cache helper to update user cache every 30 minutes
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 18:25:24 +00:00
808f5e3b1c Resolve undici version to fix vulnerability 2024-03-01 17:31:29 +00:00
16 changed files with 109 additions and 18 deletions

View file

@ -15,6 +15,8 @@ BOT_CLIENTID=682942374040961060
ABOUT_FUNDING=https://ko-fi.com/vylpes ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app
CACHE_INTERVAL=1800000 # 30 minutes
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3101 DB_PORT=3101
DB_NAME=vylbot DB_NAME=vylbot

View file

@ -15,6 +15,8 @@ BOT_CLIENTID=680083120896081954
ABOUT_FUNDING=https://ko-fi.com/vylpes ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app
CACHE_INTERVAL=1800000 # 30 minutes
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3121 DB_PORT=3121
DB_NAME=vylbot DB_NAME=vylbot

View file

@ -15,6 +15,8 @@ BOT_CLIENTID=1016767908740857949
ABOUT_FUNDING=https://ko-fi.com/vylpes ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app
CACHE_INTERVAL=1800000 # 30 minutes
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3111 DB_PORT=3111
DB_NAME=vylbot DB_NAME=vylbot

View file

@ -0,0 +1,2 @@
ALTER TABLE server
ADD LastCached datetime NOT NULL DEFAULT '2024-03-01 18:10:04';

View file

@ -1,6 +1,6 @@
{ {
"name": "vylbot-app", "name": "vylbot-app",
"version": "3.2.0", "version": "3.2.1",
"description": "A discord bot made for Vylpes' Den", "description": "A discord bot made for Vylpes' Den",
"main": "./dist/vylbot", "main": "./dist/vylbot",
"typings": "./dist", "typings": "./dist",
@ -11,6 +11,7 @@
"test": "jest", "test": "jest",
"db:up": "typeorm migration:run -d dist/database/dataSources/appDataSource.js", "db:up": "typeorm migration:run -d dist/database/dataSources/appDataSource.js",
"db:down": "typeorm migration:revert -d dist/database/dataSources/appDataSource.js", "db:down": "typeorm migration:revert -d dist/database/dataSources/appDataSource.js",
"db:create": "typeorm migration:create ./src/database/migrations",
"release": "np --no-publish" "release": "np --no-publish"
}, },
"repository": { "repository": {
@ -41,7 +42,8 @@
"typeorm": "0.3.20" "typeorm": "0.3.20"
}, },
"resolutions": { "resolutions": {
"**/semver": "^7.5.2" "**/semver": "^7.5.2",
"**/undici": "^6.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.0.0", "@types/node": "^20.0.0",

View file

@ -11,6 +11,7 @@ import { Util } from "./util";
import AppDataSource from "../database/dataSources/appDataSource"; import AppDataSource from "../database/dataSources/appDataSource";
import ButtonEventItem from "../contracts/ButtonEventItem"; import ButtonEventItem from "../contracts/ButtonEventItem";
import { ButtonEvent } from "../type/buttonEvent"; import { ButtonEvent } from "../type/buttonEvent";
import CacheHelper from "../helpers/CacheHelper";
export class CoreClient extends Client { export class CoreClient extends Client {
public static commandItems: ICommandItem[]; public static commandItems: ICommandItem[];
@ -47,6 +48,10 @@ export class CoreClient extends Client {
await super.login(process.env.BOT_TOKEN); await super.login(process.env.BOT_TOKEN);
this.guilds.cache.forEach(async (guild) => {
await CacheHelper.UpdateServerCache(guild);
});
this._util.loadEvents(this, CoreClient.eventItems); this._util.loadEvents(this, CoreClient.eventItems);
this._util.loadSlashCommands(this); this._util.loadSlashCommands(this);
} }

View file

@ -1,4 +1,4 @@
import { Entity, OneToMany } from "typeorm"; import { Column, Entity, OneToMany } from "typeorm";
import BaseEntity from "../../contracts/BaseEntity"; import BaseEntity from "../../contracts/BaseEntity";
import Role from "./Role"; import Role from "./Role";
import Setting from "./Setting"; import Setting from "./Setting";
@ -9,14 +9,22 @@ export default class Server extends BaseEntity {
super(); super();
this.Id = serverId; this.Id = serverId;
this.LastCached = new Date();
} }
@Column({ default: "2024-03-01 18:10:04" })
LastCached: Date;
@OneToMany(() => Setting, x => x.Server) @OneToMany(() => Setting, x => x.Server)
Settings: Setting[]; Settings: Setting[];
@OneToMany(() => Role, x => x.Server) @OneToMany(() => Role, x => x.Server)
Roles: Role[]; Roles: Role[];
public UpdateLastCached(lastCached: Date) {
this.LastCached = lastCached;
}
public AddSettingToServer(setting: Setting) { public AddSettingToServer(setting: Setting) {
this.Settings.push(setting); this.Settings.push(setting);
} }

View file

@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from "typeorm"
import MigrationHelper from "../../../helpers/MigrationHelper"
export class AddServerCacheDate1709316734401 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
MigrationHelper.Up('1709316734401-AddServerCacheDate', '3.2.1', [
"01-Server",
], queryRunner);
}
public async down(queryRunner: QueryRunner): Promise<void> {
}
}

View file

@ -1,10 +1,13 @@
import { EmbedBuilder, GuildMember, TextChannel } from "discord.js"; import { EmbedBuilder, GuildMember, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours"; import EmbedColours from "../../constants/EmbedColours";
import SettingsHelper from "../../helpers/SettingsHelper"; import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function GuildMemberAdd(member: GuildMember) { export default async function GuildMemberAdd(member: GuildMember) {
if (!member.guild) return; if (!member.guild) return;
await CacheHelper.UpdateServerCache(member.guild);
const enabled = await SettingsHelper.GetSetting("event.member.add.enabled", member.guild.id); const enabled = await SettingsHelper.GetSetting("event.member.add.enabled", member.guild.id);
if (!enabled || enabled.toLowerCase() != "true") return; if (!enabled || enabled.toLowerCase() != "true") return;

View file

@ -1,10 +1,13 @@
import { EmbedBuilder, GuildMember, TextChannel } from "discord.js"; import { EmbedBuilder, GuildMember, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours"; import EmbedColours from "../../constants/EmbedColours";
import SettingsHelper from "../../helpers/SettingsHelper"; import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function GuildMemberRemove(member: GuildMember) { export default async function GuildMemberRemove(member: GuildMember) {
if (!member.guild) return; if (!member.guild) return;
await CacheHelper.UpdateServerCache(member.guild);
const enabled = await SettingsHelper.GetSetting("event.member.remove.enabled", member.guild.id); const enabled = await SettingsHelper.GetSetting("event.member.remove.enabled", member.guild.id);
if (!enabled || enabled.toLowerCase() != "true") return; if (!enabled || enabled.toLowerCase() != "true") return;

View file

@ -1,8 +1,11 @@
import { GuildMember } from "discord.js"; import { GuildMember } from "discord.js";
import NicknameChanged from "./GuildMemberUpdate/NicknameChanged"; import NicknameChanged from "./GuildMemberUpdate/NicknameChanged";
import CacheHelper from "../../helpers/CacheHelper";
export default async function GuildMemberUpdate(oldMember: GuildMember, newMember: GuildMember) { export default async function GuildMemberUpdate(oldMember: GuildMember, newMember: GuildMember) {
if (oldMember.nickname != newMember.nickname) { // Nickname change await CacheHelper.UpdateServerCache(newMember.guild);
if (oldMember.nickname !== newMember.nickname) { // Nickname change
await NicknameChanged(oldMember, newMember); await NicknameChanged(oldMember, newMember);
} }
} }

View file

@ -1,11 +1,14 @@
import { Message } from "discord.js"; import { Message } from "discord.js";
import SettingsHelper from "../../helpers/SettingsHelper"; import SettingsHelper from "../../helpers/SettingsHelper";
import VerificationCheck from "./MessageCreate/VerificationCheck"; import VerificationCheck from "./MessageCreate/VerificationCheck";
import CacheHelper from "../../helpers/CacheHelper";
export default async function MessageCreate(message: Message) { export default async function MessageCreate(message: Message) {
if (!message.guild) return; if (!message.guild) return;
if (message.author.bot) return; if (message.author.bot) return;
await CacheHelper.UpdateServerCache(message.guild);
const isVerificationEnabled = await SettingsHelper.GetSetting("verification.enabled", message.guild.id); const isVerificationEnabled = await SettingsHelper.GetSetting("verification.enabled", message.guild.id);
if (isVerificationEnabled && isVerificationEnabled.toLocaleLowerCase() == "true") { if (isVerificationEnabled && isVerificationEnabled.toLocaleLowerCase() == "true") {

View file

@ -2,11 +2,14 @@ import { EmbedBuilder, Message, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours"; import EmbedColours from "../../constants/EmbedColours";
import IgnoredChannel from "../../database/entities/IgnoredChannel"; import IgnoredChannel from "../../database/entities/IgnoredChannel";
import SettingsHelper from "../../helpers/SettingsHelper"; import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function MessageDelete(message: Message) { export default async function MessageDelete(message: Message) {
if (!message.guild) return; if (!message.guild) return;
if (message.author.bot) return; if (message.author.bot) return;
await CacheHelper.UpdateServerCache(message.guild);
const enabled = await SettingsHelper.GetSetting("event.message.delete.enabled", message.guild.id); const enabled = await SettingsHelper.GetSetting("event.message.delete.enabled", message.guild.id);
if (!enabled || enabled.toLowerCase() != "true") return; if (!enabled || enabled.toLowerCase() != "true") return;

View file

@ -2,10 +2,14 @@ import { EmbedBuilder, Message, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours"; import EmbedColours from "../../constants/EmbedColours";
import IgnoredChannel from "../../database/entities/IgnoredChannel"; import IgnoredChannel from "../../database/entities/IgnoredChannel";
import SettingsHelper from "../../helpers/SettingsHelper"; import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function MessageUpdate(oldMessage: Message, newMessage: Message) { export default async function MessageUpdate(oldMessage: Message, newMessage: Message) {
if (!newMessage.guild) return; if (!newMessage.guild) return;
if (newMessage.author.bot) return; if (newMessage.author.bot) return;
await CacheHelper.UpdateServerCache(newMessage.guild);
if (oldMessage.content == newMessage.content) return; if (oldMessage.content == newMessage.content) return;
const enabled = await SettingsHelper.GetSetting("event.message.update.enabled", newMessage.guild.id); const enabled = await SettingsHelper.GetSetting("event.message.update.enabled", newMessage.guild.id);

View file

@ -0,0 +1,27 @@
import { Guild } from "discord.js";
import Server from "../database/entities/Server";
export default class CacheHelper {
public static async UpdateServerCache(guild: Guild) {
const cacheInterval = process.env.CACHE_INTERVAL;
if (!cacheInterval) return;
let server = await Server.FetchOneById(Server, guild.id);
if (!server) {
server = new Server(guild.id);
await server.Save(Server, server);
await CacheHelper.UpdateCache(guild);
} else if (server.LastCached.getTime() + Number(cacheInterval) < Date.now()) {
await CacheHelper.UpdateCache(guild);
}
}
private static async UpdateCache(guild: Guild) {
console.log(`Updating cache for ${guild.name} (${guild.id})`);
await guild.members.fetch();
}
}

View file

@ -850,9 +850,9 @@
"@types/istanbul-lib-report" "*" "@types/istanbul-lib-report" "*"
"@types/jest@^29.0.0": "@types/jest@^29.0.0":
version "29.5.11" version "29.5.12"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.11.tgz#0c13aa0da7d0929f078ab080ae5d4ced80fa2f2c" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544"
integrity sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ== integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==
dependencies: dependencies:
expect "^29.0.0" expect "^29.0.0"
pretty-format "^29.0.0" pretty-format "^29.0.0"
@ -864,7 +864,14 @@
dependencies: dependencies:
"@types/node" "*" "@types/node" "*"
"@types/node@*", "@types/node@^20.0.0": "@types/node@*":
version "20.11.16"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.16.tgz#4411f79411514eb8e2926f036c86c9f0e4ec6708"
integrity sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==
dependencies:
undici-types "~5.26.4"
"@types/node@^20.0.0":
version "20.11.10" version "20.11.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.10.tgz#6c3de8974d65c362f82ee29db6b5adf4205462f9" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.10.tgz#6c3de8974d65c362f82ee29db6b5adf4205462f9"
integrity sha512-rZEfe/hJSGYmdfX9tvcPMYeYPW2sNl50nsw4jZmRcaG0HIAb0WYEpsB05GOb53vjqpyE9GUhlDQ4jLSoB5q9kg== integrity sha512-rZEfe/hJSGYmdfX9tvcPMYeYPW2sNl50nsw4jZmRcaG0HIAb0WYEpsB05GOb53vjqpyE9GUhlDQ4jLSoB5q9kg==
@ -1782,9 +1789,9 @@ dot-prop@^7.2.0:
type-fest "^2.11.2" type-fest "^2.11.2"
dotenv@^16.0.0, dotenv@^16.0.3: dotenv@^16.0.0, dotenv@^16.0.3:
version "16.4.1" version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ== integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==
eastasianwidth@^0.2.0: eastasianwidth@^0.2.0:
version "0.2.0" version "0.2.0"
@ -4651,9 +4658,9 @@ ts-essentials@^7.0.3:
integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==
ts-jest@^29.0.0: ts-jest@^29.0.0:
version "29.1.1" version "29.1.2"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.2.tgz#7613d8c81c43c8cb312c6904027257e814c40e09"
integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== integrity sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==
dependencies: dependencies:
bs-logger "0.x" bs-logger "0.x"
fast-json-stable-stringify "2.x" fast-json-stable-stringify "2.x"
@ -4777,10 +4784,10 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
undici@5.27.2: undici@5.27.2, undici@^6.0.0:
version "5.27.2" version "6.7.0"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.27.2.tgz#a270c563aea5b46cc0df2550523638c95c5d4411" resolved "https://registry.yarnpkg.com/undici/-/undici-6.7.0.tgz#ab7eccb292c8e831c93564ac59f8323c0e8aa842"
integrity sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ== integrity sha512-IcWssIyDN1gk6Mcae44q04oRoWTKrW8OKz0effVK1xdWwAgMPnfpxhn9RXUSL5JlwSikO18R7Ibk7Nukz6kxWA==
dependencies: dependencies:
"@fastify/busboy" "^2.0.0" "@fastify/busboy" "^2.0.0"