Skip to content

Commit

Permalink
Merge pull request #80 from syumai/release-0.15.0
Browse files Browse the repository at this point in the history
Release 0.15.0
  • Loading branch information
syumai committed Aug 14, 2021
2 parents bdc15e5 + 392cd3e commit 5e2181d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SHELL=/bin/bash
SHELL=/usr/bin/env bash
TARGET_SRC=$(shell shopt -s globstar && ls ./**/*.{ts,js,tsx} | grep -v ./vendor | grep -v ./testdata)

test:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
post,
redirect,
contentType,
} from "https://denopkg.com/syumai/dinatra@0.14.0/mod.ts";
} from "https://denopkg.com/syumai/dinatra@0.15.0/mod.ts";

app(
get("/hello", () => "hello"),
Expand Down
2 changes: 1 addition & 1 deletion dem.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"protocol": "https",
"path": "deno.land/std",
"version": "0.73.0",
"version": "0.104.0",
"files": [
"/encoding/utf8.ts",
"/flags/mod.ts",
Expand Down
5 changes: 3 additions & 2 deletions response.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { encode } from "./vendor/https/deno.land/std/encoding/utf8.ts";
import { ReadCloser } from "./io.ts";

const encoder = new TextEncoder();

// HeaderMap is a type of response headers.
type HeaderMap =
| Headers
Expand Down Expand Up @@ -56,7 +57,7 @@ export function processResponse(res: Response): HTTPResponse {

let body: Uint8Array | ReadCloser | Deno.Reader;
if (typeof rawBody === "string") {
body = encode(rawBody);
body = encoder.encode(rawBody);
} else {
body = rawBody;
}
Expand Down
2 changes: 1 addition & 1 deletion serve_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ for (const tc of testCases) {
const contentLength = res.headers.get("content-length");

assertEquals(actual, tc.expected);
assertEquals(contentLength, tc.expected.length.toString());
assertEquals(contentLength, new Blob([tc.expected]).size.toString());

const { path, method } = tc.registered;
app.unregister(path, method);
Expand Down
2 changes: 1 addition & 1 deletion vendor/https/deno.land/std/encoding/utf8.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "https://deno.land/std@0.73.0/encoding/utf8.ts";
export * from "https://deno.land/std@0.104.0/encoding/utf8.ts";
2 changes: 1 addition & 1 deletion vendor/https/deno.land/std/flags/mod.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "https://deno.land/std@0.73.0/flags/mod.ts";
export * from "https://deno.land/std@0.104.0/flags/mod.ts";
2 changes: 1 addition & 1 deletion vendor/https/deno.land/std/http/server.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "https://deno.land/std@0.73.0/http/server.ts";
export * from "https://deno.land/std@0.104.0/http/server.ts";
2 changes: 1 addition & 1 deletion vendor/https/deno.land/std/testing/asserts.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "https://deno.land/std@0.73.0/testing/asserts.ts";
export * from "https://deno.land/std@0.104.0/testing/asserts.ts";

0 comments on commit 5e2181d

Please sign in to comment.