Skip to content

Commit

Permalink
feat: deno v2 (#97)
Browse files Browse the repository at this point in the history
* test: deno v2

* ci: use checkout v4
  • Loading branch information
jeiea authored Oct 15, 2024
1 parent 5fafed1 commit 70fa82b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: download deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: check format
if: matrix.os == 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2

- name: Publish package
run: deno publish
4 changes: 2 additions & 2 deletions docs/pyro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ footer:
Learn:
- Introduction /
Community:
- Discord https://discord.gg/XJMMSSC4Fj
- Support https://github.com/lino-levan/astral/issues/new
- Discord https://discord.gg/XJMMSSC4Fj
- Support https://github.com/lino-levan/astral/issues/new
2 changes: 1 addition & 1 deletion tests/fixtures/fill.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<title>Fill</title>
</head>
<body>
<input id="target"></input>
<input id="target" />
</body>
</html>
10 changes: 2 additions & 8 deletions tests/locator_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,14 @@ async function serveFixture(name: string) {

const html = await Deno.readFile(file);

let address = "";
const server = Deno.serve({
port: 0,
onListen(addr) {
address = `http://${addr.hostname}:${addr.port}`;
},
}, () => {
const server = Deno.serve({ port: 0 }, () => {
return new Response(html, {
headers: { "Content-Type": "text/html; charset=utf-8" },
});
});

return {
address,
address: `http://localhost:${server.addr.port}`,
async [Symbol.asyncDispose]() {
await server.shutdown();
await server.finished;
Expand Down

0 comments on commit 70fa82b

Please sign in to comment.