Skip to content

Version 9.0.0

Latest
Compare
Choose a tag to compare
@jaydenseric jaydenseric released this 24 Jan 06:09

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/[email protected].

      To migrate, in your server import maps (i.e. importMap.server.dev.json and importMap.server.json):

      - "std/": "https://deno.land/[email protected]/",
      + "@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.

  • Updated the function 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;
  • Migrated from the deprecated Deno standard library function readableStreamFromReader to the new Deno API Deno.FsFile.readable.
  • Migrated from the deprecated Deno APIs Deno.FsFile.rid, Deno.resources, and Deno.close to manually calling the modern Deno.FsFile method Symbol.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 serve option esModuleShimsSrc.
    • Removed the React component Html prop esModuleShimsScript.
  • Use the TypeScript JSDoc tag @import to 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 deno flag --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-puppeteer to @astral/astral in tests.