Skip to content

Commit b929b42

Browse files
github-actions[bot]web-flowayame113
authored
Update Deno Dependencies (#35)
* chore(deps): update deno dependencies * Update README.md * Update README.md --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: ayame113 <[email protected]>
1 parent a20c91c commit b929b42

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TypeScript + ES Modules
88
Transpile TypeScript on the fly and serve it from your server as ES Modules.
99

1010
```ts
11-
import { serve } from "https://deno.land/std@0.177.0/http/mod.ts";
11+
import { serve } from "https://deno.land/std@0.178.0/http/mod.ts";
1212
import { serveDirWithTs } from "https://deno.land/x/ts_serve@$MODULE_VERSION/mod.ts";
1313

1414
serve((request) => serveDirWithTs(request));
@@ -34,7 +34,7 @@ console.log(1);
3434
As oak middleware:
3535

3636
```ts
37-
import { Application } from "https://deno.land/x/oak@v11.1.0/mod.ts";
37+
import { Application } from "https://deno.land/x/oak@v12.0.1/mod.ts";
3838
import { tsMiddleware } from "https://deno.land/x/ts_serve@$MODULE_VERSION/mod.ts";
3939

4040
const app = new Application();
@@ -54,22 +54,22 @@ await app.listen({ port: 8000 });
5454
```
5555

5656
As a replacement for the
57-
[serveDir](https://doc.deno.land/https://deno.land/std@0.177.0/http/file_server.ts/~/serveDir)
57+
[serveDir](https://doc.deno.land/https://deno.land/std@0.178.0/http/file_server.ts/~/serveDir)
5858
function in the Deno standard library:
5959

6060
```ts
61-
import { serve } from "https://deno.land/std@0.177.0/http/mod.ts";
61+
import { serve } from "https://deno.land/std@0.178.0/http/mod.ts";
6262
import { serveDirWithTs } from "https://deno.land/x/ts_serve@$MODULE_VERSION/mod.ts";
6363

6464
serve((request) => serveDirWithTs(request));
6565
```
6666

6767
As a replacement for the
68-
[serveFile](https://doc.deno.land/https://deno.land/std@0.177.0/http/file_server.ts/~/serveFile)
68+
[serveFile](https://doc.deno.land/https://deno.land/std@0.178.0/http/file_server.ts/~/serveFile)
6969
function in the Deno standard library:
7070

7171
```ts
72-
import { serve } from "https://deno.land/std@0.177.0/http/mod.ts";
72+
import { serve } from "https://deno.land/std@0.178.0/http/mod.ts";
7373
import { serveFileWithTs } from "https://deno.land/x/ts_serve@$MODULE_VERSION/mod.ts";
7474

7575
serve((request) => serveFileWithTs(request, "./mod.ts"));
@@ -78,13 +78,13 @@ serve((request) => serveFileWithTs(request, "./mod.ts"));
7878
As [Hono](https://honojs.dev/)'s handler:
7979

8080
```ts
81-
import { serve } from "https://deno.land/std@0.177.0/http/server.ts";
82-
import { Hono } from "https://deno.land/x/hono@v2.2.5/mod.ts";
81+
import { serve } from "https://deno.land/std@0.178.0/http/server.ts";
82+
import { Hono } from "https://deno.land/x/hono@v3.0.2/mod.ts";
8383
import { serveDirWithTs } from "https://deno.land/x/ts_serve@$MODULE_VERSION/mod.ts";
8484

8585
const app = new Hono();
8686
app.get("*", (c) => {
87-
return serveDirWithTs(c.req);
87+
return serveDirWithTs(c.req.raw);
8888
});
8989
serve(app.fetch);
9090
```
@@ -100,7 +100,7 @@ takes time. In that case, calling this function in advance can speed up later
100100
calls to the transpile function.
101101

102102
```ts
103-
import { serve } from "https://deno.land/std@0.177.0/http/mod.ts";
103+
import { serve } from "https://deno.land/std@0.178.0/http/mod.ts";
104104
import {
105105
fourceInstantiateWasm,
106106
serveDirWithTs,

oak_test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
fail,
44
} from "https://deno.land/[email protected]/testing/asserts.ts";
55
import { deferred } from "https://deno.land/[email protected]/async/mod.ts";
6-
import { Application } from "https://deno.land/x/oak@v11.1.0/mod.ts";
6+
import { Application } from "https://deno.land/x/oak@v12.0.1/mod.ts";
77
import { MediaType, transpile, tsMiddleware } from "./mod.ts";
88

99
const port = 8888;

src/oak.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Context } from "https://deno.land/x/oak@v11.1.0/mod.ts";
2-
import { convertBodyToBodyInit } from "https://deno.land/x/oak@v11.1.0/response.ts";
1+
import type { Context } from "https://deno.land/x/oak@v12.0.1/mod.ts";
2+
import { convertBodyToBodyInit } from "https://deno.land/x/oak@v12.0.1/response.ts";
33

44
import { MediaType, transpile } from "../utils/transpile.ts";
55

@@ -14,7 +14,7 @@ const jsxType = new Set<string | undefined>(["jsx", ".jsx", "text/jsx"]);
1414
* Oak middleware that rewrites TypeScript response to JavaScript response.
1515
*
1616
* ```ts
17-
* import { Application } from "https://deno.land/x/oak@v11.1.0/mod.ts";
17+
* import { Application } from "https://deno.land/x/oak@v12.0.1/mod.ts";
1818
* import { tsMiddleware, fourceInstantiateWasm } from "https://deno.land/x/ts_serve@$MODULE_VERSION/mod.ts";
1919
*
2020
* fourceInstantiateWasm();

0 commit comments

Comments
 (0)