Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Aug 28, 2019
1 parent abc528c commit e69df0e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@
]
},
"dependencies": {
"slonik": "^18.2.0",
"slonik-interceptor-field-name-transformation": "^1.3.1",
"slonik-interceptor-query-benchmarking": "^1.3.2",
"slonik-interceptor-query-logging": "^1.2.0",
"slonik-interceptor-query-normalisation": "^1.1.3"
"slonik": "^18.11.1",
"slonik-interceptor-field-name-transformation": "^1.3.2",
"slonik-interceptor-query-benchmarking": "^1.3.3",
"slonik-interceptor-query-logging": "^1.3.0",
"slonik-interceptor-query-normalisation": "^1.1.4"
},
"description": "Slonik interceptor preset.",
"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.5.4",
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/preset-env": "^7.5.4",
"@babel/register": "^7.4.4",
"ava": "^2.2.0",
"babel-plugin-istanbul": "^5.1.4",
"@babel/preset-env": "^7.5.5",
"@babel/register": "^7.5.5",
"ava": "^2.3.0",
"babel-plugin-istanbul": "^5.2.0",
"babel-plugin-transform-export-default-name": "^2.0.4",
"coveralls": "^3.0.5",
"eslint": "^6.0.1",
"eslint-config-canonical": "^17.1.4",
"flow-bin": "^0.102.0",
"flow-copy-source": "^2.0.7",
"husky": "^3.0.0",
"coveralls": "^3.0.6",
"eslint": "^6.2.2",
"eslint-config-canonical": "^17.4.0",
"flow-bin": "^0.106.2",
"flow-copy-source": "^2.0.8",
"husky": "^3.0.4",
"nyc": "^14.1.1",
"semantic-release": "^15.13.18",
"sinon": "^7.3.2"
"semantic-release": "^15.13.24",
"sinon": "^7.4.1"
},
"engines": {
"node": ">=8.0"
Expand Down
18 changes: 9 additions & 9 deletions src/factories/createInterceptors.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @flow

import {
createFieldNameTransformationInterceptor
createFieldNameTransformationInterceptor,
} from 'slonik-interceptor-field-name-transformation';
import {
createQueryNormalisationInterceptor
createQueryNormalisationInterceptor,
} from 'slonik-interceptor-query-normalisation';
import {
createQueryBenchmarkingInterceptor
createQueryBenchmarkingInterceptor,
} from 'slonik-interceptor-query-benchmarking';
import {
createQueryLoggingInterceptor
createQueryLoggingInterceptor,
} from 'slonik-interceptor-query-logging';

/**
Expand All @@ -23,36 +23,36 @@ type UserConfigurationType = {|
+benchmarkQueries: boolean,
+logQueries: boolean,
+normaliseQueries: boolean,
+transformFieldNames: boolean
+transformFieldNames: boolean,
|};

const defaultConfiguration = {
benchmarkQueries: false,
logQueries: true,
normaliseQueries: true,
transformFieldNames: true
transformFieldNames: true,
};

export default (userConfiguration: UserConfigurationType = defaultConfiguration) => {
const configuration = {
...defaultConfiguration,
...userConfiguration
...userConfiguration,
};

const interceptors = [];

if (configuration.transformFieldNames) {
interceptors.push(
createFieldNameTransformationInterceptor({
format: 'CAMEL_CASE'
format: 'CAMEL_CASE',
})
);
}

if (configuration.normaliseQueries) {
interceptors.push(
createQueryNormalisationInterceptor({
stripComments: true
stripComments: true,
})
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow

export {
createInterceptors
createInterceptors,
} from './factories';

0 comments on commit e69df0e

Please sign in to comment.