Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to jsr for dependencies and modernize some things #487

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ci

on: [ push, pull_request, release ]
on: [push, pull_request, release]

jobs:
code_quality:
Expand All @@ -12,11 +12,11 @@ jobs:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
deno-version: v2.x

- name: Format
run: deno fmt --check

- name: Lint
run: deno lint

Expand All @@ -31,7 +31,7 @@ jobs:

- name: Build tests container
run: docker compose build tests

- name: Run tests
run: docker compose run tests

Expand All @@ -51,7 +51,7 @@ jobs:
no_typecheck_status: ${{ steps.no_typecheck_status.outputs.status }}

report_warnings:
needs: [ code_quality, test ]
needs: [code_quality, test]
runs-on: ubuntu-latest
steps:
- name: Set no-typecheck fail comment
Expand All @@ -70,4 +70,4 @@ jobs:
<pre><code>
${{ needs.test.outputs.no_typecheck }}
</code></pre>
</details>
</details>
13 changes: 6 additions & 7 deletions .github/workflows/publish_jsr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ jobs:

- name: Set up Deno
uses: denoland/setup-deno@v1

with:
deno-version: v2.x

- name: Check Format
run: deno fmt --check

- name: Convert to JSR package
run: deno run -A tools/convert_to_jsr.ts

- name: Format converted code
- name: Format
run: deno fmt

- name: Lint
run: deno lint

Expand All @@ -40,7 +39,7 @@ jobs:

- name: Build tests container
run: docker compose build tests

- name: Run tests
run: docker compose run tests

Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM denoland/deno:alpine-1.40.3
FROM denoland/deno:alpine-2.1.4
WORKDIR /app

# Install wait utility
Expand All @@ -11,7 +11,6 @@ USER deno
# Cache external libraries
# Test deps caches all main dependencies as well
COPY tests/test_deps.ts tests/test_deps.ts
COPY deps.ts deps.ts
RUN deno cache tests/test_deps.ts

ADD . .
Expand Down
2 changes: 1 addition & 1 deletion client/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class ConnectionParamsError extends Error {
/**
* Create a new ConnectionParamsError
*/
constructor(message: string, cause?: Error) {
constructor(message: string, cause?: unknown) {
super(message, { cause });
this.name = "ConnectionParamsError";
}
Expand Down
5 changes: 3 additions & 2 deletions connection/auth.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { crypto, hex } from "../deps.ts";
import { crypto } from "@std/crypto/crypto";
import { encodeHex } from "@std/encoding/hex";

const encoder = new TextEncoder();

async function md5(bytes: Uint8Array): Promise<string> {
return hex.encodeHex(await crypto.subtle.digest("MD5", bytes));
return encodeHex(await crypto.subtle.digest("MD5", bytes));
}

// AuthenticationMD5Password
Expand Down
Loading