From 892b830dc4a8ca8a604748bd1b9aff2af40f9a26 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 7 Sep 2020 14:38:30 +0200 Subject: [PATCH] Code formatting and cleanup, dependencies upgrade and version 0.22.0-rc.8 --- package.json | 2 +- src/auth/models/User.ts | 1 - src/auth/models/UserEmail.ts | 1 - test/ModelQuery.test.ts | 4 ++-- yarn.lock | 6 +++--- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b96167d..3820be3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wms-core", - "version": "0.22.0-rc.7", + "version": "0.22.0-rc.8", "description": "Node web application framework and toolbelt.", "repository": "https://gitlab.com/ArisuOngaku/wms-core", "author": "Alice Gaudon ", diff --git a/src/auth/models/User.ts b/src/auth/models/User.ts index e54c26a..a61e6f3 100644 --- a/src/auth/models/User.ts +++ b/src/auth/models/User.ts @@ -4,7 +4,6 @@ import AddApprovedFieldToUsersTable from "../migrations/AddApprovedFieldToUsersT import config from "config"; import {ManyModelRelation} from "../../db/ModelRelation"; import UserEmail from "./UserEmail"; -import ModelFactory from "../../db/ModelFactory"; import UserApprovedComponent from "./UserApprovedComponent"; export default class User extends Model { diff --git a/src/auth/models/UserEmail.ts b/src/auth/models/UserEmail.ts index 5718dbc..5d5ca85 100644 --- a/src/auth/models/UserEmail.ts +++ b/src/auth/models/UserEmail.ts @@ -1,7 +1,6 @@ import User from "./User"; import Model from "../../db/Model"; import {OneModelRelation} from "../../db/ModelRelation"; -import ModelFactory from "../../db/ModelFactory"; import {EMAIL_REGEX} from "../../db/Validator"; export default class UserEmail extends Model { diff --git a/test/ModelQuery.test.ts b/test/ModelQuery.test.ts index 08d3c15..5c97257 100644 --- a/test/ModelQuery.test.ts +++ b/test/ModelQuery.test.ts @@ -27,7 +27,7 @@ describe('Test ModelQuery', () => { 'f3': 'v3', }).where('f4', 'v4'); expect(query.toString(true)).toBe('UPDATE `model` SET `model`.`f1`=?,`model`.`f2`=?,`model`.`f3`=? WHERE `f4`=?'); - expect(query.variables).toStrictEqual(['v1','v2','v3','v4']); + expect(query.variables).toStrictEqual(['v1', 'v2', 'v3', 'v4']); }); test('function select', () => { @@ -52,7 +52,7 @@ describe('Test ModelQuery', () => { .where('f5', 'v5'); expect(query.toString(true)).toBe('SELECT `model`.* FROM `model` WHERE `f1`=? AND (`f2`=? AND `f3`=? OR (`f4`=?)) AND `f5`=?'); - expect(query.variables).toStrictEqual(['v1','v2','v3','v4','v5']); + expect(query.variables).toStrictEqual(['v1', 'v2', 'v3', 'v4', 'v5']); }); test('recursive queries', () => { diff --git a/yarn.lock b/yarn.lock index df377d4..85efbea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6019,9 +6019,9 @@ whatwg-mimetype@^2.3.0: integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== whatwg-url@^8.0.0: - version "8.2.1" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.2.1.tgz#ed73417230784b281fb2a32c3c501738b46167c3" - integrity sha512-ZmVCr6nfBeaMxEHALLEGy0LszYjpJqf6PVNQUQ1qd9Et+q7Jpygd4rGGDXgHjD8e99yLFseD69msHDM4YwPZ4A== + version "8.2.2" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.2.2.tgz#85e7f9795108b53d554cec640b2e8aee2a0d4bfd" + integrity sha512-PcVnO6NiewhkmzV0qn7A+UZ9Xx4maNTI+O+TShmfE4pqjoCMwUMjkvoNhNHPTvgR7QH9Xt3R13iHuWy2sToFxQ== dependencies: lodash.sortby "^4.7.0" tr46 "^2.0.2"