diff --git a/README.md b/README.md index cd2fb8e..8e9c3c4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Migrate -[![version](https://img.shields.io/badge/release-0.2.3-success)](https://deno.land/x/migrate@0.2.3) +[![version](https://img.shields.io/badge/release-0.2.4-success)](https://deno.land/x/migrate@0.2.4) [![CI](https://github.com/udibo/migrate/workflows/CI/badge.svg)](https://github.com/udibo/migrate/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/udibo/migrate/branch/main/graph/badge.svg?token=8Q7TSUFWUY)](https://codecov.io/gh/udibo/migrate) [![license](https://img.shields.io/github/license/udibo/migrate)](https://github.com/udibo/migrate/blob/master/LICENSE) @@ -21,9 +21,9 @@ Currently migrate is only implemented for Postgres. The main entrypoint is ```ts // Import from Deno's third party module registry -import { PostgresMigrate } from "https://deno.land/x/migrate@0.2.3/postgres.ts"; +import { PostgresMigrate } from "https://deno.land/x/migrate@0.2.4/postgres.ts"; // Import from GitHub -import { PostgresMigrate } "https://raw.githubusercontent.com/udibo/migrate/0.2.3/postgres.ts"; +import { PostgresMigrate } "https://raw.githubusercontent.com/udibo/migrate/0.2.4/postgres.ts"; ``` ## Usage @@ -34,7 +34,7 @@ To use the command line interface, you must create a script that will initialize the Migrate instance and call the run command from [cli.ts](cli.ts). An example can be found [here](#postgres-cli). -See [deno docs](https://doc.deno.land/https/deno.land/x/migrate@0.2.3/cli.ts) +See [deno docs](https://doc.deno.land/https/deno.land/x/migrate@0.2.4/cli.ts) for more information. #### Command: init @@ -160,7 +160,7 @@ different ways to use the migrate module. Only one is required to use the migrate tool. See -[deno docs](https://doc.deno.land/https/deno.land/x/migrate@0.2.3/postgres.ts) +[deno docs](https://doc.deno.land/https/deno.land/x/migrate@0.2.4/postgres.ts) for more information. #### Postgres script diff --git a/cli_test.ts b/cli_test.ts index 6b450b8..287af06 100644 --- a/cli_test.ts +++ b/cli_test.ts @@ -151,8 +151,8 @@ it( const { migrate } = this; await migrate.connect(); await migrate.load(); - await migrate.client.queryArray - `UPDATE migration SET path = ${"1_old_name.sql"}, applied_at = now() WHERE id = ${1}`; + await migrate.client + .queryArray`UPDATE migration SET path = ${"1_old_name.sql"}, applied_at = now() WHERE id = ${1}`; const migrations = await migrate.getUnapplied(); await migrate.apply(migrations[0]); await migrate.end(); diff --git a/deps.ts b/deps.ts index 3d0e049..284c8f7 100644 --- a/deps.ts +++ b/deps.ts @@ -1,8 +1,8 @@ -export { parse } from "https://deno.land/std@0.142.0/flags/mod.ts"; -export type { Args } from "https://deno.land/std@0.142.0/flags/mod.ts"; +export { parse } from "https://deno.land/std@0.150.0/flags/mod.ts"; +export type { Args } from "https://deno.land/std@0.150.0/flags/mod.ts"; -export { walk } from "https://deno.land/std@0.142.0/fs/walk.ts"; -export type { WalkEntry } from "https://deno.land/std@0.142.0/fs/walk.ts"; +export { walk } from "https://deno.land/std@0.150.0/fs/walk.ts"; +export type { WalkEntry } from "https://deno.land/std@0.150.0/fs/walk.ts"; export { dirname, @@ -11,9 +11,9 @@ export { relative, resolve, toFileUrl, -} from "https://deno.land/std@0.142.0/path/mod.ts"; +} from "https://deno.land/std@0.150.0/path/mod.ts"; -export { readLines } from "https://deno.land/std@0.142.0/io/buffer.ts"; -export { StringReader } from "https://deno.land/std@0.142.0/io/readers.ts"; +export { readLines } from "https://deno.land/std@0.150.0/io/buffer.ts"; +export { StringReader } from "https://deno.land/std@0.150.0/io/readers.ts"; -export { delay } from "https://deno.land/std@0.142.0/async/delay.ts"; +export { delay } from "https://deno.land/std@0.150.0/async/delay.ts"; diff --git a/postgres.ts b/postgres.ts index 8aff004..6117e38 100644 --- a/postgres.ts +++ b/postgres.ts @@ -164,8 +164,8 @@ export class PostgresMigrate await clientOrTransaction.queryArray(text, args); } } - clientOrTransaction.queryArray - `UPDATE migration SET applied_path = ${migration.path}, applied_at = now() WHERE id = ${migration.id}`; + clientOrTransaction + .queryArray`UPDATE migration SET applied_path = ${migration.path}, applied_at = now() WHERE id = ${migration.id}`; } async apply(migration: Migration): Promise { diff --git a/postgres_deps.ts b/postgres_deps.ts index 103a9e0..36e8fa9 100644 --- a/postgres_deps.ts +++ b/postgres_deps.ts @@ -2,5 +2,5 @@ export { Client, Transaction, TransactionError, -} from "https://deno.land/x/postgres@v0.16.0/mod.ts"; -export type { ClientOptions } from "https://deno.land/x/postgres@v0.16.0/mod.ts"; +} from "https://deno.land/x/postgres@v0.16.1/mod.ts"; +export type { ClientOptions } from "https://deno.land/x/postgres@v0.16.1/mod.ts"; diff --git a/test.Dockerfile b/test.Dockerfile index 01885f8..692390c 100644 --- a/test.Dockerfile +++ b/test.Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:1.22.2 +FROM denoland/deno:1.24.1 WORKDIR /app # Install wait utility diff --git a/test_deps.ts b/test_deps.ts index 8f47378..68be07e 100644 --- a/test_deps.ts +++ b/test_deps.ts @@ -5,17 +5,17 @@ export { assertRejects, assertStrictEquals, assertThrows, -} from "https://deno.land/std@0.142.0/testing/asserts.ts"; +} from "https://deno.land/std@0.150.0/testing/asserts.ts"; -export { ensureDir } from "https://deno.land/std@0.142.0/fs/ensure_dir.ts"; +export { ensureDir } from "https://deno.land/std@0.150.0/fs/ensure_dir.ts"; -export { describe, it } from "https://deno.land/std@0.142.0/testing/bdd.ts"; +export { describe, it } from "https://deno.land/std@0.150.0/testing/bdd.ts"; export { assertSpyCall, assertSpyCalls, spy, stub, -} from "https://deno.land/std@0.142.0/testing/mock.ts"; +} from "https://deno.land/std@0.150.0/testing/mock.ts"; -export { FakeTime } from "https://deno.land/std@0.142.0/testing/time.ts"; +export { FakeTime } from "https://deno.land/std@0.150.0/testing/time.ts";