Skip to content

Remove send - #135

Merged
zachleat merged 5 commits into
11ty:mainfrom
tmcw:no-send
Aug 19, 2026
Merged

zachleat merged 5 commits into
11ty:mainfrom
tmcw:no-send

Conversation

@tmcw

@tmcw tmcw commented May 10, 2026

Copy link
Copy Markdown
Contributor

This code used send, but only for content-range requests. send is a pretty deep dependency, and not used very much.

https://node-modules.dev/chart/treemap#install=@11ty/eleventy-dev-server

CleanShot 2026-05-10 at 14 17 06@2x

This PR ports the relevant parts to eleventy-dev-server directly. Eliminates 409kb and 17 dependencies. I think the one question mark is whether this needs to adapt send's content-type support or media content.

@zachleat

Copy link
Copy Markdown
Member

This one relates to #62. I did test locally and ran into this error

[11ty/eleventy-dev-server] Uncaught exception: RangeError [ERR_OUT_OF_RANGE]: The value of "start" is out of range. It must be <= "end" (here: 14404). Received 327680
    at new ReadStream (node:internal/fs/streams:219:13)
    at Object.createReadStream (node:fs:3191:10)
    at file:///Users/zachleatherman/Code/eleventy-dev-server/server.js:738:35
    at FSReqCallback.oncomplete (node:fs:195:5) {
  code: 'ERR_OUT_OF_RANGE'
}

via a

<!doctype html>
<html lang="en">
	<video src="demo.mp4"></video>
</html>

that does work in v3.0.0-alpha.8

@tmcw

tmcw commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

Okay! Yeah this needs a little more manual testing, and I'll see if I can create a unit test that catches that condition.

@zachleat zachleat added this to the Eleventy Dev Server v3.0.0 milestone Jun 4, 2026
@zachleat

Copy link
Copy Markdown
Member

Maybe #141 might solve this a little cleaner!

@tmcw

tmcw commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Okay, put some polish and additional testing into it!

@zachleat zachleat removed the on-hold label Aug 19, 2026
@zachleat

Copy link
Copy Markdown
Member

Shipping with v3.0.0 (and v3.0.0-alpha.11)

@zachleat
zachleat merged commit 617933b into 11ty:main Aug 19, 2026
@zachleat

Copy link
Copy Markdown
Member

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants