Introduces flow types for storage (#4349)
* Introduces flow types for storage * Better typing of QueryOptions * Adds flow types to SchemaCOntroller, - runs flow on pre tests - fixes flow * Adds ClassLevelPermissions type * Moves Controller types into a single file * Changes import styles * Changes import styles * fixing method setIndexesWithSchemaFormat (#4454) Fixing invalid database code in method `setIndexesWithSchemaFormat`: * It must be a transaction, not a task, as it executes multiple database changes * It should contain the initial queries inside the transaction, providing the context, not outside it; * Replaced the code with the ES6 Generator notation * Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters * nits * Fixes tests, improves flow typing
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
"deep-diff": "0.3.8",
|
||||
"eslint": "^4.9.0",
|
||||
"eslint-plugin-flowtype": "^2.39.1",
|
||||
"flow-bin": "^0.59.0",
|
||||
"gaze": "1.1.2",
|
||||
"jasmine": "2.8.0",
|
||||
"jasmine-spec-reporter": "^4.1.0",
|
||||
@@ -66,7 +67,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "npm run build && node bin/dev",
|
||||
"lint": "eslint --cache ./",
|
||||
"lint": "flow && eslint --cache ./",
|
||||
"build": "babel src/ -d lib/ --copy-files",
|
||||
"pretest": "npm run lint",
|
||||
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine",
|
||||
|
||||
Reference in New Issue
Block a user