diff --git a/.dvmrc b/.dvmrc index d724e43..a82727c 100644 --- a/.dvmrc +++ b/.dvmrc @@ -1 +1 @@ -1.44.1 +1.46.3 diff --git a/.github/workflows/cron-check-subscriptions.yml b/.github/workflows/cron-check-subscriptions.yml index 621a2bd..fd168b9 100644 --- a/.github/workflows/cron-check-subscriptions.yml +++ b/.github/workflows/cron-check-subscriptions.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - uses: denoland/setup-deno@v1 with: - deno-version: v1.44.1 + deno-version-file: .dvmrc - env: POSTGRESQL_HOST: ${{ secrets.POSTGRESQL_HOST }} POSTGRESQL_USER: ${{ secrets.POSTGRESQL_USER }} diff --git a/.github/workflows/cron-cleanup.yml b/.github/workflows/cron-cleanup.yml index 77124c1..3bee326 100644 --- a/.github/workflows/cron-cleanup.yml +++ b/.github/workflows/cron-cleanup.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - uses: denoland/setup-deno@v1 with: - deno-version: v1.44.1 + deno-version-file: .dvmrc - env: POSTGRESQL_HOST: ${{ secrets.POSTGRESQL_HOST }} POSTGRESQL_USER: ${{ secrets.POSTGRESQL_USER }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0923c25..58157c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v4 - uses: denoland/setup-deno@v1 with: - deno-version: v1.44.1 + deno-version-file: .dvmrc - run: docker-compose pull - uses: jpribyl/action-docker-layer-caching@v0.1.1 continue-on-error: true diff --git a/Dockerfile b/Dockerfile index 6c24992..c2a28fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:1.44.1 +FROM denoland/deno:1.46.3 EXPOSE 8000 diff --git a/Makefile b/Makefile index e667bc3..779c288 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ format: test: deno fmt --check deno lint + deno check . deno test --allow-net --allow-read --allow-env --check .PHONY: migrate-db diff --git a/deno.json b/deno.json index db44ca8..14d4921 100644 --- a/deno.json +++ b/deno.json @@ -29,6 +29,15 @@ "deno.ns" ] }, - "importMap": "./import_map.json", - "lock": false + "lock": false, + "imports": { + "/": "./", + "./": "./", + + "std/assert/equals": "jsr:@std/assert@1.0.6/equals", + "std/assert/not-equals": "jsr:@std/assert@1.0.6/not-equals", + "std/http/file-server": "jsr:@std/http@1.0.7/file-server", + "std/dotenv/load": "jsr:@std/dotenv@0.225.2/load", + "deno/emit": "jsr:@deno/emit@0.45.0" + } } diff --git a/import_map.json b/import_map.json deleted file mode 100644 index aa95d2f..0000000 --- a/import_map.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "imports": { - "/": "./", - "./": "./", - - "std/assert/assert-equals": "jsr:@std/assert@0.226.0/assert-equals", - "std/assert/assert-not-equals": "jsr:@std/assert@0.226.0/assert-not-equals", - "std/http/file-server": "jsr:@std/http@0.224.4/file-server", - "std/dotenv/load": "jsr:@std/dotenv@0.224.0/load", - "deno/emit": "jsr:@deno/emit@0.41.0" - } -} diff --git a/lib/utils_test.ts b/lib/utils_test.ts index 51c120a..c3e442d 100644 --- a/lib/utils_test.ts +++ b/lib/utils_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from 'std/assert/assert-equals'; +import { assertEquals } from 'std/assert/equals'; import { escapeHtml, generateRandomCode, jsonToFormUrlEncoded, splitArrayInChunks } from './utils.ts'; Deno.test('that escapeHtml works', () => { diff --git a/main_test.ts b/main_test.ts index 3164b60..6419340 100644 --- a/main_test.ts +++ b/main_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from 'std/assert/assert-equals'; +import { assertEquals } from 'std/assert/equals'; import { abortController } from './main.ts'; const baseUrl = 'http://localhost:8000'; diff --git a/public/ts/encryption_test.ts b/public/ts/encryption_test.ts index c43c495..174e270 100644 --- a/public/ts/encryption_test.ts +++ b/public/ts/encryption_test.ts @@ -1,5 +1,5 @@ -import { assertEquals } from 'std/assert/assert-equals'; -import { assertNotEquals } from 'std/assert/assert-not-equals'; +import { assertEquals } from 'std/assert/equals'; +import { assertNotEquals } from 'std/assert/not-equals'; import { KeyPair } from '/lib/types.ts'; import Encryption from './encryption.ts'; diff --git a/public/ts/utils_test.ts b/public/ts/utils_test.ts index 387a449..44b876e 100644 --- a/public/ts/utils_test.ts +++ b/public/ts/utils_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from 'std/assert/assert-equals'; +import { assertEquals } from 'std/assert/equals'; import { dateDiffInDays, formatNumber, SupportedCurrencySymbol, validateEmail } from './utils.ts'; Deno.test('that dateDiffInDays works', () => {