Published .
They are now https://jsr.io/@std packages, instead of the package https://deno.land/std@0.154.0.
To migrate, in your server import maps (i.e. importMap.server.dev.json
and importMap.server.json
):
- "std/": "https://deno.land/std@0.154.0/",
+ "@std/http/": "jsr:/@std/http@^1.0.12/",
+ "@std/media-types/": "jsr:/@std/media-types@^1.1.0/",
+ "@std/path/": "jsr:/@std/path@^1.0.8/",
Ruck now serves JavaScript files with the content type text/javascript
instead of application/javascript
.
serve
that creates the Ruck app HTTP server:
Migrated from the deprecated Deno standard library function to Deno.serve
.
The option port
is now optional and defaults to 0
. Set 0
to listen on any available port (later get the listening port via the resolved HTTP server property addr.port
).
It now resolves the created Deno HTTP server instance, of type Deno.HttpServer<Deno.NetAddr>
.
To migrate:
const abortController = new AbortController();
- const { close } = await serve({
+ const ruckAppHttpServer = await serve({
clientImportMap,
port,
signal: abortController.signal,
});
Later, when you need to abort the server and await it closing…
abortController.abort();
- await close;
+ await ruckAppHttpServer.finished;
readableStreamFromReader
to the new Deno API Deno.FsFile.readable
.Deno.FsFile.rid
, Deno.resources
, and Deno.close
to manually calling the modern Deno.FsFile
method Symbol.dispose
.serve
option esModuleShimsSrc
.Html
prop esModuleShimsScript
.@import
to import types in modules and readme example code.deno
flag --allow-import
, as required by Deno v2.serveProjectFiles
.deno-puppeteer
to @astral/astral
in tests.