diff --git a/package.json b/package.json index 8c76d28170a832246f9f1061c92d15355b663179..dc6fa6779358e5c78b3af0f03d0e981d1072b1f9 100644 --- a/package.json +++ b/package.json @@ -27,14 +27,11 @@ "lint:sh": "bash -n bin/*.sh", "sloc": "sloc bin examples scripts src tests --details --format cli-table --keys total,source,comment && sloc bin examples scripts src tests", "ts-node": "ts-node", - "test": "npm run test:linux", - "test:linux": "npm run test:shell && npm run test:mac", - "test:mac": "npm run lint && npm run test:unit && npm run sloc", + "test": "npm run lint && npm run test:unit && npm run test:shell && npm run sloc", "test:pack": "bash -x scripts/npm-pack-testing.sh", "test:shell": "shellcheck bin/*.sh", "test:unit": "blue-tape -r ts-node/register \"src/**/*.spec.ts\" \"src/*.spec.ts\" \"tests/*.spec.ts\" \"tests/**/*.spec.ts\"", "test:unit:retry": "ts-node scripts/retry-unit-tests", - "test:win32": "npm run test:unit:retry", "test:debug": "blue-tape -r ts-node/register src/puppet-web/bridge.spec.ts", "typedoc": "bash scripts/typedoc.sh", "io-client": "ts-node bin/io-client", @@ -79,7 +76,7 @@ }, "dependencies": { "array-flatten": "^2.1.1", - "brolog": "^1.6.3", + "brolog": "^1.8.1", "clone-class": "^0.6.11", "cuid": "^2.1.1", "express": "^4.16.3", diff --git a/scripts/prepare-osx.sh b/scripts/prepare-osx.sh index cf6bcf563b0f266489ef89ec85766b5ef553e791..5f99fb9f4c69bcfd43f94f41c171ef89c7c80142 100755 --- a/scripts/prepare-osx.sh +++ b/scripts/prepare-osx.sh @@ -5,7 +5,7 @@ set -e # brew cleanup # brew cask cleanup -# brew install \ - # moreutils \ - # jq - # shellcheck +brew install \ + moreutils \ + jq + shellcheck diff --git a/src/user/contact.ts b/src/user/contact.ts index b9694485eed468af99318c99a492bf985fd638fc..f00359b3360830874ea29c664c0ea2d7734a7e83 100644 --- a/src/user/contact.ts +++ b/src/user/contact.ts @@ -198,15 +198,15 @@ export class Contact extends Accessory implements Sayable { const contactIdList: string[] = await this.puppet.contactSearch(query) const contactList = contactIdList.map(id => this.load(id)) - const CHUNK_SIZE = 16 + const BATCH_SIZE = 16 let batchIndex = 0 const invalidContactId: string[] = [] - while (batchIndex * CHUNK_SIZE < contactList.length) { + while (batchIndex * BATCH_SIZE < contactList.length) { const batchContactList = contactList.slice( - CHUNK_SIZE * batchIndex, - CHUNK_SIZE * (batchIndex + 1), + BATCH_SIZE * batchIndex, + BATCH_SIZE * (batchIndex + 1), ) await Promise.all( batchContactList.map(