Code formatting and cleanup, dependencies upgrade and version 0.22.0-rc.8

This commit is contained in:
Alice Gaudon 2020-09-07 14:38:30 +02:00
parent 2f822aa61c
commit 892b830dc4
5 changed files with 6 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "wms-core", "name": "wms-core",
"version": "0.22.0-rc.7", "version": "0.22.0-rc.8",
"description": "Node web application framework and toolbelt.", "description": "Node web application framework and toolbelt.",
"repository": "https://gitlab.com/ArisuOngaku/wms-core", "repository": "https://gitlab.com/ArisuOngaku/wms-core",
"author": "Alice Gaudon <alice@gaudon.pro>", "author": "Alice Gaudon <alice@gaudon.pro>",

View File

@ -4,7 +4,6 @@ import AddApprovedFieldToUsersTable from "../migrations/AddApprovedFieldToUsersT
import config from "config"; import config from "config";
import {ManyModelRelation} from "../../db/ModelRelation"; import {ManyModelRelation} from "../../db/ModelRelation";
import UserEmail from "./UserEmail"; import UserEmail from "./UserEmail";
import ModelFactory from "../../db/ModelFactory";
import UserApprovedComponent from "./UserApprovedComponent"; import UserApprovedComponent from "./UserApprovedComponent";
export default class User extends Model { export default class User extends Model {

View File

@ -1,7 +1,6 @@
import User from "./User"; import User from "./User";
import Model from "../../db/Model"; import Model from "../../db/Model";
import {OneModelRelation} from "../../db/ModelRelation"; import {OneModelRelation} from "../../db/ModelRelation";
import ModelFactory from "../../db/ModelFactory";
import {EMAIL_REGEX} from "../../db/Validator"; import {EMAIL_REGEX} from "../../db/Validator";
export default class UserEmail extends Model { export default class UserEmail extends Model {

View File

@ -27,7 +27,7 @@ describe('Test ModelQuery', () => {
'f3': 'v3', 'f3': 'v3',
}).where('f4', 'v4'); }).where('f4', 'v4');
expect(query.toString(true)).toBe('UPDATE `model` SET `model`.`f1`=?,`model`.`f2`=?,`model`.`f3`=? WHERE `f4`=?'); 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', () => { test('function select', () => {
@ -52,7 +52,7 @@ describe('Test ModelQuery', () => {
.where('f5', 'v5'); .where('f5', 'v5');
expect(query.toString(true)).toBe('SELECT `model`.* FROM `model` WHERE `f1`=? AND (`f2`=? AND `f3`=? OR (`f4`=?)) AND `f5`=?'); 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', () => { test('recursive queries', () => {

View File

@ -6019,9 +6019,9 @@ whatwg-mimetype@^2.3.0:
integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
whatwg-url@^8.0.0: whatwg-url@^8.0.0:
version "8.2.1" version "8.2.2"
resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.2.1.tgz#ed73417230784b281fb2a32c3c501738b46167c3" resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.2.2.tgz#85e7f9795108b53d554cec640b2e8aee2a0d4bfd"
integrity sha512-ZmVCr6nfBeaMxEHALLEGy0LszYjpJqf6PVNQUQ1qd9Et+q7Jpygd4rGGDXgHjD8e99yLFseD69msHDM4YwPZ4A== integrity sha512-PcVnO6NiewhkmzV0qn7A+UZ9Xx4maNTI+O+TShmfE4pqjoCMwUMjkvoNhNHPTvgR7QH9Xt3R13iHuWy2sToFxQ==
dependencies: dependencies:
lodash.sortby "^4.7.0" lodash.sortby "^4.7.0"
tr46 "^2.0.2" tr46 "^2.0.2"