From 2c416ca4fa6b07c8dabcd152ec425c31301d3ea7 Mon Sep 17 00:00:00 2001 From: Hexagon Date: Fri, 4 Oct 2024 21:32:36 +0200 Subject: [PATCH] Adapt to Deno 2.0 --- .github/workflows/jsr.yaml | 2 +- .github/workflows/tests.yaml | 4 ++-- deno.json | 5 ++++- src/cli/loop.ts | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jsr.yaml b/.github/workflows/jsr.yaml index 0bdfc88..75ac719 100644 --- a/.github/workflows/jsr.yaml +++ b/.github/workflows/jsr.yaml @@ -9,4 +9,4 @@ jobs: permissions: contents: read id-token: write - uses: cross-org/workflows/.github/workflows/jsr-publish.yml@main \ No newline at end of file + uses: cross-org/workflows/.github/workflows/jsr-publish.yml@main diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 68b4daf..0a6e445 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -on: +on: push: branches: [main] pull_request: @@ -20,4 +20,4 @@ jobs: with: jsr_dependencies: "@cross/test @cross/fs @cross/runtime @std/assert@0.224.0 @std/path@0.224.0" npm_dependencies: "cbor-x" - test_target: "test/*.test.ts" \ No newline at end of file + test_target: "test/*.test.ts" diff --git a/deno.json b/deno.json index df27828..7b8b162 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@cross/kv", - "version": "0.17.1", + "version": "0.17.2", "exports": { ".": "./mod.ts", "./cli": "./src/cli/mod.ts" @@ -12,6 +12,9 @@ ] } }, + "compilerOptions": { + "useUnknownInCatchVariables": false + }, "imports": { "@cross/fs": "jsr:@cross/fs@^0.1.11", "@cross/runtime": "jsr:@cross/runtime@^1.0.0", diff --git a/src/cli/loop.ts b/src/cli/loop.ts index da82194..096075d 100644 --- a/src/cli/loop.ts +++ b/src/cli/loop.ts @@ -3,6 +3,7 @@ import { CurrentRuntime, Runtime } from "@cross/runtime"; import { createInterface } from "node:readline"; import type { KVCliHandler, KVDBContainer } from "./common.ts"; +import process from "node:process"; // Command handling structure const commands: { [command: string]: KVCliHandler } = {};