Skip to content

Commit

Permalink
remove bluebird
Browse files Browse the repository at this point in the history
  • Loading branch information
prostgles committed Oct 27, 2024
1 parent 664aeb4 commit 13f1736
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 136 deletions.
1 change: 0 additions & 1 deletion examples/full-example-vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"author": "",
"license": "MIT",
"dependencies": {
"bluebird": "latest",
"express": "latest",
"mongodb": "latest",
"prostgles-server": "latest",
Expand Down
2 changes: 0 additions & 2 deletions lib/DboBuilder/DboBuilderTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as Bluebird from "bluebird";
import * as pgPromise from 'pg-promise';
import {
AnyObject,
Expand Down Expand Up @@ -132,7 +131,6 @@ export type DBHandlerServer<TH = TableHandlers> =


export const pgp: PGP = pgPromise({
promiseLib: Bluebird
// ,query: function (e) { console.log({psql: e.query, params: e.params}); }
});

Expand Down
2 changes: 0 additions & 2 deletions lib/PubSubManager/PubSubManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { DB, getIsSuperUser } from "../Prostgles";
import { addSync } from "./addSync";
import { initPubSubManager } from "./initPubSubManager";

import * as Bluebird from "bluebird";
import * as pgPromise from 'pg-promise';
import pg from 'pg-promise/typescript/pg-subset';

Expand All @@ -30,7 +29,6 @@ import { pushSubData } from "./pushSubData";

type PGP = pgPromise.IMain<{}, pg.IClient>;
const pgp: PGP = pgPromise({
promiseLib: Bluebird
});
export const asValue = (v: any) => pgp.as.format("$1", [v]);
export const DEFAULT_SYNC_BATCH_SIZE = 50;
Expand Down
3 changes: 0 additions & 3 deletions lib/initProstgles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as promise from "bluebird";
import * as pgPromise from "pg-promise";
import pg from "pg-promise/typescript/pg-subset";
import { isEmpty } from "prostgles-types";
Expand Down Expand Up @@ -236,8 +235,6 @@ const getDbConnection = function({ dbConnection, onQuery, DEBUG_MODE, dbOptions,
};

const pgp: PGP = pgPromise({

promiseLib: promise,
...(onQueryOrError ? {
query: ctx => onQueryOrError(undefined, ctx),
error: onQueryOrError
Expand Down
Loading

0 comments on commit 13f1736

Please sign in to comment.