Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Jun 8, 2018
1 parent 04bbcef commit 6786764
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 45 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ script:
- nyc check-coverage --lines 70
after_success:
- npm run build
- semantic-release pre
- npm publish
- semantic-release post
- semantic-release
notifications:
email: false
sudo: false
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,37 @@
]
},
"dependencies": {
"ajv": "^5.3.0",
"ajv": "^6.5.0",
"array-flatten": "^2.1.1",
"bluebird": "^3.5.1",
"boolean": "^0.1.3",
"es6-error": "^4.0.2",
"pg": "^7.4.0",
"es6-error": "^4.1.1",
"pg": "^7.4.3",
"pg-connection-string": "^2.0.0",
"pretty-hrtime": "^1.0.3",
"roarr": "^2.0.2",
"roarr": "^2.3.0",
"serialize-error": "^2.1.0",
"stack-trace": "0.0.10",
"ulid": "^2.3.0"
},
"description": "A PostgreSQL client with strict types, detail logging and assertions.",
"devDependencies": {
"@babel/cli": "^7.0.0-beta.46",
"@babel/core": "^7.0.0-beta.46",
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.46",
"@babel/preset-env": "^7.0.0-beta.46",
"@babel/register": "^7.0.0-beta.46",
"@babel/cli": "^7.0.0-beta.49",
"@babel/core": "^7.0.0-beta.49",
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.49",
"@babel/preset-env": "^7.0.0-beta.49",
"@babel/register": "^7.0.0-beta.49",
"ava": "^1.0.0-beta.4",
"babel-plugin-istanbul": "^4.1.6",
"coveralls": "^3.0.0",
"eslint": "^4.10.0",
"eslint-config-canonical": "^9.3.1",
"flow-bin": "^0.71.0",
"flow-copy-source": "^1.2.1",
"coveralls": "^3.0.1",
"eslint": "^4.19.1",
"eslint-config-canonical": "^10.2.1",
"flow-bin": "^0.74.0",
"flow-copy-source": "^2.0.0",
"husky": "^0.14.3",
"nyc": "^11.7.2",
"semantic-release": "^8.2.0",
"sinon": "^4.1.2"
"nyc": "^12.0.2",
"semantic-release": "^15.5.1",
"sinon": "^5.1.0"
},
"engines": {
"node": ">=8.0"
Expand Down
40 changes: 17 additions & 23 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,6 @@ import {
SLONIK_LOG_VALUES
} from './config';

export type {
DatabaseConnectionType,
DatabasePoolConnectionType,
DatabasePoolType,
DatabaseSingleConnectionType
} from './types';

export {
DataIntegrityError,
UniqueViolationError,
SlonikError,
NotFoundError
};

// eslint-disable-next-line id-match
const INT8_OID = 20;
const TIMESTAMPTZ_OID = 1184;
Expand All @@ -90,6 +76,20 @@ const log = Logger.child({

const ulid = ulidFactory(detectPrng(true));

export type {
DatabaseConnectionType,
DatabasePoolConnectionType,
DatabasePoolType,
DatabaseSingleConnectionType
} from './types';

export {
DataIntegrityError,
UniqueViolationError,
SlonikError,
NotFoundError
};

// eslint-disable-next-line complexity
export const query: InternalQueryType<*> = async (connection, rawSql, values, queryId) => {
let stackTrace;
Expand Down Expand Up @@ -403,14 +403,14 @@ export const transaction: InternalTransactionType = async (connection, handler)
}
};

const sql = (parts: $ReadOnlyArray<string>, ...values: AnonymouseValuePlaceholderValuesType): TaggledTemplateLiteralInvocationType => {
export const sql = (parts: $ReadOnlyArray<string>, ...values: AnonymouseValuePlaceholderValuesType): TaggledTemplateLiteralInvocationType => {
return {
sql: parts.join('?'),
values
};
};

const createConnection = async (
export const createConnection = async (
connectionConfiguration: DatabaseConfigurationType,
clientConfiguration: ClientConfigurationType = {}
): Promise<DatabaseSingleConnectionType> => {
Expand Down Expand Up @@ -449,7 +449,7 @@ const createConnection = async (
return bindConnection;
};

const createPool = (
export const createPool = (
connectionConfiguration: DatabaseConfigurationType,
clientConfiguration: ClientConfigurationType = {}
): DatabasePoolType => {
Expand Down Expand Up @@ -507,9 +507,3 @@ const createPool = (
}
};
};

export {
createConnection,
createPool,
sql
};
2 changes: 1 addition & 1 deletion src/types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

/* eslint-disable no-use-before-define */
/* eslint-disable no-use-before-define, import/exports-last */

type FieldType = {
+columnID: number,
Expand Down
2 changes: 1 addition & 1 deletion test/slonik/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test('rollbacks unsuccessful transaction', async (t) => {
const transactionExecution = transaction(connection, async () => {
await query('FOO');

throw new Error();
throw new Error('Instigated error.');
});

await t.throws(transactionExecution);
Expand Down

0 comments on commit 6786764

Please sign in to comment.