From eaccbaa841656d8e48f1948218df01491a5495d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20Ju=C3=A1rez?= Date: Fri, 27 May 2022 15:19:52 -0500 Subject: [PATCH 1/4] Update to MariaDB and add error lock handler (#1) --- .github/workflows/tests.yml | 29 + .gitignore | 4 + .travis.yml | 5 - LICENSE | 22 - README.md | 93 +- lib/constants.js | 4 +- lib/methods/_connectionHandle.js | 13 +- lib/methods/_maybeRetryQuery.js | 20 + lib/methods/_maybeRollbackAndRelease.js | 10 + lib/methods/_queryCallback.js | 38 +- lib/methods/_transaction.js | 14 +- lib/methods/addQueryToTransaction.js | 2 +- lib/methods/beginTransaction.js | 15 +- lib/methods/commit.js | 14 +- lib/methods/getConnection.js | 19 +- lib/methods/resolveOrRejectOnBooleanField.js | 10 +- package.json | 30 +- spec/_connectionHandleSpec.js | 99 ++ spec/_maybeRetryQuerySpec.js | 71 ++ spec/_queryCallbackSpec.js | 829 +++++++++-------- spec/fuzzifySpec.js | 2 +- spec/resolveOrRejectOnBooleanFieldSpec.js | 45 +- spec/transformFromColumnSpec.js | 2 +- spec/transformQueryResponseSpec.js | 6 +- spec/transformToColumnSpec.js | 2 +- yarn-error.log | 924 ------------------- yarn.lock | 893 +++++++----------- 27 files changed, 1188 insertions(+), 2027 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml delete mode 100644 LICENSE create mode 100644 lib/methods/_maybeRetryQuery.js create mode 100644 lib/methods/_maybeRollbackAndRelease.js create mode 100644 spec/_connectionHandleSpec.js create mode 100644 spec/_maybeRetryQuerySpec.js delete mode 100644 yarn-error.log diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ebdf910 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: yarn install + - run: yarn test diff --git a/.gitignore b/.gitignore index 0457551..b86382c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ node_modules coverage .idea .DS_Store +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 74c0c5b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 6 -after_script: - - "./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info" diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9ca5d65..0000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Alien Creations - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/README.md b/README.md index 1551387..fe83524 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ -# alien-node-mysql-utils -Helper functions for MySql on NodeJS. The functions are pure and curried with Ramda. +# node-mariadb-utils +![Tests](https://github.com/JonaMX/node-mariadb-utils/actions/workflows/tests.yml/badge.svg) -[![Build Status](https://travis-ci.org/AlienCreations/alien-node-mysql-utils.svg?branch=master)](https://travis-ci.org/AlienCreations/alien-node-mysql-utils) [![Coverage Status](https://coveralls.io/repos/AlienCreations/alien-node-mysql-utils/badge.svg?branch=master&service=github)](https://coveralls.io/github/AlienCreations/alien-node-mysql-utils?branch=master) [![npm version](http://img.shields.io/npm/v/alien-node-mysql-utils.svg)](https://npmjs.org/package/alien-node-mysql-utils) [![Dependency Status](https://david-dm.org/AlienCreations/alien-node-mysql-utils.svg)](https://david-dm.org/AlienCreations/alien-node-mysql-utils) + +Helper functions for MariaDB on NodeJS. The functions are pure and curried with Ramda. ## Install ``` -$ npm install alien-node-mysql-utils --save +$ npm install node-mariadb-utils --save ``` Run the specs @@ -19,21 +20,21 @@ $ npm test #### query() Make a SQL query in which you expect zero or more results. Returns a promise which -either resolves to an array containing found records (as objects) or rejects if no records found. +either resolves to an array containing found records (as objects) or rejects if no records found. #### querySafe() Same as query but resolves an empty array if no records found. -##### Suggested model usage: +##### Suggested model usage: ```js 'use strict'; -const mysql = require('mysql'), - config = require('config'), - dbPool = mysql.createPool(config.mysql); - -const DB = require('alien-node-mysql-utils')(dbPool), +const mariadb = require('mariadb'), + config = require('config'), + dbPool = mariadb.createPool(config.mariadb); + +const DB = require('node-mariadb-utils')(dbPool), validateAccountData = require('../some-validator'); const createAndExecuteQuery = (status) => { @@ -56,7 +57,7 @@ const getAccountsByStatus = status => { module.exports = getAccountsByStatus; ``` -##### Suggested controller usage +##### Suggested controller usage *(using DB.query)* @@ -70,7 +71,7 @@ getAccountsByStatus('active').then(accounts => { .catch(err => { // handle "No records found" or other errors here }); - + ``` *(using DB.querySafe)* @@ -85,25 +86,25 @@ getAccountsByStatus('active').then(maybeAccounts => { .catch(err => { // handle errors here }); - + ``` #### lookup() Make a SQL query in which you expect zero or one result. Returns a promise which -either resolves to an object matching the row schema or rejects if no records found. +either resolves to an object matching the row schema or rejects if no records found. #### lookupSafe() -Same as lookup, but resolves `undefined` if no records are found. +Same as lookup, but resolves `undefined` if no records are found. ```js 'use strict'; -const mysql = require('mysql'), - config = require('config'), - dbPool = mysql.createPool(config.mysql); - -const DB = require('alien-node-mysql-utils')(dbPool), +const mariadb = require('mariadb'), + config = require('config'), + dbPool = mariadb.createPool(config.mariadb); + +const DB = require('node-mariadb-utils')(dbPool), validateAccountData = require('../some-validator'); const createAndExecuteQuery = id => { @@ -141,7 +142,7 @@ getAccountById(1234).then(account => { .catch(err => { // handle "No records found" or other errors here }); - + ``` *(using DB.lookupSafe)* @@ -157,63 +158,63 @@ getAccountById(1234).then(maybeAccount => { .catch(err => { // handle errors here }); - + ``` ## Transactions -This library supports some simple transaction abstractions to play nicely with your promise chains. +This library supports some simple transaction abstractions to play nicely with your promise chains. -The three methods you need to care about are : +The three methods you need to care about are : - DB.beginTransaction() - DB.addQueryToTransaction() - DB.commit() - -These methods have a unique signature compared to the other methods for querying. Let's break them down: - + +These methods have a unique signature compared to the other methods for querying. Let's break them down: + **DB.beginTransaction()** : `() -> Promise(connection)` This method will use the curried `dbPool` object provided during require... ```js -const DB = require('alien-node-mysql-utils')(dbPool); +const DB = require('node-mariadb-utils')(dbPool); ``` ... and call the native `getConnection()` on it, then resolve the connection on its promise. - -This connection needs to be provided to the subsequent methods so the transaction knows how to commit and rollback. - + +This connection needs to be provided to the subsequent methods so the transaction knows how to commit and rollback. + **DB.addQueryToTransaction()** : `connection -> query -> Promise({ data, connection })` -This method accepts the connection object which you should have gotten from `DB.beginTransaction()`, along with the typical query which you give to -any other query method in this library. It behaves like `DB.querySafe()` in that it lets you +This method accepts the connection object which you should have gotten from `DB.beginTransaction()`, along with the typical query which you give to +any other query method in this library. It behaves like `DB.querySafe()` in that it lets you deal with all the data scrubbing and null-checks (resolves zero-or-more result sets and all `SELECT` statements -return an array). +return an array). -Please notice that this method returns the connection along with the data, so in the spirit of -keeping the unary promise chain data flow in mind, the promise will resolve a single object, +Please notice that this method returns the connection along with the data, so in the spirit of +keeping the unary promise chain data flow in mind, the promise will resolve a single object, where the data lives in a `data` property, and the connection on a `connection` property. **DB.commit()** : `connection` -This method accepts the connection object which you should have gotten from `DB.beginTransaction()`. It simply +This method accepts the connection object which you should have gotten from `DB.beginTransaction()`. It simply resolves `true` if there are no errors, otherwise it rejects the promise with whatever error may happen to ruin your day. ##### Suggested wrapper-model usage for transactions ```js -const DB = require('alien-node-mysql-utils')(dbPool); +const DB = require('node-mariadb-utils')(dbPool); const getUserBalance = id => connection => { const query = 'SELECT balance FROM users WHERE id = ?', queryStatement = [query, [id]]; - + return DB.addQueryToTransaction(connection, queryStatement); }; const updateUserBalance = (id, amount) => connection => { const query = 'UPDATE users SET balance = balance + ? WHERE id = ?', queryStatement = [query, [amount, id]]; - + return DB.addQueryToTransaction(connection, queryStatement); }; @@ -221,7 +222,7 @@ const ensurePositiveTransfer = amount => connection => { if (amount > 0) { return connection; } else { - throw { + throw { error : new Error('What are you doing?'), connection }; @@ -231,11 +232,11 @@ const ensurePositiveTransfer = amount => connection => { const ensureEnoughMoney = amount => transaction => { const data = transaction.data || [{ balance : 0 }], balance = data[0].balance || 0; - + if (amount <= balance) { return transaction; } else { - throw { + throw { error : new Error('Broke ass' ), connection : transaction.connection }; @@ -262,7 +263,5 @@ DB.beginTransaction() exception.connection.rollback(); logger.error(exception.error); }); - + ``` -## TODO - - Make the transform to/from column methods unbiased with decorator injection diff --git a/lib/constants.js b/lib/constants.js index 35e7ff9..0f78545 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ module.exports = { }, NO_DB_CONNECTION : { code : 6001, - message : 'Cannot connect to MySQL. Make sure the database is running.' + message : 'Cannot connect to MariaDB. Make sure the database is running.' }, DUPLICATE : message => ({ code : 6002, @@ -20,7 +20,7 @@ module.exports = { }), MISSING_CONNECTION : { code : 6998, - message : 'There was a problem establishing a database connection. This is likely an application error and not a MySQL error.' + message : 'There was a problem establishing a database connection. This is likely an application error and not a MariaDB error.' } } }; diff --git a/lib/methods/_connectionHandle.js b/lib/methods/_connectionHandle.js index 100da1e..61ea00f 100644 --- a/lib/methods/_connectionHandle.js +++ b/lib/methods/_connectionHandle.js @@ -3,33 +3,30 @@ const _queryCallback = require('./_queryCallback'), constants = require('../constants'); -const _connectionHandle = (deferred, queryStatement, transaction, singleReturnItem, allowEmptyResponse) => (err, connection) => { +const _connectionHandle = ({ resolve, reject }, queryStatement, transaction, singleReturnItem, allowEmptyResponse, attempt = 1) => (err, connection) => { const preparedStatement = queryStatement[0], valueSwapIns = queryStatement[1]; if (!connection) { - deferred.reject(constants.errors.NO_DB_CONNECTION); - return deferred.promise; + reject(constants.errors.NO_DB_CONNECTION); + return; } if (err) { - if (transaction) { connection.rollback(); } connection.release(); - deferred.reject(err); + reject(err); } connection.query( preparedStatement, valueSwapIns, - _queryCallback(deferred, connection, transaction, singleReturnItem, allowEmptyResponse) + _queryCallback({ resolve, reject }, queryStatement, connection, transaction, singleReturnItem, allowEmptyResponse, attempt, _connectionHandle) ); - - return deferred.promise; }; module.exports = _connectionHandle; diff --git a/lib/methods/_maybeRetryQuery.js b/lib/methods/_maybeRetryQuery.js new file mode 100644 index 0000000..d050039 --- /dev/null +++ b/lib/methods/_maybeRetryQuery.js @@ -0,0 +1,20 @@ +'use strict'; + +const R = require('ramda'); + +const _maybeRollbackAndRelease = require('./_maybeRollbackAndRelease'), + constants = require('../constants'); + +const RETRY_IN_MILLISECONDS = 40, + MAX_RETRIES = 5; + +const _maybeRetryQuery = ({ resolve, reject }, queryStatement, connection, transaction, singleReturnItem, allowEmptyResponse, attempt, _connectionHandle, err) => { + if (attempt >= MAX_RETRIES){ + _maybeRollbackAndRelease(connection, transaction); + reject(constants.errors.UNKNOWN(R.prop('message', err))); + } else { + setTimeout(() => _connectionHandle({ resolve, reject }, queryStatement, connection, transaction, singleReturnItem, allowEmptyResponse, attempt+1)(null, connection), RETRY_IN_MILLISECONDS); + } +}; + +module.exports = _maybeRetryQuery; diff --git a/lib/methods/_maybeRollbackAndRelease.js b/lib/methods/_maybeRollbackAndRelease.js new file mode 100644 index 0000000..d7b09ed --- /dev/null +++ b/lib/methods/_maybeRollbackAndRelease.js @@ -0,0 +1,10 @@ +'use strict'; + +const _maybeRollbackAndRelease = (connection, transaction) => { + if (transaction) { + connection.rollback(); + } + connection.release(); +}; + +module.exports = _maybeRollbackAndRelease; diff --git a/lib/methods/_queryCallback.js b/lib/methods/_queryCallback.js index b16e34a..a6a4913 100644 --- a/lib/methods/_queryCallback.js +++ b/lib/methods/_queryCallback.js @@ -4,61 +4,49 @@ const R = require('ramda'); const transformQueryResponse = require('./transformQueryResponse'), ensureNotSingleItemArray = require('./ensureNotSingleItemArray'), + _maybeRetryQuery = require('./_maybeRetryQuery'), + _maybeRollbackAndRelease = require('./_maybeRollbackAndRelease'), constants = require('../constants'); const isNilOrEmpty = R.anyPass([R.isNil, R.isEmpty]); -const maybeRollbackAndRelease = (connection, transaction) => { - if (transaction) { - connection.rollback(); - } - connection.release(); -}; - const maybeEnsureSingleItemArray = singleReturnItem => data => singleReturnItem ? ensureNotSingleItemArray(data) : data; -const _queryCallback = (deferred, connection, transaction, singleReturnItem, allowEmptyResponse) => (err, data) => { +const _queryCallback = ({ resolve, reject }, queryStatement, connection, transaction, singleReturnItem, allowEmptyResponse, attempt, _connectionHandle) => (err, data) => { if (err) { switch (R.prop('code', err)) { case 'ER_DUP_ENTRY' : - maybeRollbackAndRelease(connection, transaction); - deferred.reject(constants.errors.DUPLICATE(R.prop('message', err))); + _maybeRollbackAndRelease(connection, transaction); + reject(constants.errors.DUPLICATE(R.prop('message', err))); + break; + case 'ER_LOCK_DEADLOCK' : + _maybeRetryQuery({ resolve, reject }, queryStatement, connection, transaction, singleReturnItem, allowEmptyResponse, attempt, _connectionHandle, err); break; default : - maybeRollbackAndRelease(connection, transaction); - deferred.reject(constants.errors.UNKNOWN(R.prop('message', err))); + _maybeRollbackAndRelease(connection, transaction); + reject(constants.errors.UNKNOWN(R.prop('message', err))); break; } - return deferred.promise; - } else { - if (isNilOrEmpty(data)) { - if (allowEmptyResponse) { if (!transaction) { connection.release(); } - deferred.resolve(singleReturnItem ? undefined : []) + resolve(singleReturnItem ? undefined : []) } else { connection.release(); - deferred.reject(constants.errors.NO_QUERY_RESULTS); + reject(constants.errors.NO_QUERY_RESULTS); } - - return deferred.promise; - } else { const transformedData = R.compose(transformQueryResponse, maybeEnsureSingleItemArray(singleReturnItem))(data); if (!transaction) { connection.release(); } - - deferred.resolve(transaction ? { data : transformedData, connection } : transformedData); - - return deferred.promise; + resolve(transaction ? { data : transformedData, connection } : transformedData); } } }; diff --git a/lib/methods/_transaction.js b/lib/methods/_transaction.js index aa4aac5..372b3ba 100644 --- a/lib/methods/_transaction.js +++ b/lib/methods/_transaction.js @@ -1,18 +1,16 @@ 'use strict'; -const R = require('ramda'), - Q = require('q'); +const R = require('ramda'); const _connectionHandle = require('./_connectionHandle'); const _transaction = R.curry((connection, singleReturnItem, allowEmptyResponse, dbPool, queryStatement) => { - const deferred = Q.defer(), - transaction = !!connection, - cb = _connectionHandle(deferred, queryStatement, transaction, singleReturnItem, allowEmptyResponse); + return new Promise((resolve, reject) => { + const transaction = !!connection, + cb = _connectionHandle({ resolve, reject }, queryStatement, transaction, singleReturnItem, allowEmptyResponse); - connection ? cb(null, connection) : dbPool.getConnection(cb); - - return deferred.promise; + connection ? cb(null, connection) : dbPool.getConnection(cb); + }); }); module.exports = _transaction; diff --git a/lib/methods/addQueryToTransaction.js b/lib/methods/addQueryToTransaction.js index 7ba20d9..074d58e 100644 --- a/lib/methods/addQueryToTransaction.js +++ b/lib/methods/addQueryToTransaction.js @@ -2,7 +2,7 @@ const R = require('ramda'); -const _transaction = require('./_transaction'); +const _transaction = require('./_transaction'); const EXPECT_SINGLE_RETURN_ITEM = false, ALLOW_EMPTY_RESPONSE = true, diff --git a/lib/methods/beginTransaction.js b/lib/methods/beginTransaction.js index a2ba18c..0575965 100644 --- a/lib/methods/beginTransaction.js +++ b/lib/methods/beginTransaction.js @@ -1,26 +1,21 @@ 'use strict'; -const Q = require('q'); - const getConnection = require('./getConnection'); -module.exports = dbPool => () => { - const deferred = Q.defer(); - +module.exports = dbPool => () => new Promise((resolve, reject) => { getConnection(dbPool)() .then(connection => { connection.beginTransaction(err => { if (err) { - deferred.reject(err); + reject(err); } else { - deferred.resolve(connection); + resolve(connection); } }); }) .catch(err => { - deferred.reject(err); + reject(err); }); - return deferred.promise; -}; +}); diff --git a/lib/methods/commit.js b/lib/methods/commit.js index 1552902..ed96b10 100644 --- a/lib/methods/commit.js +++ b/lib/methods/commit.js @@ -1,20 +1,14 @@ 'use strict'; -const Q = require('q'); - -module.exports = connection => { - const deferred = Q.defer(); - +module.exports = connection => new Promise((resolve, reject) => { connection.commit(err => { if (err) { connection.rollback(); connection.release(); - deferred.reject(err); + reject(err); } else { connection.release(); - deferred.resolve(true); + resolve(true); } }); - - return deferred.promise; -}; +}); diff --git a/lib/methods/getConnection.js b/lib/methods/getConnection.js index ba3dbf0..420d545 100644 --- a/lib/methods/getConnection.js +++ b/lib/methods/getConnection.js @@ -1,31 +1,24 @@ 'use strict'; -const Q = require('q'); - const constants = require('../constants'); -const getConnection = dbPool => () => { - const deferred = Q.defer(); - +const getConnection = dbPool => () => new Promise((resolve, reject) => { try { - dbPool.getConnection((err, connection) => { if (err) { - deferred.reject(err); + reject(err); } else { if (connection) { - deferred.resolve(connection); + resolve(connection); } else { - deferred.reject(constants.errors.MISSING_CONNECTION); + reject(constants.errors.MISSING_CONNECTION); } } }); } catch(err) { - deferred.reject(err); + reject(err); } - - return deferred.promise; -}; +}); module.exports = getConnection; diff --git a/lib/methods/resolveOrRejectOnBooleanField.js b/lib/methods/resolveOrRejectOnBooleanField.js index 01c1801..950e8ad 100644 --- a/lib/methods/resolveOrRejectOnBooleanField.js +++ b/lib/methods/resolveOrRejectOnBooleanField.js @@ -9,19 +9,17 @@ const R = require('ramda'); * @param {String} field * @param {*} data */ -const resolveOrRejectOnBooleanField = R.curry((deferred, field, data) => { +const resolveOrRejectOnBooleanField = R.curry(({ resolve, reject }, field, data) => { if (R.isNil(data[field])) { - throw new Error('No field found matching "' + field + '"'); + throw new Error(`No field found matching "${field}"`); } if (data[field]) { - deferred.resolve(true); + resolve(true); } else { - deferred.reject(false); + reject(false); } - - return deferred.promise; }); module.exports = resolveOrRejectOnBooleanField; diff --git a/package.json b/package.json index 67c90d9..a8274d9 100644 --- a/package.json +++ b/package.json @@ -1,38 +1,36 @@ { - "name": "alien-node-mysql-utils", - "version": "0.5.11", - "description": "Helper functions for MySQL on NodeJS", + "name": "node-mariadb-utils", + "version": "1.0.0", + "description": "Helper functions for MariaDB on NodeJS", "main": "lib/DB.js", "dependencies": { - "aybabtu": "*", - "moment": "^2.11.2", - "mysql": "^2.15.x", - "q": "^2.0.x", - "ramda": "^0.x.x" + "aybabtu": "^1.1.6", + "moment": "^2.29.3", + "ramda": "^0.28.0" }, "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.13", - "jasmine": "^2.3.1" + "coveralls": "^3.1.1", + "istanbul": "^0.4.5", + "jasmine": "^4.1.0" }, "scripts": { "test": "./node_modules/.bin/istanbul cover ./node_modules/.bin/jasmine" }, "repository": { "type": "git", - "url": "https://github.com/aliencreations/alien-node-mysql-utils.git" + "url": "https://github.com/jonamx/node-mariadb-utils.git" }, "keywords": [ - "aliencreations", + "mariadb", "api", "util", "node", "ramda" ], - "author": "Sean Cannon", + "author": "Jonatan Juarez", "license": "MIT", "bugs": { - "url": "https://github.com/aliencreations/alien-node-mysql-utils/issues" + "url": "https://github.com/jonamx/node-mariadb-utils/issues" }, - "homepage": "https://github.com/aliencreations/alien-node-mysql-utils" + "homepage": "https://github.com/jonamx/node-mariadb-utils" } diff --git a/spec/_connectionHandleSpec.js b/spec/_connectionHandleSpec.js new file mode 100644 index 0000000..e6331f7 --- /dev/null +++ b/spec/_connectionHandleSpec.js @@ -0,0 +1,99 @@ +'use strict'; + +const _connectionHandle = require('../lib/methods/_connectionHandle'); + +const FAKE_DEFERRED = jasmine.createSpyObj('deferred', ['reject']), + FAKE_CONNECTION = jasmine.createSpyObj('connection', ['release', 'rollback', 'query']), + FAKE_QUERY_STATEMENT = '', + FAKE_TRANSACTION = {}, + FAKE_TRANSACTION_MISSING = undefined, + FAKE_SINGLE_RETURN_ITEM = false, + FAKE_ALLOW_EMPTY_RESPONSE = false, + FAKE_ERROR = {}, + FAKE_ACCESS_DENIED_ERROR = { code : 'ER_ACCESS_DENIED_ERROR' }; + +describe('connectionHandle', () => { + it('invokes the query when there are no errors', done => { + _connectionHandle( + FAKE_DEFERRED, + FAKE_QUERY_STATEMENT, + FAKE_TRANSACTION, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE + )(null, FAKE_CONNECTION); + setTimeout(() => { + expect(FAKE_CONNECTION.query).toHaveBeenCalled(); + done(); + }, 10); + }); + + it('rejects when connection is missing', done => { + _connectionHandle( + FAKE_DEFERRED, + FAKE_QUERY_STATEMENT, + FAKE_TRANSACTION, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE + )(FAKE_ERROR); + setTimeout(() => { + expect(FAKE_DEFERRED.reject).toHaveBeenCalled(); + done(); + }, 10); + }); + + it('rolls back transaction when there is an error AND a connection, which should never happen', done => { + _connectionHandle( + FAKE_DEFERRED, + FAKE_QUERY_STATEMENT, + FAKE_TRANSACTION, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE + )(FAKE_ERROR, FAKE_CONNECTION); + setTimeout(() => { + expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); + done(); + }, 10); + }); + + it('rolls back transaction when there is an error and no connection', done => { + _connectionHandle( + FAKE_DEFERRED, + FAKE_QUERY_STATEMENT, + FAKE_TRANSACTION, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE + )(FAKE_ERROR, FAKE_CONNECTION); + setTimeout(() => { + expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); + done(); + }, 10); + }); + + it('rolls back transaction when credentials are bad', done => { + _connectionHandle( + FAKE_DEFERRED, + FAKE_QUERY_STATEMENT, + FAKE_TRANSACTION, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE + )(FAKE_ACCESS_DENIED_ERROR, FAKE_CONNECTION); + setTimeout(() => { + expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); + done(); + }, 100); + }); + + it('releases the connection when there is an error with no transaction', done => { + _connectionHandle( + FAKE_DEFERRED, + FAKE_QUERY_STATEMENT, + FAKE_TRANSACTION_MISSING, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE + )(FAKE_ERROR, FAKE_CONNECTION); + setTimeout(() => { + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }, 10); + }); +}); diff --git a/spec/_maybeRetryQuerySpec.js b/spec/_maybeRetryQuerySpec.js new file mode 100644 index 0000000..0ee0e1d --- /dev/null +++ b/spec/_maybeRetryQuerySpec.js @@ -0,0 +1,71 @@ +'use strict'; + +const _maybeRetryQuery = require('../lib/methods/_maybeRetryQuery'); + +const FAKE_CONNECTION = { + release : () => {} +}; + +const FAKE_CONNECTION_HANDLE = { + _connectionHandle : ({ resolve }) => () => resolve() +}; + +const FAKE_TRANSACTION = undefined, + FAKE_QUERY_STATEMENT = ['SELECT * FROM foo'], + FAKE_SINGLE_RETURN_ITEM = false, + FAKE_ALLOW_EMPTY_RESPONSE = false, + FAKE_ATTEMPT = 1, + FAKE_ERROR = { code : 'ER_LOCK_DEADLOCK', message : 'ER_LOCK_DEADLOCK' }, + MAX_RETRIES = 5; + +describe('maybeRetryQuery', () => { + beforeEach(done => { + spyOn(FAKE_CONNECTION, 'release'); + spyOn(FAKE_CONNECTION_HANDLE, '_connectionHandle').and.callThrough(); + done(); + }); + + it('retries the query if the attempt number is less than MAX_RETRIES', done => { + new Promise((resolve, reject) => { + _maybeRetryQuery( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + FAKE_TRANSACTION, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle, + FAKE_ERROR + ); + }) + .then(() => { + expect(FAKE_CONNECTION_HANDLE._connectionHandle).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); + }); + + it('throws an error if the attempt number is greater than MAX_RETRIES', done => { + new Promise((resolve, reject) => { + _maybeRetryQuery( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + FAKE_TRANSACTION, + FAKE_SINGLE_RETURN_ITEM, + FAKE_ALLOW_EMPTY_RESPONSE, + MAX_RETRIES + 1, + FAKE_CONNECTION_HANDLE._connectionHandle, + FAKE_ERROR + ); + }) + .then(done.fail) + .catch(err => { + expect(FAKE_CONNECTION_HANDLE._connectionHandle).not.toHaveBeenCalled(); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + expect(err.message).toEqual(FAKE_ERROR.message); + done(); + }); + }); +}); diff --git a/spec/_queryCallbackSpec.js b/spec/_queryCallbackSpec.js index 0f22e6e..fecaa79 100644 --- a/spec/_queryCallbackSpec.js +++ b/spec/_queryCallbackSpec.js @@ -1,466 +1,565 @@ 'use strict'; -const Q = require('q'); - const constants = require('../lib/constants'), _queryCallback = require('../lib/methods/_queryCallback'); -const MYSQL_DUPLICATE_ENTRY_ERROR_CODE = 'ER_DUP_ENTRY'; +const MARIADB_DUPLICATE_ENTRY_ERROR_CODE = 'ER_DUP_ENTRY', + MARIADB_DEADLOCK_ERROR_CODE = 'ER_LOCK_DEADLOCK'; const FAKE_CONNECTION = { rollback : () => {}, release : () => {} }; +const FAKE_CONNECTION_HANDLE = { + _connectionHandle : ({ resolve }) => () => resolve() +}; + const FAKE_ERROR = new Error('foobar'), - FAKE_DUPLICATE_RECORD_ERROR = {code : MYSQL_DUPLICATE_ENTRY_ERROR_CODE, message : 'foo duplicate'}, + FAKE_DUPLICATE_RECORD_ERROR = {code : MARIADB_DUPLICATE_ENTRY_ERROR_CODE, message : 'foo duplicate'}, + FAKE_DEADLOCK_ERROR = {code : MARIADB_DEADLOCK_ERROR_CODE, message : 'foo deadlock' }, FAKE_RESPONSE_SINGLE = {foo : 'bar'}, FAKE_RESPONSE_SINGLE_ARRAY = [FAKE_RESPONSE_SINGLE], - FAKE_RESPONSE_ARRAY = [{foo : 'bar'}, {baz : 'bat'}, {biz : 'buz'}]; + FAKE_RESPONSE_ARRAY = [{foo : 'bar'}, {baz : 'bat'}, {biz : 'buz'}], + FAKE_QUERY_STATEMENT = ['SELECT * FROM foo']; const IS_TRANSACTION_FALSE = false, IS_TRANSACTION_TRUE = true, SINGLE_RETURN_ITEM_FALSE = false, SINGLE_RETURN_ITEM_TRUE = true, ALLOW_EMPTY_RESPONSE_FALSE = false, - ALLOW_EMPTY_RESPONSE_TRUE = true; + ALLOW_EMPTY_RESPONSE_TRUE = true, + FAKE_ATTEMPT = 1; describe('_queryCallback', () => { beforeEach(() => { spyOn(FAKE_CONNECTION, 'rollback'); spyOn(FAKE_CONNECTION, 'release'); + spyOn(FAKE_CONNECTION_HANDLE, '_connectionHandle').and.callThrough(); }); it('invokes a transactional queryOnTransaction() callback with no errors on a multi-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res.connection).toEqual(FAKE_CONNECTION); - expect(res.data).toEqual(FAKE_RESPONSE_ARRAY); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_TRUE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, FAKE_RESPONSE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_TRUE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_ARRAY); + }) + .then(res => { + expect(res.connection).toEqual(FAKE_CONNECTION); + expect(res.data).toEqual(FAKE_RESPONSE_ARRAY); + done(); + }) + .catch(done.fail); }); it('invokes a transactional, queryOnTransaction() callback with errors on a multi-item array', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); - expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_TRUE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(FAKE_ERROR); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_TRUE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(FAKE_ERROR); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); + expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); + done(); + }); }); it('invokes a non-transaction, query() callback with no errors on a multi-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_ARRAY); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, FAKE_RESPONSE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_ARRAY); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, query() callback with no errors on an empty result', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.NO_QUERY_RESULTS); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, []); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, []); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.NO_QUERY_RESULTS); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }); }); it('invokes a non-transaction, query() callback with no errors on a single-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE_ARRAY); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, FAKE_RESPONSE_SINGLE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE_ARRAY); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, query() callback with no errors on a response object', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, FAKE_RESPONSE_SINGLE); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, querySafe() callback with no errors on a multi-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_ARRAY); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, FAKE_RESPONSE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_ARRAY); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, querySafe() callback with no errors on an empty response', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual([]); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, []); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, []); + }) + .then(res => { + expect(res).toEqual([]); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a transaction, querySafe() callback with no errors on an empty response', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual([]); - expect(FAKE_CONNECTION.release).not.toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_TRUE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, []); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_TRUE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, []); + }) + .then(res => { + expect(res).toEqual([]); + expect(FAKE_CONNECTION.release).not.toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, querySafe() callback with no errors on a single-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE_ARRAY); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, FAKE_RESPONSE_SINGLE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE_ARRAY); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, querySafe() callback with no errors on a response object', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, FAKE_RESPONSE_SINGLE); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, lookup() callback with no errors on a multi-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_ARRAY); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, FAKE_RESPONSE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_ARRAY); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, lookup() callback with no errors on an empty response', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.NO_QUERY_RESULTS); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, []); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, []); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.NO_QUERY_RESULTS); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }); }); it('invokes a non-transaction, lookup() callback with no errors on a single-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, FAKE_RESPONSE_SINGLE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, lookup() callback with no errors on a response object', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_FALSE - )(null, FAKE_RESPONSE_SINGLE); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, lookupSafe() callback with no errors on a multi-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_ARRAY); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, FAKE_RESPONSE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_ARRAY); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, lookupSafe() callback with no errors on an empty response', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(undefined); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, []); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, []); + }) + .then(res => { + expect(res).toEqual(undefined); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, lookupSafe() callback with no errors on a single-item array', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, FAKE_RESPONSE_SINGLE_ARRAY); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE_ARRAY); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('invokes a non-transaction, lookupSafe() callback with no errors on a response object', done => { - const deferred = Q.defer(); - - deferred.promise.then(res => { - expect(res).toEqual(FAKE_RESPONSE_SINGLE); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_TRUE - )(null, FAKE_RESPONSE_SINGLE); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(null, FAKE_RESPONSE_SINGLE); + }) + .then(res => { + expect(res).toEqual(FAKE_RESPONSE_SINGLE); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); it('handles a duplicate-record error no differently than other errors', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.DUPLICATE(FAKE_DUPLICATE_RECORD_ERROR.message)); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(FAKE_DUPLICATE_RECORD_ERROR); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(FAKE_DUPLICATE_RECORD_ERROR); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.DUPLICATE(FAKE_DUPLICATE_RECORD_ERROR.message)); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }); }); it('invokes a non-transaction, query() callback with errors', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_FALSE - )(FAKE_ERROR); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(FAKE_ERROR); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }); }); it('invokes a non-transaction, querySafe() callback with errors on a multi-item array', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_FALSE, - ALLOW_EMPTY_RESPONSE_TRUE - )(FAKE_ERROR); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(FAKE_ERROR); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }); }); it('invokes a non-transaction, lookup() callback with errors', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_FALSE - )(FAKE_ERROR); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(FAKE_ERROR); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }); }); it('invokes a non-transaction, lookupSafe() callback with errors', done => { - const deferred = Q.defer(); - - deferred.promise.catch(err => { - expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); - expect(FAKE_CONNECTION.release).toHaveBeenCalled(); - done(); - }); - - _queryCallback( - deferred, - FAKE_CONNECTION, - IS_TRANSACTION_FALSE, - SINGLE_RETURN_ITEM_TRUE, - ALLOW_EMPTY_RESPONSE_TRUE - )(FAKE_ERROR); + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_TRUE, + ALLOW_EMPTY_RESPONSE_TRUE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(FAKE_ERROR); + }) + .then(done.fail) + .catch(err => { + expect(err).toEqual(constants.errors.UNKNOWN(FAKE_ERROR.message)); + expect(FAKE_CONNECTION.release).toHaveBeenCalled(); + done(); + }); + }); + + it('handles a deadlock error retrying query', done => { + new Promise((resolve, reject) => { + _queryCallback( + { resolve, reject }, + FAKE_QUERY_STATEMENT, + FAKE_CONNECTION, + IS_TRANSACTION_FALSE, + SINGLE_RETURN_ITEM_FALSE, + ALLOW_EMPTY_RESPONSE_FALSE, + FAKE_ATTEMPT, + FAKE_CONNECTION_HANDLE._connectionHandle + )(FAKE_DEADLOCK_ERROR); + }) + .then(() => { + expect(FAKE_CONNECTION_HANDLE._connectionHandle).toHaveBeenCalled(); + done(); + }) + .catch(done.fail); }); }); diff --git a/spec/fuzzifySpec.js b/spec/fuzzifySpec.js index 1701d3e..44bfbd7 100644 --- a/spec/fuzzifySpec.js +++ b/spec/fuzzifySpec.js @@ -3,7 +3,7 @@ const fuzzify = require('../lib/methods/fuzzify'); describe('fuzzify', () => { - it('takes a search string and wrap it in MySQL fuzzy delimiters `%`', () => { + it('takes a search string and wrap it in MariaDB fuzzy delimiters `%`', () => { expect(fuzzify('foo bar')).toBe('%foo bar%'); }); }); diff --git a/spec/resolveOrRejectOnBooleanFieldSpec.js b/spec/resolveOrRejectOnBooleanFieldSpec.js index e11a424..6d4aa0d 100644 --- a/spec/resolveOrRejectOnBooleanFieldSpec.js +++ b/spec/resolveOrRejectOnBooleanFieldSpec.js @@ -1,33 +1,36 @@ 'use strict'; -const Q = require('q'); - const resolveOrRejectOnBooleanField = require('../lib/methods/resolveOrRejectOnBooleanField'); describe('resolveOrRejectOnBooleanField', () => { - it('resolves when given a true field', (done) => { - const deferred = Q.defer(); - - resolveOrRejectOnBooleanField(deferred, 'foo', { foo : true }).then((bool) => { - expect(bool).toBe(true); - done(); - }); + it('resolves when given a true field', done => { + new Promise((resolve, reject) => { + resolveOrRejectOnBooleanField({ resolve, reject }, 'foo', { foo : true }); + }) + .then(bool => { + expect(bool).toBe(true); + done(); + }) + .catch(done.fail); }); - it('rejects when given a false field', (done) => { - const deferred = Q.defer(); - - resolveOrRejectOnBooleanField(deferred, 'foo', { foo : false }).catch((bool) => { - expect(bool).toBe(false); - done(); - }); + it('rejects when given a false field', done => { + new Promise((resolve, reject) => { + resolveOrRejectOnBooleanField({ resolve, reject }, 'foo', { foo : false }); + }) + .then(done.fail) + .catch(bool => { + expect(bool).toBe(false); + done(); + }); }); it('rejects when given an unrecognized field', () => { - const deferred = Q.defer(); - - expect(() => { - resolveOrRejectOnBooleanField(deferred, 'bar', {foo : true}); - }).toThrow(new Error('No field found matching "bar"')); + new Promise((resolve, reject) => { + expect(() => { + resolveOrRejectOnBooleanField({ resolve, reject }, 'bar', { foo : true }); + }) + .toThrow(new Error('No field found matching "bar"')); + }); }); }); diff --git a/spec/transformFromColumnSpec.js b/spec/transformFromColumnSpec.js index 200910a..0d7f65b 100644 --- a/spec/transformFromColumnSpec.js +++ b/spec/transformFromColumnSpec.js @@ -4,7 +4,7 @@ const transformFromColumn = require('../lib/methods/transformFromColumn'); describe('transformFromColumn', () => { it('transforms a string from the case used ' + - 'for MySQL fields to the case used for JS variables', () => { + 'for MariaDB fields to the case used for JS variables', () => { expect(transformFromColumn('some_db_field')).toBe('someDbField'); }); }); diff --git a/spec/transformQueryResponseSpec.js b/spec/transformQueryResponseSpec.js index 1f5b979..35e695b 100644 --- a/spec/transformQueryResponseSpec.js +++ b/spec/transformQueryResponseSpec.js @@ -15,7 +15,7 @@ const fakeRecordAfter = { }; const makeFakeRecord = () => { - return R.merge(fakeRecordBefore, {}); + return R.mergeRight(fakeRecordBefore, {}); }; const fakeQueryResponse = [makeFakeRecord(), makeFakeRecord()], @@ -24,14 +24,14 @@ const fakeQueryResponse = [makeFakeRecord(), makeFakeRecord()], describe('transformQueryResponse', () => { it('transforms all strings from the case used ' + - 'for MySQL fields to the case used for JS variables ' + + 'for MariaDB fields to the case used for JS variables ' + 'in a given object', () => { expect(transformQueryResponse(fakeLookupResponse)) .toEqual(fakeRecordAfter); }); it('transforms all strings from the case used ' + - 'for MySQL fields to the case used for JS variables ' + + 'for MariaDB fields to the case used for JS variables ' + 'in a given array of objects', () => { expect(transformQueryResponse(fakeQueryResponse)) .toEqual([fakeRecordAfter, fakeRecordAfter]); diff --git a/spec/transformToColumnSpec.js b/spec/transformToColumnSpec.js index 09cb11b..d3736f2 100644 --- a/spec/transformToColumnSpec.js +++ b/spec/transformToColumnSpec.js @@ -4,7 +4,7 @@ const transformToColumn = require('../lib/methods/transformToColumn'); describe('transformToColumn', () => { it('transforms a string from the case used ' + - 'for MySQL fields to the case used for JS variables', () => { + 'for MariaDB fields to the case used for JS variables', () => { expect(transformToColumn('someDbField')).toBe('`some_db_field`'); }); }); diff --git a/yarn-error.log b/yarn-error.log deleted file mode 100644 index d114f1f..0000000 --- a/yarn-error.log +++ /dev/null @@ -1,924 +0,0 @@ -Arguments: - /Users/seancannon/.nvm/versions/node/v8.9.4/bin/node /usr/local/Cellar/yarn/1.5.1_1/libexec/bin/yarn.js test - -PATH: - /Users/seancannon/.rbenv/shims:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/seancannon/Downloads/google-cloud-sdk/bin:/Users/seancannon/.nvm/versions/node/v8.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/Users/seancannon/.yarn/bin - -Yarn version: - 1.5.1 - -Node version: - 8.9.4 - -Platform: - darwin x64 - -npm manifest: - { - "name" : "alien-node-mysql-utils", - "version" : "0.5.7", - "description" : "Helper functions for MySQL on NodeJS", - "main" : "lib/DB.js", - "dependencies" : { - "aybabtu" : "*", - "ramda" : "^0.x.x", - "mysql" : "^2.11.x", - "q" : "^2.0.x", - "moment" : "^2.11.2" - }, - "devDependencies" : { - "coveralls" : "^2.11.2", - "istanbul" : "^0.3.13", - "jasmine" : "^2.3.1" - }, - "scripts" : { - "test" : "./node_modules/.bin/istanbul cover ./node_modules/.bin/jasmine" - }, - "repository" : { - "type" : "git", - "url" : "https://github.com/aliencreations/alien-node-mysql-utils.git" - }, - "keywords" : [ - "aliencreations", - "api", - "util", - "node", - "ramda" - ], - "author" : "Sean Cannon", - "license" : "MIT", - "bugs" : { - "url" : "https://github.com/aliencreations/alien-node-mysql-utils/issues" - }, - "homepage" : "https://github.com/aliencreations/alien-node-mysql-utils" - } - -yarn manifest: - No manifest - -Lockfile: - # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - # yarn lockfile v1 - - - abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - - abbrev@1.0.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - - align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - - amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - - ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - - ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - - argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - - asap@^2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - - asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - - assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - - assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - - async@1.x, async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - - asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - - aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - - aws4@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - - aybabtu@*: - version "1.1.5" - resolved "https://registry.yarnpkg.com/aybabtu/-/aybabtu-1.1.5.tgz#d3f20c1550275a46e1c0216a6d42c42bc9844fd0" - - balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - - bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - - bignumber.js@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.0.4.tgz#7c40f5abcd2d6623ab7b99682ee7db81b11889a4" - - boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - - brace-expansion@^1.0.0, brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - - camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - - caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" - - center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - - chalk@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - - cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - - combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - - commander@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - - concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - - core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - - coveralls@^2.11.2: - version "2.13.3" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" - dependencies: - js-yaml "3.6.1" - lcov-parse "0.0.10" - log-driver "1.2.5" - minimist "1.2.0" - request "2.79.0" - - cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - - dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - - decamelize@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - - deep-is@~0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - - delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - - ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - - escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - - escodegen@1.7.x: - version "1.7.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.7.1.tgz#30ecfcf66ca98dc67cd2fd162abeb6eafa8ce6fc" - dependencies: - esprima "^1.2.2" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.5.0" - optionalDependencies: - source-map "~0.2.0" - - esprima@2.5.x: - version "2.5.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.5.0.tgz#f387a46fd344c1b1a39baf8c20bfb43b6d0058cc" - - esprima@^1.2.2: - version "1.2.5" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.5.tgz#0993502feaf668138325756f30f9a51feeec11e9" - - esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - - esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - - estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - - esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - - exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - - extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - - extsprintf@1.3.0, extsprintf@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - - fast-levenshtein@~1.0.0: - version "1.0.7" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz#0178dcdee023b92905193af0959e8a7639cfdcb9" - - fileset@0.2.x: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" - dependencies: - glob "5.x" - minimatch "2.x" - - forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - - form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - - fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - - generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - - generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" - - getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - - glob@5.x: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - - glob@^7.0.6: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - - handlebars@^4.0.1: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - - har-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" - dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" - - has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - - has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - - hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - - hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - - http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - - inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - - inherits@2, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - - is-buffer@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" - - is-my-json-valid@^2.12.4: - version "2.16.1" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - - is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - - is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - - isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - - isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - - isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - - istanbul@^0.3.13: - version "0.3.22" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.3.22.tgz#3e164d85021fe19c985d1f0e7ef0c3e22d012eb6" - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.7.x" - esprima "2.5.x" - fileset "0.2.x" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - - jasmine-core@~2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e" - - jasmine@^2.3.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.8.0.tgz#6b089c0a11576b1f16df11b80146d91d4e8b8a3e" - dependencies: - exit "^0.1.2" - glob "^7.0.6" - jasmine-core "~2.8.0" - - js-yaml@3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - - js-yaml@3.x: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - - jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - - json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - - json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - - jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" - - jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - - kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - - lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - - lcov-parse@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" - - levn@~0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" - dependencies: - prelude-ls "~1.1.0" - type-check "~0.3.1" - - log-driver@1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" - - longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - - mime-db@~1.30.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" - - mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.17" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" - dependencies: - mime-db "~1.30.0" - - "minimatch@2 || 3", minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - - minimatch@2.x: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" - dependencies: - brace-expansion "^1.0.0" - - minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - - minimist@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - - minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - - mkdirp@0.5.x: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - - moment@^2.11.2: - version "2.19.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.1.tgz#56da1a2d1cbf01d38b7e1afc31c10bcfa1929167" - - mysql@^2.11.x: - version "2.15.0" - resolved "https://registry.yarnpkg.com/mysql/-/mysql-2.15.0.tgz#ea16841156343e8f2e47fc8985ec41cdd9573b5c" - dependencies: - bignumber.js "4.0.4" - readable-stream "2.3.3" - safe-buffer "5.1.1" - sqlstring "2.3.0" - - nopt@3.x: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - - oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - - once@1.x, once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - - optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - - optionator@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.5.0.tgz#b75a8995a2d417df25b6e4e3862f50aa88651368" - dependencies: - deep-is "~0.1.2" - fast-levenshtein "~1.0.0" - levn "~0.2.5" - prelude-ls "~1.1.1" - type-check "~0.3.1" - wordwrap "~0.0.2" - - path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - - pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - - pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - - pop-iterate@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/pop-iterate/-/pop-iterate-1.0.1.tgz#ceacfdab4abf353d7a0f2aaa2c1fc7b3f9413ba3" - - prelude-ls@~1.1.0, prelude-ls@~1.1.1, prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - - process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - - punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - - q@^2.0.x: - version "2.0.3" - resolved "https://registry.yarnpkg.com/q/-/q-2.0.3.tgz#75b8db0255a1a5af82f58c3f3aaa1efec7d0d134" - dependencies: - asap "^2.0.0" - pop-iterate "^1.0.1" - weak-map "^1.0.5" - - qs@~6.3.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" - - ramda@^0.x.x: - version "0.25.0" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" - - readable-stream@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - - repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - - request@2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - qs "~6.3.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - uuid "^3.0.0" - - resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - - right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - - safe-buffer@5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - - sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - - source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - - source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - dependencies: - amdefine ">=0.0.4" - - source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - - sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - - sqlstring@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.0.tgz#525b8a4fd26d6f71aa61e822a6caf976d31ad2a8" - - sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - - string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - - stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - - strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - - supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - - supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - - tough-cookie@~2.3.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" - dependencies: - punycode "^1.4.1" - - tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" - - tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - - type-check@~0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" - - uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - - uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - - util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - - uuid@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - - verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - - weak-map@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.5.tgz#79691584d98607f5070bd3b70a40e6bb22e401eb" - - which@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - dependencies: - isexe "^2.0.0" - - window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - - wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - - wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - - wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - - wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - - xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - - yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -Trace: - Error: Command failed. - Exit code: 1 - Command: sh - Arguments: -c ./node_modules/.bin/istanbul cover ./node_modules/.bin/jasmine - Directory: /Users/seancannon/Projects/alien-node-mysql-utils - Output: - - at ProcessTermError.MessageError (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:186:110) - at new ProcessTermError (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:226:113) - at ChildProcess. (/usr/local/Cellar/yarn/1.5.1_1/libexec/lib/cli.js:30281:17) - at emitTwo (events.js:126:13) - at ChildProcess.emit (events.js:214:7) - at maybeClose (internal/child_process.js:925:16) - at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) diff --git a/yarn.lock b/yarn.lock index 195e18f..2c9478c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,292 +5,242 @@ abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== abbrev@1.0.x: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" -asap@^2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -async@1.x, async@^1.4.0: +async@1.x: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== -aws4@^1.2.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -aybabtu@*: - version "1.1.5" - resolved "https://registry.yarnpkg.com/aybabtu/-/aybabtu-1.1.5.tgz#d3f20c1550275a46e1c0216a6d42c42bc9844fd0" +aybabtu@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/aybabtu/-/aybabtu-1.1.6.tgz#b4336d6baffb48efc5058bff0c5c923ee5bd2326" + integrity sha512-oJSgLvAig8S72HPeK91jGQbT+b2HxaPqbHhRBliuPgVG+6Qx8iIJGR1XNbIyTzdynO4WiVChiOox9VxIpPBABw== balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: tweetnacl "^0.14.3" -bignumber.js@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.0.4.tgz#7c40f5abcd2d6623ab7b99682ee7db81b11889a4" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -brace-expansion@^1.0.0, brace-expansion@^1.1.7: +brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -commander@^2.9.0: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -core-util-is@1.0.2, core-util-is@~1.0.0: +core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== -coveralls@^2.11.2: - version "2.13.3" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" - dependencies: - js-yaml "3.6.1" - lcov-parse "0.0.10" - log-driver "1.2.5" - minimist "1.2.0" - request "2.79.0" - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" +coveralls@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.1.tgz#f5d4431d8b5ae69c5079c8f8ca00d64ac77cf081" + integrity sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww== dependencies: - boom "2.x.x" + js-yaml "^3.13.1" + lcov-parse "^1.0.0" + log-driver "^1.2.7" + minimist "^1.2.5" + request "^2.88.2" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== dependencies: assert-plus "^1.0.0" -decamelize@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -deep-is@~0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= dependencies: jsbn "~0.1.0" + safer-buffer "^2.1.0" -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -escodegen@1.7.x: - version "1.7.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.7.1.tgz#30ecfcf66ca98dc67cd2fd162abeb6eafa8ce6fc" +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= dependencies: - esprima "^1.2.2" + esprima "^2.7.1" estraverse "^1.9.1" esutils "^2.0.2" - optionator "^0.5.0" + optionator "^0.8.1" optionalDependencies: source-map "~0.2.0" -esprima@2.5.x: - version "2.5.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.5.0.tgz#f387a46fd344c1b1a39baf8c20bfb43b6d0058cc" - -esprima@^1.2.2: - version "1.2.5" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.5.tgz#0993502feaf668138325756f30f9a51feeec11e9" - -esprima@^2.6.0: +esprima@2.7.x, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== -fast-levenshtein@~1.0.0: - version "1.0.7" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz#0178dcdee023b92905193af0959e8a7639cfdcb9" +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fileset@0.2.x: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" - dependencies: - glob "5.x" - minimatch "2.x" +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" - combined-stream "^1.0.5" + combined-stream "^1.0.6" mime-types "^2.1.12" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" -glob@5.x: +glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= dependencies: inflight "^1.0.4" inherits "2" @@ -298,125 +248,95 @@ glob@5.x: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.6: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" +glob@^7.1.6: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" handlebars@^4.0.1: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" optionalDependencies: - uglify-js "^2.6" - -har-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" - dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" + uglify-js "^3.1.4" -has-ansi@^2.0.0: +har-schema@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: - ansi-regex "^2.0.0" + ajv "^6.12.3" + har-schema "^2.0.0" has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= dependencies: - assert-plus "^0.2.0" + assert-plus "^1.0.0" jsprim "^1.2.2" sshpk "^1.7.0" inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - -is-my-ip-valid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" - -is-my-json-valid@^2.12.4: - version "2.17.2" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - is-my-ip-valid "^1.0.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - -is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -istanbul@^0.3.13: - version "0.3.22" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.3.22.tgz#3e164d85021fe19c985d1f0e7ef0c3e22d012eb6" +istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + integrity sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs= dependencies: abbrev "1.0.x" async "1.x" - escodegen "1.7.x" - esprima "2.5.x" - fileset "0.2.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" handlebars "^4.0.1" js-yaml "3.x" mkdirp "0.5.x" @@ -427,28 +347,23 @@ istanbul@^0.3.13: which "^1.1.1" wordwrap "^1.0.0" -jasmine-core@~2.99.0: - version "2.99.1" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15" +jasmine-core@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-4.1.1.tgz#1045091e16f4f19e1d72416eef5db01e64d5fbeb" + integrity sha512-lmUfT5XcK9KKvt3lLYzn93hc4MGzlUBowExFVgzbSW0ZCrdeyS574dfsyfRhxbg81Wj4gk+RxUiTnj7KBfDA1g== -jasmine@^2.3.1: - version "2.99.0" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.99.0.tgz#8ca72d102e639b867c6489856e0e18a9c7aa42b7" +jasmine@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-4.1.0.tgz#0de347ca8bb6cc764b0ed186ae4cfc45bd64bdc4" + integrity sha512-4VhjbUgwfNS9CBnUMoSWr9tdNgOoOhNIjAD8YRxTn+PmOf4qTSC0Uqhk66dWGnz2vJxtNIU0uBjiwnsp4Ud9VA== dependencies: - exit "^0.1.2" - glob "^7.0.6" - jasmine-core "~2.99.0" + glob "^7.1.6" + jasmine-core "^4.1.0" -js-yaml@3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - -js-yaml@3.x: - version "3.11.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" +js-yaml@3.x, js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -456,407 +371,309 @@ js-yaml@3.x: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + version "1.4.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: assert-plus "1.0.0" extsprintf "1.3.0" - json-schema "0.2.3" + json-schema "0.4.0" verror "1.10.0" -kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -lcov-parse@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" +lcov-parse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0" + integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A= -levn@~0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: - prelude-ls "~1.1.0" - type-check "~0.3.1" - -log-driver@1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + prelude-ls "~1.1.2" + type-check "~0.3.2" -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" +log-driver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" + integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "~1.33.0" + mime-db "1.52.0" -"minimatch@2 || 3", minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" +"minimatch@2 || 3", minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimatch@2.x: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" - dependencies: - brace-expansion "^1.0.0" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" +minimist@^1.2.5, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mkdirp@0.5.x: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: - minimist "0.0.8" + minimist "^1.2.6" -moment@^2.11.2: - version "2.22.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.1.tgz#529a2e9bf973f259c9643d237fda84de3a26e8ad" +moment@^2.29.3: + version "2.29.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3" + integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw== -mysql@^2.15.x: - version "2.15.0" - resolved "https://registry.yarnpkg.com/mysql/-/mysql-2.15.0.tgz#ea16841156343e8f2e47fc8985ec41cdd9573b5c" - dependencies: - bignumber.js "4.0.4" - readable-stream "2.3.3" - safe-buffer "5.1.1" - sqlstring "2.3.0" +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== nopt@3.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= dependencies: abbrev "1" -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== once@1.x, once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -optionator@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.5.0.tgz#b75a8995a2d417df25b6e4e3862f50aa88651368" - dependencies: - deep-is "~0.1.2" - fast-levenshtein "~1.0.0" - levn "~0.2.5" - prelude-ls "~1.1.1" - type-check "~0.3.1" - wordwrap "~0.0.2" + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -pop-iterate@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/pop-iterate/-/pop-iterate-1.0.1.tgz#ceacfdab4abf353d7a0f2aaa2c1fc7b3f9413ba3" +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -prelude-ls@~1.1.0, prelude-ls@~1.1.1, prelude-ls@~1.1.2: +prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -q@^2.0.x: - version "2.0.3" - resolved "https://registry.yarnpkg.com/q/-/q-2.0.3.tgz#75b8db0255a1a5af82f58c3f3aaa1efec7d0d134" - dependencies: - asap "^2.0.0" - pop-iterate "^1.0.1" - weak-map "^1.0.5" - -qs@~6.3.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" - -ramda@^0.x.x: - version "0.25.0" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9" +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -readable-stream@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -request@2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== + +ramda@^0.28.0: + version "0.28.0" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.28.0.tgz#acd785690100337e8b063cab3470019be427cc97" + integrity sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA== + +request@^2.88.2: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - qs "~6.3.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - uuid "^3.0.0" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -safe-buffer@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= dependencies: amdefine ">=0.0.4" -source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -sqlstring@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.0.tgz#525b8a4fd26d6f71aa61e822a6caf976d31ad2a8" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" + version "1.17.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" -string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -stringstream@~0.0.4: - version "0.0.6" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - supports-color@^3.1.0: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= dependencies: has-flag "^1.0.0" -tough-cookie@~2.3.0: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== dependencies: - punycode "^1.4.1" + psl "^1.1.28" + punycode "^2.1.1" -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= -type-check@~0.3.1: +type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" +uglify-js@^3.1.4: + version "3.15.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.5.tgz#2b10f9e0bfb3f5c15a8e8404393b6361eaeb33b3" + integrity sha512-hNM5q5GbBRB5xB+PMqVRcgYe4c8jbyZ1pzZhS6jbq54/4F2gFK869ZheiE5A8/t+W5jtTNpWef/5Q9zk639FNQ== -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" -uuid@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" extsprintf "^1.2.0" -weak-map@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.5.tgz#79691584d98607f5070bd3b70a40e6bb22e401eb" - which@^1.1.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= From 077482f47d9a5f3531f5401c96f555360d125fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20Ju=C3=A1rez?= Date: Fri, 27 May 2022 16:15:20 -0500 Subject: [PATCH 2/4] 0.6.0 - Add error deadlock handling and remove Q dependency --- .github/workflows/tests.yml | 29 --------- README.md | 31 +++++----- lib/constants.js | 4 +- package.json | 23 +++---- spec/_connectionHandleSpec.js | 12 ++-- spec/fuzzifySpec.js | 2 +- spec/resolveOrRejectOnBooleanFieldSpec.js | 14 +++-- spec/transformFromColumnSpec.js | 2 +- spec/transformQueryResponseSpec.js | 4 +- spec/transformToColumnSpec.js | 2 +- yarn.lock | 73 +++++++++++++++++++++-- 11 files changed, 118 insertions(+), 78 deletions(-) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index ebdf910..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Tests - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: yarn install - - run: yarn test diff --git a/README.md b/README.md index fe83524..62f9f3c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ -# node-mariadb-utils -![Tests](https://github.com/JonaMX/node-mariadb-utils/actions/workflows/tests.yml/badge.svg) +# alien-node-mysql-utils +Helper functions for MySql on NodeJS. The functions are pure and curried with Ramda. - -Helper functions for MariaDB on NodeJS. The functions are pure and curried with Ramda. +[![Build Status](https://travis-ci.org/AlienCreations/alien-node-mysql-utils.svg?branch=master)](https://travis-ci.org/AlienCreations/alien-node-mysql-utils) [![Coverage Status](https://coveralls.io/repos/AlienCreations/alien-node-mysql-utils/badge.svg?branch=master&service=github)](https://coveralls.io/github/AlienCreations/alien-node-mysql-utils?branch=master) [![npm version](http://img.shields.io/npm/v/alien-node-mysql-utils.svg)](https://npmjs.org/package/alien-node-mysql-utils) [![Dependency Status](https://david-dm.org/AlienCreations/alien-node-mysql-utils.svg)](https://david-dm.org/AlienCreations/alien-node-mysql-utils) ## Install ``` -$ npm install node-mariadb-utils --save +$ npm install alien-node-mysql-utils --save ``` Run the specs @@ -30,11 +29,11 @@ Same as query but resolves an empty array if no records found. 'use strict'; -const mariadb = require('mariadb'), - config = require('config'), - dbPool = mariadb.createPool(config.mariadb); +const mysql = require('mysql'), + config = require('config'), + dbPool = mysql.createPool(config.mysql); -const DB = require('node-mariadb-utils')(dbPool), +const DB = require('alien-node-mysql-utils')(dbPool), validateAccountData = require('../some-validator'); const createAndExecuteQuery = (status) => { @@ -100,11 +99,11 @@ Same as lookup, but resolves `undefined` if no records are found. 'use strict'; -const mariadb = require('mariadb'), - config = require('config'), - dbPool = mariadb.createPool(config.mariadb); +const mysql = require('mysql'), + config = require('config'), + dbPool = mysql.createPool(config.mysql); -const DB = require('node-mariadb-utils')(dbPool), +const DB = require('alien-node-mysql-utils')(dbPool), validateAccountData = require('../some-validator'); const createAndExecuteQuery = id => { @@ -176,7 +175,7 @@ These methods have a unique signature compared to the other methods for querying This method will use the curried `dbPool` object provided during require... ```js -const DB = require('node-mariadb-utils')(dbPool); +const DB = require('alien-node-mysql-utils')(dbPool); ``` ... and call the native `getConnection()` on it, then resolve the connection on its promise. @@ -202,7 +201,7 @@ resolves `true` if there are no errors, otherwise it rejects the promise with wh ##### Suggested wrapper-model usage for transactions ```js -const DB = require('node-mariadb-utils')(dbPool); +const DB = require('alien-node-mysql-utils')(dbPool); const getUserBalance = id => connection => { const query = 'SELECT balance FROM users WHERE id = ?', @@ -265,3 +264,5 @@ DB.beginTransaction() }); ``` +## TODO + - Make the transform to/from column methods unbiased with decorator injection diff --git a/lib/constants.js b/lib/constants.js index 0f78545..35e7ff9 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -8,7 +8,7 @@ module.exports = { }, NO_DB_CONNECTION : { code : 6001, - message : 'Cannot connect to MariaDB. Make sure the database is running.' + message : 'Cannot connect to MySQL. Make sure the database is running.' }, DUPLICATE : message => ({ code : 6002, @@ -20,7 +20,7 @@ module.exports = { }), MISSING_CONNECTION : { code : 6998, - message : 'There was a problem establishing a database connection. This is likely an application error and not a MariaDB error.' + message : 'There was a problem establishing a database connection. This is likely an application error and not a MySQL error.' } } }; diff --git a/package.json b/package.json index a8274d9..854c259 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { - "name": "node-mariadb-utils", - "version": "1.0.0", - "description": "Helper functions for MariaDB on NodeJS", + "name": "alien-node-mysql-utils", + "version": "0.6.0", + "description": "Helper functions for MySQL on NodeJS", "main": "lib/DB.js", "dependencies": { - "aybabtu": "^1.1.6", - "moment": "^2.29.3", - "ramda": "^0.28.0" + "aybabtu": "*", + "moment": "^2.11.2", + "mysql": "^2.15.x", + "ramda": "^0.x.x" }, "devDependencies": { "coveralls": "^3.1.1", @@ -18,19 +19,19 @@ }, "repository": { "type": "git", - "url": "https://github.com/jonamx/node-mariadb-utils.git" + "url": "https://github.com/aliencreations/alien-node-mysql-utils.git" }, "keywords": [ - "mariadb", + "aliencreations", "api", "util", "node", "ramda" ], - "author": "Jonatan Juarez", + "author": "Sean Cannon", "license": "MIT", "bugs": { - "url": "https://github.com/jonamx/node-mariadb-utils/issues" + "url": "https://github.com/aliencreations/alien-node-mysql-utils/issues" }, - "homepage": "https://github.com/jonamx/node-mariadb-utils" + "homepage": "https://github.com/aliencreations/alien-node-mysql-utils" } diff --git a/spec/_connectionHandleSpec.js b/spec/_connectionHandleSpec.js index e6331f7..f4c814c 100644 --- a/spec/_connectionHandleSpec.js +++ b/spec/_connectionHandleSpec.js @@ -24,7 +24,7 @@ describe('connectionHandle', () => { setTimeout(() => { expect(FAKE_CONNECTION.query).toHaveBeenCalled(); done(); - }, 10); + }, 1); }); it('rejects when connection is missing', done => { @@ -38,7 +38,7 @@ describe('connectionHandle', () => { setTimeout(() => { expect(FAKE_DEFERRED.reject).toHaveBeenCalled(); done(); - }, 10); + }, 1); }); it('rolls back transaction when there is an error AND a connection, which should never happen', done => { @@ -52,7 +52,7 @@ describe('connectionHandle', () => { setTimeout(() => { expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); done(); - }, 10); + }, 1); }); it('rolls back transaction when there is an error and no connection', done => { @@ -66,7 +66,7 @@ describe('connectionHandle', () => { setTimeout(() => { expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); done(); - }, 10); + }, 1); }); it('rolls back transaction when credentials are bad', done => { @@ -80,7 +80,7 @@ describe('connectionHandle', () => { setTimeout(() => { expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); done(); - }, 100); + }, 1); }); it('releases the connection when there is an error with no transaction', done => { @@ -94,6 +94,6 @@ describe('connectionHandle', () => { setTimeout(() => { expect(FAKE_CONNECTION.release).toHaveBeenCalled(); done(); - }, 10); + }, 1); }); }); diff --git a/spec/fuzzifySpec.js b/spec/fuzzifySpec.js index 44bfbd7..1701d3e 100644 --- a/spec/fuzzifySpec.js +++ b/spec/fuzzifySpec.js @@ -3,7 +3,7 @@ const fuzzify = require('../lib/methods/fuzzify'); describe('fuzzify', () => { - it('takes a search string and wrap it in MariaDB fuzzy delimiters `%`', () => { + it('takes a search string and wrap it in MySQL fuzzy delimiters `%`', () => { expect(fuzzify('foo bar')).toBe('%foo bar%'); }); }); diff --git a/spec/resolveOrRejectOnBooleanFieldSpec.js b/spec/resolveOrRejectOnBooleanFieldSpec.js index 6d4aa0d..afe0025 100644 --- a/spec/resolveOrRejectOnBooleanFieldSpec.js +++ b/spec/resolveOrRejectOnBooleanFieldSpec.js @@ -25,12 +25,14 @@ describe('resolveOrRejectOnBooleanField', () => { }); }); - it('rejects when given an unrecognized field', () => { + it('rejects when given an unrecognized field', done => { new Promise((resolve, reject) => { - expect(() => { - resolveOrRejectOnBooleanField({ resolve, reject }, 'bar', { foo : true }); - }) - .toThrow(new Error('No field found matching "bar"')); - }); + resolveOrRejectOnBooleanField({ resolve, reject }, 'bar', { foo : true }); + }) + .then(done.fail) + .catch(err => { + expect(err.message).toBe('No field found matching "bar"') + done(); + }); }); }); diff --git a/spec/transformFromColumnSpec.js b/spec/transformFromColumnSpec.js index 0d7f65b..200910a 100644 --- a/spec/transformFromColumnSpec.js +++ b/spec/transformFromColumnSpec.js @@ -4,7 +4,7 @@ const transformFromColumn = require('../lib/methods/transformFromColumn'); describe('transformFromColumn', () => { it('transforms a string from the case used ' + - 'for MariaDB fields to the case used for JS variables', () => { + 'for MySQL fields to the case used for JS variables', () => { expect(transformFromColumn('some_db_field')).toBe('someDbField'); }); }); diff --git a/spec/transformQueryResponseSpec.js b/spec/transformQueryResponseSpec.js index 35e695b..e41bd02 100644 --- a/spec/transformQueryResponseSpec.js +++ b/spec/transformQueryResponseSpec.js @@ -24,14 +24,14 @@ const fakeQueryResponse = [makeFakeRecord(), makeFakeRecord()], describe('transformQueryResponse', () => { it('transforms all strings from the case used ' + - 'for MariaDB fields to the case used for JS variables ' + + 'for MySQL fields to the case used for JS variables ' + 'in a given object', () => { expect(transformQueryResponse(fakeLookupResponse)) .toEqual(fakeRecordAfter); }); it('transforms all strings from the case used ' + - 'for MariaDB fields to the case used for JS variables ' + + 'for MySQL fields to the case used for JS variables ' + 'in a given array of objects', () => { expect(transformQueryResponse(fakeQueryResponse)) .toEqual([fakeRecordAfter, fakeRecordAfter]); diff --git a/spec/transformToColumnSpec.js b/spec/transformToColumnSpec.js index d3736f2..09cb11b 100644 --- a/spec/transformToColumnSpec.js +++ b/spec/transformToColumnSpec.js @@ -4,7 +4,7 @@ const transformToColumn = require('../lib/methods/transformToColumn'); describe('transformToColumn', () => { it('transforms a string from the case used ' + - 'for MariaDB fields to the case used for JS variables', () => { + 'for MySQL fields to the case used for JS variables', () => { expect(transformToColumn('someDbField')).toBe('`some_db_field`'); }); }); diff --git a/yarn.lock b/yarn.lock index 2c9478c..9ff3265 100644 --- a/yarn.lock +++ b/yarn.lock @@ -66,7 +66,7 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -aybabtu@^1.1.6: +aybabtu@*: version "1.1.6" resolved "https://registry.yarnpkg.com/aybabtu/-/aybabtu-1.1.6.tgz#b4336d6baffb48efc5058bff0c5c923ee5bd2326" integrity sha512-oJSgLvAig8S72HPeK91jGQbT+b2HxaPqbHhRBliuPgVG+6Qx8iIJGR1XNbIyTzdynO4WiVChiOox9VxIpPBABw== @@ -83,6 +83,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +bignumber.js@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" + integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -113,6 +118,11 @@ core-util-is@1.0.2: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + coveralls@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.1.tgz#f5d4431d8b5ae69c5079c8f8ca00d64ac77cf081" @@ -307,7 +317,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -317,6 +327,11 @@ is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -447,11 +462,21 @@ mkdirp@0.5.x: dependencies: minimist "^1.2.6" -moment@^2.29.3: +moment@^2.11.2: version "2.29.3" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3" integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw== +mysql@^2.15.x: + version "2.18.1" + resolved "https://registry.yarnpkg.com/mysql/-/mysql-2.18.1.tgz#2254143855c5a8c73825e4522baf2ea021766717" + integrity sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig== + dependencies: + bignumber.js "9.0.0" + readable-stream "2.3.7" + safe-buffer "5.1.2" + sqlstring "2.3.1" + neo-async@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -503,6 +528,11 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -518,11 +548,24 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== -ramda@^0.28.0: +ramda@^0.x.x: version "0.28.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.28.0.tgz#acd785690100337e8b063cab3470019be427cc97" integrity sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA== +readable-stream@2.3.7: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -554,6 +597,11 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -581,6 +629,11 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +sqlstring@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.1.tgz#475393ff9e91479aea62dcaf0ca3d14983a7fb40" + integrity sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A= + sshpk@^1.7.0: version "1.17.0" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" @@ -596,6 +649,13 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + supports-color@^3.1.0: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" @@ -642,6 +702,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" From 81bb7c1a4c0e5f3c698659ffd3712bac43d615de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20Ju=C3=A1rez?= Date: Fri, 27 May 2022 16:19:58 -0500 Subject: [PATCH 3/4] Add removed files --- .travis.yml | 5 +++++ LICENSE | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .travis.yml create mode 100644 LICENSE diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..74c0c5b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 6 +after_script: + - "./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f43b65d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Alien Creations + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 8b14fc8add0dec668d55cdb88e48380c0f6466c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20Ju=C3=A1rez?= Date: Fri, 27 May 2022 16:25:39 -0500 Subject: [PATCH 4/4] Attend sonarcloud suggestions --- spec/_connectionHandleSpec.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/spec/_connectionHandleSpec.js b/spec/_connectionHandleSpec.js index f4c814c..cee9835 100644 --- a/spec/_connectionHandleSpec.js +++ b/spec/_connectionHandleSpec.js @@ -55,20 +55,6 @@ describe('connectionHandle', () => { }, 1); }); - it('rolls back transaction when there is an error and no connection', done => { - _connectionHandle( - FAKE_DEFERRED, - FAKE_QUERY_STATEMENT, - FAKE_TRANSACTION, - FAKE_SINGLE_RETURN_ITEM, - FAKE_ALLOW_EMPTY_RESPONSE - )(FAKE_ERROR, FAKE_CONNECTION); - setTimeout(() => { - expect(FAKE_CONNECTION.rollback).toHaveBeenCalled(); - done(); - }, 1); - }); - it('rolls back transaction when credentials are bad', done => { _connectionHandle( FAKE_DEFERRED,