Major
- Updated the required Deno version to v2+.
- Updated the Deno standard library dependencies.
-
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.jsonandimportMap.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/javascriptinstead ofapplication/javascript.
-
- Updated the function
servethat creates the Ruck app HTTP server:-
Migrated from the deprecated Deno standard library function to
Deno.serve. -
The option
portis now optional and defaults to0. Set0to listen on any available port (later get the listening port via the resolved HTTP server propertyaddr.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;
-
- Migrated from the deprecated Deno standard library function
readableStreamFromReaderto the new Deno APIDeno.FsFile.readable. - Migrated from the deprecated Deno APIs
Deno.FsFile.rid,Deno.resources, andDeno.closeto manually calling the modernDeno.FsFilemethodSymbol.dispose. - Ruck app pages no longer include an ES Module Shims script in the server side rendered HTML, as now all modern browsers support import maps.
- Removed the function
serveoptionesModuleShimsSrc. - Removed the React component
HtmlpropesModuleShimsScript.
- Removed the function
- Use the TypeScript JSDoc tag
@importto import types in modules and readme example code.
Patch
- Updated the GitHub Actions CI config:
- No longer run the workflow on pull request.
- Enable manual workflow dispatching.
- Run checks in separate jobs.
- For the test job on Linux, disable the modern security feature “AppArmor” so the Chromium developer build installed by Astral can be used (see crbug.com/373753919).
- Removed custom step names.
- Use Deno v2.
- Updated actions/checkout to v4.
- Updated actions/setup-deno to v2.
- Updated the project and readme import maps for the latest React v18.3.1 URLs.
- Configured Deno to not auto-generate a lockfile.
- Fixed formatting issues caused by updating Deno.
- Added in project and readme scripts the CLI
denoflag--allow-import, as required by Deno v2. - Modernized the project find min compatible Deno version script.
- Modernized the project type check script.
- Modernized the test helper function
serveProjectFiles. - Implemented Deno test steps now that denoland/deno#15425 is no longer an issue.
- Migrated from
deno-puppeteerto@astral/astralin tests.