Skip to content

Releases: predetermined/aqua

v1.3.6

11 Dec 14:47
ef8c459
Compare
Choose a tag to compare

Requires at least Deno version 1.13

Updates

  • Fixes an occurrence of the "Http: connection closed before message completed" error (#101)

v1.3.5

03 Jul 20:47
cc086fc
Compare
Choose a tag to compare

Requires at least Deno version 1.13

Updates

  • Fixes a bug that prevented parsing of the request cookies (#96)

v1.3.4

25 Jun 20:15
ba0f5d8
Compare
Choose a tag to compare

Requires at least Deno version 1.13

Updates

  • Fixes a bug that caused root-level static file serving to not work (#93; thank you @felixfong227!)

v1.3.3

30 Dec 15:36
85f5f39
Compare
Choose a tag to compare

Requires at least Deno version 1.13

Updates

  • The fallback handler now receives a second argument, errorType, so it's easier to determine why a route wasn't matched. You can find an example here.
export enum ErrorType {
  NotFound,
  SchemaMismatch,
  ErrorThrownInResponseHandler,
}
  • If an error occurs in a request handler, the error is now being returned as the route's content by default (can be changed with a custom fallback handler), instead of causing the application to break.
app.get("/error", (req) => {
  throw new Error("test");
});
// The route now returns "Error: test"
  • There is now support for more content return types (this also enables streaming).
type ResponseContent =
  | Uint8Array
  | Blob
  | BufferSource
  | FormData
  | URLSearchParams
  | ReadableStream<Uint8Array>
  | string;

v1.3.2

12 Oct 18:06
57eb316
Compare
Choose a tag to compare

Requires at least Deno version 1.13

Updates

  • Support async schema validation functions
app.get("/", (_req) => "Hello, World!", {
  schema: {
    query: [
      async (query) => {
        return await isValidKey(query.key);
      },
    ],
  },
});
  • Use more explicit context type for schema validation functions
schema: {
  body: [
    (body) => { // Record<string, Json>
      return !!body.test;
    },
  ],
  query: [
    (query) => { // Record<string, string>
      return !!query.test;
    },
  ],
},

v1.3.1

28 Aug 19:13
Compare
Choose a tag to compare

Requires at least Deno version 1.13

Updates

  • Remove render example

v1.3.0

28 Aug 17:30
Compare
Choose a tag to compare

Requires at least Deno version 1.13

Updates

  • Drop support for std/http (Discussion: #80)
  • Use the native Deno.serveHttp function
    • Change the Request["raw"] type
  • Remove the public render method on the Aqua class
  • Fix a bug where URL parameters would be set to undefined instead of the right value
  • Set Request["body"] type to Json
  • Add conn to the Request type (req.conn)
  • Match user-facing Response type with the allowed return type of a response handler function
function test(_req: Request): Response {
 return "test!"; // No response object required anymore
}
app.get("/", test);
  • Match the fallback handler status code behavior when the redirect property is present to the one of the other request handlers

v1.2.4

18 Aug 15:52
07697fc
Compare
Choose a tag to compare

Uses Deno Standard Modules v0.105.0

Updates

  • Fix method mismatching for RegExp and parameter routes

v1.2.3

21 Jul 18:36
Compare
Choose a tag to compare

Uses Deno Standard Modules v0.102.0

Updates

  • Use same exports for deploy.ts as in the mod.ts
  • Remove false sentence in README

v1.2.2

20 Jul 19:39
Compare
Choose a tag to compare

Uses Deno Standard Modules v0.102.0

Updates

  • Fix typos