Skip to content

Commit

Permalink
Release 7.0.0
Browse files Browse the repository at this point in the history
* Add generic types to select and where. #72 Thanks @krislefeber!
* Add debug environment variable to print sql to console. #73 Thanks @krislefeber!
* Add generic types to returnSelect and sort arguments
* Update npms
  • Loading branch information
jgeurts committed Feb 24, 2021
1 parent 8296d5b commit 024e9a7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ module.exports = {
usePrettierrc: true,
},
],
'arrow-body-style': ['error', 'as-needed', { requireReturnForObjectLiteral: true }],
curly: ['error', 'all'],
'callback-return': ['error', ['callback', 'cb', 'next', 'done']],
'class-methods-use-this': 'off',
'consistent-return': 'off',
'handle-callback-err': ['error', '^.*err'],
'new-cap': 'off',
'no-confusing-arrow': ['error', { allowParens: false }],
'no-console': 'error',
'no-else-return': 'error',
'no-eq-null': 'off',
Expand Down Expand Up @@ -184,7 +186,6 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
rules: {
Expand Down
9 changes: 6 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/sh
. "$(dirname $0)/_/husky.sh"
# shellcheck disable=SC1090,SC1091
. "$(dirname "$0")/_/husky.sh"

echo 'NOTE: If node is not found, you may need to run brew link for your specific node version'
/usr/local/bin/node node_modules/.bin/lint-staged
PATH=$PATH:/usr/local/bin

echo 'NOTE: If node or npm is not found, you may need to run brew link for your specific node version'
npm run lint-staged
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bigal",
"version": "6.0.2",
"version": "7.0.0",
"description": "A fast and lightweight orm for postgres and node.js, written in typescript.",
"main": "index.js",
"types": "index.d.ts",
Expand All @@ -19,45 +19,46 @@
"node": ">=10"
},
"dependencies": {
"@types/lodash": "^4.14.167",
"@types/node": "^14.14.20",
"@types/pg": "^7.14.7",
"lodash": "^4.17.20",
"@types/lodash": "^4.14.168",
"@types/node": "^14.14.31",
"@types/pg": "^7.14.10",
"lodash": "^4.17.21",
"pg": "8.5.1",
"postgres-pool": "^3.2.5"
"postgres-pool": "^3.2.7"
},
"devDependencies": {
"@types/chai": "^4.2.14",
"@types/faker": "^5.1.5",
"@types/mocha": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"chai": "^4.2.0",
"eslint": "^7.17.0",
"@types/chai": "^4.2.15",
"@types/faker": "^5.1.7",
"@types/mocha": "^8.2.1",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"chai": "^4.3.0",
"eslint": "^7.20.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-config-prettier": "^7.1.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^31.0.3",
"eslint-plugin-jsdoc": "^32.2.0",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-security": "^1.4.0",
"faker": "^5.1.0",
"husky": "^5.0.6",
"lint-staged": "^10.5.3",
"mocha": "^8.2.1",
"pinst": "^2.1.1",
"faker": "^5.4.0",
"husky": "^5.1.1",
"lint-staged": "^10.5.4",
"mocha": "^8.3.0",
"pinst": "^2.1.6",
"prettier": "^2.2.1",
"strict-event-emitter-types": "^2.0.0",
"ts-mockito": "^2.6.1",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
"typescript": "^4.2.2"
},
"scripts": {
"build": "tsc",
"test": "mocha -r ts-node/register tests/**/*.tests.ts",
"lint": "eslint --fix --ext .ts src tests",
"lint-staged": "lint-staged",
"dist": "if [ -d \"src\" ]; then rm -rf dist && npm run build && npm run lint && npm run test && cp package.json dist && cp *.md dist && cp LICENSE dist && cp .npmignore dist && cd dist && npm publish; fi",
"prepublishOnly": "if [ -d \"src\" ]; then echo \"Please use: npm run dist\" && exit 125; fi && pinst --disable",
"postinstall": "husky install",
Expand Down
4 changes: 2 additions & 2 deletions src/ReadonlyRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ export class ReadonlyRepository<T> implements IReadonlyRepository<T> {
await Promise.all(populateQueries);
}

return resolve(result);
return await resolve(result);
}

return resolve(null);
return await resolve(null);
} catch (ex) {
const typedException = ex as Error;
if (typedException.stack) {
Expand Down

0 comments on commit 024e9a7

Please sign in to comment.