Skip to content

Commit cea793e

Browse files
committed
upgrade deno@v1.0.2
Signed-off-by: 迷渡 <justjavac@gmail.com>
1 parent c64b073 commit cea793e

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Deno
2121
uses: denolib/setup-deno@master
2222
with:
23-
deno-version: 0.x
23+
deno-version: 1.0.2
2424

2525
- name: Cache Deno Generated Files
2626
uses: actions/cache@v1

Funfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
RUNTIME custom
22

3-
RUN mkdir -p /code/.fun/deno/bin
3+
ENV DENO_INSTALL /code/.fun/deno/
44

5-
RUN cd /code/.fun/deno/bin \
6-
&& curl --fail --location --progress-bar --output deno.zip https://cdn.devtips.cn/deno/releases/v0.41.0/deno-x86_64-unknown-linux-gnu.zip \
7-
&& unzip -o deno.zip \
8-
&& chmod +x deno \
9-
&& rm deno.zip \
5+
RUN curl -fsSL https://x.deno.js.cn/install.sh | sh -s v1.0.2 \
106
&& echo "Deno was installed successfully."

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![tag](https://img.shields.io/github/release/justjavac/deno_serverless_aliyun)](https://github.com/justjavac/deno_serverless_aliyun/releases)
44
[![Build Status](https://github.com/justjavac/deno_serverless_aliyun/workflows/ci/badge.svg?branch=master)](https://github.com/justjavac/deno_serverless_aliyun/actions)
55
[![license](https://img.shields.io/github/license/justjavac/deno_serverless_aliyun)](https://github.com/justjavac/deno_serverless_aliyun/blob/master/LICENSE)
6-
[![](https://img.shields.io/badge/deno-v0.41.0-green.svg)](https://github.com/denoland/deno)
6+
[![](https://img.shields.io/badge/deno-v1.0.2-green.svg)](https://github.com/denoland/deno)
77

88
Deno + Serverless = Awesome
99

bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
deno -A server.js
2+
deno run -A --unstable server.js

mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
ServerRequest,
33
listenAndServe,
4-
} from "https://deno.land/std@v0.41.0/http/server.ts";
4+
} from "https://deno.land/std@v0.53.0/http/server.ts";
55

66
async function handler(req: ServerRequest): Promise<void> {
77
// 获取 request id
@@ -15,7 +15,7 @@ async function handler(req: ServerRequest): Promise<void> {
1515
}
1616

1717
// 从环境变量获取端口号
18-
const port = Deno.env("FC_SERVER_PORT") ?? "9000";
18+
const port = Deno.env.get("FC_SERVER_PORT") ?? "9000";
1919

2020
// 监听网络请求,并处理
2121
listenAndServe(`:${port}`, handler);

mod_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
1+
import { assertEquals } from "https://deno.land/std@v0.53.0/testing/asserts.ts";
22

3-
Deno.test(function myTestFunction(): void {
3+
Deno.test("myTestFunction", (): void => {
44
assertEquals("foo bar", "foo bar");
55
});

0 commit comments

Comments
 (0)