diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a7c7088..802f438 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,8 +15,8 @@ jobs: with: deno-version: v1.x - name: Test - run: deno test --allow-write --allow-read + run: deno task test - name: Lint - run: deno lint --unstable + run: deno lint - name: Format Check - run: deno fmt --check --ignore=README.md,README_JP.md,./.github/ \ No newline at end of file + run: deno task fmt --check \ No newline at end of file diff --git a/README.md b/README.md index e9bfffc..42119a6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ DB module in JSON format created with Deno. - [x] Asynchronous support - [x] Partial search with regular expressions -If you don't see a feature you think you need, please let us know what you want in [Issue](https://github.com/windchime-yk/bracesdb/issues/new). It will be used as a reference for implementation. +If you don't see a feature you think you need, please let us know what you want in [Issue](https://github.com/rwl-dev/bracesdb/issues/new). It will be used as a reference for implementation. ## API When creating a file, you must add `--allow-read` and `--allow-write` at execution to read and write the file. @@ -32,7 +32,7 @@ When creating a file, you must add `--allow-read` and `--allow-write` at executi `filename` is the DB name. Default name is `main`. ``` typescript -import { BracesDB } from "https://deno.land/x/bracesdb/mod.ts"; +import { BracesDB } from "https://deno.land/x/bracesdb@/mod.ts"; interface DB { name?: string; @@ -80,13 +80,10 @@ const dataAll = db.find(); ### Test Execute the following command. ``` bash -$ git clone git@github.com:windchime-yk/bracesdb.git +$ git clone https://github.com/rwl-dev/bracesdb.git $ cd path/to/bracesdb -# If there is no Denon -$ deno test --allow-write --allow-read -# If you have a Denon -$ denon test +$ deno task test ``` ## On translation diff --git a/README_JP.md b/README_JP.md index 2f8a3d5..dcfce8e 100644 --- a/README_JP.md +++ b/README_JP.md @@ -21,7 +21,7 @@ Denoで作られたJSON形式のDBモジュール。 - [x] 非同期対応 - [x] 正規表現による部分検索 -もし必要だと思う機能がなければ、[Issues](https://github.com/windchime-yk/bracesdb/issues/new)で教えてください。参考にします。 +もし必要だと思う機能がなければ、[Issues](https://github.com/rwl-dev/bracesdb/issues/new)で教えてください。参考にします。 ## API ファイルを作成する保存形式では、ファイルの読み込みと書き込みを行なうため、実行の際に`--allow-read`と`--allow-write`をつけてください。 @@ -31,7 +31,7 @@ Denoで作られたJSON形式のDBモジュール。 `folder`はDBファイルを格納するフォルダのパスです。デフォルトではプロジェクトルートに生成されます。 `filename`はDBファイルの名前です。デフォルトは`main`です。 ``` typescript -import { BracesDB } from "https://deno.land/x/bracesdb/mod.ts"; +import { BracesDB } from "https://deno.land/x/bracesdb@/mod.ts"; interface DB { name?: string; @@ -80,11 +80,8 @@ const dataAll = db.find(); ## テスト 以下のコマンドを実行してください。 ``` bash -$ git clone git@github.com:windchime-yk/bracesdb.git +$ git clone https://github.com/rwl-dev/bracesdb.git $ cd path/to/bracesdb -# Denonがない場合 -$ deno test --allow-write --allow-read -# Denonがある場合 -$ denon test +$ deno task test ``` \ No newline at end of file diff --git a/deno.jsonc b/deno.jsonc new file mode 100644 index 0000000..f5d22ed --- /dev/null +++ b/deno.jsonc @@ -0,0 +1,6 @@ +{ + "tasks": { + "test": "deno test --allow-write --allow-read", + "fmt": "deno fmt --ignore=README.md,README_JP.md,./.github/,.vscode/" + } +} diff --git a/mod.test.ts b/mod.test.ts index 41f06b1..9d451d0 100644 --- a/mod.test.ts +++ b/mod.test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; +import { assertEquals } from "https://deno.land/std@0.117.0/testing/asserts.ts"; import { BracesDB } from "./mod.ts"; interface Test { diff --git a/mod.ts b/mod.ts index 2493ec8..64c5005 100644 --- a/mod.ts +++ b/mod.ts @@ -3,7 +3,7 @@ import { readFileSync, writeFile, writeFileSync, -} from "https://github.com/windchime-yk/deno-util/raw/v0.0.1/modules/file.ts"; +} from "https://pax.deno.dev/windchime-yk/deno-util@v1.6.0/file.ts"; export interface BracesDBOption { /** diff --git a/scripts.config.ts b/scripts.config.ts deleted file mode 100644 index c906824..0000000 --- a/scripts.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { DenonConfig } from "https://deno.land/x/denon@2.4.7/mod.ts"; - -const config: DenonConfig = { - scripts: { - test: { - cmd: "deno test", - allow: ["write", "read"], - watch: false, - }, - fmt: { - cmd: "deno fmt --ignore=README.md,README_JP.md,./.github/,.vscode/", - watch: false, - }, - }, -}; - -export default config;