From ab46bbf47f1b41a45c186a362ed43ce66d8b17a2 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Mon, 22 Oct 2018 12:46:51 +0300 Subject: [PATCH] Fix `purs bundle` output `purs bundle` (used by e.g. `pulp build`) fails to output `DATE_OID` in the output bundle due to some dead code elimination bug/feature, so an app using `purescript-postgresql-client` fails to start. Remove `DATE_OID` and use its value inline instead. --- src/Database/PostgreSQL/Value.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Database/PostgreSQL/Value.js b/src/Database/PostgreSQL/Value.js index 40c5648..a5bedd8 100644 --- a/src/Database/PostgreSQL/Value.js +++ b/src/Database/PostgreSQL/Value.js @@ -4,8 +4,8 @@ // value to js Date, so we have // to prevent this craziness var pg = require('pg'); -var DATE_OID = 1082; -pg.types.setTypeParser(DATE_OID, function(dateString) { return dateString; }); + +pg.types.setTypeParser(1082 /* DATE_OID */, function(dateString) { return dateString; }); exports['null'] = null;