Repository navigation
esdev@0.27.0
Added
-
A
pluginsentry may be several plugins (DECISIONS D214). An export, or
what its factory returns, may be a list of plugins, and the list takes the
entry's place in order, so a package made of several plugins needs one
esdev.jsonentry. Nested lists flatten andnull/falseare skipped.
runtime:build'sbuild({ plugins })reads its list the same way and also
awaits promises, as Rollup does. A0or""is refused rather than
skipped. This used to fail withplugin-0: unknown hook "0". -
The
fullstacktemplate's server is the generated AFW handler
(@afw/server): API routes, loaders, middleware, server functions and
server-rendered pages all come through onecreateHandler, so a new route
needs no edit toserver.js. It ships a server-function sample
(app/todos/todos.server.js) that the todos page calls and its loader calls
directly. In TypeScript the sample is typed; that needs
@opentf/esdev-plugin-afwwith its.tsxtype fix (after 0.7.0). -
dev.servers(DECISIONS D208):esdev startruns several servers —
each with its owntarget,port,env,args, startedafterthe ones
it names — restarts only those whose output changed, and shows each one's
errors on the page under its name.dev.server.proxymay name a server,
making esdev the front door: one address for the page, the update channel
and every server, with the page'sHostkept.dev.runis unchanged. -
Server errors in the overlay (DECISIONS D207). When the server
esdev startruns fails a request or crashes, open pages show it under
Server error, with the request's method, path and trace id. -
esdev startand its server are linked: a restart drains in-flight
requests on every platform, Windows included (it used to kill the server
there), the loop learns the server is listening whenserve()binds, and a
server whoseesdev startis killed exits instead of holding its port. -
An outbound proxy (DECISIONS D205).
fetch, theWebSocketclient
and the--otelexporter — in the programs esdev runs,esdev start's
server,esdev create's registry lookups andesdev upgrade— follow
HTTPS_PROXY/HTTP_PROXY/NO_PROXY(lowercase first), as npm and git do.
--proxy=<url>and--no-proxy=<list>override them;--no-proxy=*turns
the proxy off.
Changed
-
esdev createandesdev initask in Clack's layout and colours, as
create-afw does (@clack/prompts1.8): a gray gutter joining the questions
under a cyan title badge, the question being asked in cyan with a
↑/↓ to navigate • Enter: confirm • Esc: backfooter,●/○options with
the hint beside the focused one, an inline● Yes / ○ Nofor yes/no
questions, and a text input with its default as the placeholder. Outcomes
are marked with ticks, crosses and warning signs: a green✔on each answer
and oncreated, a red✖and struck-through answer on a cancel, a gray–
on a skipped question and a yellow⚠on a registry retry. The keys stay as
they were (Esc steps back, a digit jumps). Esc on the install question now
readsSkipped; it still installs nothing. -
esdev create --template=docsleaves the blog out unless asked, as
create-afw does: the question is now "Add a blog?" and starts on No, and an
unattended run without--blogwrites docs only.--blogaddsapp/blog/
with a sample post, a Blog link, and RSS and Atom feeds;--no-blogis
still accepted. -
esdev upgradealso updates theesruninstalled beside it
(DECISIONS D204), each to its own newest release, checked against its
checksums.txt.--only=esdevor--only=esrun(install.sh's spelling)
limits it to one, and--dry-runreports on both. Anesrunelsewhere on
PATHis left alone. This replacesesrun upgrade, which is removed. -
The bundler moves to rolldown 1.3.1 and oxc 0.157. Among rolldown's
fixes since 1.2.3: a use-after-free in async transforms that read a
tsconfig.json, side effects dropped by tree-shaking (through import
cycles, afterexports.xwrites, and when an exported constant was inlined),
several renaming collisions, chunk execution order, and module namespace
objects that are now null-prototype and non-extensible. oxc fixes TypeScript
enums exported across namespace blocks and the lowering of private class
members andusing. The React Compiler pass stays on the oxc it targets. -
A library build names a non-JavaScript module's output after the whole
file:button.module.cssbecomesbutton.module.css.js(was
button.module.js), anddata.jsonbecomesdata.json.js, as Rollup and
Vite library builds name them. A module can no longer collide with a
button.module.jsbeside it. The imports,requires and declarations the
build writes name the new files; a packageexportsmap that names one of
the old paths needs updating.
Fixed
esdev upgradetries a download again when the network fails it (a
dropped connection, a truncated or stalled body, a5xxor429), up to
three attempts in all, and shows a progress bar for the archive when
stderr is a terminal.
Security
- An import loads only what esdev turns into a module (DECISIONS D209),
as under esrun: module files, the TypeScript and JSX esdev compiles,
.css, and whatever a plugin'stransformfilter admits. Anything else is
refused withERR_UNKNOWN_FILE_EXTENSIONbefore it is read — it used to
run as JavaScript. A plugin with noidfilter on itstransformstill
claims every file. - A web page can no longer attach to
--inspect. The debugger answered
anyHostand anyOrigin, so a page using DNS rebinding could read
/json/list, attach and run code in the process — Node's CVE-2018-7160.
It now answers only tolocalhostor an IP address, refuses a WebSocket
upgrade carrying anyOriginbut Chrome DevTools' (devtools://devtools),
and its session id comes from the OS random source rather than the clock.