undici icon indicating copy to clipboard operation
undici copied to clipboard

v7

Open ronag opened this issue 1 year ago • 16 comments

  • llhttp (@metcoder95 merges next branch) - https://github.com/nodejs/undici/pull/3388
  • remove deprecated interceptor api (@metcoder95 merges next branch) #3399
  • dispatcher API issues (@mcollina, @ronag, @metcoder95 )
  • fetch stuff
    • remove polyfills (@KhafraDev has already prepared PRs)
  • add alternative to onHeaders with pre-parsed headers (@ronag )
  • diagnostics channels (@mcollina )

We start with merging the next branch into main (@metcoder95) and then start working actively on v7 with a deadline relative to Node v23.

ronag avatar Jul 03 '24 08:07 ronag

Shall we consider the exposure of the lenient flags from lhttp as part of this?

metcoder95 avatar Jul 03 '24 08:07 metcoder95

Shall we consider the exposure of the lenient flags from lhttp as part of this?

Yes, I think so.

mcollina avatar Jul 03 '24 09:07 mcollina

How can i support?

Uzlopak avatar Jul 03 '24 09:07 Uzlopak

  • diagnostics channels

is this something we're absolutely landing?

Also hopefully https://github.com/nodejs/undici/pull/2727 is included in the fetch stuff, it's slightly older so I'm hoping it won't get missed.

KhafraDev avatar Jul 03 '24 16:07 KhafraDev

How can i support?

Would you like to support adding the lenient flags for llhttp @Uzlopak?

metcoder95 avatar Jul 03 '24 20:07 metcoder95

I was kicking off the work for the lenient flags, but I just noticed that most of them as marked as opening a security vector if enabled; do we want to enable that within undici?

By default they are disabled sure, but do we want to expose the users to that possibility? I'd consider to not do so, cannot imagine under which circumstances (beyond legacy servers) you might want to enable this

metcoder95 avatar Jul 19 '24 09:07 metcoder95

Why was dropped interceptors ? What should i use instead ?

b2whats avatar Jul 21 '24 12:07 b2whats

Interceptors hasn't been dropped, but rather refactored into a new API. Check: https://undici.nodejs.org/#/docs/api/Dispatcher?id=dispatchercomposeinterceptors-interceptor

metcoder95 avatar Jul 21 '24 12:07 metcoder95

can the npm package next point to v7?

Uzlopak avatar Aug 24 '24 09:08 Uzlopak

image

Uzlopak avatar Aug 24 '24 09:08 Uzlopak

That's done.


On a different topic, I think we might want to release v7 before Node.js v23, to be included there.

mcollina avatar Sep 03 '24 07:09 mcollina

Backported some of the work done for interceptors and smaller fixes at core.

metcoder95 avatar Sep 12 '24 20:09 metcoder95

Do we want to make v7 before v23 is cut? https://github.com/nodejs/Release/issues/1034

mcollina avatar Sep 19 '24 15:09 mcollina

Yes.

Uzlopak avatar Sep 19 '24 15:09 Uzlopak

Is undici@v7 going to drop support for Node.js 18.x?

trivikr avatar Oct 04 '24 01:10 trivikr

Not right now. However, if we miss the deadline for Node.js v23 (seems likely), we will definitely be dropping it, as Node.js v18 goes EOL April 2025.

mcollina avatar Oct 04 '24 07:10 mcollina

@trivikr are you arguing we should drop support for Node.js v18 or not? So far it's in and it's not causing many issues.

mcollina avatar Nov 20 '24 08:11 mcollina

I've discussed with @ronag in person how we can handle multiple dispatcher versions (even in minor releases). So those are actually not hard requirements.

mcollina avatar Nov 20 '24 08:11 mcollina

I plan to ship this on the 27th of November.

mcollina avatar Nov 20 '24 08:11 mcollina

are you arguing we should drop support for Node.js v18 or not?

Looking at the history of major version releases of undici and end-of-life of Node.js runtimes, it looks like undici@v7 should drop support for Node.js 18.x

undici version, and release date Min Node.js version, and end-of-life support for EoL Node.js version
v4, 2021-06-21 >=12.18, 2022-04-30 N/A. Next version released before EoL
v5, 2022-03-29 >=12.18, 2022-04-30 1.5+ years
v6, 2023-12-05 >=18.0, 2025-04-30 N/A. Next version released before EoL
v7, 2024-11-27

Assuming v8 of undici is released in December 2025, we can think of two options for min Node.js version support.

undici version, and release date Min Node.js version, and end-of-life support for EoL Node.js version
v7, 2024-11-27 >=18.0, 2025-04-30 6+ months.
v7, 2024-11-27 >=20.0, 2026-04-30 N/A. Next version released before EoL

Undici can use this data to drop support for Node.js 18.x, and push undici users to upgrade. If undici plans to come up with a major release schedule in future - it can be aligned with Node.js LTS EoL (say Q2/Q3 of each year?)

trivikr avatar Nov 20 '24 17:11 trivikr

Bumping for decision on supported version of Node.js.

The https://github.com/nodejs/undici/releases/tag/v7.0.0-alpha.7 was released today, and stable version is expected to be released in two days.

trivikr avatar Nov 25 '24 16:11 trivikr

I have yet to see justification for dropping v18. What benefit is there in dropping it?

KhafraDev avatar Nov 25 '24 16:11 KhafraDev

As time will pass, it would be harder for us to maintain it. Right now, this means using tspl instead of t.plan() for our tests, but the list can grown.

mcollina avatar Nov 25 '24 16:11 mcollina

I'll trust you on that, I guess I would be a -0 on dropping it.

KhafraDev avatar Nov 25 '24 19:11 KhafraDev

If undici plans to come up with a major release schedule in future - it can be aligned with Node.js LTS EoL (say Q2/Q3 of each year?)

Should I create a new feature request for this, if maintainers are interested in coming up with a schedule? It can start with April 2026.

Looking at the past releases, it does not look like undici needs a release schedule. But it might need in future, if undici.request is made available in Node.js just like undici.fetch

trivikr avatar Nov 26 '24 16:11 trivikr

But it might need in future, if undici.request is made available in Node.js just like undici.fetch

Overall, the dispatcher versions can vary and maybe bring some troubles; not 100% sure if we need a release schedule for that, but good to keep in mind

metcoder95 avatar Nov 27 '24 08:11 metcoder95

Shall we close it?

metcoder95 avatar Jan 10 '25 08:01 metcoder95