From bb42a57738ef83a79eea58f6f886f74fe03a53d5 Mon Sep 17 00:00:00 2001 From: Christoph Walcher Date: Fri, 13 May 2022 08:21:10 +0200 Subject: [PATCH] rename cause to reason to avoid esnext conflicts --- src/migrate.ts | 2 +- src/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/migrate.ts b/src/migrate.ts index e00807b..fb80f5d 100644 --- a/src/migrate.ts +++ b/src/migrate.ts @@ -147,7 +147,7 @@ function runMigrations(intendedMigrations: Array, log: Logger) { const error: MigrationError = new Error( `Migration failed. Reason: ${e.message}`, ) - error.cause = e + error.reason = e throw error } } diff --git a/src/types.ts b/src/types.ts index 5e16f9a..3f60dfe 100644 --- a/src/types.ts +++ b/src/types.ts @@ -62,7 +62,7 @@ export interface FullConfig { } export class MigrationError extends Error { - public cause?: string + public reason?: string } export type FileType = "sql" | "js"