Skip to content

Commit

Permalink
Fix formatting in cli.ts and bump to Deno v1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanfadhil committed Oct 4, 2020
1 parent 4e7f6b5 commit be15589
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install deno
uses: denolib/setup-deno@master
with:
deno-version: 1.4.0
deno-version: 1.4.2

- name: Check formatting
run: deno fmt --check
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hayd/alpine-deno:1.4.0
FROM hayd/alpine-deno:1.4.2

WORKDIR /app

Expand Down
14 changes: 7 additions & 7 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function error(message: string) {
errorMessage
.split("")
.map(() => " ")
.join("")
.join(""),
);
const redMessage = Colors.bgRed(errorMessage);
console.log("\n" + redSpaces + "\n" + redMessage + "\n" + redSpaces);
Expand Down Expand Up @@ -99,9 +99,10 @@ ${Colors.yellow("Commands:")}
async function getMigrationsInfo(runner: MigrationRunner) {
const migrations = await runner.getAllMigrations();

const longestName = migrations.migrations.reduce((a, b) =>
a.name.length > b.name.length ? a : b
).name;
const longestName =
migrations.migrations.reduce((a, b) =>
a.name.length > b.name.length ? a : b
).name;

let migrationNameDashes = "";

Expand All @@ -128,8 +129,7 @@ if (parsedArgs._.length >= 1) {
console.log(helps[command]);
} else {
try {
const configPath =
(parsedArgs.config as string) ||
const configPath = (parsedArgs.config as string) ||
(parsedArgs.c as string) ||
"./ormconfig.json";

Expand All @@ -140,7 +140,7 @@ if (parsedArgs._.length >= 1) {
const runner = new MigrationRunner(
joinPath(Deno.cwd(), "./migrations"),
adapter,
COTTON_VERSION
COTTON_VERSION,
);

// Do something with the command
Expand Down

0 comments on commit be15589

Please sign in to comment.