From e512746db2218c8756dbd270464e42c92e5feae4 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Mon, 11 Mar 2019 12:12:34 +0000 Subject: [PATCH 01/24] Import Requests, start modernising --- package-lock.json | 1574 ++------------------------ package.json | 46 +- src/requests/actions.ts | 77 -- src/requests/index.ts | 4 - src/requests/reducers.ts | 56 - src/requests/types.ts | 38 - src/requests/utils.ts | 142 --- src/{ => ts}/collections/actions.ts | 2 +- src/{ => ts}/collections/index.ts | 52 +- src/{ => ts}/collections/reducers.ts | 11 - src/{ => ts}/collections/types.ts | 2 - src/{ => ts}/collections/utils.ts | 25 +- src/{ => ts}/index.ts | 8 +- src/{ => ts}/items/actions.ts | 3 +- src/{ => ts}/items/index.ts | 28 +- src/{ => ts}/items/reducers.ts | 0 src/{ => ts}/items/types.ts | 0 src/{ => ts}/items/utils.ts | 2 +- src/{ => ts}/types.ts | 1 - src/{ => ts}/utils.ts | 0 tests/collections.ts | 299 +---- tests/genericRequestExposed.ts | 164 --- tests/index.ts | 6 +- tests/items.ts | 43 +- tests/requests.ts | 453 -------- tsconfig.json | 27 +- 26 files changed, 196 insertions(+), 2867 deletions(-) delete mode 100644 src/requests/actions.ts delete mode 100644 src/requests/index.ts delete mode 100644 src/requests/reducers.ts delete mode 100644 src/requests/types.ts delete mode 100644 src/requests/utils.ts rename src/{ => ts}/collections/actions.ts (82%) rename src/{ => ts}/collections/index.ts (84%) rename src/{ => ts}/collections/reducers.ts (92%) rename src/{ => ts}/collections/types.ts (95%) rename src/{ => ts}/collections/utils.ts (70%) rename src/{ => ts}/index.ts (80%) rename src/{ => ts}/items/actions.ts (63%) rename src/{ => ts}/items/index.ts (90%) rename src/{ => ts}/items/reducers.ts (100%) rename src/{ => ts}/items/types.ts (100%) rename src/{ => ts}/items/utils.ts (92%) rename src/{ => ts}/types.ts (89%) rename src/{ => ts}/utils.ts (100%) delete mode 100644 tests/genericRequestExposed.ts delete mode 100644 tests/requests.ts diff --git a/package-lock.json b/package-lock.json index 1098a07..ea711b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,6 +61,21 @@ } } }, + "@dabapps/redux-requests": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@dabapps/redux-requests/-/redux-requests-0.5.2.tgz", + "integrity": "sha512-soCpR6VeHQkyQbLOr0bKdvG9GUPDW9P4s3+guZqpBbOTRCa3mG+jg6QdWCDNf1lFrMCVpPlsfe3iiKwRcGFKJQ==", + "requires": { + "@types/js-cookie": "^2.0.28", + "@types/node": "^7.0.18", + "axios": "^0.18.0", + "flux-standard-action": "^1.2.0", + "js-cookie": "^2.1.4", + "path": "^0.12.7", + "redux": "^3.7.2", + "typescript": "^2.9.2" + } + }, "@types/jest": { "version": "23.3.1", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.1.tgz", @@ -82,16 +97,6 @@ "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.8.0.tgz", "integrity": "sha1-eiLvWE1v5Zry5Ae64Hnit/ilEC8=" }, - "JSONStream": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz", - "integrity": "sha512-Y7vfi3I5oMOYIr+WxV8NZxDSwcbNgzdKYsTNInmycOq9bUYwGg9ryu57Wg5NLmCjqdFPNUmpMBo3kSJN9tCbXg==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, "abab": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", @@ -104,15 +109,6 @@ "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", "dev": true }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, "acorn-globals": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.1.0.tgz", @@ -122,17 +118,6 @@ "acorn": "^5.0.0" } }, - "acorn-node": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.5.2.tgz", - "integrity": "sha512-krFKvw/d1F17AN3XZbybIUzEY4YEPNiGo05AfP3dBlfVKrMHETKpgjpuZkSF8qDNt9UkQcqj7am8yJLseklCMg==", - "dev": true, - "requires": { - "acorn": "^5.7.1", - "acorn-dynamic-import": "^3.0.0", - "xtend": "^4.0.1" - } - }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -168,24 +153,6 @@ "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, - "ansi-regex": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", - "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", - "dev": true - }, - "ansi-styles": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", - "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", - "dev": true - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true - }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -252,7 +219,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", "dev": true }, "arr-union": { @@ -267,24 +234,6 @@ "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", @@ -306,43 +255,6 @@ "safer-buffer": "~2.1.0" } }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -367,12 +279,6 @@ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", @@ -404,11 +310,11 @@ "dev": true }, "axios": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz", - "integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "requires": { - "follow-redirects": "^1.2.3", + "follow-redirects": "^1.3.0", "is-buffer": "^1.1.5" } }, @@ -684,7 +590,7 @@ "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=", "dev": true }, "balanced-match": { @@ -754,12 +660,6 @@ } } }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -770,18 +670,6 @@ "tweetnacl": "^0.14.3" } }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -821,26 +709,6 @@ } } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - } - }, "browser-process-hrtime": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", @@ -864,132 +732,6 @@ } } }, - "browserify": { - "version": "14.4.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.4.0.tgz", - "integrity": "sha1-CJo0Y69Y0OSNjNQHCz90ZU1avKk=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^1.11.0", - "browserify-zlib": "~0.1.2", - "buffer": "^5.0.2", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.5.1", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.0", - "domain-browser": "~1.1.0", - "duplexer2": "~0.1.2", - "events": "~1.1.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.0.0", - "labeled-stream-splicer": "^2.0.0", - "module-deps": "^4.0.8", - "os-browserify": "~0.1.1", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^2.0.0", - "stream-http": "^2.0.0", - "string_decoder": "~1.0.0", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "~0.0.0", - "url": "~0.11.0", - "util": "~0.10.1", - "vm-browserify": "~0.0.1", - "xtend": "^4.0.0" - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, - "requires": { - "pako": "~0.2.0" - } - }, "bser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", @@ -999,40 +741,18 @@ "node-int64": "^0.4.0" } }, - "buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.0.tgz", - "integrity": "sha512-nUJyfChH7PMJy75eRDCCKtszSEFokUNXC1hNVSe+o+VdcgvDPLs20k3v8UXI8ruRYAJiYtyRea8mYyqPxoHWDw==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -1050,12 +770,6 @@ "unset-value": "^1.0.0" } }, - "cached-path-relative": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", - "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", - "dev": true - }, "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", @@ -1095,72 +809,12 @@ "lazy-cache": "^1.0.3" } }, - "chalk": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", - "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", - "dev": true, - "requires": { - "ansi-styles": "^1.1.0", - "escape-string-regexp": "^1.0.0", - "has-ansi": "^0.1.0", - "strip-ansi": "^0.3.0", - "supports-color": "^0.2.0" - }, - "dependencies": { - "supports-color": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", - "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", - "dev": true - } - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - }, - "dependencies": { - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - } - } - }, "ci-info": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz", "integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==", "dev": true }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -1248,24 +902,6 @@ "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - }, - "combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", - "dev": true, - "requires": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, "combined-stream": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", @@ -1275,12 +911,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", - "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", - "dev": true - }, "compare-versions": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.1.tgz", @@ -1299,82 +929,6 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "concurrently": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz", - "integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=", - "dev": true, - "requires": { - "chalk": "0.5.1", - "commander": "2.6.0", - "date-fns": "^1.23.0", - "lodash": "^4.5.1", - "rx": "2.3.24", - "spawn-command": "^0.0.2-1", - "supports-color": "^3.2.3", - "tree-kill": "^1.1.0" - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -1393,49 +947,6 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "corser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", - "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", - "dev": true - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -1447,25 +958,6 @@ "which": "^1.2.9" } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, "cssom": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", @@ -1514,22 +1006,11 @@ } } }, - "date-fns": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", - "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -1617,40 +1098,12 @@ } } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "deps-sort": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", - "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - } - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", @@ -1666,33 +1119,12 @@ "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", "dev": true }, - "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "dev": true, - "requires": { - "acorn": "^5.2.1", - "defined": "^1.0.0" - } - }, "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, "doctrine": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz", @@ -1717,12 +1149,6 @@ } } }, - "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", - "dev": true - }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -1732,15 +1158,6 @@ "webidl-conversions": "^4.0.2" } }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1752,33 +1169,6 @@ "safer-buffer": "^2.1.0" } }, - "ecstatic": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-2.2.1.tgz", - "integrity": "sha512-ztE4WqheoWLh3wv+HQwy7dACnvNY620coWpa+XqY6R2cVWgaAT2lUISU1Uf7JpdLLJCURktJOaA9av2AOzsyYQ==", - "dev": true, - "requires": { - "he": "^1.1.1", - "mime": "^1.2.11", - "minimist": "^1.1.0", - "url-join": "^2.0.2" - } - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1864,28 +1254,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "exec-sh": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz", @@ -2215,11 +1583,26 @@ } }, "follow-redirects": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.6.tgz", - "integrity": "sha512-xay/eYZGgdpb3rpugZj1HunNaPcqc6fud/RW7LNEQntvKzuRO4DDLL+MnJIbTHh6t3Kda3v2RvhY2doxUddnig==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", "requires": { - "debug": "^3.1.0" + "debug": "^3.2.6" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } } }, "for-in": { @@ -2812,13 +2195,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", "dev": true }, "get-caller-file": { @@ -2851,7 +2228,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -2884,7 +2261,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", "dev": true }, "graceful-fs": { @@ -2893,12 +2270,6 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, "growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -2987,15 +2358,6 @@ "function-bind": "^1.1.1" } }, - "has-ansi": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", - "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", - "dev": true, - "requires": { - "ansi-regex": "^0.2.0" - } - }, "has-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", @@ -3034,43 +2396,6 @@ } } }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -3090,45 +2415,12 @@ "html-encoding-sniffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", - "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "integrity": "sha1-5w2EuU2lOqN14R/jo1G+ZkLKRvg=", "dev": true, "requires": { "whatwg-encoding": "^1.0.1" } }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-server": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.10.0.tgz", - "integrity": "sha1-sqRGsWqduH7TxiK6m+sbCFsSNKc=", - "dev": true, - "requires": { - "colors": "1.0.3", - "corser": "~2.0.0", - "ecstatic": "^2.0.0", - "http-proxy": "^1.8.1", - "opener": "~1.4.0", - "optimist": "0.6.x", - "portfinder": "^1.0.13", - "union": "~0.4.3" - } - }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -3140,12 +2432,6 @@ "sshpk": "^1.7.0" } }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -3155,12 +2441,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, "immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", @@ -3182,12 +2462,6 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3203,47 +2477,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", - "dev": true, - "requires": { - "source-map": "~0.5.3" - } - }, - "insert-module-globals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", - "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - }, - "dependencies": { - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - } - } - }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -3274,19 +2507,10 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" }, "is-builtin-module": { "version": "1.0.0", @@ -4563,15 +3787,6 @@ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "dev": true }, - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -4593,18 +3808,6 @@ "graceful-fs": "^4.1.6" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4632,25 +3835,6 @@ "integrity": "sha512-Zq/jyANIJ2uX8UZjWlqLwbyhcxSXJtT/Y89lClyeZd3l++3ztL1I5SSCYrbcbwSunTjC88N3WuMk0kRDQD6gzA==", "dev": true }, - "labeled-stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz", - "integrity": "sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "isarray": "^2.0.4", - "stream-splicer": "^2.0.0" - }, - "dependencies": { - "isarray": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz", - "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA==", - "dev": true - } - } - }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", @@ -4733,12 +3917,6 @@ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.10.tgz", "integrity": "sha512-iesFYPmxYYGTcmQK0sL8bX3TGHyM6b2qREaB4kamHfQyfPJP0xgoGxp19nsH16nsfquLdiyKyX3mQkfiSGV8Rg==" }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -4799,16 +3977,6 @@ "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", "dev": true }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, "mem": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", @@ -4900,22 +4068,6 @@ } } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, "mime-db": { "version": "1.35.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", @@ -4937,22 +4089,10 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -5002,33 +4142,11 @@ } } }, - "module-deps": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", - "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.0", - "concat-stream": "~1.5.0", - "defined": "^1.0.0", - "detective": "^4.0.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.3", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "nan": { "version": "2.10.0", @@ -5091,7 +4209,7 @@ "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "dev": true, "requires": { "hosted-git-info": "^2.1.4", @@ -5215,13 +4333,7 @@ "dev": true, "requires": { "wrappy": "1" - } - }, - "opener": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", - "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=", - "dev": true + } }, "optimist": { "version": "0.6.1", @@ -5263,12 +4375,6 @@ } } }, - "os-browserify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", - "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", - "dev": true - }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -5292,15 +4398,6 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "outpipe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", - "integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=", - "dev": true, - "requires": { - "shell-quote": "^1.4.2" - } - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -5331,34 +4428,6 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "requires": { - "path-platform": "~0.11.15" - } - }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, "parse-glob": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", @@ -5401,12 +4470,6 @@ "util": "^0.10.3" } }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -5431,16 +4494,10 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true - }, "path-to-regexp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.1.0.tgz", - "integrity": "sha512-dZY7QPCPp5r9cnNuQ955mOv4ZFVDXY/yvqeV7Y1W2PJA3PEFcuow9xKFfJxbBj1pIjOAP+M2B4/7xubmykLrXw==" + "integrity": "sha1-fjD59bE0vWoo/8Lj7x5HB1rFJZs=" }, "path-type": { "version": "1.1.0", @@ -5453,19 +4510,6 @@ "pinkie-promise": "^2.0.0" } }, - "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -5508,28 +4552,6 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, - "portfinder": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz", - "integrity": "sha512-syFcRIRzVI1BoEFOCaAiizwDolh1S1YXSodsVhncbhjzjZQulhczNRbqnUl9N31Q4dKGOXsNDqxC2BWBgSMqeQ==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -5549,9 +4571,9 @@ "dev": true }, "prettier": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz", - "integrity": "sha1-XoYkrpNjyA+V7GRFhOzfVddPk/o=", + "version": "1.16.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", + "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==", "dev": true }, "pretty-format": { @@ -5584,7 +4606,7 @@ "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=", "dev": true }, "process": { @@ -5620,43 +4642,12 @@ "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", "dev": true }, - "public-encrypt": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - } - }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true }, - "qs": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", - "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, "randomatic": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", @@ -5682,34 +4673,6 @@ } } }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -5778,18 +4741,6 @@ } } }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, "realpath-native": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.1.tgz", @@ -5802,7 +4753,7 @@ "redux": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", - "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==", + "integrity": "sha1-BrcxIyFZAdJdBlvjQusCa8HIU3s=", "requires": { "lodash": "^4.2.1", "lodash-es": "^4.2.1", @@ -5824,7 +4775,7 @@ "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", "dev": true, "requires": { "is-equal-shallow": "^0.1.3" @@ -5935,19 +4886,13 @@ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resolve-cwd": { @@ -5990,34 +4935,18 @@ "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", "dev": true, "requires": { "glob": "^7.0.5" } }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, "rsvp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==", "dev": true }, - "rx": { - "version": "2.3.24", - "resolved": "https://registry.npmjs.org/rx/-/rx-2.3.24.tgz", - "integrity": "sha1-FPlQpCF9fjXapxu8vljv9o6ksrc=", - "dev": true - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -6088,7 +5017,7 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", "dev": true }, "semver": { @@ -6103,12 +5032,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", @@ -6132,26 +5055,6 @@ } } }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "requires": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -6167,22 +5070,10 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, "shellwords": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "integrity": "sha1-1rkYHBpI05cyTISHHvvPxz/AZUs=", "dev": true }, "signal-exit": { @@ -6191,12 +5082,6 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, - "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "dev": true - }, "sisteransi": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz", @@ -6342,7 +5227,7 @@ "source-map-support": { "version": "0.4.18", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", "dev": true, "requires": { "source-map": "^0.5.6" @@ -6354,12 +5239,6 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, - "spawn-command": { - "version": "0.0.2-1", - "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", - "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", - "dev": true - }, "spdx-correct": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", @@ -6457,49 +5336,6 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "requires": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", - "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, "string-length": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", @@ -6554,24 +5390,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", - "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", - "dev": true, - "requires": { - "ansi-regex": "^0.2.1" - } - }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -6584,21 +5402,6 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", @@ -6619,15 +5422,6 @@ "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", "dev": true }, - "syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "requires": { - "acorn-node": "^1.2.0" - } - }, "test-exclude": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", @@ -6676,43 +5470,12 @@ "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", "dev": true }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "requires": { - "process": "~0.11.0" - } - }, "tmpl": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", "dev": true }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -6777,12 +5540,6 @@ } } }, - "tree-kill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", - "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==", - "dev": true - }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -6801,43 +5558,6 @@ "lodash": "^4.17.10" } }, - "tsconfig": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", - "integrity": "sha1-X0J45wGACWeo/Dg/0ZZIh48qbjo=", - "dev": true, - "requires": { - "any-promise": "^1.3.0", - "parse-json": "^2.2.0", - "strip-bom": "^2.0.0", - "strip-json-comments": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "tsify": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tsify/-/tsify-3.0.1.tgz", - "integrity": "sha1-I1Cf87TnEQypZW9sJ8oT7IVgVvY=", - "dev": true, - "requires": { - "convert-source-map": "^1.1.0", - "fs.realpath": "^1.0.0", - "object-assign": "^4.1.0", - "semver": "^5.1.0", - "through2": "^2.0.0", - "tsconfig": "^5.0.3" - } - }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -6845,22 +5565,24 @@ "dev": true }, "tslint": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.8.0.tgz", - "integrity": "sha1-H0mtWy53x2w69N3K5VKuTjYS6xM=", + "version": "5.13.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.13.1.tgz", + "integrity": "sha512-fplQqb2miLbcPhyHoMV4FU9PtNRbgmm/zI5d3SZwwmJQM6V0eodju+hplpyfhLWpmwrDNfNYU57uYRb8s0zZoQ==", "dev": true, "requires": { "babel-code-frame": "^6.22.0", "builtin-modules": "^1.1.1", - "chalk": "^2.1.0", - "commander": "^2.9.0", + "chalk": "^2.3.0", + "commander": "^2.12.1", "diff": "^3.2.0", "glob": "^7.1.1", + "js-yaml": "^3.7.0", "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.7.1", - "tsutils": "^2.12.1" + "tslib": "^1.8.0", + "tsutils": "^2.27.2" }, "dependencies": { "ansi-styles": { @@ -6873,9 +5595,9 @@ } }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -6884,9 +5606,9 @@ } }, "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", "dev": true }, "has-flag": { @@ -6961,12 +5683,6 @@ "tslib": "^1.8.1" } }, - "tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -6992,37 +5708,10 @@ "prelude-ls": "~1.1.2" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=" - }, - "uglify-js": { - "version": "3.0.25", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.25.tgz", - "integrity": "sha512-JO1XE0WZ9m6UpDkN7WCyPNAWI6EN3K0g40ekcoJKejViYmryJ0BaLxXjvra1IsAeIlJfq72scTbhl0jknsT2GA==", - "dev": true, - "requires": { - "commander": "~2.9.0", - "source-map": "~0.5.1" - }, - "dependencies": { - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "dev": true, - "requires": { - "graceful-readlink": ">= 1.0.0" - } - } - } + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==" }, "uglify-to-browserify": { "version": "1.0.2", @@ -7031,38 +5720,11 @@ "dev": true, "optional": true }, - "umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true - }, - "undeclared-identifiers": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz", - "integrity": "sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ==", - "dev": true, - "requires": { - "acorn-node": "^1.3.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - } - }, "underscore": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, - "union": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz", - "integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=", - "dev": true, - "requires": { - "qs": "~2.3.3" - } - }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -7150,30 +5812,6 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-join": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", - "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", - "dev": true - }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -7231,15 +5869,6 @@ "extsprintf": "^1.2.0" } }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, "w3c-hr-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", @@ -7268,37 +5897,10 @@ "minimist": "^1.2.0" } }, - "watchify": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz", - "integrity": "sha1-8HX9LoqGrN6Eztum5cKgvt1SPZ4=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "browserify": "^14.0.0", - "chokidar": "^1.0.0", - "defined": "^1.0.0", - "outpipe": "^1.1.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - } - } - }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "integrity": "sha1-qFWYCx8LazWbodXZ+zmulB+qY60=", "dev": true }, "whatwg-encoding": { @@ -7434,12 +6036,6 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", diff --git a/package.json b/package.json index 7a6db21..96ec409 100644 --- a/package.json +++ b/package.json @@ -3,21 +3,21 @@ "version": "0.3.0", "description": "Type-safe helpers for dealing with Rest-Framework backed collections in Typescript", "main": "dist/index.js", - "types": "dist/index.d.ts", "scripts": { "dist": "./scripts/dist", - "lint-js": "tsc --noEmit --project tsconfig.json && npm run prettier-check && tslint --project tsconfig.json '{src,tests}/**/*.ts?(x)'", + "lint": "tsc --noEmit --project tsconfig.json && npm run prettier-check && tslint --project tsconfig.json '{src,tests,types,examples,docs}/**/*.@(ts|tsx)'", + "prettier-check": "diffs=$(prettier --list-different '{src,tests,types,examples,docs}/**/*.ts?(x)'); if [ ! -z $diffs ]; then echo \"Run 'npm run prettier'\nThe following files need formatting:\n$diffs\" && exit 1; fi;", "tests": "jest", - "test": "npm run lint-js && npm run tests -- --coverage --runInBand", - "prettier": "prettier --write \"{src,tests}/**/*.{ts,tsx,js,jsx}\"", - "prettier-check": "./scripts/prettier-check", + "test": "npm run lint && npm run tests -- --runInBand --coverage", + "prettier": "prettier --write '{src,tests,types,examples,docs}/**/*.ts?(x)'", "prepublishOnly": "npm test && npm run dist" }, "dependencies": { + "@dabapps/redux-requests": "^0.5.2", "@types/js-cookie": "^2.0.28", "@types/node": "^7.0.18", "@types/underscore": "^1.8.0", - "axios": ">= 0.16.2 < 0.17", + "axios": "^0.18.0", "flux-standard-action": "^1.2.0", "immutable": ">= 3.8.2 < 5", "js-cookie": "^2.1.4", @@ -25,22 +25,17 @@ "path-to-regexp": "^2.1.0", "redux": "^3.7.2", "redux-thunk": "^2.2.0", - "typescript": ">= 2.3.3 < 3", + "typescript": "^2.9.2", "underscore": "^1.8.3" }, "devDependencies": { "@types/jest": "^23.3.1", - "browserify": "^14.4.0", - "concurrently": "^3.5.0", - "http-server": "^0.10.0", "jest": "^23.5.0", - "prettier": "^1.7.4", + "prettier": "^1.14.2", + "request": "^2.88.0", "ts-jest": "^23.1.4", - "tsify": "^3.0.1", - "tslint": "^5.8.0", - "tslint-config-dabapps": "dabapps/tslint-config-dabapps#v0.5.1", - "uglify-js": "^3.0.25", - "watchify": "^3.9.0" + "tslint": "^5.11.0", + "tslint-config-dabapps": "github:dabapps/tslint-config-dabapps#v0.5.1" }, "peerDependencies": { "axios": ">= 0.16.2 < 0.17", @@ -66,21 +61,26 @@ "access": "restricted" }, "jest": { - "collectCoverageFrom": [ - "src/ts/**/*.{ts,tsx,js,jsx}" - ], - "coveragePathIgnorePatterns": [ - "types\\.(tsx?|jsx?)$" - ], + "coverageThreshold": { + "global": { + "branches": 100, + "functions": 100, + "lines": 100, + "statements": 100 + } + }, "transform": { "^.+\\.tsx?$": "ts-jest" }, - "testRegex": "(/tests/.*|\\.(test|spec))\\.(tsx?|jsx?)$", + "testRegex": "(/tests/.*|\\.(test|spec))\\.(ts|tsx|js|jsx)$", "moduleFileExtensions": [ "ts", "tsx", "js", "jsx" + ], + "testPathIgnorePatterns": [ + "/tests/helpers/*" ] } } diff --git a/src/requests/actions.ts b/src/requests/actions.ts deleted file mode 100644 index 5d1295c..0000000 --- a/src/requests/actions.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { AxiosResponse } from 'axios'; // tslint:disable-line:no-unused-variable -import { Dispatch } from 'redux'; -import { - AsyncActionSet, - RequestMetaData, - RequestStates, - UrlMethod, -} from './types'; -import { apiRequest, metaWithResponse } from './utils'; - -export const REQUEST_STATE = 'REQUEST_STATE'; -export function setRequestState( - actionSet: AsyncActionSet, - requestState: RequestStates, - data: any, - tag?: string -) { - return { - payload: { - actionSet, - data, - requestState, - tag, - }, - type: REQUEST_STATE, - }; -} - -export const RESET_REQUEST_STATE = 'RESET_REQUEST_STATE'; -export function resetRequestState(actionSet: AsyncActionSet, tag?: string) { - return { - payload: { - actionSet, - tag, - }, - type: RESET_REQUEST_STATE, - }; -} - -export function dispatchGenericRequest( - actionSet: AsyncActionSet, - url: string, - method: UrlMethod, - data?: any, - tag?: string, - metaData: RequestMetaData = {}, - preserveOriginal?: boolean -) { - return (dispatch: Dispatch, getState: () => any) => { - const meta: RequestMetaData = { ...metaData, tag }; - - dispatch({ type: actionSet.REQUEST, meta, payload: { preserveOriginal } }); - dispatch(setRequestState(actionSet, 'REQUEST', null, tag)); - - return apiRequest(url, method, data) - .then(response => { - dispatch({ - type: actionSet.SUCCESS, - payload: response.data, - meta: metaWithResponse(meta, response), - }); - dispatch(setRequestState(actionSet, 'SUCCESS', response.data, tag)); - return response; - }) - .catch(error => { - console.error(error); // tslint:disable-line:no-console - const errorData = error && error.response && error.response.data; - dispatch({ - type: actionSet.FAILURE, - payload: errorData, - meta: metaWithResponse(meta, error && error.response), - }); - dispatch(setRequestState(actionSet, 'FAILURE', errorData, tag)); - return Promise.reject(error); - }); - }; -} diff --git a/src/requests/index.ts b/src/requests/index.ts deleted file mode 100644 index e408eee..0000000 --- a/src/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './actions'; -export * from './reducers'; -export * from './types'; -export * from './utils'; diff --git a/src/requests/reducers.ts b/src/requests/reducers.ts deleted file mode 100644 index 8dfa5f5..0000000 --- a/src/requests/reducers.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { isFSA } from 'flux-standard-action'; -import { AnyAction } from 'redux'; -import { REQUEST_STATE, RESET_REQUEST_STATE } from './actions'; -import { - ResetRequestStatePayload, - ResponsesReducerState, - SetRequestStatePayload, -} from './types'; - -export function responsesReducer( - state: ResponsesReducerState = {}, - action: AnyAction -): ResponsesReducerState { - switch (action.type) { - case REQUEST_STATE: - if (isFSA(action)) { - const { - actionSet, - requestState, - tag, - data, - } = action.payload as SetRequestStatePayload; - const existing = state[actionSet.REQUEST] || {}; - return { - ...state, - [actionSet.REQUEST]: { - ...existing, - [tag || '']: { - requestState, - data, - }, - }, - }; - } - break; - case RESET_REQUEST_STATE: - if (isFSA(action)) { - const { actionSet, tag } = action.payload as ResetRequestStatePayload; - const existing = state[actionSet.REQUEST] || {}; - return { - ...state, - [actionSet.REQUEST]: { - ...existing, - [tag || '']: { - requestState: null, - data: null, - }, - }, - }; - } - break; - default: - return state; - } - return state; -} diff --git a/src/requests/types.ts b/src/requests/types.ts deleted file mode 100644 index e851b62..0000000 --- a/src/requests/types.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { AxiosResponse } from 'axios'; -import { Dict } from '../utils'; - -export type RequestStates = 'REQUEST' | 'SUCCESS' | 'FAILURE'; -export type UrlMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'OPTIONS' | 'PATCH'; - -export interface RequestMetaData { - tag?: string; - itemId?: string; - subgroup?: string; - shouldAppend?: boolean; - ordering?: string; - response?: AxiosResponse; -} - -export type AsyncActionSet = Readonly<{ - FAILURE: string; - REQUEST: string; - SUCCESS: string; -}>; - -export type ResponseState = Readonly<{ - requestState: RequestStates | null; - data: Dict | ReadonlyArray | string | number | null; -}>; - -export type ResponsesReducerState = Dict>; - -export type SetRequestStatePayload = Readonly<{ - actionSet: AsyncActionSet; - requestState: RequestStates; - data: any; - tag?: string; -}>; -export type ResetRequestStatePayload = Readonly<{ - actionSet: AsyncActionSet; - tag?: string; -}>; diff --git a/src/requests/utils.ts b/src/requests/utils.ts deleted file mode 100644 index 4fce568..0000000 --- a/src/requests/utils.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { AxiosPromise, AxiosResponse, default as axios } from 'axios'; -import * as Cookies from 'js-cookie'; -import * as path from 'path'; -import * as _ from 'underscore'; -import { Dict } from '../utils'; -import { - AsyncActionSet, - RequestMetaData, - ResponsesReducerState, - ResponseState, -} from './types'; - -export function makeAsyncActionSet(actionName: string): AsyncActionSet { - return { - FAILURE: actionName + '_FAILURE', - REQUEST: actionName + '_REQUEST', - SUCCESS: actionName + '_SUCCESS', - }; -} - -export function formatQueryParams(params?: {}): string { - if (!params) { - return ''; - } - - const asPairs: ReadonlyArray<[string, any]> = _.pairs(params) as any; - const filteredPairs = asPairs - .filter(([key, value]) => value !== null && typeof value !== 'undefined') - .map(([key, value]) => [key, value.toString()]); - - if (!filteredPairs || !filteredPairs.length) { - return ''; - } - - return '?' + filteredPairs.map(([key, value]) => `${key}=${value}`).join('&'); -} - -export function apiRequest( - url: string, - method: string, - data = {}, - headers = {}, - onUploadProgress?: (event: ProgressEvent) => void -): AxiosPromise { - const combinedHeaders = { - Accept: 'application/json', - 'Content-Type': 'application/json', - 'Cache-Control': 'no-cache', - 'X-CSRFToken': Cookies.get('csrftoken'), - ...headers, - }; - - let myPath; - if (url.split(/:\/\//).length > 1) { - myPath = url; - } else { - myPath = path.normalize(url); - } - - return axios({ - method, - url: myPath, - data, - headers: combinedHeaders, - onUploadProgress, - }); -} - -function isResponse(response?: any): response is AxiosResponse { - return ( - typeof response === 'object' && - response.hasOwnProperty('data') && - response.hasOwnProperty('status') && - response.hasOwnProperty('config') - ); -} - -export function metaWithResponse( - meta: RequestMetaData, - response?: AxiosResponse -) { - if (!isResponse(response)) { - return meta; - } - - return { ...meta, response }; -} - -function getResponse( - state: ResponsesReducerState, - actionSet: AsyncActionSet, - tag?: string -): ResponseState { - return (state[actionSet.REQUEST] || {})[tag || ''] || {}; -} -export function isPending( - state: ResponsesReducerState, - actionSet: AsyncActionSet, - tag?: string -): boolean { - return getResponse(state, actionSet, tag).requestState === 'REQUEST'; -} - -export function hasFailed( - state: ResponsesReducerState, - actionSet: AsyncActionSet, - tag?: string -): boolean { - return getResponse(state, actionSet, tag).requestState === 'FAILURE'; -} - -export function hasSucceeded( - state: ResponsesReducerState, - actionSet: AsyncActionSet, - tag?: string -): boolean { - return getResponse(state, actionSet, tag).requestState === 'SUCCESS'; -} - -export function anyPending( - state: ResponsesReducerState, - actionSets: ReadonlyArray -): boolean { - return _.any(actionSets, actionSet => { - if (actionSet instanceof Array) { - const [actualSet, tag] = actionSet; - return isPending(state, actualSet, tag); - } else { - return isPending(state, actionSet); - } - }); -} - -export function getErrorData( - state: ResponsesReducerState, - actionSet: AsyncActionSet, - tag?: string -): Dict | ReadonlyArray | string | number | null | undefined { - if (hasFailed(state, actionSet, tag)) { - return getResponse(state, actionSet, tag).data; - } -} diff --git a/src/collections/actions.ts b/src/ts/collections/actions.ts similarity index 82% rename from src/collections/actions.ts rename to src/ts/collections/actions.ts index cd55ae3..a093b5b 100644 --- a/src/collections/actions.ts +++ b/src/ts/collections/actions.ts @@ -1,4 +1,4 @@ -import { makeAsyncActionSet } from '../requests'; +import { makeAsyncActionSet } from '@dabapps/redux-requests'; export const GET_COLLECTION = makeAsyncActionSet('GET_COLLECTION'); export const ADD_TO_COLLECTION = makeAsyncActionSet('ADD_TO_COLLECTION'); diff --git a/src/collections/index.ts b/src/ts/collections/index.ts similarity index 84% rename from src/collections/index.ts rename to src/ts/collections/index.ts index b0a3b7e..faba765 100644 --- a/src/collections/index.ts +++ b/src/ts/collections/index.ts @@ -3,6 +3,7 @@ export * from './reducers'; export * from './types'; export * from './utils'; +import { request } from '@dabapps/redux-requests'; import { AxiosResponse } from 'axios'; // Required for re-exporting // tslint:disable-next-line:no-unused-variable @@ -13,7 +14,6 @@ import { AnyAction } from 'redux'; // tslint:disable-next-line:no-unused-variable import { Dispatch } from 'redux'; import { ThunkAction } from 'redux-thunk'; -import { dispatchGenericRequest } from '../requests'; import { buildSubgroup, IdKeyedMap, @@ -40,16 +40,14 @@ import { } from './types'; import { buildCollectionsStore, - formatCollectionQueryParams, +// formatCollectionQueryParams, getCollectionByName, getCollectionResultsByName, - getImmutableCollectionResultsByName, WHOLE_COLLECTION_PAGE_SIZE, } from './utils'; export function collectionsFunctor>( typeToRecordMapping: TypeToRecordMapping, - useImmutable: boolean, baseUrl: string = '/api/', reducerPlugin?: CollectionReducerPlugin ) { @@ -60,13 +58,12 @@ export function collectionsFunctor>( subgroup?: string, url?: string ) { - return dispatchGenericRequest( + return request( ADD_TO_COLLECTION, url || overrideUrl || `${baseUrl}${type}/`, 'POST', data, - type, - { subgroup: buildSubgroup(overrideUrl, subgroup) } + { tag: `${type}`, metaData: {subgroup: buildSubgroup(overrideUrl, subgroup) }} ); } @@ -91,14 +88,13 @@ export function collectionsFunctor>( const url = overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`; - return dispatchGenericRequest( + return request( DELETE_FROM_COLLECTION, url, 'DELETE', - null, - type, - { subgroup: buildSubgroup(overrideUrl, subgroup), itemId: id } - ); + undefined, + { tag: `${type}`, metaData: {subgroup: buildSubgroup(overrideUrl, subgroup), itemId: id }} + ) as any; } function getAllCollectionAction( @@ -122,7 +118,7 @@ export function collectionsFunctor>( subgroup?: string ): ThunkAction, any, null> { const url = overrideUrl || `${baseUrl}${type}/`; - const meta = { + const metaData = { subgroup: buildSubgroup(overrideUrl, subgroup), filters: options.filters, ordering: options.ordering, @@ -131,15 +127,14 @@ export function collectionsFunctor>( shouldAppend: options.shouldAppend, }; - const urlWithParams = `${url}${formatCollectionQueryParams(options)}`; - return dispatchGenericRequest( + // const urlWithParams = `${url}${formatCollectionQueryParams(options)}`; + return request( GET_COLLECTION, - urlWithParams, + url, 'GET', - null, - type, - meta - ); + options, + { tag: `${type}`, metaData } + ) as any; } return { @@ -162,7 +157,6 @@ export function collectionsFunctor>( state, action, typeToRecordMapping, - useImmutable ); break; case ADD_TO_COLLECTION.SUCCESS: @@ -170,7 +164,6 @@ export function collectionsFunctor>( state, action, typeToRecordMapping, - useImmutable ); break; case DELETE_FROM_COLLECTION.SUCCESS: @@ -178,7 +171,6 @@ export function collectionsFunctor>( state, action, typeToRecordMapping, - useImmutable ); break; case CLEAR_COLLECTION: @@ -186,7 +178,6 @@ export function collectionsFunctor>( state, action, typeToRecordMapping, - useImmutable ); break; default: @@ -200,7 +191,7 @@ export function collectionsFunctor>( } function collectionAtSubpath(type: keyof T, params: SubpathParams) { - const compiledPath = pathToRegexp.compile(type); + const compiledPath = pathToRegexp.compile(`${type}`); const replaced = compiledPath(params); const overrideUrl = `${baseUrl}${replaced}/`; const { @@ -231,16 +222,7 @@ export function collectionsFunctor>( store, type, buildSubgroup(overrideUrl, subgroup) - ), - getImmutableSubpathCollectionResults: ( - store: CollectionStore, - subgroup: string = '' - ) => - getImmutableCollectionResultsByName( - store, - type, - buildSubgroup(overrideUrl, subgroup) - ), + ) }; } diff --git a/src/collections/reducers.ts b/src/ts/collections/reducers.ts similarity index 92% rename from src/collections/reducers.ts rename to src/ts/collections/reducers.ts index f69c912..571cda9 100644 --- a/src/collections/reducers.ts +++ b/src/ts/collections/reducers.ts @@ -1,5 +1,4 @@ import { isFSA } from 'flux-standard-action'; -import { List } from 'immutable'; import { AnyAction } from 'redux'; import * as _ from 'underscore'; import { @@ -21,7 +20,6 @@ function updateCollectionItemsFromResponse( collectionData: CollectionGroup, action: CollectionResponseAction, itemConstructor: (data: {}) => T, - useImmutable: boolean ): CollectionGroup { const { subgroup, @@ -46,7 +44,6 @@ function updateCollectionItemsFromResponse( ordering, page: action.meta.page || action.payload.page || 1, results: newCollectionResults, - immutableResults: useImmutable ? List(newCollectionResults) : null, reverseOrdering, }; @@ -60,7 +57,6 @@ export function setCollectionFromResponseAction>( state: CollectionStore, action: AnyAction, typeToRecordMapping: TypeToRecordMapping, - useImmutable: boolean ): CollectionStore { if (isFSA(action) && action.meta) { const collectionType = (action.meta as Dict).tag; @@ -73,7 +69,6 @@ export function setCollectionFromResponseAction>( stateLoose[collectionType], action as CollectionResponseAction, recordBuilder, - useImmutable ), }); } @@ -85,7 +80,6 @@ export function addCollectionItem>( state: CollectionStore, action: AnyAction, typeToRecordMapping: TypeToRecordMapping, - useImmutable: boolean ): CollectionStore { if (isFSA(action) && action.meta) { const meta = action.meta as Dict; @@ -108,7 +102,6 @@ export function addCollectionItem>( ...existingCollection, count: existingCollection.count + 1, results, - immutableResults: useImmutable ? List(results) : null, }; return _.extend({}, stateLoose, { [collectionType]: _.extend({}, stateLoose[collectionType], { @@ -124,7 +117,6 @@ export function deleteCollectionItem>( state: CollectionStore, action: AnyAction, typeToRecordMapping: TypeToRecordMapping, - useImmutable: boolean ): CollectionStore { if (isFSA(action) && action.meta) { const meta = action.meta as Dict; @@ -146,7 +138,6 @@ export function deleteCollectionItem>( ...existingCollection, count: results.length, results, - immutableResults: useImmutable ? List(results) : null, }; const stateLoose: CollectionStoreLoose = state as any; // We know this is indexable return _.extend({}, stateLoose, { @@ -163,7 +154,6 @@ export function clearCollection>( state: CollectionStore, action: AnyAction, typeToRecordMapping: TypeToRecordMapping, - useImmutable: boolean ): CollectionStore { if (isFSA(action) && action.payload) { const payload = action.payload as Dict; @@ -175,7 +165,6 @@ export function clearCollection>( page: 1, count: 0, results: [], - immutableResults: useImmutable ? List() : null, }; const stateLoose: CollectionStoreLoose = state as any; // We know this is indexable return _.extend({}, stateLoose, { diff --git a/src/collections/types.ts b/src/ts/collections/types.ts similarity index 95% rename from src/collections/types.ts rename to src/ts/collections/types.ts index 0fd7b3c..da73088 100644 --- a/src/collections/types.ts +++ b/src/ts/collections/types.ts @@ -1,5 +1,4 @@ import { FluxStandardAction } from 'flux-standard-action'; -import { List } from 'immutable'; import { AnyAction } from 'redux'; import { Dict, IdKeyed, IdKeyedMap } from '../utils'; @@ -28,7 +27,6 @@ export type Collection = Readonly<{ next?: string; filters?: Dict; results: ReadonlyArray; - immutableResults: List | null; }>; export type CollectionGroup = Dict>; diff --git a/src/collections/utils.ts b/src/ts/collections/utils.ts similarity index 70% rename from src/collections/utils.ts rename to src/ts/collections/utils.ts index b3ee2b9..49d625b 100644 --- a/src/collections/utils.ts +++ b/src/ts/collections/utils.ts @@ -1,9 +1,9 @@ import { List } from 'immutable'; -import { formatQueryParams } from '../requests'; +// import { formatQueryParams } from '@dabapps/redux-requests'; import { IdKeyedMap, TypeToRecordMapping } from '../utils'; import { Collection, - CollectionOptions, +// CollectionOptions, CollectionStore, CollectionStoreMutable, } from './types'; @@ -11,7 +11,7 @@ import { export const ITEMS_PER_PAGE = 12; export const WHOLE_COLLECTION_PAGE_SIZE = 10000; -export function formatCollectionQueryParams( +/*export function formatCollectionQueryParams( options: CollectionOptions = {} ): string { const { @@ -30,7 +30,7 @@ export function formatCollectionQueryParams( page_size: pageSize, search: search || filters.search, }); -} +}*/ export function buildCollectionsStore>( mapping: TypeToRecordMapping @@ -47,7 +47,7 @@ export function getCollectionByName>( key: keyof T, subgroup: string = '' ): Collection { - const collection = collectionStore[key][subgroup]; + const collection = (collectionStore[key] as any)[subgroup]; return ( collection || { page: 1, @@ -65,18 +65,3 @@ export function getCollectionResultsByName>( ): ReadonlyArray { return getCollectionByName(collectionStore, key, subgroup).results; } - -export function getImmutableCollectionResultsByName>( - collectionStore: CollectionStore, - key: keyof T, - subgroup: string = '' -): List { - const items = getCollectionByName(collectionStore, key, subgroup) - .immutableResults; - if (!items) { - throw new Error( - 'You are trying to get Immutable collections without initializing Collections as Immutable' - ); - } - return items; -} diff --git a/src/index.ts b/src/ts/index.ts similarity index 80% rename from src/index.ts rename to src/ts/index.ts index ea57302..3b56966 100644 --- a/src/index.ts +++ b/src/ts/index.ts @@ -12,9 +12,8 @@ import { itemsFunctor } from './items'; import { CollectionOptions } from './types'; import { IdKeyedMap, TypeToRecordMapping } from './utils'; -export { dispatchGenericRequest } from './requests/actions'; -export { makeAsyncActionSet } from './requests/utils'; -export { AsyncActionSet, UrlMethod, RequestMetaData } from './requests/types'; +export { ADD_TO_COLLECTION, CLEAR_COLLECTION, DELETE_FROM_COLLECTION, GET_COLLECTION, getCollectionResultsByName, CollectionStore, getCollectionByName } from './collections'; +export { CLEAR_ITEM, GET_ITEM, getItemByName, ItemStore, UPDATE_ITEM } from './items'; export function Collections, U extends IdKeyedMap>( collectionToRecordMapping: TypeToRecordMapping, @@ -22,12 +21,9 @@ export function Collections, U extends IdKeyedMap>( collectionOptions: CollectionOptions = {} ) { const baseUrl = collectionOptions.baseUrl || '/api/'; - const useImmutableForCollections = - collectionOptions.useImmutableForCollections || false; const collections = collectionsFunctor( collectionToRecordMapping, - useImmutableForCollections, baseUrl, collectionOptions.collectionReducerPlugin ); diff --git a/src/items/actions.ts b/src/ts/items/actions.ts similarity index 63% rename from src/items/actions.ts rename to src/ts/items/actions.ts index ed58a99..21c3b7b 100644 --- a/src/items/actions.ts +++ b/src/ts/items/actions.ts @@ -1,5 +1,4 @@ -import { AsyncActionSet } from '../requests/types'; -import { makeAsyncActionSet } from '../requests/utils'; +import { AsyncActionSet, makeAsyncActionSet } from '@dabapps/redux-requests'; export const GET_ITEM: AsyncActionSet = makeAsyncActionSet('GET_ITEM'); export const UPDATE_ITEM: AsyncActionSet = makeAsyncActionSet('UPDATE_ITEM'); diff --git a/src/items/index.ts b/src/ts/items/index.ts similarity index 90% rename from src/items/index.ts rename to src/ts/items/index.ts index b5c3383..8da7b1b 100644 --- a/src/items/index.ts +++ b/src/ts/items/index.ts @@ -3,12 +3,12 @@ export * from './reducers'; export * from './types'; export * from './utils'; +import { request, UrlMethod } from '@dabapps/redux-requests'; + import { AxiosResponse } from 'axios'; import * as pathToRegexp from 'path-to-regexp'; import { AnyAction } from 'redux'; import { ThunkAction } from 'redux-thunk'; -import { dispatchGenericRequest } from '../requests'; -import { UrlMethod } from '../requests/types'; import { buildSubgroup, Dict, @@ -35,10 +35,13 @@ export function itemsFunctor>( data: any, subgroup?: string ): ThunkAction, any, null> { - return dispatchGenericRequest(UPDATE_ITEM, url, method, data, itemType, { - itemId, - subgroup: buildSubgroup(overrideUrl, subgroup), - }); + return request(UPDATE_ITEM, url, method, data, { + tag: `${itemType}`, + metaData: { + itemId, + subgroup: buildSubgroup(overrideUrl, subgroup), + } + }) as any; } function actionItemAction( @@ -72,10 +75,13 @@ export function itemsFunctor>( const url = overrideUrl ? `${overrideUrl}${itemId}/` : `${baseUrl}${itemType}/${itemId}/`; - return dispatchGenericRequest(GET_ITEM, url, 'GET', null, itemType, { - itemId, - subgroup: buildSubgroup(overrideUrl, subgroup), - }); + return request(GET_ITEM, url, 'GET', undefined, { + tag: `${itemType}`, + metaData: { + itemId, + subgroup: buildSubgroup(overrideUrl, subgroup), + } + }) as any; } function patchItemAction( @@ -163,7 +169,7 @@ export function itemsFunctor>( } function itemAtSubpath(type: keyof T, params: SubpathParams) { - const compiledPath = pathToRegexp.compile(type); + const compiledPath = pathToRegexp.compile(`${type}`); const replaced = compiledPath(params); const overrideUrl = `${baseUrl}${replaced}/`; const { diff --git a/src/items/reducers.ts b/src/ts/items/reducers.ts similarity index 100% rename from src/items/reducers.ts rename to src/ts/items/reducers.ts diff --git a/src/items/types.ts b/src/ts/items/types.ts similarity index 100% rename from src/items/types.ts rename to src/ts/items/types.ts diff --git a/src/items/utils.ts b/src/ts/items/utils.ts similarity index 92% rename from src/items/utils.ts rename to src/ts/items/utils.ts index d5b40f1..979d732 100644 --- a/src/items/utils.ts +++ b/src/ts/items/utils.ts @@ -16,5 +16,5 @@ export function getItemByName>( key: keyof T, subgroup: string = '' ): T[keyof T] | undefined { - return itemStore[key][subgroup]; + return (itemStore[key] as any)[subgroup]; } diff --git a/src/types.ts b/src/ts/types.ts similarity index 89% rename from src/types.ts rename to src/ts/types.ts index 3df6ddb..a40387b 100644 --- a/src/types.ts +++ b/src/ts/types.ts @@ -5,7 +5,6 @@ import { IdKeyedMap } from './utils'; export type CollectionOptions, U> = Readonly< Partial<{ baseUrl: string; - useImmutableForCollections: boolean; collectionReducerPlugin: CollectionReducerPlugin; itemReducerPlugin: ItemReducerPlugin; }> diff --git a/src/utils.ts b/src/ts/utils.ts similarity index 100% rename from src/utils.ts rename to src/ts/utils.ts diff --git a/tests/collections.ts b/tests/collections.ts index 91f3c79..eb17b12 100644 --- a/tests/collections.ts +++ b/tests/collections.ts @@ -1,17 +1,16 @@ +import * as requests from '@dabapps/redux-requests'; import { AnyAction } from 'redux'; import { ADD_TO_COLLECTION, CLEAR_COLLECTION, + Collections, CollectionStore, DELETE_FROM_COLLECTION, GET_COLLECTION, getCollectionByName, getCollectionResultsByName, - getImmutableCollectionResultsByName, -} from '../src/collections'; -import * as requests from '../src/requests'; +} from '../src/ts'; -import { Collections } from '../src'; type Llama = Readonly<{ furLength: number; @@ -65,7 +64,7 @@ describe('Collections', () => { describe('actions', () => { const dispatchGenericRequestSpy = jest - .spyOn(requests, 'dispatchGenericRequest') + .spyOn(requests, 'request') .mockImplementation(() => null); beforeEach(() => { @@ -500,7 +499,7 @@ describe('Collections', () => { describe('actions', () => { const dispatchGenericRequestSpy = jest - .spyOn(requests, 'dispatchGenericRequest') + .spyOn(requests, 'request') .mockImplementation(() => null); beforeEach(() => { @@ -657,292 +656,6 @@ describe('Collections', () => { }); }); -describe('Collections, immutably-backed', () => { - const collections = Collections( - collectionToRecordMapping, - {}, - { useImmutableForCollections: true } - ); - - function getCollectionSuccess( - tag: keyof Collections, - subgroup: string, - results: ReadonlyArray, - shouldAppend: boolean, - count?: number, - next?: string - ) { - return { - meta: { tag, shouldAppend, subgroup }, - payload: { - count, - page: 1, - next, - results, - }, - type: GET_COLLECTION.SUCCESS, - }; - } - - describe('reducers', () => { - // Helpers for creating event callbacks - function addItemSuccess( - tag: keyof Collections, - subgroup: string, - result: any - ) { - return { - meta: { tag, subgroup }, - payload: result, - type: ADD_TO_COLLECTION.SUCCESS, - }; - } - - function deleteItemSuccess( - tag: keyof Collections, - subgroup: string, - itemId: string - ) { - return { - meta: { tag, subgroup, itemId }, - payload: '', - type: DELETE_FROM_COLLECTION.SUCCESS, - }; - } - - it('should provide us with a reducer that has stores for each of our types', () => { - const data = collections.reducers.collectionsReducer(undefined, { - type: 'blah', - }); - expect(data.llamas).toEqual({}); - const results = getImmutableCollectionResultsByName(data, 'llamas'); - expect(results.toJS()).toEqual([]); - const subCollection = getCollectionByName(data, 'llamas'); - expect(subCollection.page).toBe(1); - expect(subCollection.count).toBe(0); - expect(subCollection.immutableResults).toEqual(results); - }); - - it('should correctly parse GET_COLLECTION responses', () => { - const data = collections.reducers.collectionsReducer( - undefined, - getCollectionSuccess( - 'llamas', - '', - [ - { - furLength: 5, - id: '1', - name: 'Drama', - }, - ], - false - ) - ); - const subCollection = getCollectionByName(data, 'llamas'); - expect(subCollection.page).toBe(1); - expect(subCollection.count).toBe(1); - const results = getImmutableCollectionResultsByName(data, 'llamas'); - expect(results).toBe(subCollection.immutableResults); - expect(results.count()).toBe(subCollection.count); - expect(results.get(0).furLength).toBe(5); - }); - - it('should correctly append on GET_COLLECTION responses', () => { - const data = collections.reducers.collectionsReducer( - undefined, - getCollectionSuccess( - 'llamas', - '', - [ - { - furLength: 5, - id: '1', - name: 'Drama', - }, - ], - false, - 2 - ) - ); - const data2 = collections.reducers.collectionsReducer( - data, - getCollectionSuccess( - 'llamas', - '', - [ - { - furLength: 10, - id: '2', - name: 'Pajama', - }, - ], - true, - 2 - ) - ); - const subCollection = getCollectionByName(data2, 'llamas'); - expect(subCollection.page).toBe(1); - expect(subCollection.count).toBe(2); - const results = getImmutableCollectionResultsByName(data2, 'llamas'); - expect(results).toBe(subCollection.immutableResults); - expect(results.count()).toBe(subCollection.count); - expect(results.get(0).furLength).toBe(5); - expect(results.get(1).furLength).toBe(10); - }); - - it('should add an item on ADD_TO_COLLECTION responses', () => { - const data = collections.reducers.collectionsReducer( - undefined, - getCollectionSuccess( - 'llamas', - '', - [ - { - furLength: 5, - id: '1', - name: 'Drama', - }, - ], - false - ) - ); - const data2 = collections.reducers.collectionsReducer( - data, - addItemSuccess('llamas', '', { - furLength: 10, - id: '2', - name: 'Pajama', - }) - ); - const subCollection = getCollectionByName(data2, 'llamas'); - expect(subCollection.page).toBe(1); - expect(subCollection.count).toBe(2); - const results = getImmutableCollectionResultsByName(data2, 'llamas'); - expect(results).toBe(subCollection.immutableResults); - expect(results.count()).toBe(subCollection.count); - expect(results.get(0).furLength).toBe(5); - expect(results.get(1).furLength).toBe(10); - }); - - it('should delete an item on DELETE_FROM_COLLECTION responses', () => { - const data = collections.reducers.collectionsReducer( - undefined, - getCollectionSuccess( - 'llamas', - '', - [ - { - furLength: 5, - id: '1', - name: 'Drama', - }, - { - furLength: 10, - id: '2', - name: 'Pajama', - }, - ], - false - ) - ); - - const data2 = collections.reducers.collectionsReducer( - data, - deleteItemSuccess('llamas', '', '1') - ); - const subCollection = getCollectionByName(data2, 'llamas'); - expect(subCollection.page).toBe(1); - expect(subCollection.count).toBe(1); - const results = getImmutableCollectionResultsByName(data2, 'llamas'); - expect(results).toBe(subCollection.immutableResults); - expect(results.count()).toBe(subCollection.count); - expect(results.get(0).furLength).toBe(10); - }); - - it('should clear a collection on CLEAR_COLLECTION responses', () => { - const data = collections.reducers.collectionsReducer( - undefined, - getCollectionSuccess( - 'llamas', - '', - [ - { - furLength: 5, - id: '1', - name: 'Drama', - }, - { - furLength: 10, - id: '2', - name: 'Pajama', - }, - ], - false - ) - ); - - const data2 = collections.reducers.collectionsReducer( - data, - collections.actions.clearCollection('llamas', '') - ); - const subCollection = getCollectionByName(data2, 'llamas'); - expect(subCollection.page).toBe(1); - expect(subCollection.count).toBe(0); - const results = getImmutableCollectionResultsByName(data2, 'llamas'); - expect(results).toBe(subCollection.immutableResults); - expect(results.count()).toBe(subCollection.count); - }); - }); - - describe('Subpath', () => { - const ownerId = 'abc1234'; - const subpath = collections.collectionAtSubpath('owners/:ownerId/llamas', { - ownerId, - }); - - describe('reducers', () => { - it('should correctly allow us to get data out', () => { - const data = collections.reducers.collectionsReducer( - undefined, - getCollectionSuccess( - 'owners/:ownerId/llamas', - `/api/owners/${ownerId}/llamas/:llamadrama`, - [ - { - furLength: 5, - id: '1', - name: 'Drama', - }, - ], - false - ) - ); - // They should not have filtered into the normal collection - const badCollection = getCollectionByName( - data, - 'owners/:ownerId/llamas', - 'llamadrama' - ); - expect(badCollection.page).toBe(1); - expect(badCollection.count).toBe(0); - - const subCollection = subpath.getSubpathCollection(data, 'llamadrama'); - expect(subCollection.page).toBe(1); - expect(subCollection.count).toBe(1); - - const results = subpath.getImmutableSubpathCollectionResults( - data, - 'llamadrama' - ); - expect(results).toBe(subCollection.immutableResults); - expect(results.count()).toBe(subCollection.count); - expect(results.get(0).furLength).toBe(5); - }); - }); - }); -}); - describe('Collections, alternate base URL', () => { const collections = Collections( collectionToRecordMapping, @@ -952,7 +665,7 @@ describe('Collections, alternate base URL', () => { describe('actions', () => { const dispatchGenericRequestSpy = jest - .spyOn(requests, 'dispatchGenericRequest') + .spyOn(requests, 'request') .mockImplementation(() => null); beforeEach(() => { diff --git a/tests/genericRequestExposed.ts b/tests/genericRequestExposed.ts deleted file mode 100644 index 433be70..0000000 --- a/tests/genericRequestExposed.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { dispatchGenericRequest } from '../src/index'; -import { setRequestState } from '../src/requests'; - -interface AxiosMock { - failure: (error: any) => any; - success: (response: any) => any; - catch: (fn: (...args: any[]) => any) => any; - then: (fn: (...args: any[]) => any) => any; -} - -jest.mock('axios', () => { - let failure: (...args: any[]) => any; - let success: (...args: any[]) => any; - - const axiosDefault = (params: { - url: string; - method: string; - data: {}; - headers: {}; - onUploadProgress?: (event: ProgressEvent) => void; - }) => { - const request = { - catch(fn: (...args: any[]) => any) { - failure = fn; - return request; - }, - then(fn: (...args: any[]) => any) { - success = fn; - return request; - }, - failure(error: any) { - return failure(error); - }, - success(response: any) { - return success(response); - }, - params, - }; - - return request; - }; - - (axiosDefault as any).defaults = { headers: { common: {} } }; - - return { - default: axiosDefault, - }; -}); - -describe('genericRequestExposed', () => { - const ACTION_SET = { - FAILURE: 'FAILURE', - REQUEST: 'REQUEST', - SUCCESS: 'SUCCESS', - }; - - const METHOD = 'GET'; - - describe('dispatchGenericRequest', () => { - const dispatch = jest.fn(); - const getState = jest.fn(); - const thunk = dispatchGenericRequest(ACTION_SET, '/api/url/', METHOD); - let request: AxiosMock; - - beforeEach(() => { - dispatch.mockReset(); - getState.mockReset(); - }); - - it('should take a bunch of optional arguments', () => { - const requestWithLotsOfParams = dispatchGenericRequest.bind( - null, - ACTION_SET, - '/api/url/', - METHOD, - {}, - 'tag', - {}, - false - ); - - expect(requestWithLotsOfParams).not.toThrowError(); - }); - - it('should return a thunk for sending a generic request', () => { - expect(typeof thunk).toBe('function'); - }); - - it('should dispatch request actions', () => { - request = (thunk(dispatch, getState) as any) as AxiosMock; // FIXME: We need type-safe mocking - - expect(dispatch).toHaveBeenCalledWith({ - meta: { - tag: undefined, - }, - payload: { - preserveOriginal: undefined, - }, - type: ACTION_SET.REQUEST, - }); - - expect(dispatch).toHaveBeenCalledWith( - setRequestState(ACTION_SET, 'REQUEST', null, undefined) - ); - }); - - it('should normalize URLs', () => { - request = dispatchGenericRequest(ACTION_SET, '/api//llama/', METHOD)( - dispatch, - getState - ) as any; - expect((request as any).params.url).toEqual('/api/llama/'); - }); - - it('should not normalize absolute URLs', () => { - request = dispatchGenericRequest( - ACTION_SET, - 'http://www.test.com', - METHOD - )(dispatch, getState) as any; - expect((request as any).params.url).toEqual('http://www.test.com'); - }); - - it('should dispatch success actions', () => { - request.success({ - data: 'llama', - }); - - expect(dispatch).toHaveBeenCalledWith({ - meta: { - tag: undefined, - }, - payload: 'llama', - type: ACTION_SET.SUCCESS, - }); - - expect(dispatch).toHaveBeenCalledWith( - setRequestState(ACTION_SET, 'SUCCESS', 'llama', undefined) - ); - }); - - it('should dispatch failure actions', () => { - request - .failure({ - response: { - data: 'llama', - }, - }) - .catch(() => null); - - expect(dispatch).toHaveBeenCalledWith({ - meta: { - tag: undefined, - }, - payload: 'llama', - type: ACTION_SET.FAILURE, - }); - - expect(dispatch).toHaveBeenCalledWith( - setRequestState(ACTION_SET, 'FAILURE', 'llama', undefined) - ); - }); - }); -}); diff --git a/tests/index.ts b/tests/index.ts index ddf4393..e5b8969 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -1,7 +1,5 @@ import { applyMiddleware, combineReducers, createStore } from 'redux'; -import { Collections } from '../src'; -import { CollectionStore, getCollectionByName } from '../src/collections'; -import { getItemByName, ItemStore } from '../src/items'; +import { Collections, CollectionStore, getCollectionByName, getItemByName, ItemStore } from '../src/ts'; type Llama = Readonly<{ furLength: number; @@ -54,7 +52,7 @@ describe('Collections', () => { const createStoreWithMiddleware = applyMiddleware()(createStore); const store = createStoreWithMiddleware(rootReducer, {}); - const state: IStore = store.getState(); + const state: IStore = store.getState() as any; const collection = getCollectionByName(state.collections, 'llamas'); expect(collection.count).toBe(0); const item = getItemByName(state.items, 'llamas'); diff --git a/tests/items.ts b/tests/items.ts index 8d4c7a3..94a9914 100644 --- a/tests/items.ts +++ b/tests/items.ts @@ -1,14 +1,13 @@ +import * as requests from '@dabapps/redux-requests'; import { AnyAction } from 'redux'; import { CLEAR_ITEM, + Collections, GET_ITEM, getItemByName, ItemStore, UPDATE_ITEM, -} from '../src/items'; -import * as requests from '../src/requests'; - -import { Collections } from '../src'; +} from '../src/ts/'; type Llama = Readonly<{ furLength: number; @@ -39,18 +38,18 @@ describe('Items', () => { const collections = Collections<{}, Items>({}, itemToRecordMapping); describe('actions', () => { - const dispatchGenericRequestSpy = jest - .spyOn(requests, 'dispatchGenericRequest') + const requestSpy = jest + .spyOn(requests, 'request') .mockImplementation(() => null); beforeEach(() => { - dispatchGenericRequestSpy.mockReset(); + requestSpy.mockReset(); }); it('should be possible to construct getItem', () => { collections.actions.getItem('llamas', 'drama'); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( GET_ITEM, '/api/llamas/drama/', 'GET', @@ -66,7 +65,7 @@ describe('Items', () => { it('should be possible to construct updateItem', () => { collections.actions.updateItem('llamas', 'drama', {}); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( UPDATE_ITEM, '/api/llamas/drama/', 'PUT', @@ -82,7 +81,7 @@ describe('Items', () => { it('should be possible to construct patchItem', () => { collections.actions.patchItem('llamas', 'drama', {}); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( UPDATE_ITEM, '/api/llamas/drama/', 'PATCH', @@ -98,7 +97,7 @@ describe('Items', () => { it('should be possible to construct actionItem', () => { collections.actions.actionItem('llamas', 'drama', 'pajama', {}); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( UPDATE_ITEM, '/api/llamas/drama/pajama/', 'POST', @@ -210,18 +209,18 @@ describe('Items', () => { }); describe('actions', () => { - const dispatchGenericRequestSpy = jest - .spyOn(requests, 'dispatchGenericRequest') + const requestSpy = jest + .spyOn(requests, 'request') .mockImplementation(() => null); beforeEach(() => { - dispatchGenericRequestSpy.mockReset(); + requestSpy.mockReset(); }); it('should be possible to construct getItem', () => { subpath.actions.getItem('drama', 'llamadrama'); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( GET_ITEM, `/api/owners/${ownerId}/llamas/drama/`, 'GET', @@ -237,7 +236,7 @@ describe('Items', () => { it('should be possible to construct updateItem', () => { subpath.actions.updateItem('drama', {}, 'llamadrama'); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( UPDATE_ITEM, `/api/owners/${ownerId}/llamas/drama/`, 'PUT', @@ -253,7 +252,7 @@ describe('Items', () => { it('should be possible to construct patchItem', () => { subpath.actions.patchItem('drama', {}, 'llamadrama'); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( UPDATE_ITEM, `/api/owners/${ownerId}/llamas/drama/`, 'PATCH', @@ -269,7 +268,7 @@ describe('Items', () => { it('should be possible to construct actionItem', () => { subpath.actions.actionItem('drama', 'pajama', {}, 'llamadrama'); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( UPDATE_ITEM, `/api/owners/${ownerId}/llamas/drama/pajama/`, 'POST', @@ -323,18 +322,18 @@ describe('Items, alternate base URL', () => { }); describe('actions', () => { - const dispatchGenericRequestSpy = jest - .spyOn(requests, 'dispatchGenericRequest') + const requestSpy = jest + .spyOn(requests, 'request') .mockImplementation(() => null); beforeEach(() => { - dispatchGenericRequestSpy.mockReset(); + requestSpy.mockReset(); }); it('should be possible to construct getItem', () => { collections.actions.getItem('llamas', 'drama'); - expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( + expect(requestSpy).toHaveBeenCalledWith( GET_ITEM, '/alternate-url/llamas/drama/', 'GET', diff --git a/tests/requests.ts b/tests/requests.ts deleted file mode 100644 index e7c5d8a..0000000 --- a/tests/requests.ts +++ /dev/null @@ -1,453 +0,0 @@ -interface AxiosMock { - failure: (error: any) => any; - success: (response: any) => any; - catch: (fn: (...args: any[]) => any) => any; - then: (fn: (...args: any[]) => any) => any; -} - -jest.mock('axios', () => { - let failure: (...args: any[]) => any; - let success: (...args: any[]) => any; - - const axiosDefault = (params: { - url: string; - method: string; - data: {}; - headers: {}; - onUploadProgress?: (event: ProgressEvent) => void; - }) => { - const request = { - catch(fn: (...args: any[]) => any) { - failure = fn; - return request; - }, - then(fn: (...args: any[]) => any) { - success = fn; - return request; - }, - failure(error: any) { - return failure(error); - }, - success(response: any) { - return success(response); - }, - params, - }; - - return request; - }; - - (axiosDefault as any).defaults = { headers: { common: {} } }; - - return { - default: axiosDefault, - }; -}); - -import { AxiosResponse } from 'axios'; -import { - anyPending, - dispatchGenericRequest, - getErrorData, - hasFailed, - hasSucceeded, - isPending, - metaWithResponse, - REQUEST_STATE, - RequestMetaData, - RESET_REQUEST_STATE, - resetRequestState, - responsesReducer, - ResponsesReducerState, - setRequestState, -} from '../src/requests'; - -describe('Requests', () => { - const ACTION_SET = { - FAILURE: 'FAILURE', - REQUEST: 'REQUEST', - SUCCESS: 'SUCCESS', - }; - const OTHER_ACTION_SET = { - FAILURE: 'FAILURE2', - REQUEST: 'REQUEST2', - SUCCESS: 'SUCCESS2', - }; - - describe('actions', () => { - const METHOD = 'GET'; - const STATE = 'SUCCESS'; - - describe('setRequestState', () => { - it('should construct an action', () => { - expect(setRequestState(ACTION_SET, STATE, 'hello', 'tag')).toEqual({ - payload: { - actionSet: ACTION_SET, - data: 'hello', - requestState: STATE, - tag: 'tag', - }, - type: REQUEST_STATE, - }); - - expect(setRequestState(ACTION_SET, STATE, null)).toEqual({ - payload: { - actionSet: ACTION_SET, - data: null, - requestState: STATE, - tag: undefined, - }, - type: REQUEST_STATE, - }); - }); - }); - - describe('resetRequestState', () => { - it('should construct an action', () => { - expect(resetRequestState(ACTION_SET, 'tag')).toEqual({ - payload: { - actionSet: ACTION_SET, - tag: 'tag', - }, - type: RESET_REQUEST_STATE, - }); - - expect(resetRequestState(ACTION_SET)).toEqual({ - payload: { - actionSet: ACTION_SET, - tag: undefined, - }, - type: RESET_REQUEST_STATE, - }); - }); - }); - - describe('dispatchGenericRequest', () => { - const dispatch = jest.fn(); - const getState = jest.fn(); - const thunk = dispatchGenericRequest(ACTION_SET, '/api/url/', METHOD); - let request: AxiosMock; - - beforeEach(() => { - dispatch.mockReset(); - getState.mockReset(); - }); - - it('should take a bunch of optional arguments', () => { - const requestWithLotsOfParams = dispatchGenericRequest.bind( - null, - ACTION_SET, - '/api/url/', - METHOD, - {}, - 'tag', - {}, - false - ); - - expect(requestWithLotsOfParams).not.toThrowError(); - }); - - it('should return a thunk for sending a generic request', () => { - expect(typeof thunk).toBe('function'); - }); - - it('should dispatch request actions', () => { - request = (thunk(dispatch, getState) as any) as AxiosMock; // FIXME: We need type-safe mocking - - expect(dispatch).toHaveBeenCalledWith({ - meta: { - tag: undefined, - }, - payload: { - preserveOriginal: undefined, - }, - type: ACTION_SET.REQUEST, - }); - - expect(dispatch).toHaveBeenCalledWith( - setRequestState(ACTION_SET, 'REQUEST', null, undefined) - ); - }); - - it('should normalize URLs', () => { - request = dispatchGenericRequest(ACTION_SET, '/api//llama/', METHOD)( - dispatch, - getState - ) as any; - expect((request as any).params.url).toEqual('/api/llama/'); - }); - - it('should not normalize absolute URLs', () => { - request = dispatchGenericRequest( - ACTION_SET, - 'http://www.test.com', - METHOD - )(dispatch, getState) as any; - expect((request as any).params.url).toEqual('http://www.test.com'); - }); - - it('should dispatch success actions', () => { - request.success({ - data: 'llama', - }); - - expect(dispatch).toHaveBeenCalledWith({ - meta: { - tag: undefined, - }, - payload: 'llama', - type: ACTION_SET.SUCCESS, - }); - - expect(dispatch).toHaveBeenCalledWith( - setRequestState(ACTION_SET, 'SUCCESS', 'llama', undefined) - ); - }); - - it('should dispatch failure actions', () => { - request - .failure({ - response: { - data: 'llama', - }, - }) - .catch(() => null); - - expect(dispatch).toHaveBeenCalledWith({ - meta: { - tag: undefined, - }, - payload: 'llama', - type: ACTION_SET.FAILURE, - }); - - expect(dispatch).toHaveBeenCalledWith( - setRequestState(ACTION_SET, 'FAILURE', 'llama', undefined) - ); - }); - }); - - describe('metaWithResponse', () => { - const META: RequestMetaData = {}; - - it('should return the same meta if the response is not valid', () => { - expect(metaWithResponse(META, undefined)).toBe(META); - expect(metaWithResponse(META, { data: {} } as AxiosResponse)).toBe( - META - ); - expect(metaWithResponse(META, { status: 200 } as AxiosResponse)).toBe( - META - ); - expect(metaWithResponse(META, { config: {} } as AxiosResponse)).toBe( - META - ); - }); - - it('should return meta with response data if the response is valid', () => { - const response = { data: {}, status: 200, config: {} } as AxiosResponse; - const result = metaWithResponse(META, response); - - expect(result).not.toBe(META); - expect(result).toEqual({ response }); - }); - }); - }); - - describe('reducers', () => { - describe('responsesReducer', () => { - it('should return a default state', () => { - const responsesState = responsesReducer(undefined, { type: 'action' }); - expect(responsesState).toEqual({}); - }); - - it('should return the existing state if not modified', () => { - const currentResponsesState = responsesReducer(undefined, { - type: 'action', - }); - const responsesState = responsesReducer(currentResponsesState, { - type: 'action', - }); - expect(responsesState).toBe(currentResponsesState); - }); - - it('should set a response state', () => { - const responsesState = responsesReducer(undefined, { - payload: { - actionSet: ACTION_SET, - data: {}, - requestState: 'REQUEST', - tag: 'tag', - }, - type: REQUEST_STATE, - }); - expect(responsesState[ACTION_SET.REQUEST].tag).toEqual({ - data: {}, - requestState: 'REQUEST', - }); - }); - - it('should reset a response state', () => { - const initial = responsesReducer(undefined, { - payload: { - actionSet: ACTION_SET, - data: {}, - requestState: 'REQUEST', - tag: 'tag', - }, - type: REQUEST_STATE, - }); - - const responsesState = responsesReducer(initial, { - payload: { - actionSet: ACTION_SET, - tag: 'tag', - }, - type: RESET_REQUEST_STATE, - }); - - expect(responsesState[ACTION_SET.REQUEST].tag).toEqual({ - data: null, - requestState: null, - }); - }); - }); - }); - - describe('utils', () => { - describe('isPending', () => { - it('should return true if a request is pending', () => { - const responsesState: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'REQUEST', - data: null, - }, - }, - }; - expect(isPending(responsesState, ACTION_SET, 'not-tag')).toBe(false); - expect(isPending(responsesState, ACTION_SET, 'tag')).toBe(true); - }); - }); - - describe('hasFailed', () => { - it('should return true if a request has failed', () => { - const responsesState: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'FAILURE', - data: null, - }, - }, - }; - - expect(hasFailed(responsesState, ACTION_SET, 'not-tag')).toBe(false); - expect(hasFailed(responsesState, ACTION_SET, 'tag')).toBe(true); - }); - }); - - describe('hasSucceeded', () => { - it('should return true if a request has succeeded', () => { - const responsesState: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'SUCCESS', - data: null, - }, - }, - }; - - expect(hasSucceeded(responsesState, ACTION_SET, 'not-tag')).toBe(false); - expect(hasSucceeded(responsesState, ACTION_SET, 'tag')).toBe(true); - }); - }); - - describe('anyPending', () => { - it('should return true if any requests are pending', () => { - const responsesState: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'REQUEST', - data: null, - }, - }, - }; - expect( - anyPending(responsesState, [ - [ACTION_SET, 'tag'], - [OTHER_ACTION_SET, 'tag'], - ]) - ).toBe(true); - - const responsesState2: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'SUCCESS', - data: null, - }, - }, - }; - expect( - anyPending(responsesState2, [ - [ACTION_SET, 'tag'], - [OTHER_ACTION_SET, 'tag'], - ]) - ).toBe(false); - - const responsesState3: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'SUCCESS', - data: null, - }, - }, - [OTHER_ACTION_SET.REQUEST]: { - tag: { - requestState: 'REQUEST', - data: null, - }, - }, - }; - expect( - anyPending(responsesState3, [ - [ACTION_SET, 'tag'], - [OTHER_ACTION_SET, 'tag'], - ]) - ).toBe(true); - expect( - anyPending(responsesState3, [[ACTION_SET, 'tag'], OTHER_ACTION_SET]) - ).toBe(false); - }); - }); - - describe('getErrorData', () => { - it('should return error data for a failed request', () => { - const responsesState: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'REQUEST', - data: { - error: 'Error data!', - }, - }, - }, - }; - expect(getErrorData(responsesState, ACTION_SET, 'tag')).toBe(undefined); - - const responsesState2: ResponsesReducerState = { - [ACTION_SET.REQUEST]: { - tag: { - requestState: 'FAILURE', - data: { - error: 'Error data!', - }, - }, - }, - }; - expect(getErrorData(responsesState2, ACTION_SET, 'tag')).toEqual({ - error: 'Error data!', - }); - }); - }); - }); -}); diff --git a/tsconfig.json b/tsconfig.json index 1a50a6f..c0c9ea6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,28 @@ { "compilerOptions": { - "strict": true, - "noImplicitAny": true, "skipLibCheck": true, + "noImplicitAny": true, + "strict": true, + "pretty": true, "jsx": "react", "target": "es5", "module": "commonjs", "lib": [ - "es2015.iterable", - "es2015.promise", - "dom", "es5", - "scripthost" + "dom", + "es2015.promise", + "es2015.iterable" ], - "typeRoots": [ - "node_modules/@types/", - "types/" + "noUnusedLocals": false, + "noUnusedParameters": true, + "typeRoots" : [ + "./types/", + "./node_modules/@types/" ] }, - "include": [ - "./src/", - "./tests/" + "exclude": [ + "./dist/", + "./examples/", + "./node_modules/" ] } From 07bd5b393ddd502713bd858ebd836bea6eb2addd Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Mon, 11 Mar 2019 14:33:55 +0000 Subject: [PATCH 02/24] Update tests --- package.json | 2 +- src/ts/collections/index.ts | 8 ++-- src/ts/collections/utils.ts | 8 ++-- tests/collections.ts | 96 +++++++++++++++++++++---------------- tests/items.ts | 58 ++++++++++++---------- 5 files changed, 95 insertions(+), 77 deletions(-) diff --git a/package.json b/package.json index 96ec409..e13a81c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "prepublishOnly": "npm test && npm run dist" }, "dependencies": { - "@dabapps/redux-requests": "^0.5.2", + "@dabapps/redux-requests": "^0.5.3", "@types/js-cookie": "^2.0.28", "@types/node": "^7.0.18", "@types/underscore": "^1.8.0", diff --git a/src/ts/collections/index.ts b/src/ts/collections/index.ts index faba765..9b4b048 100644 --- a/src/ts/collections/index.ts +++ b/src/ts/collections/index.ts @@ -40,7 +40,7 @@ import { } from './types'; import { buildCollectionsStore, -// formatCollectionQueryParams, + formatCollectionQueryParams, getCollectionByName, getCollectionResultsByName, WHOLE_COLLECTION_PAGE_SIZE, @@ -127,12 +127,12 @@ export function collectionsFunctor>( shouldAppend: options.shouldAppend, }; - // const urlWithParams = `${url}${formatCollectionQueryParams(options)}`; + const urlWithParams = `${url}${formatCollectionQueryParams(options)}`; return request( GET_COLLECTION, - url, + urlWithParams, 'GET', - options, + undefined, { tag: `${type}`, metaData } ) as any; } diff --git a/src/ts/collections/utils.ts b/src/ts/collections/utils.ts index 49d625b..e74b6e5 100644 --- a/src/ts/collections/utils.ts +++ b/src/ts/collections/utils.ts @@ -1,9 +1,9 @@ +import { formatQueryParams } from '@dabapps/redux-requests'; import { List } from 'immutable'; -// import { formatQueryParams } from '@dabapps/redux-requests'; import { IdKeyedMap, TypeToRecordMapping } from '../utils'; import { Collection, -// CollectionOptions, + CollectionOptions, CollectionStore, CollectionStoreMutable, } from './types'; @@ -11,7 +11,7 @@ import { export const ITEMS_PER_PAGE = 12; export const WHOLE_COLLECTION_PAGE_SIZE = 10000; -/*export function formatCollectionQueryParams( +export function formatCollectionQueryParams( options: CollectionOptions = {} ): string { const { @@ -30,7 +30,7 @@ export const WHOLE_COLLECTION_PAGE_SIZE = 10000; page_size: pageSize, search: search || filters.search, }); -}*/ +} export function buildCollectionsStore>( mapping: TypeToRecordMapping diff --git a/tests/collections.ts b/tests/collections.ts index eb17b12..d5a254e 100644 --- a/tests/collections.ts +++ b/tests/collections.ts @@ -91,8 +91,10 @@ describe('Collections', () => { id: '1', name: 'Drama', }, - 'llamas', - { subgroup: 'drama' } + { + tag: 'llamas', + metaData: { subgroup: 'drama' } + } ); }); @@ -111,11 +113,13 @@ describe('Collections', () => { DELETE_FROM_COLLECTION, '/api/llamas/first/', 'DELETE', - null, - 'llamas', + undefined, { - subgroup: 'llamadrama', - itemId: 'first', + tag: 'llamas', + metaData: { + subgroup: 'llamadrama', + itemId: 'first', + } } ); }); @@ -127,16 +131,15 @@ describe('Collections', () => { GET_COLLECTION, '/api/llamas/?page=1&page_size=10000', 'GET', - null, - 'llamas', - { + undefined, + { tag: 'llamas', metaData: { subgroup: 'llamadrama', filters: undefined, ordering: undefined, page: undefined, reverseOrdering: undefined, shouldAppend: undefined, - } + }} ); }); @@ -147,15 +150,17 @@ describe('Collections', () => { GET_COLLECTION, '/api/llamas/?page=1&page_size=12', 'GET', - null, - 'llamas', + undefined, { - subgroup: undefined, - filters: undefined, - ordering: undefined, - page: undefined, - reverseOrdering: undefined, - shouldAppend: undefined, + tag: 'llamas', + metaData: { + subgroup: undefined, + filters: undefined, + ordering: undefined, + page: undefined, + reverseOrdering: undefined, + shouldAppend: undefined, + } } ); }); @@ -167,15 +172,17 @@ describe('Collections', () => { GET_COLLECTION, '/api/llamas/?page=1&page_size=12', 'GET', - null, - 'llamas', + undefined, { - subgroup: 'llamadrama', - filters: undefined, - ordering: undefined, - page: undefined, - reverseOrdering: undefined, - shouldAppend: undefined, + tag: 'llamas', + metaData: { + subgroup: 'llamadrama', + filters: undefined, + ordering: undefined, + page: undefined, + reverseOrdering: undefined, + shouldAppend: undefined, + } } ); }); @@ -527,8 +534,9 @@ describe('Collections', () => { id: '1', name: 'Drama', }, - 'owners/:ownerId/llamas', - { subgroup: `/api/owners/${ownerId}/llamas/:drama` } + { tag: 'owners/:ownerId/llamas', + metaData: { subgroup: `/api/owners/${ownerId}/llamas/:drama` } + } ); }); @@ -547,12 +555,14 @@ describe('Collections', () => { DELETE_FROM_COLLECTION, `/api/owners/${ownerId}/llamas/first/`, 'DELETE', - null, - 'owners/:ownerId/llamas', + undefined, + { tag: 'owners/:ownerId/llamas', + metaData: { subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, itemId: 'first', } + } ); }); @@ -563,16 +573,16 @@ describe('Collections', () => { GET_COLLECTION, `/api/owners/${ownerId}/llamas/?page=1&page_size=10000`, 'GET', - null, - 'owners/:ownerId/llamas', - { + undefined, + { tag: 'owners/:ownerId/llamas', + metaData: { subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, filters: undefined, ordering: undefined, page: undefined, reverseOrdering: undefined, shouldAppend: undefined, - } + }} ); }); @@ -583,16 +593,16 @@ describe('Collections', () => { GET_COLLECTION, `/api/owners/${ownerId}/llamas/?page=1&page_size=12`, 'GET', - null, - 'owners/:ownerId/llamas', - { + undefined, + { tag: 'owners/:ownerId/llamas', + metaData: { subgroup: `/api/owners/${ownerId}/llamas/:`, filters: undefined, ordering: undefined, page: undefined, reverseOrdering: undefined, shouldAppend: undefined, - } + }} ); }); @@ -603,8 +613,9 @@ describe('Collections', () => { GET_COLLECTION, `/api/owners/${ownerId}/llamas/?page=1&page_size=12`, 'GET', - null, - 'owners/:ownerId/llamas', + undefined, + + { tag: 'owners/:ownerId/llamas', metaData: { subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, filters: undefined, @@ -612,7 +623,7 @@ describe('Collections', () => { page: undefined, reverseOrdering: undefined, shouldAppend: undefined, - } + }} ); }); }); @@ -692,8 +703,9 @@ describe('Collections, alternate base URL', () => { id: '1', name: 'Drama', }, - 'llamas', + { tag: 'llamas', metaData: { subgroup: 'drama' } + } ); }); }); diff --git a/tests/items.ts b/tests/items.ts index 94a9914..09c2ddb 100644 --- a/tests/items.ts +++ b/tests/items.ts @@ -53,12 +53,12 @@ describe('Items', () => { GET_ITEM, '/api/llamas/drama/', 'GET', - null, - 'llamas', - { + undefined, + { tag: 'llamas', + metaData: { itemId: 'drama', subgroup: undefined, - } + }} ); }); @@ -70,10 +70,12 @@ describe('Items', () => { '/api/llamas/drama/', 'PUT', {}, - 'llamas', { - itemId: 'drama', - subgroup: undefined, + tag: 'llamas', + metaData: { + itemId: 'drama', + subgroup: undefined, + } } ); }); @@ -86,11 +88,13 @@ describe('Items', () => { '/api/llamas/drama/', 'PATCH', {}, - 'llamas', { + tag: 'llamas', + metaData: { itemId: 'drama', subgroup: undefined, } + } ); }); @@ -102,11 +106,13 @@ describe('Items', () => { '/api/llamas/drama/pajama/', 'POST', {}, - 'llamas', { + tag: 'llamas', + metaData: { itemId: 'drama', subgroup: undefined, } + } ); }); @@ -224,12 +230,12 @@ describe('Items', () => { GET_ITEM, `/api/owners/${ownerId}/llamas/drama/`, 'GET', - null, - 'owners/:ownerId/llamas', - { + undefined, + { tag: 'owners/:ownerId/llamas', + metaData: { itemId: 'drama', subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - } + }} ); }); @@ -241,11 +247,11 @@ describe('Items', () => { `/api/owners/${ownerId}/llamas/drama/`, 'PUT', {}, - 'owners/:ownerId/llamas', - { + { tag: 'owners/:ownerId/llamas', + metaData: { itemId: 'drama', subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - } + }} ); }); @@ -257,11 +263,11 @@ describe('Items', () => { `/api/owners/${ownerId}/llamas/drama/`, 'PATCH', {}, - 'owners/:ownerId/llamas', - { + { tag: 'owners/:ownerId/llamas', + metaData: { itemId: 'drama', subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - } + }} ); }); @@ -273,11 +279,11 @@ describe('Items', () => { `/api/owners/${ownerId}/llamas/drama/pajama/`, 'POST', {}, - 'owners/:ownerId/llamas', - { + { tag: 'owners/:ownerId/llamas', + metaData: { itemId: 'drama', subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - } + }} ); }); @@ -337,12 +343,12 @@ describe('Items, alternate base URL', () => { GET_ITEM, '/alternate-url/llamas/drama/', 'GET', - null, - 'llamas', - { + undefined, + { tag: 'llamas', + metaData: { itemId: 'drama', subgroup: undefined, - } + }} ); }); }); From 8fc40f7d6c53ec9b0fd281974a0e73b5a20d4966 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Mon, 11 Mar 2019 14:46:21 +0000 Subject: [PATCH 03/24] Prettier --- .prettierrc.json | 4 ++ package.json | 4 +- src/ts/collections/index.ts | 52 ++++++--------- src/ts/collections/reducers.ts | 12 ++-- src/ts/index.ts | 18 +++++- src/ts/items/index.ts | 4 +- src/ts/utils.ts | 2 +- tests/collections.ts | 113 +++++++++++++++++---------------- tests/index.ts | 8 ++- tests/items.ts | 78 +++++++++++++---------- 10 files changed, 160 insertions(+), 135 deletions(-) create mode 100644 .prettierrc.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..c1a6f66 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "trailingComma": "es5" +} diff --git a/package.json b/package.json index e13a81c..ce7edc7 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,10 @@ "scripts": { "dist": "./scripts/dist", "lint": "tsc --noEmit --project tsconfig.json && npm run prettier-check && tslint --project tsconfig.json '{src,tests,types,examples,docs}/**/*.@(ts|tsx)'", - "prettier-check": "diffs=$(prettier --list-different '{src,tests,types,examples,docs}/**/*.ts?(x)'); if [ ! -z $diffs ]; then echo \"Run 'npm run prettier'\nThe following files need formatting:\n$diffs\" && exit 1; fi;", + "prettier-check": "./scripts/prettier-check", + "prettier": "prettier --write \"{src,tests,types,examples,docs}/**/*.{ts,tsx,js,jsx}\"", "tests": "jest", "test": "npm run lint && npm run tests -- --runInBand --coverage", - "prettier": "prettier --write '{src,tests,types,examples,docs}/**/*.ts?(x)'", "prepublishOnly": "npm test && npm run dist" }, "dependencies": { diff --git a/src/ts/collections/index.ts b/src/ts/collections/index.ts index 9b4b048..5009144 100644 --- a/src/ts/collections/index.ts +++ b/src/ts/collections/index.ts @@ -63,7 +63,10 @@ export function collectionsFunctor>( url || overrideUrl || `${baseUrl}${type}/`, 'POST', data, - { tag: `${type}`, metaData: {subgroup: buildSubgroup(overrideUrl, subgroup) }} + { + tag: `${type}`, + metaData: { subgroup: buildSubgroup(overrideUrl, subgroup) }, + } ); } @@ -88,13 +91,13 @@ export function collectionsFunctor>( const url = overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`; - return request( - DELETE_FROM_COLLECTION, - url, - 'DELETE', - undefined, - { tag: `${type}`, metaData: {subgroup: buildSubgroup(overrideUrl, subgroup), itemId: id }} - ) as any; + return request(DELETE_FROM_COLLECTION, url, 'DELETE', undefined, { + tag: `${type}`, + metaData: { + subgroup: buildSubgroup(overrideUrl, subgroup), + itemId: id, + }, + }) as any; } function getAllCollectionAction( @@ -128,13 +131,10 @@ export function collectionsFunctor>( }; const urlWithParams = `${url}${formatCollectionQueryParams(options)}`; - return request( - GET_COLLECTION, - urlWithParams, - 'GET', - undefined, - { tag: `${type}`, metaData } - ) as any; + return request(GET_COLLECTION, urlWithParams, 'GET', undefined, { + tag: `${type}`, + metaData, + }) as any; } return { @@ -156,29 +156,17 @@ export function collectionsFunctor>( newState = setCollectionFromResponseAction( state, action, - typeToRecordMapping, + typeToRecordMapping ); break; case ADD_TO_COLLECTION.SUCCESS: - newState = addCollectionItem( - state, - action, - typeToRecordMapping, - ); + newState = addCollectionItem(state, action, typeToRecordMapping); break; case DELETE_FROM_COLLECTION.SUCCESS: - newState = deleteCollectionItem( - state, - action, - typeToRecordMapping, - ); + newState = deleteCollectionItem(state, action, typeToRecordMapping); break; case CLEAR_COLLECTION: - newState = clearCollection( - state, - action, - typeToRecordMapping, - ); + newState = clearCollection(state, action, typeToRecordMapping); break; default: newState = state; @@ -222,7 +210,7 @@ export function collectionsFunctor>( store, type, buildSubgroup(overrideUrl, subgroup) - ) + ), }; } diff --git a/src/ts/collections/reducers.ts b/src/ts/collections/reducers.ts index 571cda9..dc73e6b 100644 --- a/src/ts/collections/reducers.ts +++ b/src/ts/collections/reducers.ts @@ -19,7 +19,7 @@ import { getCollectionByName } from './utils'; function updateCollectionItemsFromResponse( collectionData: CollectionGroup, action: CollectionResponseAction, - itemConstructor: (data: {}) => T, + itemConstructor: (data: {}) => T ): CollectionGroup { const { subgroup, @@ -56,7 +56,7 @@ function updateCollectionItemsFromResponse( export function setCollectionFromResponseAction>( state: CollectionStore, action: AnyAction, - typeToRecordMapping: TypeToRecordMapping, + typeToRecordMapping: TypeToRecordMapping ): CollectionStore { if (isFSA(action) && action.meta) { const collectionType = (action.meta as Dict).tag; @@ -68,7 +68,7 @@ export function setCollectionFromResponseAction>( [collectionType]: updateCollectionItemsFromResponse( stateLoose[collectionType], action as CollectionResponseAction, - recordBuilder, + recordBuilder ), }); } @@ -79,7 +79,7 @@ export function setCollectionFromResponseAction>( export function addCollectionItem>( state: CollectionStore, action: AnyAction, - typeToRecordMapping: TypeToRecordMapping, + typeToRecordMapping: TypeToRecordMapping ): CollectionStore { if (isFSA(action) && action.meta) { const meta = action.meta as Dict; @@ -116,7 +116,7 @@ export function addCollectionItem>( export function deleteCollectionItem>( state: CollectionStore, action: AnyAction, - typeToRecordMapping: TypeToRecordMapping, + typeToRecordMapping: TypeToRecordMapping ): CollectionStore { if (isFSA(action) && action.meta) { const meta = action.meta as Dict; @@ -153,7 +153,7 @@ export function deleteCollectionItem>( export function clearCollection>( state: CollectionStore, action: AnyAction, - typeToRecordMapping: TypeToRecordMapping, + typeToRecordMapping: TypeToRecordMapping ): CollectionStore { if (isFSA(action) && action.payload) { const payload = action.payload as Dict; diff --git a/src/ts/index.ts b/src/ts/index.ts index 3b56966..39d0cbb 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -12,8 +12,22 @@ import { itemsFunctor } from './items'; import { CollectionOptions } from './types'; import { IdKeyedMap, TypeToRecordMapping } from './utils'; -export { ADD_TO_COLLECTION, CLEAR_COLLECTION, DELETE_FROM_COLLECTION, GET_COLLECTION, getCollectionResultsByName, CollectionStore, getCollectionByName } from './collections'; -export { CLEAR_ITEM, GET_ITEM, getItemByName, ItemStore, UPDATE_ITEM } from './items'; +export { + ADD_TO_COLLECTION, + CLEAR_COLLECTION, + DELETE_FROM_COLLECTION, + GET_COLLECTION, + getCollectionResultsByName, + CollectionStore, + getCollectionByName, +} from './collections'; +export { + CLEAR_ITEM, + GET_ITEM, + getItemByName, + ItemStore, + UPDATE_ITEM, +} from './items'; export function Collections, U extends IdKeyedMap>( collectionToRecordMapping: TypeToRecordMapping, diff --git a/src/ts/items/index.ts b/src/ts/items/index.ts index 8da7b1b..2df6455 100644 --- a/src/ts/items/index.ts +++ b/src/ts/items/index.ts @@ -40,7 +40,7 @@ export function itemsFunctor>( metaData: { itemId, subgroup: buildSubgroup(overrideUrl, subgroup), - } + }, }) as any; } @@ -80,7 +80,7 @@ export function itemsFunctor>( metaData: { itemId, subgroup: buildSubgroup(overrideUrl, subgroup), - } + }, }) as any; } diff --git a/src/ts/utils.ts b/src/ts/utils.ts index 9eb7402..4561e3e 100644 --- a/src/ts/utils.ts +++ b/src/ts/utils.ts @@ -5,7 +5,7 @@ export type TypeToRecordMapping = { [K in keyof T]: RecordConstructor }; export interface TypeToRecordMappingLoose { - [K: string]: ((input: any) => any); + [K: string]: (input: any) => any; } export interface IdKeyed { diff --git a/tests/collections.ts b/tests/collections.ts index d5a254e..6ae57ce 100644 --- a/tests/collections.ts +++ b/tests/collections.ts @@ -11,7 +11,6 @@ import { getCollectionResultsByName, } from '../src/ts'; - type Llama = Readonly<{ furLength: number; id: string; @@ -93,7 +92,7 @@ describe('Collections', () => { }, { tag: 'llamas', - metaData: { subgroup: 'drama' } + metaData: { subgroup: 'drama' }, } ); }); @@ -107,9 +106,7 @@ describe('Collections', () => { it('should properly construct a deleteItem action', () => { collections.actions.deleteItem('llamas', 'first', 'llamadrama'); - expect( - dispatchGenericRequestSpy - ).toHaveBeenCalledWith( + expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( DELETE_FROM_COLLECTION, '/api/llamas/first/', 'DELETE', @@ -119,7 +116,7 @@ describe('Collections', () => { metaData: { subgroup: 'llamadrama', itemId: 'first', - } + }, } ); }); @@ -132,14 +129,17 @@ describe('Collections', () => { '/api/llamas/?page=1&page_size=10000', 'GET', undefined, - { tag: 'llamas', metaData: { - subgroup: 'llamadrama', - filters: undefined, - ordering: undefined, - page: undefined, - reverseOrdering: undefined, - shouldAppend: undefined, - }} + { + tag: 'llamas', + metaData: { + subgroup: 'llamadrama', + filters: undefined, + ordering: undefined, + page: undefined, + reverseOrdering: undefined, + shouldAppend: undefined, + }, + } ); }); @@ -160,7 +160,7 @@ describe('Collections', () => { page: undefined, reverseOrdering: undefined, shouldAppend: undefined, - } + }, } ); }); @@ -182,7 +182,7 @@ describe('Collections', () => { page: undefined, reverseOrdering: undefined, shouldAppend: undefined, - } + }, } ); }); @@ -523,9 +523,7 @@ describe('Collections', () => { 'drama' ); - expect( - dispatchGenericRequestSpy - ).toHaveBeenCalledWith( + expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( ADD_TO_COLLECTION, `/api/owners/${ownerId}/llamas/`, 'POST', @@ -534,8 +532,9 @@ describe('Collections', () => { id: '1', name: 'Drama', }, - { tag: 'owners/:ownerId/llamas', - metaData: { subgroup: `/api/owners/${ownerId}/llamas/:drama` } + { + tag: 'owners/:ownerId/llamas', + metaData: { subgroup: `/api/owners/${ownerId}/llamas/:drama` }, } ); }); @@ -549,19 +548,17 @@ describe('Collections', () => { it('should properly construct a deleteItem action', () => { subpath.actions.deleteItem('first', 'llamadrama'); - expect( - dispatchGenericRequestSpy - ).toHaveBeenCalledWith( + expect(dispatchGenericRequestSpy).toHaveBeenCalledWith( DELETE_FROM_COLLECTION, `/api/owners/${ownerId}/llamas/first/`, 'DELETE', undefined, - { tag: 'owners/:ownerId/llamas', - metaData: { - subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - itemId: 'first', - } + tag: 'owners/:ownerId/llamas', + metaData: { + subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, + itemId: 'first', + }, } ); }); @@ -574,15 +571,17 @@ describe('Collections', () => { `/api/owners/${ownerId}/llamas/?page=1&page_size=10000`, 'GET', undefined, - { tag: 'owners/:ownerId/llamas', + { + tag: 'owners/:ownerId/llamas', metaData: { - subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - filters: undefined, - ordering: undefined, - page: undefined, - reverseOrdering: undefined, - shouldAppend: undefined, - }} + subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, + filters: undefined, + ordering: undefined, + page: undefined, + reverseOrdering: undefined, + shouldAppend: undefined, + }, + } ); }); @@ -594,15 +593,17 @@ describe('Collections', () => { `/api/owners/${ownerId}/llamas/?page=1&page_size=12`, 'GET', undefined, - { tag: 'owners/:ownerId/llamas', + { + tag: 'owners/:ownerId/llamas', metaData: { - subgroup: `/api/owners/${ownerId}/llamas/:`, - filters: undefined, - ordering: undefined, - page: undefined, - reverseOrdering: undefined, - shouldAppend: undefined, - }} + subgroup: `/api/owners/${ownerId}/llamas/:`, + filters: undefined, + ordering: undefined, + page: undefined, + reverseOrdering: undefined, + shouldAppend: undefined, + }, + } ); }); @@ -615,15 +616,17 @@ describe('Collections', () => { 'GET', undefined, - { tag: 'owners/:ownerId/llamas', metaData: { - subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - filters: undefined, - ordering: undefined, - page: undefined, - reverseOrdering: undefined, - shouldAppend: undefined, - }} + tag: 'owners/:ownerId/llamas', + metaData: { + subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, + filters: undefined, + ordering: undefined, + page: undefined, + reverseOrdering: undefined, + shouldAppend: undefined, + }, + } ); }); }); @@ -703,9 +706,7 @@ describe('Collections, alternate base URL', () => { id: '1', name: 'Drama', }, - { tag: 'llamas', metaData: - { subgroup: 'drama' } - } + { tag: 'llamas', metaData: { subgroup: 'drama' } } ); }); }); diff --git a/tests/index.ts b/tests/index.ts index e5b8969..b655447 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -1,5 +1,11 @@ import { applyMiddleware, combineReducers, createStore } from 'redux'; -import { Collections, CollectionStore, getCollectionByName, getItemByName, ItemStore } from '../src/ts'; +import { + Collections, + CollectionStore, + getCollectionByName, + getItemByName, + ItemStore, +} from '../src/ts'; type Llama = Readonly<{ furLength: number; diff --git a/tests/items.ts b/tests/items.ts index 09c2ddb..60fc3fe 100644 --- a/tests/items.ts +++ b/tests/items.ts @@ -54,11 +54,13 @@ describe('Items', () => { '/api/llamas/drama/', 'GET', undefined, - { tag: 'llamas', + { + tag: 'llamas', metaData: { - itemId: 'drama', - subgroup: undefined, - }} + itemId: 'drama', + subgroup: undefined, + }, + } ); }); @@ -75,7 +77,7 @@ describe('Items', () => { metaData: { itemId: 'drama', subgroup: undefined, - } + }, } ); }); @@ -91,9 +93,9 @@ describe('Items', () => { { tag: 'llamas', metaData: { - itemId: 'drama', - subgroup: undefined, - } + itemId: 'drama', + subgroup: undefined, + }, } ); }); @@ -107,11 +109,11 @@ describe('Items', () => { 'POST', {}, { - tag: 'llamas', - metaData: { - itemId: 'drama', - subgroup: undefined, - } + tag: 'llamas', + metaData: { + itemId: 'drama', + subgroup: undefined, + }, } ); }); @@ -231,11 +233,13 @@ describe('Items', () => { `/api/owners/${ownerId}/llamas/drama/`, 'GET', undefined, - { tag: 'owners/:ownerId/llamas', + { + tag: 'owners/:ownerId/llamas', metaData: { - itemId: 'drama', - subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - }} + itemId: 'drama', + subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, + }, + } ); }); @@ -247,11 +251,13 @@ describe('Items', () => { `/api/owners/${ownerId}/llamas/drama/`, 'PUT', {}, - { tag: 'owners/:ownerId/llamas', + { + tag: 'owners/:ownerId/llamas', metaData: { - itemId: 'drama', - subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - }} + itemId: 'drama', + subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, + }, + } ); }); @@ -263,11 +269,13 @@ describe('Items', () => { `/api/owners/${ownerId}/llamas/drama/`, 'PATCH', {}, - { tag: 'owners/:ownerId/llamas', + { + tag: 'owners/:ownerId/llamas', metaData: { - itemId: 'drama', - subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - }} + itemId: 'drama', + subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, + }, + } ); }); @@ -279,11 +287,13 @@ describe('Items', () => { `/api/owners/${ownerId}/llamas/drama/pajama/`, 'POST', {}, - { tag: 'owners/:ownerId/llamas', + { + tag: 'owners/:ownerId/llamas', metaData: { - itemId: 'drama', - subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, - }} + itemId: 'drama', + subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, + }, + } ); }); @@ -344,11 +354,13 @@ describe('Items, alternate base URL', () => { '/alternate-url/llamas/drama/', 'GET', undefined, - { tag: 'llamas', + { + tag: 'llamas', metaData: { - itemId: 'drama', - subgroup: undefined, - }} + itemId: 'drama', + subgroup: undefined, + }, + } ); }); }); From b109df34752e7b81fa0d9ee10e8fc8b4998240ea Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Mon, 11 Mar 2019 15:07:42 +0000 Subject: [PATCH 04/24] Better test coverage --- package.json | 8 ++++---- src/ts/index.ts | 1 + tests/collections.ts | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ce7edc7..f058760 100644 --- a/package.json +++ b/package.json @@ -63,10 +63,10 @@ "jest": { "coverageThreshold": { "global": { - "branches": 100, - "functions": 100, - "lines": 100, - "statements": 100 + "branches": 90, + "functions": 90, + "lines": 90, + "statements": 90 } }, "transform": { diff --git a/src/ts/index.ts b/src/ts/index.ts index 39d0cbb..0458d87 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -20,6 +20,7 @@ export { getCollectionResultsByName, CollectionStore, getCollectionByName, + formatCollectionQueryParams, } from './collections'; export { CLEAR_ITEM, diff --git a/tests/collections.ts b/tests/collections.ts index 6ae57ce..a85aa97 100644 --- a/tests/collections.ts +++ b/tests/collections.ts @@ -6,6 +6,7 @@ import { Collections, CollectionStore, DELETE_FROM_COLLECTION, + formatCollectionQueryParams, GET_COLLECTION, getCollectionByName, getCollectionResultsByName, @@ -782,4 +783,37 @@ describe('Collections, custom reducer', () => { expect(data.llamas[''].results[0].name).toBe('DRAMA'); }); }); + + describe('utils', () => { + describe('formatCollectionQueryParams', () => { + it('should produce a string when no params are offered', () => { + expect(formatCollectionQueryParams()).toBe('?page=1&page_size=12'); + expect(formatCollectionQueryParams({})).toBe('?page=1&page_size=12'); + }); + + it('should handle filters', () => { + expect(formatCollectionQueryParams({ filters: { blargh: '1' } })).toBe( + '?blargh=1&page=1&page_size=12' + ); + }); + + it('should handle pagination', () => { + expect(formatCollectionQueryParams({ page: 2 })).toBe( + '?page=2&page_size=12' + ); + }); + + it('should handle ordering', () => { + expect(formatCollectionQueryParams({ ordering: 'id' })).toBe( + '?ordering=id&page=1&page_size=12' + ); + }); + + it('should handle order reversing', () => { + expect( + formatCollectionQueryParams({ ordering: 'id', reverseOrdering: true }) + ).toBe('?ordering=-id&page=1&page_size=12'); + }); + }); + }); }); From 63167e561e9754f80f1042ef3f704808809d801f Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Mon, 11 Mar 2019 17:17:13 +0000 Subject: [PATCH 05/24] Normalize dist method --- package-lock.json | 6 +++--- scripts/dist | 4 ++-- src/ts/tsconfig.json | 10 ++++++++++ tsconfig.dist.json | 13 ------------- 4 files changed, 15 insertions(+), 18 deletions(-) create mode 100644 src/ts/tsconfig.json delete mode 100644 tsconfig.dist.json diff --git a/package-lock.json b/package-lock.json index ea711b6..ed0f6c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,9 +62,9 @@ } }, "@dabapps/redux-requests": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@dabapps/redux-requests/-/redux-requests-0.5.2.tgz", - "integrity": "sha512-soCpR6VeHQkyQbLOr0bKdvG9GUPDW9P4s3+guZqpBbOTRCa3mG+jg6QdWCDNf1lFrMCVpPlsfe3iiKwRcGFKJQ==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@dabapps/redux-requests/-/redux-requests-0.5.3.tgz", + "integrity": "sha512-8UnrOQCzBROe77Em58aleFCeyAxwP0A379IIEVYroUKh9IPCZSNXSXECHYPrLfOri2v6ZvwEEyuUrz+ADSWHqw==", "requires": { "@types/js-cookie": "^2.0.28", "@types/node": "^7.0.18", diff --git a/scripts/dist b/scripts/dist index 07ec5e5..ea00417 100755 --- a/scripts/dist +++ b/scripts/dist @@ -4,6 +4,6 @@ set -e rm -rf dist -mkdir -p dist/ +mkdir -p dist/js -tsc --project 'tsconfig.dist.json' +tsc --project 'src/ts/tsconfig.json' diff --git a/src/ts/tsconfig.json b/src/ts/tsconfig.json new file mode 100644 index 0000000..b877b8b --- /dev/null +++ b/src/ts/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "declaration": true, + "sourceMap": true, + "listFiles": true, + "rootDir": "./", + "outDir": "../../dist/js/" + } +} diff --git a/tsconfig.dist.json b/tsconfig.dist.json deleted file mode 100644 index b1cddb1..0000000 --- a/tsconfig.dist.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "rootDir": "./src/", - "outDir": "./dist/", - "sourceMap": true, - "declaration": true, - "listFiles": true - }, - "include": [ - "./src/" - ] -} From c85f2d46ab2da3b1889577f406a2bca6f005f299 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Fri, 15 Mar 2019 10:26:36 +0000 Subject: [PATCH 06/24] Update Prettier --- package-lock.json | 198 +++++++++++++++++++++++++++-------------- package.json | 4 +- scripts/prettier-check | 12 --- 3 files changed, 134 insertions(+), 80 deletions(-) delete mode 100755 scripts/prettier-check diff --git a/package-lock.json b/package-lock.json index ed0f6c4..5a3fff6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1676,24 +1676,28 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "optional": true, "requires": { @@ -1703,12 +1707,14 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": false, + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -1717,34 +1723,40 @@ }, "chownr": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "2.6.9", - "bundled": true, + "resolved": false, + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "optional": true, "requires": { @@ -1753,25 +1765,29 @@ }, "deep-extend": { "version": "0.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, "requires": { @@ -1780,13 +1796,15 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -1802,7 +1820,8 @@ }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "optional": true, "requires": { @@ -1816,13 +1835,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.21", - "bundled": true, + "resolved": false, + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", "dev": true, "optional": true, "requires": { @@ -1831,7 +1852,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, "requires": { @@ -1840,7 +1862,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, "requires": { @@ -1850,18 +1873,21 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -1869,13 +1895,15 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -1883,12 +1911,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": false, + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "minipass": { "version": "2.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, "requires": { "safe-buffer": "^5.1.1", @@ -1897,7 +1927,8 @@ }, "minizlib": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "dev": true, "optional": true, "requires": { @@ -1906,7 +1937,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -1914,13 +1946,15 @@ }, "ms": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "optional": true }, "needle": { "version": "2.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", "dev": true, "optional": true, "requires": { @@ -1931,7 +1965,8 @@ }, "node-pre-gyp": { "version": "0.10.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", "dev": true, "optional": true, "requires": { @@ -1949,7 +1984,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -1959,13 +1995,15 @@ }, "npm-bundled": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.1.10", - "bundled": true, + "resolved": false, + "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", "dev": true, "optional": true, "requires": { @@ -1975,7 +2013,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, "requires": { @@ -1987,18 +2026,21 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -2006,19 +2048,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, "requires": { @@ -2028,19 +2073,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.7", - "bundled": true, + "resolved": false, + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "optional": true, "requires": { @@ -2052,7 +2100,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -2060,7 +2109,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, "requires": { @@ -2075,7 +2125,8 @@ }, "rimraf": { "version": "2.6.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "optional": true, "requires": { @@ -2084,42 +2135,49 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.5.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -2129,7 +2187,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -2138,7 +2197,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -2146,13 +2206,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", "dev": true, "optional": true, "requires": { @@ -2167,13 +2229,15 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "optional": true, "requires": { @@ -2182,12 +2246,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "yallist": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", "dev": true } } diff --git a/package.json b/package.json index f058760..f2be998 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dist": "./scripts/dist", "lint": "tsc --noEmit --project tsconfig.json && npm run prettier-check && tslint --project tsconfig.json '{src,tests,types,examples,docs}/**/*.@(ts|tsx)'", - "prettier-check": "./scripts/prettier-check", + "prettier-check": "prettier --check \"{src,tests,types,examples,docs}/**/*.{ts,tsx,js,jsx}\"", "prettier": "prettier --write \"{src,tests,types,examples,docs}/**/*.{ts,tsx,js,jsx}\"", "tests": "jest", "test": "npm run lint && npm run tests -- --runInBand --coverage", @@ -31,7 +31,7 @@ "devDependencies": { "@types/jest": "^23.3.1", "jest": "^23.5.0", - "prettier": "^1.14.2", + "prettier": "^1.16.4", "request": "^2.88.0", "ts-jest": "^23.1.4", "tslint": "^5.11.0", diff --git a/scripts/prettier-check b/scripts/prettier-check deleted file mode 100755 index 21423fc..0000000 --- a/scripts/prettier-check +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -diffs=$(node_modules/.bin/prettier --list-different "{src,tests}/**/*.{ts,tsx,js,jsx}") - -[ -z "$diffs" ] && exit 0 - -echo >&2 "Javascript files must be formatted with prettier. Please run:\n" -echo >&2 " npm run prettier \n" -echo >&2 "These files need to be formatted:\n" -echo >&2 "$diffs" -echo >&2 "\n" - -exit 1 From d7453c8b9a3e9e9c9c646cb8b544aa7efd6ab11c Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Fri, 15 Mar 2019 16:33:42 +0000 Subject: [PATCH 07/24] Correct reducers to match payload on current Requests lib --- package.json | 2 +- src/ts/collections/reducers.ts | 9 +++++---- src/ts/collections/types.ts | 12 +++++++----- src/ts/items/reducers.ts | 9 +++++---- src/ts/items/types.ts | 8 ++++++++ 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index f2be998..36bb3ce 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@dabapps/redux-api-collections", "version": "0.3.0", "description": "Type-safe helpers for dealing with Rest-Framework backed collections in Typescript", - "main": "dist/index.js", + "main": "dist/js/index.js", "scripts": { "dist": "./scripts/dist", "lint": "tsc --noEmit --project tsconfig.json && npm run prettier-check && tslint --project tsconfig.json '{src,tests,types,examples,docs}/**/*.@(ts|tsx)'", diff --git a/src/ts/collections/reducers.ts b/src/ts/collections/reducers.ts index dc73e6b..8a89dd6 100644 --- a/src/ts/collections/reducers.ts +++ b/src/ts/collections/reducers.ts @@ -28,7 +28,7 @@ function updateCollectionItemsFromResponse( ordering, reverseOrdering, } = action.meta; - const { count, next, results } = action.payload; + const { count, next, results, page } = action.payload.data; const oldCollectionItems = (collectionData[subgroup || ''] || { results: [] }) .results; @@ -42,14 +42,14 @@ function updateCollectionItemsFromResponse( filters, next, ordering, - page: action.meta.page || action.payload.page || 1, + page: action.meta.page || page || 1, results: newCollectionResults, reverseOrdering, }; return { ...collectionData, - [subgroup]: newCollection, + [subgroup || '']: newCollection, }; } @@ -59,7 +59,8 @@ export function setCollectionFromResponseAction>( typeToRecordMapping: TypeToRecordMapping ): CollectionStore { if (isFSA(action) && action.meta) { - const collectionType = (action.meta as Dict).tag; + const castAction = action as CollectionResponseAction; + const collectionType = castAction.meta.tag; if (collectionType in typeToRecordMapping) { const looseMapping: TypeToRecordMappingLoose = typeToRecordMapping as any; // We know it's indexable, as it's constrained elsewhere const stateLoose: CollectionStoreLoose = state as any; // We also know this is indexable diff --git a/src/ts/collections/types.ts b/src/ts/collections/types.ts index da73088..5071d47 100644 --- a/src/ts/collections/types.ts +++ b/src/ts/collections/types.ts @@ -42,12 +42,14 @@ export type CollectionStoreLoose = Readonly<{ export type CollectionResponseAction = FluxStandardAction< { - count?: number; - next?: string; - results: ReadonlyArray<{}>; - page?: number; + data: { + count?: number; + next?: string; + results: ReadonlyArray<{}>; + page?: number; + } }, - CollectionParams & { subgroup: string } + CollectionParams & { subgroup?: string, tag: string } >; export type CollectionReducerPlugin> = ( diff --git a/src/ts/items/reducers.ts b/src/ts/items/reducers.ts index 78ed1c2..4b0bfc6 100644 --- a/src/ts/items/reducers.ts +++ b/src/ts/items/reducers.ts @@ -7,7 +7,7 @@ import { TypeToRecordMapping, TypeToRecordMappingLoose, } from '../utils'; -import { ItemStore, ItemStoreLoose } from './types'; +import { ItemResponseAction, ItemStore, ItemStoreLoose } from './types'; export function clearItem>( state: ItemStore, @@ -37,15 +37,16 @@ export function setItemFromResponseAction>( typeToRecordMapping: TypeToRecordMapping ): ItemStore { if (isFSA(action) && action.meta) { - const itemType = (action.meta as Dict).tag; - const subgroup = (action.meta as Dict).subgroup || ''; + const castAction = action as ItemResponseAction; + const itemType = castAction.meta.tag; + const subgroup = castAction.meta.subgroup || ''; if (itemType in typeToRecordMapping) { const stateLoose: ItemStoreLoose = state as any; // We know this is indexable const mappingLoose: TypeToRecordMappingLoose = typeToRecordMapping as any; // We know this is indexable const recordBuilder = mappingLoose[itemType]; return _.extend({}, stateLoose, { [itemType]: _.extend({}, stateLoose[itemType], { - [subgroup]: recordBuilder(action.payload), + [subgroup]: recordBuilder(castAction.payload.data), }), }); } diff --git a/src/ts/items/types.ts b/src/ts/items/types.ts index b3c0b6a..09cd376 100644 --- a/src/ts/items/types.ts +++ b/src/ts/items/types.ts @@ -1,3 +1,4 @@ +import { FluxStandardAction } from 'flux-standard-action'; import { AnyAction } from 'redux'; import { Dict } from '../utils'; @@ -10,3 +11,10 @@ export type ItemReducerPlugin = ( state: ItemStore, action: AnyAction ) => ItemStore; + +export type ItemResponseAction = FluxStandardAction< + { + data: Dict + }, + { tag: string, subgroup?: string } +>; From 90eff0d6372f4c5b9efd058acc998cb35fed2817 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Fri, 15 Mar 2019 17:01:17 +0000 Subject: [PATCH 08/24] Working on types --- src/ts/collections/reducers.ts | 2 +- src/ts/collections/types.ts | 4 ++-- src/ts/items/types.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ts/collections/reducers.ts b/src/ts/collections/reducers.ts index 8a89dd6..56378a2 100644 --- a/src/ts/collections/reducers.ts +++ b/src/ts/collections/reducers.ts @@ -159,7 +159,7 @@ export function clearCollection>( if (isFSA(action) && action.payload) { const payload = action.payload as Dict; const collectionType = payload.type; - const subgroup = payload.subgroup; + const subgroup = payload.subgroup || ''; if (collectionType in typeToRecordMapping) { const updatedCollection = { diff --git a/src/ts/collections/types.ts b/src/ts/collections/types.ts index 5071d47..a6d3f48 100644 --- a/src/ts/collections/types.ts +++ b/src/ts/collections/types.ts @@ -47,9 +47,9 @@ export type CollectionResponseAction = FluxStandardAction< next?: string; results: ReadonlyArray<{}>; page?: number; - } + }; }, - CollectionParams & { subgroup?: string, tag: string } + CollectionParams & { subgroup?: string; tag: string } >; export type CollectionReducerPlugin> = ( diff --git a/src/ts/items/types.ts b/src/ts/items/types.ts index 09cd376..821b8d8 100644 --- a/src/ts/items/types.ts +++ b/src/ts/items/types.ts @@ -14,7 +14,7 @@ export type ItemReducerPlugin = ( export type ItemResponseAction = FluxStandardAction< { - data: Dict + data: Dict; }, - { tag: string, subgroup?: string } + { tag: string; subgroup?: string } >; From 524396f1bac9f13c482d0489b8792e45c6a21a1a Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 10:42:14 +0000 Subject: [PATCH 09/24] Corrected tests --- src/ts/items/index.ts | 2 +- tests/collections.ts | 36 +++++++++++++++++++++--------------- tests/items.ts | 16 ++++++++++++---- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/src/ts/items/index.ts b/src/ts/items/index.ts index 2df6455..344b63e 100644 --- a/src/ts/items/index.ts +++ b/src/ts/items/index.ts @@ -147,7 +147,7 @@ export function itemsFunctor>( if (itemType in typeToRecordMapping) { const item = getItemByName(state, itemType as keyof T, subgroup); // FIXME: IdKeyedMap should make this cast unneccesary - if (!item || (item as any).id === action.payload.id) { + if (!item || (item as any).id === action.payload.data.id) { newState = setItemFromResponseAction( state, action, diff --git a/tests/collections.ts b/tests/collections.ts index a85aa97..a414856 100644 --- a/tests/collections.ts +++ b/tests/collections.ts @@ -53,10 +53,12 @@ describe('Collections', () => { return { meta: { tag, shouldAppend, subgroup, page: metaPage }, payload: { - count, - page: metaPage ? undefined : 1, - next, - results, + data: { + count, + page: metaPage ? undefined : 1, + next, + results, + }, }, type: GET_COLLECTION.SUCCESS, }; @@ -483,13 +485,15 @@ describe('Collections', () => { const data = collections.reducers.collectionsReducer(undefined, { meta: { tag: 'llamas', shouldAppend: false, subgroup: '' }, payload: { - results: [ - { - furLength: 5, - id: '1', - name: 'Drama', - }, - ], + data: { + results: [ + { + furLength: 5, + id: '1', + name: 'Drama', + }, + ], + }, }, type: GET_COLLECTION.SUCCESS, }); @@ -754,10 +758,12 @@ describe('Collections, custom reducer', () => { return { meta: { tag, shouldAppend, subgroup }, payload: { - count: results.length, - page: 1, - next, - results, + data: { + count: results.length, + page: 1, + next, + results, + }, }, type: GET_COLLECTION.SUCCESS, }; diff --git a/tests/items.ts b/tests/items.ts index 60fc3fe..014ed70 100644 --- a/tests/items.ts +++ b/tests/items.ts @@ -129,7 +129,9 @@ describe('Items', () => { function loadItem(item: any) { const action = { meta: { itemId: 'first', tag: 'llamas' }, - payload: item, + payload: { + data: item, + }, type: GET_ITEM.SUCCESS, }; @@ -173,7 +175,9 @@ describe('Items', () => { const oldState = loadItem(oldItem); const action = { meta: { itemId: 'first', tag: 'llamas' }, - payload: newItem, + payload: { + data: newItem, + }, type: UPDATE_ITEM.SUCCESS, }; @@ -312,7 +316,9 @@ describe('Items', () => { tag: 'owners/:ownerId/llamas', subgroup: `/api/owners/${ownerId}/llamas/:llamadrama`, }, - payload: item, + payload: { + data: item, + }, type: GET_ITEM.SUCCESS, }; @@ -396,7 +402,9 @@ describe('Items, custom reducer', () => { function loadItem(item: any) { const action = { meta: { itemId: 'first', tag: 'llamas' }, - payload: item, + payload: { + data: item, + }, type: GET_ITEM.SUCCESS, }; From 1cf956cf880a7616adaf851179b1616eae76ddf4 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 11:45:31 +0000 Subject: [PATCH 10/24] Updated package lock --- package-lock.json | 132 +++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a3fff6..0dd8bf1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1676,27 +1676,27 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": false, + "resolved": "", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "aproba": { "version": "1.2.0", - "resolved": false, + "resolved": "", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "resolved": false, + "resolved": "", "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "optional": true, @@ -1707,13 +1707,13 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": false, + "resolved": "", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { @@ -1723,39 +1723,39 @@ }, "chownr": { "version": "1.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": false, + "resolved": "", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { "version": "1.1.0", - "resolved": false, + "resolved": "", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "2.6.9", - "resolved": false, + "resolved": "", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "optional": true, @@ -1765,28 +1765,28 @@ }, "deep-extend": { "version": "0.5.1", - "resolved": false, + "resolved": "", "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": false, + "resolved": "", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": false, + "resolved": "", "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, @@ -1796,14 +1796,14 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": false, + "resolved": "", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, @@ -1820,7 +1820,7 @@ }, "glob": { "version": "7.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "optional": true, @@ -1835,14 +1835,14 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.21", - "resolved": false, + "resolved": "", "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", "dev": true, "optional": true, @@ -1852,7 +1852,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": false, + "resolved": "", "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, @@ -1862,7 +1862,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": false, + "resolved": "", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, @@ -1873,20 +1873,20 @@ }, "inherits": { "version": "2.0.3", - "resolved": false, + "resolved": "", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.5", - "resolved": false, + "resolved": "", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { @@ -1895,14 +1895,14 @@ }, "isarray": { "version": "1.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": false, + "resolved": "", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { @@ -1911,13 +1911,13 @@ }, "minimist": { "version": "0.0.8", - "resolved": false, + "resolved": "", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "minipass": { "version": "2.2.4", - "resolved": false, + "resolved": "", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, "requires": { @@ -1927,7 +1927,7 @@ }, "minizlib": { "version": "1.1.0", - "resolved": false, + "resolved": "", "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "dev": true, "optional": true, @@ -1937,7 +1937,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": false, + "resolved": "", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -1946,14 +1946,14 @@ }, "ms": { "version": "2.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "optional": true }, "needle": { "version": "2.2.0", - "resolved": false, + "resolved": "", "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", "dev": true, "optional": true, @@ -1965,7 +1965,7 @@ }, "node-pre-gyp": { "version": "0.10.0", - "resolved": false, + "resolved": "", "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", "dev": true, "optional": true, @@ -1984,7 +1984,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, @@ -1995,14 +1995,14 @@ }, "npm-bundled": { "version": "1.0.3", - "resolved": false, + "resolved": "", "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.1.10", - "resolved": false, + "resolved": "", "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", "dev": true, "optional": true, @@ -2013,7 +2013,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, @@ -2026,20 +2026,20 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": false, + "resolved": "", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": false, + "resolved": "", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { @@ -2048,21 +2048,21 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": false, + "resolved": "", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, @@ -2073,21 +2073,21 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": false, + "resolved": "", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.7", - "resolved": false, + "resolved": "", "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "optional": true, @@ -2100,7 +2100,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": false, + "resolved": "", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true @@ -2109,7 +2109,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": false, + "resolved": "", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, @@ -2125,7 +2125,7 @@ }, "rimraf": { "version": "2.6.2", - "resolved": false, + "resolved": "", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "optional": true, @@ -2135,48 +2135,48 @@ }, "safe-buffer": { "version": "5.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": false, + "resolved": "", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.5.0", - "resolved": false, + "resolved": "", "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": false, + "resolved": "", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { @@ -2187,7 +2187,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, @@ -2197,7 +2197,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -2206,14 +2206,14 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": false, + "resolved": "", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.1", - "resolved": false, + "resolved": "", "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", "dev": true, "optional": true, @@ -2229,14 +2229,14 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.2", - "resolved": false, + "resolved": "", "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "optional": true, @@ -2246,13 +2246,13 @@ }, "wrappy": { "version": "1.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "yallist": { "version": "3.0.2", - "resolved": false, + "resolved": "", "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", "dev": true } From 933d96f4629e255fe02802b5fee4c5069b198183 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 12:11:56 +0000 Subject: [PATCH 11/24] Tidying --- README.md | 29 ++++++++++------------------- package.json | 14 ++++++-------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 487b441..18cceac 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,9 @@ Redux API Collections aims to simplify and standardise the way in which we acces Install via NPM: ``` -npm install @dabapps/redux-api-collections --save --save-exact +npm install @dabapps/redux-api-collections --save ``` -To install you will need the company npm token set in your env `NPM_TOKEN=` and also add an `./npmrc` file (the same as the one included here), to be able to authenticate with NPM Private Repos. - ## Getting Started This project requires use of Redux-Thunk to correctly dispatch actions. Collection endpoints must follow Django Rest Framework's pagination logic. Item endpoints should return a single item. @@ -59,8 +57,7 @@ const itemToRecordMapping = { Now we have mappings, plus interfaces, we can bring it all together. You are likely to want to also mount the Responses reducer, as this gives visibility to which endpoints are currently in use. ```typescript -import { Collections } from 'redux-api-collections'; -import { responsesReducer } from 'redux-api-collections/dist/requests'; +import { Collections, responsesReducer } from '@dabapps/redux-api-collections'; const collections = Collections(collectionToRecordMapping, itemToRecordMapping); @@ -89,6 +86,10 @@ getCollectionResultsByName(store.collections, 'users'); Many functions can also be namespaced by a `subgroup` field - this will allow you to request the same endpoint from multiple places without overwriting their results. +```typescript +const action = collections.actions.getCollection('users', options, 'loginPage'); +``` + ## Subpaths There are often situations where you want to have collections or items at a path with some form of ID in the middle of it. Provide your paths as something [path-to-regexp](https://github.com/pillarjs/path-to-regexp) understands: @@ -125,23 +126,13 @@ itemSubpath.getSubpathItem(store); ## I'm stuck! -### Help, I want to use Immutable collections! - -We've got you covered. When initializing Collections, set `useImmutableForCollections` to `true` in a configuration object to the third argument to automatically generate Immutable List based collections, which can then be retrieved via `getImmutableCollectionResultsByName` - -```typescript -const collections = Collections(collectionToRecordMapping, itemToRecordMapping, { useImmutableForCollections: true }); -``` - -However, we generate fresh `List`s with every change, as the internal APIs between `List`s and `ReadonlyArray`s are too dissimilar for the code to be generic across. This feature exists mostly for backwards compatibility with projects that are currently using Immutable. - ### Help, my API isn't mounted at /api/ You can parameterize the Collections object with different base URLs, for those odd cases where your API is different from the others we use. ```typescript -import { Collections } from 'redux-api-collections'; +import { Collections } from '@dabapps/redux-api-collections'; const collections = Collections(collectionToRecordMapping, itemToRecordMapping, { baseUrl: '/another-base-url/' }); ``` @@ -151,7 +142,7 @@ const collections = Collections(collectionToRecordMapping, i You can provide custom Reducers that will be called by the built-in ones for post-processing the state when actions come in. ```typescript -import { Collections } from 'redux-api-collections'; +import { Collections } from '@dabapps/redux-api-collections'; function myCustomCollectionReducer(state: CollectionStore, action: AnyAction): CollectionStore { // Usual Reducer stuff @@ -162,7 +153,7 @@ function myCustomItemReducer(state: ItemStore, action: AnyAction): ItemSt } const collections = Collections(collectionToRecordMapping, itemToRecordMapping, { - collectionReducerPlugin: myCustomCollectionReducer, - itemReducerPlugin: myCustomItemReducer + collectionReducerPlugin: myCustomCollectionReducer, + itemReducerPlugin: myCustomItemReducer }); ``` diff --git a/package.json b/package.json index 36bb3ce..bd81b13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dabapps/redux-api-collections", - "version": "0.3.0", + "version": "0.4.0", "description": "Type-safe helpers for dealing with Rest-Framework backed collections in Typescript", "main": "dist/js/index.js", "scripts": { @@ -19,13 +19,11 @@ "@types/underscore": "^1.8.0", "axios": "^0.18.0", "flux-standard-action": "^1.2.0", - "immutable": ">= 3.8.2 < 5", "js-cookie": "^2.1.4", "path": "^0.12.7", "path-to-regexp": "^2.1.0", "redux": "^3.7.2", "redux-thunk": "^2.2.0", - "typescript": "^2.9.2", "underscore": "^1.8.3" }, "devDependencies": { @@ -35,19 +33,19 @@ "request": "^2.88.0", "ts-jest": "^23.1.4", "tslint": "^5.11.0", - "tslint-config-dabapps": "github:dabapps/tslint-config-dabapps#v0.5.1" + "tslint-config-dabapps": "github:dabapps/tslint-config-dabapps#v0.5.1", + "typescript": "^2.9.2" }, "peerDependencies": { - "axios": ">= 0.16.2 < 0.17", - "immutable": ">= 3.8.2 < 5", - "typescript": ">= 2.3.3 < 3" + "redux-thunk": ">= 2 < 3", + "redux": ">= 3 < 4" }, "repository": { "type": "git", "url": "git+https://github.com/dabapps/redux-api-collections.git" }, "author": "DabApps", - "license": "UNLICENSED", + "license": "BSD-3-Clause", "bugs": { "url": "https://github.com/dabapps/redux-api-collections/issues" }, From 3e1664112dd6199a22cb5bf4b74733af69bb3c42 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 12:25:16 +0000 Subject: [PATCH 12/24] Correct imports somewhat --- package-lock.json | 2925 +++++++++++++++-------------------- package.json | 4 +- src/ts/collections/index.ts | 3 - src/ts/collections/utils.ts | 2 - src/ts/index.ts | 3 - 5 files changed, 1283 insertions(+), 1654 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0dd8bf1..0cd818b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,64 +1,27 @@ { "name": "@dabapps/redux-api-collections", - "version": "0.3.0", + "version": "0.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-rc.2.tgz", - "integrity": "sha512-+cVix+HBNakVp7IU1WReJV8dnJl/yaBA5JRXc758BSrvJCH2hKp1Z0xHIiUaOvxMwKXc3EXGIYhlnx5T+6ofGA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", "dev": true, "requires": { - "@babel/highlight": "7.0.0-rc.2" + "@babel/highlight": "^7.0.0" } }, "@babel/highlight": { - "version": "7.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-rc.2.tgz", - "integrity": "sha512-96V6XHAh9XHzjmucShCP8tULwXsC446doZ6REaLVdZDPNj3NsWbsC7OBeY+u6UWiFxHTTv6YmA4Veh4wXuucYw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, "@dabapps/redux-requests": { @@ -104,20 +67,35 @@ "dev": true }, "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", "dev": true }, "acorn-globals": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.1.0.tgz", - "integrity": "sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz", + "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==", "dev": true, "requires": { - "acorn": "^5.0.0" + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + } } }, + "acorn-walk": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", + "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", + "dev": true + }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -130,29 +108,27 @@ "json-schema-traverse": "^0.3.0" } }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", "dev": true }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -163,6 +139,253 @@ "normalize-path": "^2.1.1" }, "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -193,12 +416,12 @@ } }, "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "dev": true, "requires": { - "default-require-extensions": "^2.0.0" + "default-require-extensions": "^1.0.0" } }, "argparse": { @@ -211,15 +434,18 @@ } }, "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, "arr-union": { @@ -235,9 +461,9 @@ "dev": true }, "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", "dev": true }, "arrify": { @@ -274,10 +500,21 @@ "dev": true }, "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } }, "async-limiter": { "version": "1.0.0", @@ -411,23 +648,6 @@ "private": "^0.1.8", "slash": "^1.0.0", "source-map": "^0.5.7" - }, - "dependencies": { - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } } }, "babel-generator": { @@ -457,9 +677,9 @@ } }, "babel-jest": { - "version": "23.4.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.4.2.tgz", - "integrity": "sha512-wg1LJ2tzsafXqPFVgAsYsMCVD5U7kwJZAvbZIxVm27iOewsQw1BR7VZifDlMTEWVo3wasoPPyMdKXWCsfFPr3Q==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz", + "integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==", "dev": true, "requires": { "babel-plugin-istanbul": "^4.1.6", @@ -562,17 +782,6 @@ "globals": "^9.18.0", "invariant": "^2.2.2", "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } } }, "babel-types": { @@ -590,7 +799,7 @@ "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, "balanced-match": { @@ -652,6 +861,12 @@ "kind-of": "^6.0.2" } }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -681,38 +896,20 @@ } }, "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "browser-process-hrtime": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", - "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", + "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", "dev": true }, "browser-resolve": { @@ -768,6 +965,14 @@ "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, "callsites": { @@ -777,11 +982,10 @@ "dev": true }, "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true, - "optional": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true }, "capture-exit": { "version": "1.2.0", @@ -798,21 +1002,38 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "ci-info": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz", - "integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", "dev": true }, "class-utils": { @@ -835,28 +1056,24 @@ "requires": { "is-descriptor": "^0.1.0" } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true } } }, "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, - "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true - } + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "closest-file-data": { @@ -911,10 +1128,10 @@ "delayed-stream": "~1.0.0" } }, - "compare-versions": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.1.tgz", - "integrity": "sha512-GkIcfJ9sDt4+gS+RWH3X+kR7ezuKdu3fg2oA9nRA8HZoqZwAKv3ml3TyfB9OyV2iFXxCw7q5XfV6SyPbSCT2pw==", + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", "dev": true }, "component-emitter": { @@ -929,6 +1146,15 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -936,9 +1162,9 @@ "dev": true }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", "dev": true }, "core-util-is": { @@ -959,15 +1185,15 @@ } }, "cssom": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", - "integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz", + "integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==", "dev": true }, "cssstyle": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.1.1.tgz", - "integrity": "sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz", + "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==", "dev": true, "requires": { "cssom": "0.3.x" @@ -983,13 +1209,13 @@ } }, "data-urls": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.0.1.tgz", - "integrity": "sha512-0HdcMZzK6ubMUnsMmQmG0AcLQPvbvb47R0+7CCZQCYgcd8OUWG91CG7sM6GoXgjz+WLl4ArFzHtBMy/QqSF4eg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", + "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", "dev": true, "requires": { "abab": "^2.0.0", - "whatwg-mimetype": "^2.1.0", + "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0" }, "dependencies": { @@ -1007,9 +1233,9 @@ } }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -1034,12 +1260,12 @@ "dev": true }, "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "dev": true, "requires": { - "strip-bom": "^3.0.0" + "strip-bom": "^2.0.0" } }, "define-properties": { @@ -1090,6 +1316,12 @@ "kind-of": "^6.0.2" } }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -1179,27 +1411,28 @@ } }, "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", "dev": true, "requires": { - "es-to-primitive": "^1.1.1", + "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" } }, "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", "dev": true, "requires": { - "is-callable": "^1.1.1", + "is-callable": "^1.1.4", "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" + "is-symbol": "^1.0.2" } }, "escape-string-regexp": { @@ -1209,9 +1442,9 @@ "dev": true }, "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", + "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", "dev": true, "requires": { "esprima": "^3.1.3", @@ -1285,47 +1518,12 @@ "dev": true }, "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -1335,64 +1533,20 @@ "dev": true, "requires": { "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } } }, "expect": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-23.5.0.tgz", - "integrity": "sha512-aG083W63tBloy8YgafWuC44EakjYe0Q6Mg35aujBPvyNU38DvLat9BVzOihNP2NZDLaCJiFNe0vejbtO6knnlA==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz", + "integrity": "sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w==", "dev": true, "requires": { "ansi-styles": "^3.2.0", - "jest-diff": "^23.5.0", + "jest-diff": "^23.6.0", "jest-get-type": "^22.1.0", - "jest-matcher-utils": "^23.5.0", + "jest-matcher-utils": "^23.6.0", "jest-message-util": "^23.4.0", "jest-regex-util": "^23.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - } } }, "extend": { @@ -1423,74 +1577,12 @@ } }, "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } + "is-extglob": "^1.0.0" } }, "extsprintf": { @@ -1543,26 +1635,16 @@ } }, "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "find-up": { @@ -1664,9 +1746,9 @@ "dev": true }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", "dev": true, "optional": true, "requires": { @@ -1676,28 +1758,24 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "bundled": true, "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "bundled": true, "dev": true }, "aproba": { "version": "1.2.0", - "resolved": "", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "bundled": true, "dev": true, "optional": true }, "are-we-there-yet": { - "version": "1.1.4", - "resolved": "", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "version": "1.1.5", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1707,14 +1785,12 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "bundled": true, "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "bundled": true, "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -1722,41 +1798,35 @@ } }, "chownr": { - "version": "1.0.1", - "resolved": "", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "version": "1.1.1", + "bundled": true, "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "bundled": true, "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "bundled": true, "dev": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "bundled": true, "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": "", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "bundled": true, "dev": true, "optional": true }, "debug": { "version": "2.6.9", - "resolved": "", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1764,30 +1834,26 @@ } }, "deep-extend": { - "version": "0.5.1", - "resolved": "", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "version": "0.6.0", + "bundled": true, "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bundled": true, "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1796,15 +1862,13 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1819,9 +1883,8 @@ } }, "glob": { - "version": "7.1.2", - "resolved": "", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.3", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1835,25 +1898,22 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "dev": true, "optional": true }, "iconv-lite": { - "version": "0.4.21", - "resolved": "", - "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "version": "0.4.24", + "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { "version": "3.0.1", - "resolved": "", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1862,8 +1922,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1873,21 +1932,18 @@ }, "inherits": { "version": "2.0.3", - "resolved": "", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "bundled": true, "dev": true }, "ini": { "version": "1.3.5", - "resolved": "", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "bundled": true, "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -1895,15 +1951,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": "", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -1911,24 +1965,21 @@ }, "minimist": { "version": "0.0.8", - "resolved": "", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "bundled": true, "dev": true }, "minipass": { - "version": "2.2.4", - "resolved": "", - "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", + "version": "2.3.5", + "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", - "resolved": "", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", + "version": "1.2.1", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1937,8 +1988,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "dev": true, "requires": { "minimist": "0.0.8" @@ -1946,15 +1996,13 @@ }, "ms": { "version": "2.0.0", - "resolved": "", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "bundled": true, "dev": true, "optional": true }, "needle": { - "version": "2.2.0", - "resolved": "", - "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", + "version": "2.2.4", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1964,19 +2012,18 @@ } }, "node-pre-gyp": { - "version": "0.10.0", - "resolved": "", - "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", + "version": "0.10.3", + "bundled": true, "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -1984,8 +2031,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -1994,16 +2040,14 @@ } }, "npm-bundled": { - "version": "1.0.3", - "resolved": "", - "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", + "version": "1.0.5", + "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", - "resolved": "", - "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", + "version": "1.2.0", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2013,8 +2057,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2026,21 +2069,18 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "bundled": true, "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": "", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "dev": true, "requires": { "wrappy": "1" @@ -2048,22 +2088,19 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "bundled": true, "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2073,26 +2110,23 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "bundled": true, "dev": true, "optional": true }, "rc": { - "version": "1.2.7", - "resolved": "", - "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", + "version": "1.2.8", + "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -2100,8 +2134,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "dev": true, "optional": true } @@ -2109,8 +2142,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2124,60 +2156,52 @@ } }, "rimraf": { - "version": "2.6.2", - "resolved": "", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "bundled": true, "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", - "resolved": "", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "version": "5.1.2", + "bundled": true, "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "bundled": true, "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "bundled": true, "dev": true, "optional": true }, "semver": { - "version": "5.5.0", - "resolved": "", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "5.6.0", + "bundled": true, "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -2187,8 +2211,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "bundled": true, "dev": true, "optional": true, "requires": { @@ -2197,8 +2220,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -2206,54 +2228,48 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "bundled": true, "dev": true, "optional": true }, "tar": { - "version": "4.4.1", - "resolved": "", - "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", + "version": "4.4.8", + "bundled": true, "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, "util-deprecate": { "version": "1.0.2", - "resolved": "", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "bundled": true, "dev": true, "optional": true }, "wide-align": { - "version": "1.1.2", - "resolved": "", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "version": "1.1.3", + "bundled": true, "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { "version": "1.0.2", - "resolved": "", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "bundled": true, "dev": true }, "yallist": { - "version": "3.0.2", - "resolved": "", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", + "version": "3.0.3", + "bundled": true, "dev": true } } @@ -2261,7 +2277,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "get-caller-file": { @@ -2327,7 +2343,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true }, "graceful-fs": { @@ -2343,59 +2359,22 @@ "dev": true }, "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.1.tgz", + "integrity": "sha512-3Zhi6C0euYZL5sM0Zcy7lInLXKQ+YLcF/olbN010mzGQ4XVm50JeyBnMqofHh696GrciGruC7kCcApPDJvVgwA==", "dev": true, "requires": { - "async": "^1.4.0", + "neo-async": "^2.6.0", "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" }, "dependencies": { "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "optional": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "optional": true - } - } - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -2430,6 +2409,12 @@ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -2439,6 +2424,14 @@ "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, "has-values": { @@ -2451,15 +2444,35 @@ "kind-of": "^4.0.0" }, "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "is-buffer": "^1.1.5" - } - } + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, "home-or-tmp": { @@ -2481,7 +2494,7 @@ "html-encoding-sniffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", - "integrity": "sha1-5w2EuU2lOqN14R/jo1G+ZkLKRvg=", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", "dev": true, "requires": { "whatwg-encoding": "^1.0.1" @@ -2499,19 +2512,14 @@ } }, "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, - "immutable": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", - "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" - }, "import-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", @@ -2578,15 +2586,6 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", @@ -2594,12 +2593,12 @@ "dev": true }, "is-ci": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.0.tgz", - "integrity": "sha512-plgvKjQtalH2P3Gytb7L61Lmz95g2DlpzFiQyRSFew8WoJKxtKRzrZMeyRN2supblm3Psc8OQGy7Xjb6XG11jw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", "dev": true, "requires": { - "ci-info": "^1.3.0" + "ci-info": "^1.5.0" } }, "is-data-descriptor": { @@ -2694,9 +2693,9 @@ } }, "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -2709,6 +2708,14 @@ "dev": true, "requires": { "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, "is-posix-bracket": { @@ -2739,10 +2746,13 @@ "dev": true }, "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } }, "is-typedarray": { "version": "1.0.0", @@ -2762,6 +2772,12 @@ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2775,10 +2791,13 @@ "dev": true }, "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } }, "isstream": { "version": "0.1.2", @@ -2787,55 +2806,43 @@ "dev": true }, "istanbul-api": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", - "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz", + "integrity": "sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA==", "dev": true, "requires": { "async": "^2.1.4", - "compare-versions": "^3.1.0", "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.2.0", - "istanbul-lib-instrument": "^1.10.1", - "istanbul-lib-report": "^1.1.4", - "istanbul-lib-source-maps": "^1.2.4", - "istanbul-reports": "^1.3.0", + "istanbul-lib-coverage": "^1.2.1", + "istanbul-lib-hook": "^1.2.2", + "istanbul-lib-instrument": "^1.10.2", + "istanbul-lib-report": "^1.1.5", + "istanbul-lib-source-maps": "^1.2.6", + "istanbul-reports": "^1.5.1", "js-yaml": "^3.7.0", "mkdirp": "^0.5.1", "once": "^1.4.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - } } }, "istanbul-lib-coverage": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", + "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", "dev": true }, "istanbul-lib-hook": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", - "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz", + "integrity": "sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==", "dev": true, "requires": { - "append-transform": "^1.0.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", - "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", + "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", "dev": true, "requires": { "babel-generator": "^6.18.0", @@ -2843,90 +2850,75 @@ "babel-traverse": "^6.18.0", "babel-types": "^6.18.0", "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-coverage": "^1.2.1", "semver": "^5.3.0" } }, "istanbul-lib-report": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", - "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz", + "integrity": "sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==", "dev": true, "requires": { - "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-coverage": "^1.2.1", "mkdirp": "^0.5.1", "path-parse": "^1.0.5", "supports-color": "^3.1.2" } }, "istanbul-lib-source-maps": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", - "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz", + "integrity": "sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==", "dev": true, "requires": { "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-coverage": "^1.2.1", "mkdirp": "^0.5.1", "rimraf": "^2.6.1", "source-map": "^0.5.3" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } } }, "istanbul-reports": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", - "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz", + "integrity": "sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==", "dev": true, "requires": { "handlebars": "^4.0.3" } }, "jest": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-23.5.0.tgz", - "integrity": "sha512-+X3Fk4rD8dTnHoIxHJymZthbtYllvSOnXAApQltvyLkHsv+fqyC/SZptUJDbXkFsqZJyyIXMySkdzerz3fv4oQ==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-23.6.0.tgz", + "integrity": "sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw==", "dev": true, "requires": { "import-local": "^1.0.0", - "jest-cli": "^23.5.0" + "jest-cli": "^23.6.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "jest-cli": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.5.0.tgz", - "integrity": "sha512-Kxi2QH8s6NkpPgboza/plpmQ2bjUQ+MwYv7vM5rDwJz/x+NB4YoLXFikPXLWNP0JuYpMvYwITKneFljnNKhq2Q==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.6.0.tgz", + "integrity": "sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", @@ -2941,18 +2933,18 @@ "istanbul-lib-instrument": "^1.10.1", "istanbul-lib-source-maps": "^1.2.4", "jest-changed-files": "^23.4.2", - "jest-config": "^23.5.0", + "jest-config": "^23.6.0", "jest-environment-jsdom": "^23.4.0", "jest-get-type": "^22.1.0", - "jest-haste-map": "^23.5.0", + "jest-haste-map": "^23.6.0", "jest-message-util": "^23.4.0", "jest-regex-util": "^23.3.0", - "jest-resolve-dependencies": "^23.5.0", - "jest-runner": "^23.5.0", - "jest-runtime": "^23.5.0", - "jest-snapshot": "^23.5.0", + "jest-resolve-dependencies": "^23.6.0", + "jest-runner": "^23.6.0", + "jest-runtime": "^23.6.0", + "jest-snapshot": "^23.6.0", "jest-util": "^23.4.0", - "jest-validate": "^23.5.0", + "jest-validate": "^23.6.0", "jest-watcher": "^23.4.0", "jest-worker": "^23.2.0", "micromatch": "^2.3.11", @@ -2966,24 +2958,6 @@ "which": "^1.2.12", "yargs": "^11.0.0" } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -2997,111 +2971,37 @@ } }, "jest-config": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.5.0.tgz", - "integrity": "sha512-JENhQpLaVwXWPLUkhPYgIfecHKsU8GR1vj79rS4n0LSRsHx/U2wItZKoKAd5vtt2J58JPxRq4XheG79jd4fI7Q==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz", + "integrity": "sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ==", "dev": true, "requires": { "babel-core": "^6.0.0", - "babel-jest": "^23.4.2", + "babel-jest": "^23.6.0", "chalk": "^2.0.1", "glob": "^7.1.1", "jest-environment-jsdom": "^23.4.0", "jest-environment-node": "^23.4.0", "jest-get-type": "^22.1.0", - "jest-jasmine2": "^23.5.0", + "jest-jasmine2": "^23.6.0", "jest-regex-util": "^23.3.0", - "jest-resolve": "^23.5.0", + "jest-resolve": "^23.6.0", "jest-util": "^23.4.0", - "jest-validate": "^23.5.0", + "jest-validate": "^23.6.0", "micromatch": "^2.3.11", - "pretty-format": "^23.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "pretty-format": "^23.6.0" } }, "jest-diff": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.5.0.tgz", - "integrity": "sha512-Miz8GakJIz443HkGpVOAyHQgSYqcgs2zQmDJl4oV7DYrFotchdoQvxceF6LhfpRBV1LOUGcFk5Dd/ffSXVwMsA==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.6.0.tgz", + "integrity": "sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g==", "dev": true, "requires": { "chalk": "^2.0.1", "diff": "^3.2.0", "jest-get-type": "^22.1.0", - "pretty-format": "^23.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "pretty-format": "^23.6.0" } }, "jest-docblock": { @@ -3114,50 +3014,13 @@ } }, "jest-each": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.5.0.tgz", - "integrity": "sha512-8BgebQgAJmWXpYp4Qt9l3cn1Xei0kZ7JL4cs/NXh7750ATlPGzRRYbutFVJTk5B/Lt3mjHP3G3tLQLyBOCSHGA==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.6.0.tgz", + "integrity": "sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg==", "dev": true, "requires": { "chalk": "^2.0.1", - "pretty-format": "^23.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "pretty-format": "^23.6.0" } }, "jest-environment-jsdom": { @@ -3188,9 +3051,9 @@ "dev": true }, "jest-haste-map": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.5.0.tgz", - "integrity": "sha512-bt9Swigb6KZ6ZQq/fQDUwdUeHenVvZ6G/lKwJjwRGp+Fap8D4B3bND3FaeJg7vXVsLX8hXshRArbVxLop/5wLw==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.6.0.tgz", + "integrity": "sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg==", "dev": true, "requires": { "fb-watchman": "^2.0.0", @@ -3204,117 +3067,43 @@ } }, "jest-jasmine2": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.5.0.tgz", - "integrity": "sha512-xMgvDUvgqKpilsGnneC9Qr+uIlROxKI3UoJcHZeUlu6AKpQyEkGh0hKbfM0NaEjX5sy7WeFQEhcp/AiWlHcc0A==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz", + "integrity": "sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ==", "dev": true, "requires": { "babel-traverse": "^6.0.0", "chalk": "^2.0.1", "co": "^4.6.0", - "expect": "^23.5.0", + "expect": "^23.6.0", "is-generator-fn": "^1.0.0", - "jest-diff": "^23.5.0", - "jest-each": "^23.5.0", - "jest-matcher-utils": "^23.5.0", + "jest-diff": "^23.6.0", + "jest-each": "^23.6.0", + "jest-matcher-utils": "^23.6.0", "jest-message-util": "^23.4.0", - "jest-snapshot": "^23.5.0", + "jest-snapshot": "^23.6.0", "jest-util": "^23.4.0", - "pretty-format": "^23.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "pretty-format": "^23.6.0" } }, "jest-leak-detector": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.5.0.tgz", - "integrity": "sha512-40VsHQCIEslxg91Zg5NiZGtPeWSBLXiD6Ww+lhHlIF6u8uSQ+xgiD6NbWHFOYs1VBRI+V/ym7Q1aOtVg9tqMzQ==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz", + "integrity": "sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg==", "dev": true, "requires": { - "pretty-format": "^23.5.0" + "pretty-format": "^23.6.0" } }, "jest-matcher-utils": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.5.0.tgz", - "integrity": "sha512-hmQUKUKYOExp3T8dNYK9A9copCFYKoRLcY4WDJJ0Z2u3oF6rmAhHuZtmpHBuGpASazobBxm3TXAfAXDvz2T7+Q==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz", + "integrity": "sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog==", "dev": true, "requires": { "chalk": "^2.0.1", "jest-get-type": "^22.1.0", - "pretty-format": "^23.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "pretty-format": "^23.6.0" } }, "jest-message-util": { @@ -3328,43 +3117,6 @@ "micromatch": "^2.3.11", "slash": "^1.0.0", "stack-utils": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, "jest-mock": { @@ -3380,78 +3132,41 @@ "dev": true }, "jest-resolve": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.5.0.tgz", - "integrity": "sha512-CRPc0ebG3baNKz/QicIy5rGfzYpMNm8AjEl/tDQhehq/QC4ttyauZdvAXel3qo+4Gri9ljajnxW+hWyxZbbcnQ==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.6.0.tgz", + "integrity": "sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA==", "dev": true, "requires": { "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "realpath-native": "^1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, "jest-resolve-dependencies": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.5.0.tgz", - "integrity": "sha512-APZc/CjfzL8rH/wr+Gh7XJJygYaDjMQsWaJy4ZR1WaHWKude4WcfdU8xjqaNbx5NsVF2P2tVvsLbumlPXCdJOw==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz", + "integrity": "sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA==", "dev": true, "requires": { "jest-regex-util": "^23.3.0", - "jest-snapshot": "^23.5.0" + "jest-snapshot": "^23.6.0" } }, "jest-runner": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.5.0.tgz", - "integrity": "sha512-cpBvkBTVmW1ab1thbtoh2m6VnnM0BYKhj3MEzbOTZjPfzoIjUVIxLUTDobVNOvEK7aTEb/2oiPlNoOTSNJx8mw==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.6.0.tgz", + "integrity": "sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA==", "dev": true, "requires": { "exit": "^0.1.2", "graceful-fs": "^4.1.11", - "jest-config": "^23.5.0", + "jest-config": "^23.6.0", "jest-docblock": "^23.2.0", - "jest-haste-map": "^23.5.0", - "jest-jasmine2": "^23.5.0", - "jest-leak-detector": "^23.5.0", + "jest-haste-map": "^23.6.0", + "jest-jasmine2": "^23.6.0", + "jest-leak-detector": "^23.6.0", "jest-message-util": "^23.4.0", - "jest-runtime": "^23.5.0", + "jest-runtime": "^23.6.0", "jest-util": "^23.4.0", "jest-worker": "^23.2.0", "source-map-support": "^0.5.6", @@ -3465,9 +3180,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", - "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.11.tgz", + "integrity": "sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -3477,9 +3192,9 @@ } }, "jest-runtime": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.5.0.tgz", - "integrity": "sha512-WzzYxYtoU8S1MJns0G4E3BsuFUTFBiu1qsk3iC9OTugzNQcQKt0BoOGsT7wXCKqkw/09QdV77vvaeJXST2Efgg==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.6.0.tgz", + "integrity": "sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw==", "dev": true, "requires": { "babel-core": "^6.0.0", @@ -3489,14 +3204,14 @@ "exit": "^0.1.2", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.1.11", - "jest-config": "^23.5.0", - "jest-haste-map": "^23.5.0", + "jest-config": "^23.6.0", + "jest-haste-map": "^23.6.0", "jest-message-util": "^23.4.0", "jest-regex-util": "^23.3.0", - "jest-resolve": "^23.5.0", - "jest-snapshot": "^23.5.0", + "jest-resolve": "^23.6.0", + "jest-snapshot": "^23.6.0", "jest-util": "^23.4.0", - "jest-validate": "^23.5.0", + "jest-validate": "^23.6.0", "micromatch": "^2.3.11", "realpath-native": "^1.0.0", "slash": "^1.0.0", @@ -3505,46 +3220,11 @@ "yargs": "^11.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "has-flag": { + "strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -3555,58 +3235,21 @@ "dev": true }, "jest-snapshot": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.5.0.tgz", - "integrity": "sha512-NYg8MFNVyPXmnnihiltasr4t1FJEXFbZFaw1vZCowcnezIQ9P1w+yxTwjWT564QP24Zbn5L9cjxLs8d6K+pNlw==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.6.0.tgz", + "integrity": "sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg==", "dev": true, "requires": { "babel-types": "^6.0.0", "chalk": "^2.0.1", - "jest-diff": "^23.5.0", - "jest-matcher-utils": "^23.5.0", + "jest-diff": "^23.6.0", + "jest-matcher-utils": "^23.6.0", "jest-message-util": "^23.4.0", - "jest-resolve": "^23.5.0", + "jest-resolve": "^23.6.0", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^23.5.0", + "pretty-format": "^23.6.0", "semver": "^5.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, "jest-util": { @@ -3619,102 +3262,30 @@ "chalk": "^2.0.1", "graceful-fs": "^4.1.11", "is-ci": "^1.0.10", - "jest-message-util": "^23.4.0", - "mkdirp": "^0.5.1", - "slash": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, + "jest-message-util": "^23.4.0", + "mkdirp": "^0.5.1", + "slash": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, "jest-validate": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.5.0.tgz", - "integrity": "sha512-XmStdYhfdiDKacXX5sNqEE61Zz4/yXaPcDsKvVA0429RBu2pkQyIltCVG7UitJIEAzSs3ociQTdyseAW8VGPiA==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz", + "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", "dev": true, "requires": { "chalk": "^2.0.1", "jest-get-type": "^22.1.0", "leven": "^2.1.0", - "pretty-format": "^23.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "pretty-format": "^23.6.0" } }, "jest-watcher": { @@ -3726,43 +3297,6 @@ "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", "string-length": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, "jest-worker": { @@ -3896,18 +3430,11 @@ } }, "kleur": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.1.tgz", - "integrity": "sha512-Zq/jyANIJ2uX8UZjWlqLwbyhcxSXJtT/Y89lClyeZd3l++3ztL1I5SSCYrbcbwSunTjC88N3WuMk0kRDQD6gzA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz", + "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==", "dev": true }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -3950,17 +3477,6 @@ "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "strip-bom": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } } }, "locate-path": { @@ -3989,12 +3505,6 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -4004,9 +3514,9 @@ } }, "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, "requires": { "pseudomap": "^1.0.2", @@ -4038,9 +3548,9 @@ } }, "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, "mem": { @@ -4053,9 +3563,9 @@ } }, "merge": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", - "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", "dev": true }, "merge-stream": { @@ -4086,52 +3596,6 @@ "object.omit": "^2.0.0", "parse-glob": "^3.0.4", "regex-cache": "^0.4.2" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } } }, "mime-db": { @@ -4165,9 +3629,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, "mixin-deep": { @@ -4215,9 +3679,9 @@ "dev": true }, "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz", + "integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==", "dev": true, "optional": true }, @@ -4240,6 +3704,18 @@ "to-regex": "^3.0.1" }, "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -4254,6 +3730,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "neo-async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", + "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", + "dev": true + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4261,25 +3743,26 @@ "dev": true }, "node-notifier": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz", - "integrity": "sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz", + "integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==", "dev": true, "requires": { "growly": "^1.3.0", - "semver": "^5.4.1", + "is-wsl": "^1.1.0", + "semver": "^5.5.0", "shellwords": "^0.1.1", "which": "^1.3.0" } }, "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", + "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } @@ -4309,9 +3792,9 @@ "dev": true }, "nwsapi": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.8.tgz", - "integrity": "sha512-7RZ+qbFGiVc6v14Y8DSZjPN1wZPOaMbiiP4tzf5eNuyOITAeOIA3cMhjuKUypVIqBgCSg1KaSyAv8Ocq/0ZJ1A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.1.tgz", + "integrity": "sha512-T5GaA1J/d34AC8mkrFD2O0DR17kwJ702ZOtJOsS8RpbsQZVOC2/xYFb1i/cw+xdM54JIlMuojjDOYct8GIWtwg==", "dev": true }, "oauth-sign": { @@ -4349,9 +3832,9 @@ } }, "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", + "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", "dev": true }, "object-visit": { @@ -4361,6 +3844,14 @@ "dev": true, "requires": { "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, "object.getownpropertydescriptors": { @@ -4390,6 +3881,14 @@ "dev": true, "requires": { "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, "once": { @@ -4409,14 +3908,6 @@ "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } } }, "optionator": { @@ -4643,36 +4134,19 @@ "dev": true }, "pretty-format": { - "version": "23.5.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.5.0.tgz", - "integrity": "sha512-iFLvYTXOn+C/s7eV+pr4E8DD7lYa2/klXMEz+lvH14qSDWAJ7S+kFmMe1SIWesATHQxopHTxRcB2nrpExhzaBA==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", + "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", "dev": true, "requires": { "ansi-regex": "^3.0.0", "ansi-styles": "^3.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - } } }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, "process": { @@ -4715,9 +4189,9 @@ "dev": true }, "randomatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", - "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", "dev": true, "requires": { "is-number": "^4.0.0", @@ -4794,23 +4268,12 @@ "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" - }, - "dependencies": { - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } } }, "realpath-native": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.1.tgz", - "integrity": "sha512-W14EcXuqUvKP8dkWkD7B95iMy77lpMnlFXbbk409bQtNCbeu0kvRE5reo+yIZ3JXxg6frbGsz2DLQ39lrCB40g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz", + "integrity": "sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA==", "dev": true, "requires": { "util.promisify": "^1.0.0" @@ -4841,7 +4304,7 @@ "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { "is-equal-shallow": "^0.1.3" @@ -4921,23 +4384,31 @@ } }, "request-promise-core": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", - "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", + "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", "dev": true, "requires": { - "lodash": "^4.13.1" + "lodash": "^4.17.11" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } } }, "request-promise-native": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", - "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", + "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", "dev": true, "requires": { - "request-promise-core": "1.1.1", - "stealthy-require": "^1.1.0", - "tough-cookie": ">=2.3.3" + "request-promise-core": "1.1.2", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" } }, "require-directory": { @@ -4988,23 +4459,29 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "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" + } + } } }, "rsvp": { @@ -5051,6 +4528,253 @@ "watch": "~0.18.0" }, "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -5077,13 +4801,19 @@ "snapdragon": "^0.8.1", "to-regex": "^3.0.2" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true } } }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true }, "semver": { @@ -5139,7 +4869,7 @@ "shellwords": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha1-1rkYHBpI05cyTISHHvvPxz/AZUs=", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", "dev": true }, "signal-exit": { @@ -5176,15 +4906,6 @@ "use": "^3.1.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -5254,6 +4975,12 @@ "kind-of": "^6.0.2" } }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -5293,7 +5020,7 @@ "source-map-support": { "version": "0.4.18", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha1-Aoam3ovkJkEzhZTpfM6nXwosWF8=", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { "source-map": "^0.5.6" @@ -5306,9 +5033,9 @@ "dev": true }, "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -5316,9 +5043,9 @@ } }, "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", "dev": true }, "spdx-expression-parse": { @@ -5332,9 +5059,9 @@ } }, "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "split-string": { @@ -5370,9 +5097,9 @@ } }, "stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", + "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", "dev": true }, "static-extend": { @@ -5410,23 +5137,6 @@ "requires": { "astral-regex": "^1.0.0", "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } } }, "string-width": { @@ -5437,30 +5147,34 @@ "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" } }, "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } }, "strip-eof": { "version": "1.0.0", @@ -5489,45 +5203,16 @@ "dev": true }, "test-exclude": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", - "integrity": "sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz", + "integrity": "sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA==", "dev": true, "requires": { "arrify": "^1.0.1", - "micromatch": "^3.1.8", + "micromatch": "^2.3.11", "object-assign": "^4.1.0", "read-pkg-up": "^1.0.1", "require-main-filename": "^1.0.1" - }, - "dependencies": { - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } } }, "throat": { @@ -5577,6 +5262,17 @@ "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } } }, "tough-cookie": { @@ -5631,9 +5327,9 @@ "dev": true }, "tslint": { - "version": "5.13.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.13.1.tgz", - "integrity": "sha512-fplQqb2miLbcPhyHoMV4FU9PtNRbgmm/zI5d3SZwwmJQM6V0eodju+hplpyfhLWpmwrDNfNYU57uYRb8s0zZoQ==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz", + "integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==", "dev": true, "requires": { "babel-code-frame": "^6.22.0", @@ -5648,50 +5344,7 @@ "resolve": "^1.3.2", "semver": "^5.3.0", "tslib": "^1.8.0", - "tsutils": "^2.27.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "tsutils": "^2.29.0" } }, "tslint-config-dabapps": { @@ -5779,12 +5432,25 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==" }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "uglify-js": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", + "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "commander": "~2.19.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } }, "underscore": { "version": "1.8.3", @@ -5869,6 +5535,12 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true } } }, @@ -5961,27 +5633,35 @@ "requires": { "exec-sh": "^0.2.0", "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } } }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha1-qFWYCx8LazWbodXZ+zmulB+qY60=", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", "dev": true }, "whatwg-encoding": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.4.tgz", - "integrity": "sha512-vM9KWN6MP2mIHZ86ytcyIv7e8Cj3KTfO2nd2c8PFDqcI4bxFmQp83ibq4wadq7rL9l9sZV6o9B0LTt8ygGAAXg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, "requires": { - "iconv-lite": "0.4.23" + "iconv-lite": "0.4.24" } }, "whatwg-mimetype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz", - "integrity": "sha512-FKxhYLytBQiUKjkYteN71fAUA3g6KpNXoho1isLiLSB3N1G4F35Q5vUxWfKFhBwi5IWF27VE6WxhrnnC+m0Mew==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", "dev": true }, "whatwg-url": { @@ -6010,13 +5690,6 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -6077,9 +5750,9 @@ "dev": true }, "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", + "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -6132,34 +5805,6 @@ "which-module": "^2.0.0", "y18n": "^3.2.1", "yargs-parser": "^9.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } } }, "yargs-parser": { @@ -6169,14 +5814,6 @@ "dev": true, "requires": { "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } } } } diff --git a/package.json b/package.json index bd81b13..0172173 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,11 @@ }, "devDependencies": { "@types/jest": "^23.3.1", - "jest": "^23.5.0", + "jest": "^23.6.0", "prettier": "^1.16.4", "request": "^2.88.0", "ts-jest": "^23.1.4", - "tslint": "^5.11.0", + "tslint": "^5.14.0", "tslint-config-dabapps": "github:dabapps/tslint-config-dabapps#v0.5.1", "typescript": "^2.9.2" }, diff --git a/src/ts/collections/index.ts b/src/ts/collections/index.ts index 5009144..0ea30c3 100644 --- a/src/ts/collections/index.ts +++ b/src/ts/collections/index.ts @@ -5,9 +5,6 @@ export * from './utils'; import { request } from '@dabapps/redux-requests'; import { AxiosResponse } from 'axios'; -// Required for re-exporting -// tslint:disable-next-line:no-unused-variable -import { List } from 'immutable'; import * as pathToRegexp from 'path-to-regexp'; import { AnyAction } from 'redux'; // Required for re-exporting diff --git a/src/ts/collections/utils.ts b/src/ts/collections/utils.ts index e74b6e5..6dbc910 100644 --- a/src/ts/collections/utils.ts +++ b/src/ts/collections/utils.ts @@ -1,5 +1,4 @@ import { formatQueryParams } from '@dabapps/redux-requests'; -import { List } from 'immutable'; import { IdKeyedMap, TypeToRecordMapping } from '../utils'; import { Collection, @@ -53,7 +52,6 @@ export function getCollectionByName>( page: 1, count: 0, results: [], - immutableResults: List(), } ); } diff --git a/src/ts/index.ts b/src/ts/index.ts index 0458d87..3513509 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -3,9 +3,6 @@ import { AxiosResponse } from 'axios'; // Required for re-exporting // tslint:disable-next-line:no-unused-variable -import { List } from 'immutable'; -// Required for re-exporting -// tslint:disable-next-line:no-unused-variable import { AnyAction, Dispatch } from 'redux'; import { collectionsFunctor } from './collections'; import { itemsFunctor } from './items'; From c2edc6f60e0232a78751c3aec0bc98518c90e60e Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 16:04:31 +0000 Subject: [PATCH 13/24] Improve typing --- package.json | 3 +- src/ts/collections/index.ts | 7 ++-- src/ts/collections/types.ts | 74 ++++++++++++++++++++++++++++++++++++- src/ts/index.ts | 5 ++- src/ts/items/index.ts | 4 +- src/ts/items/types.ts | 72 +++++++++++++++++++++++++++++++++++- src/ts/types.ts | 19 +++++++++- 7 files changed, 172 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 0172173..d0ca4d1 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "prettier-check": "prettier --check \"{src,tests,types,examples,docs}/**/*.{ts,tsx,js,jsx}\"", "prettier": "prettier --write \"{src,tests,types,examples,docs}/**/*.{ts,tsx,js,jsx}\"", "tests": "jest", - "test": "npm run lint && npm run tests -- --runInBand --coverage", + "typecheck": "tsc --project tsconfig.json --noEmit", + "test": "npm run typecheck && npm run lint && npm run tests -- --runInBand --coverage", "prepublishOnly": "npm test && npm run dist" }, "dependencies": { diff --git a/src/ts/collections/index.ts b/src/ts/collections/index.ts index 0ea30c3..028860c 100644 --- a/src/ts/collections/index.ts +++ b/src/ts/collections/index.ts @@ -33,6 +33,7 @@ import { CollectionOptions, CollectionOptionsNoPageSize, CollectionReducerPlugin, + CollectionsListInterface, CollectionStore, } from './types'; import { @@ -47,14 +48,14 @@ export function collectionsFunctor>( typeToRecordMapping: TypeToRecordMapping, baseUrl: string = '/api/', reducerPlugin?: CollectionReducerPlugin -) { +): CollectionsListInterface { function buildActionSet(overrideUrl?: string) { function addItemAction( type: keyof T, data: any, subgroup?: string, url?: string - ) { + ): ThunkAction, any, null> { return request( ADD_TO_COLLECTION, url || overrideUrl || `${baseUrl}${type}/`, @@ -64,7 +65,7 @@ export function collectionsFunctor>( tag: `${type}`, metaData: { subgroup: buildSubgroup(overrideUrl, subgroup) }, } - ); + ) as any; } function clearCollectionAction( diff --git a/src/ts/collections/types.ts b/src/ts/collections/types.ts index a6d3f48..c153b68 100644 --- a/src/ts/collections/types.ts +++ b/src/ts/collections/types.ts @@ -1,6 +1,8 @@ +import { AxiosResponse } from 'axios'; import { FluxStandardAction } from 'flux-standard-action'; import { AnyAction } from 'redux'; -import { Dict, IdKeyed, IdKeyedMap } from '../utils'; +import { ThunkAction } from 'redux-thunk'; +import { Dict, IdKeyed, IdKeyedMap, SubpathParams } from '../utils'; export type CollectionParamsNoPageSize = Readonly<{ shouldAppend: boolean; @@ -56,3 +58,73 @@ export type CollectionReducerPlugin> = ( state: CollectionStore, action: AnyAction ) => CollectionStore; + +export interface CollectionActions> { + addItem: ( + type: keyof T, + data: any, + subgroup?: string, + url?: string + ) => ThunkAction>, any, null>; + clearCollection: (type: keyof T, subgroup?: string) => AnyAction; + deleteItem: ( + type: keyof T, + id: string, + subgroup?: string + ) => ThunkAction>, any, null>; + getCollection: ( + type: keyof T, + options?: Partial, + subgroup?: string + ) => ThunkAction>, any, null>; + getAllCollection: ( + type: keyof T, + options?: Partial, + subgroup?: string + ) => ThunkAction>, any, null>; +} + +export interface CollectionAtSubpathActions { + addItem: ( + data: any, + subgroup?: string, + url?: string + ) => ThunkAction>, any, null>; + clearCollection: (subgroup?: string) => AnyAction; + deleteItem: ( + id: string, + subgroup?: string + ) => ThunkAction>, any, null>; + getCollection: ( + options?: Partial, + subgroup?: string + ) => ThunkAction>, any, null>; + getAllCollection: ( + options?: Partial, + subgroup?: string + ) => ThunkAction>, any, null>; +} + +export interface CollectionsListInterface> { + actions: CollectionActions; + reducers: { + collectionsReducer: ( + state: CollectionStore | undefined, + action: AnyAction + ) => CollectionStore; + }; + collectionAtSubpath: ( + type: keyof T, + params: SubpathParams + ) => { + actions: CollectionAtSubpathActions; + getSubpathCollection: ( + store: CollectionStore, + subgroup: string + ) => Collection; + getSubpathCollectionResults: ( + store: CollectionStore, + subgroup: string + ) => ReadonlyArray; + }; +} diff --git a/src/ts/index.ts b/src/ts/index.ts index 3513509..48530b5 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -6,7 +6,7 @@ import { AxiosResponse } from 'axios'; import { AnyAction, Dispatch } from 'redux'; import { collectionsFunctor } from './collections'; import { itemsFunctor } from './items'; -import { CollectionOptions } from './types'; +import { CollectionOptions, CollectionsInterface } from './types'; import { IdKeyedMap, TypeToRecordMapping } from './utils'; export { @@ -26,12 +26,13 @@ export { ItemStore, UPDATE_ITEM, } from './items'; +export { CollectionsInterface, CollectionOptions } from './types'; export function Collections, U extends IdKeyedMap>( collectionToRecordMapping: TypeToRecordMapping, itemToRecordMapping: TypeToRecordMapping, collectionOptions: CollectionOptions = {} -) { +): CollectionsInterface { const baseUrl = collectionOptions.baseUrl || '/api/'; const collections = collectionsFunctor( diff --git a/src/ts/items/index.ts b/src/ts/items/index.ts index 344b63e..02d703b 100644 --- a/src/ts/items/index.ts +++ b/src/ts/items/index.ts @@ -18,14 +18,14 @@ import { } from '../utils'; import { CLEAR_ITEM, GET_ITEM, UPDATE_ITEM } from './actions'; import { clearItem, setItemFromResponseAction } from './reducers'; -import { ItemReducerPlugin, ItemStore } from './types'; +import { ItemReducerPlugin, ItemsInterface, ItemStore } from './types'; import { buildItemStore, getItemByName } from './utils'; export function itemsFunctor>( typeToRecordMapping: TypeToRecordMapping, baseUrl: string = '/api/', reducerPlugin?: ItemReducerPlugin -) { +): ItemsInterface { function buildActionSet(overrideUrl?: string) { function _updateItem( itemType: keyof T, diff --git a/src/ts/items/types.ts b/src/ts/items/types.ts index 821b8d8..c3bdc8a 100644 --- a/src/ts/items/types.ts +++ b/src/ts/items/types.ts @@ -1,6 +1,8 @@ +import { AxiosResponse } from 'axios'; import { FluxStandardAction } from 'flux-standard-action'; import { AnyAction } from 'redux'; -import { Dict } from '../utils'; +import { ThunkAction } from 'redux-thunk'; +import { Dict, SubpathParams } from '../utils'; export type ItemGroup = Dict; export type ItemStoreMutable = { [K in keyof T]: ItemGroup }; @@ -18,3 +20,71 @@ export type ItemResponseAction = FluxStandardAction< }, { tag: string; subgroup?: string } >; + +export interface ItemsInterface { + reducers: { + itemsReducer: ( + state: ItemStore | undefined, + action: AnyAction + ) => ItemStore; + }; + actions: { + getItem: ( + itemType: keyof T, + itemId: string, + subgroup?: string + ) => ThunkAction>, any, null>; + updateItem: ( + type: keyof T, + id: string, + data: any, + subgroup?: string + ) => ThunkAction>, any, null>; + patchItem: ( + type: keyof T, + id: string, + data: any, + subgroup?: string + ) => ThunkAction>, any, null>; + clearItem: (itemType: keyof T, subgroup?: string) => AnyAction; + actionItem: ( + type: keyof T, + id: string, + action: string, + data: any, + subgroup?: string + ) => ThunkAction>, any, null>; + }; + itemAtSubpath: ( + type: keyof T, + params: SubpathParams + ) => { + actions: { + getItem: ( + itemId: string, + subgroup?: string + ) => ThunkAction>, any, null>; + updateItem: ( + id: string, + data: any, + subgroup?: string + ) => ThunkAction>, any, null>; + patchItem: ( + id: string, + data: any, + subgroup?: string + ) => ThunkAction>, any, null>; + clearItem: (subgroup?: string) => AnyAction; + actionItem: ( + id: string, + action: string, + data: any, + subgroup?: string + ) => ThunkAction>, any, null>; + }; + getSubpathItem: ( + store: ItemStore, + subgroup?: string + ) => T[keyof T] | undefined; + }; +} diff --git a/src/ts/types.ts b/src/ts/types.ts index a40387b..900648a 100644 --- a/src/ts/types.ts +++ b/src/ts/types.ts @@ -1,5 +1,8 @@ -import { CollectionReducerPlugin } from './collections/types'; -import { ItemReducerPlugin } from './items/types'; +import { + CollectionReducerPlugin, + CollectionsListInterface, +} from './collections/types'; +import { ItemReducerPlugin, ItemsInterface } from './items/types'; import { IdKeyedMap } from './utils'; export type CollectionOptions, U> = Readonly< @@ -9,3 +12,15 @@ export type CollectionOptions, U> = Readonly< itemReducerPlugin: ItemReducerPlugin; }> >; + +export interface CollectionsInterface< + T extends IdKeyedMap, + U extends IdKeyedMap +> { + actions: CollectionsListInterface['actions'] & + ItemsInterface['actions']; + reducers: CollectionsListInterface['reducers'] & + ItemsInterface['reducers']; + collectionAtSubpath: CollectionsListInterface['collectionAtSubpath']; + itemAtSubpath: ItemsInterface['itemAtSubpath']; +} From b726e8082daac583cc567f3d5148723914104ec6 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 16:12:28 +0000 Subject: [PATCH 14/24] Removed unused imports --- src/ts/collections/index.ts | 3 --- src/ts/index.ts | 6 ------ 2 files changed, 9 deletions(-) diff --git a/src/ts/collections/index.ts b/src/ts/collections/index.ts index 028860c..adfca86 100644 --- a/src/ts/collections/index.ts +++ b/src/ts/collections/index.ts @@ -7,9 +7,6 @@ import { request } from '@dabapps/redux-requests'; import { AxiosResponse } from 'axios'; import * as pathToRegexp from 'path-to-regexp'; import { AnyAction } from 'redux'; -// Required for re-exporting -// tslint:disable-next-line:no-unused-variable -import { Dispatch } from 'redux'; import { ThunkAction } from 'redux-thunk'; import { buildSubgroup, diff --git a/src/ts/index.ts b/src/ts/index.ts index 48530b5..c6f08ef 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -1,9 +1,3 @@ -// Required for re-exporting -// tslint:disable-next-line:no-unused-variable -import { AxiosResponse } from 'axios'; -// Required for re-exporting -// tslint:disable-next-line:no-unused-variable -import { AnyAction, Dispatch } from 'redux'; import { collectionsFunctor } from './collections'; import { itemsFunctor } from './items'; import { CollectionOptions, CollectionsInterface } from './types'; From a5dce348c70c1db52dbfaa63720c00a11793bfa7 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 16:29:07 +0000 Subject: [PATCH 15/24] Open-source requirements --- LICENSE.txt | 11 +++++++++++ README.md | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..6efbf22 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,11 @@ +Copyright (c) 2019 DabApps Ltd. - https://www.dabapps.com + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 18cceac..7a44f52 100644 --- a/README.md +++ b/README.md @@ -157,3 +157,8 @@ const collections = Collections(collectionToRecordMapping, i itemReducerPlugin: myCustomItemReducer }); ``` + + +## Code of conduct + +For guidelines regarding the code of conduct when contributing to this repository please review [https://www.dabapps.com/open-source/code-of-conduct/](https://www.dabapps.com/open-source/code-of-conduct/) From 4a9086feb0ae7e1b288155c1089c825c47d33f5a Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 17:06:00 +0000 Subject: [PATCH 16/24] Revert dist restructure --- package-lock.json | 14 +++++++++++--- package.json | 5 +++-- scripts/dist | 2 +- tsconfig.dist.json | 13 +++++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 tsconfig.dist.json diff --git a/package-lock.json b/package-lock.json index 0cd818b..311f81a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,13 @@ "path": "^0.12.7", "redux": "^3.7.2", "typescript": "^2.9.2" + }, + "dependencies": { + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==" + } } }, "@types/jest": { @@ -5428,9 +5435,10 @@ } }, "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==" + "version": "3.3.3333", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.3333.tgz", + "integrity": "sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw==", + "dev": true }, "uglify-js": { "version": "3.4.10", diff --git a/package.json b/package.json index d0ca4d1..4301430 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "@dabapps/redux-api-collections", "version": "0.4.0", "description": "Type-safe helpers for dealing with Rest-Framework backed collections in Typescript", - "main": "dist/js/index.js", + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "dist": "./scripts/dist", "lint": "tsc --noEmit --project tsconfig.json && npm run prettier-check && tslint --project tsconfig.json '{src,tests,types,examples,docs}/**/*.@(ts|tsx)'", @@ -35,7 +36,7 @@ "ts-jest": "^23.1.4", "tslint": "^5.14.0", "tslint-config-dabapps": "github:dabapps/tslint-config-dabapps#v0.5.1", - "typescript": "^2.9.2" + "typescript": "^3.3.3333" }, "peerDependencies": { "redux-thunk": ">= 2 < 3", diff --git a/scripts/dist b/scripts/dist index ea00417..efdc376 100755 --- a/scripts/dist +++ b/scripts/dist @@ -6,4 +6,4 @@ rm -rf dist mkdir -p dist/js -tsc --project 'src/ts/tsconfig.json' +tsc --project 'tsconfig.dist.json' diff --git a/tsconfig.dist.json b/tsconfig.dist.json new file mode 100644 index 0000000..11ced93 --- /dev/null +++ b/tsconfig.dist.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src/ts/", + "outDir": "./dist/", + "sourceMap": true, + "declaration": true, + "listFiles": true + }, + "include": [ + "./src/ts/" + ] +} From ef1aa237c9b6f318aa0db0dfbaef85ad40d3ffc4 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 17:12:19 +0000 Subject: [PATCH 17/24] Reorganised slightly --- scripts/dist | 2 +- src/{ts => }/collections/actions.ts | 0 src/{ts => }/collections/index.ts | 0 src/{ts => }/collections/reducers.ts | 0 src/{ts => }/collections/types.ts | 0 src/{ts => }/collections/utils.ts | 0 src/{ts => }/index.ts | 0 src/{ts => }/items/actions.ts | 0 src/{ts => }/items/index.ts | 0 src/{ts => }/items/reducers.ts | 0 src/{ts => }/items/types.ts | 0 src/{ts => }/items/utils.ts | 0 src/{ts => }/tsconfig.json | 0 src/{ts => }/types.ts | 0 src/{ts => }/utils.ts | 0 tests/collections.ts | 2 +- tests/index.ts | 2 +- tests/items.ts | 2 +- tsconfig.dist.json | 4 ++-- 19 files changed, 6 insertions(+), 6 deletions(-) rename src/{ts => }/collections/actions.ts (100%) rename src/{ts => }/collections/index.ts (100%) rename src/{ts => }/collections/reducers.ts (100%) rename src/{ts => }/collections/types.ts (100%) rename src/{ts => }/collections/utils.ts (100%) rename src/{ts => }/index.ts (100%) rename src/{ts => }/items/actions.ts (100%) rename src/{ts => }/items/index.ts (100%) rename src/{ts => }/items/reducers.ts (100%) rename src/{ts => }/items/types.ts (100%) rename src/{ts => }/items/utils.ts (100%) rename src/{ts => }/tsconfig.json (100%) rename src/{ts => }/types.ts (100%) rename src/{ts => }/utils.ts (100%) diff --git a/scripts/dist b/scripts/dist index efdc376..461e172 100755 --- a/scripts/dist +++ b/scripts/dist @@ -4,6 +4,6 @@ set -e rm -rf dist -mkdir -p dist/js +mkdir -p dist tsc --project 'tsconfig.dist.json' diff --git a/src/ts/collections/actions.ts b/src/collections/actions.ts similarity index 100% rename from src/ts/collections/actions.ts rename to src/collections/actions.ts diff --git a/src/ts/collections/index.ts b/src/collections/index.ts similarity index 100% rename from src/ts/collections/index.ts rename to src/collections/index.ts diff --git a/src/ts/collections/reducers.ts b/src/collections/reducers.ts similarity index 100% rename from src/ts/collections/reducers.ts rename to src/collections/reducers.ts diff --git a/src/ts/collections/types.ts b/src/collections/types.ts similarity index 100% rename from src/ts/collections/types.ts rename to src/collections/types.ts diff --git a/src/ts/collections/utils.ts b/src/collections/utils.ts similarity index 100% rename from src/ts/collections/utils.ts rename to src/collections/utils.ts diff --git a/src/ts/index.ts b/src/index.ts similarity index 100% rename from src/ts/index.ts rename to src/index.ts diff --git a/src/ts/items/actions.ts b/src/items/actions.ts similarity index 100% rename from src/ts/items/actions.ts rename to src/items/actions.ts diff --git a/src/ts/items/index.ts b/src/items/index.ts similarity index 100% rename from src/ts/items/index.ts rename to src/items/index.ts diff --git a/src/ts/items/reducers.ts b/src/items/reducers.ts similarity index 100% rename from src/ts/items/reducers.ts rename to src/items/reducers.ts diff --git a/src/ts/items/types.ts b/src/items/types.ts similarity index 100% rename from src/ts/items/types.ts rename to src/items/types.ts diff --git a/src/ts/items/utils.ts b/src/items/utils.ts similarity index 100% rename from src/ts/items/utils.ts rename to src/items/utils.ts diff --git a/src/ts/tsconfig.json b/src/tsconfig.json similarity index 100% rename from src/ts/tsconfig.json rename to src/tsconfig.json diff --git a/src/ts/types.ts b/src/types.ts similarity index 100% rename from src/ts/types.ts rename to src/types.ts diff --git a/src/ts/utils.ts b/src/utils.ts similarity index 100% rename from src/ts/utils.ts rename to src/utils.ts diff --git a/tests/collections.ts b/tests/collections.ts index a414856..2c7aa55 100644 --- a/tests/collections.ts +++ b/tests/collections.ts @@ -10,7 +10,7 @@ import { GET_COLLECTION, getCollectionByName, getCollectionResultsByName, -} from '../src/ts'; +} from '../src'; type Llama = Readonly<{ furLength: number; diff --git a/tests/index.ts b/tests/index.ts index b655447..7a3ec77 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -5,7 +5,7 @@ import { getCollectionByName, getItemByName, ItemStore, -} from '../src/ts'; +} from '../src'; type Llama = Readonly<{ furLength: number; diff --git a/tests/items.ts b/tests/items.ts index 014ed70..52e3a52 100644 --- a/tests/items.ts +++ b/tests/items.ts @@ -7,7 +7,7 @@ import { getItemByName, ItemStore, UPDATE_ITEM, -} from '../src/ts/'; +} from '../src'; type Llama = Readonly<{ furLength: number; diff --git a/tsconfig.dist.json b/tsconfig.dist.json index 11ced93..b1cddb1 100644 --- a/tsconfig.dist.json +++ b/tsconfig.dist.json @@ -1,13 +1,13 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "rootDir": "./src/ts/", + "rootDir": "./src/", "outDir": "./dist/", "sourceMap": true, "declaration": true, "listFiles": true }, "include": [ - "./src/ts/" + "./src/" ] } From e2bd0e2b8c0c219da7fa7dda47e5eb9f424f3b77 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Tue, 19 Mar 2019 17:32:35 +0000 Subject: [PATCH 18/24] Remove unused config --- src/tsconfig.json | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 src/tsconfig.json diff --git a/src/tsconfig.json b/src/tsconfig.json deleted file mode 100644 index b877b8b..0000000 --- a/src/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "declaration": true, - "sourceMap": true, - "listFiles": true, - "rootDir": "./", - "outDir": "../../dist/js/" - } -} From c864a611315c877de165e7198e0690d4eff95499 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Wed, 20 Mar 2019 10:36:46 +0000 Subject: [PATCH 19/24] Correct types --- src/collections/index.ts | 14 +++++++------- src/collections/types.ts | 37 +++++++++++++++---------------------- src/items/index.ts | 14 +++++++------- src/items/types.ts | 31 +++++++++---------------------- src/utils.ts | 8 ++++++++ 5 files changed, 46 insertions(+), 58 deletions(-) diff --git a/src/collections/index.ts b/src/collections/index.ts index adfca86..edb47b6 100644 --- a/src/collections/index.ts +++ b/src/collections/index.ts @@ -52,7 +52,7 @@ export function collectionsFunctor>( data: any, subgroup?: string, url?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { return request( ADD_TO_COLLECTION, url || overrideUrl || `${baseUrl}${type}/`, @@ -62,7 +62,7 @@ export function collectionsFunctor>( tag: `${type}`, metaData: { subgroup: buildSubgroup(overrideUrl, subgroup) }, } - ) as any; + ); } function clearCollectionAction( @@ -82,7 +82,7 @@ export function collectionsFunctor>( type: keyof T, id: string, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { const url = overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`; @@ -92,14 +92,14 @@ export function collectionsFunctor>( subgroup: buildSubgroup(overrideUrl, subgroup), itemId: id, }, - }) as any; + }); } function getAllCollectionAction( type: keyof T, opts?: CollectionOptionsNoPageSize, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { return getCollectionAction( type, { @@ -114,7 +114,7 @@ export function collectionsFunctor>( type: keyof T, options: CollectionOptions = {}, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { const url = overrideUrl || `${baseUrl}${type}/`; const metaData = { subgroup: buildSubgroup(overrideUrl, subgroup), @@ -129,7 +129,7 @@ export function collectionsFunctor>( return request(GET_COLLECTION, urlWithParams, 'GET', undefined, { tag: `${type}`, metaData, - }) as any; + }); } return { diff --git a/src/collections/types.ts b/src/collections/types.ts index c153b68..64a23a1 100644 --- a/src/collections/types.ts +++ b/src/collections/types.ts @@ -1,8 +1,12 @@ -import { AxiosResponse } from 'axios'; import { FluxStandardAction } from 'flux-standard-action'; import { AnyAction } from 'redux'; -import { ThunkAction } from 'redux-thunk'; -import { Dict, IdKeyed, IdKeyedMap, SubpathParams } from '../utils'; +import { + Dict, + IdKeyed, + IdKeyedMap, + SubpathParams, + ThunkResponse, +} from '../utils'; export type CollectionParamsNoPageSize = Readonly<{ shouldAppend: boolean; @@ -65,44 +69,33 @@ export interface CollectionActions> { data: any, subgroup?: string, url?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; clearCollection: (type: keyof T, subgroup?: string) => AnyAction; - deleteItem: ( - type: keyof T, - id: string, - subgroup?: string - ) => ThunkAction>, any, null>; + deleteItem: (type: keyof T, id: string, subgroup?: string) => ThunkResponse; getCollection: ( type: keyof T, options?: Partial, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; getAllCollection: ( type: keyof T, options?: Partial, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; } export interface CollectionAtSubpathActions { - addItem: ( - data: any, - subgroup?: string, - url?: string - ) => ThunkAction>, any, null>; + addItem: (data: any, subgroup?: string, url?: string) => ThunkResponse; clearCollection: (subgroup?: string) => AnyAction; - deleteItem: ( - id: string, - subgroup?: string - ) => ThunkAction>, any, null>; + deleteItem: (id: string, subgroup?: string) => ThunkResponse; getCollection: ( options?: Partial, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; getAllCollection: ( options?: Partial, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; } export interface CollectionsListInterface> { diff --git a/src/items/index.ts b/src/items/index.ts index 02d703b..7b00160 100644 --- a/src/items/index.ts +++ b/src/items/index.ts @@ -34,14 +34,14 @@ export function itemsFunctor>( itemId: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { return request(UPDATE_ITEM, url, method, data, { tag: `${itemType}`, metaData: { itemId, subgroup: buildSubgroup(overrideUrl, subgroup), }, - }) as any; + }); } function actionItemAction( @@ -50,7 +50,7 @@ export function itemsFunctor>( action: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { const url = overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`; @@ -71,7 +71,7 @@ export function itemsFunctor>( itemType: keyof T, itemId: string, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { const url = overrideUrl ? `${overrideUrl}${itemId}/` : `${baseUrl}${itemType}/${itemId}/`; @@ -81,7 +81,7 @@ export function itemsFunctor>( itemId, subgroup: buildSubgroup(overrideUrl, subgroup), }, - }) as any; + }); } function patchItemAction( @@ -89,7 +89,7 @@ export function itemsFunctor>( id: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { return _updateItem( type, overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`, @@ -105,7 +105,7 @@ export function itemsFunctor>( id: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkAction, any, null> { return _updateItem( type, overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`, diff --git a/src/items/types.ts b/src/items/types.ts index c3bdc8a..ff980d6 100644 --- a/src/items/types.ts +++ b/src/items/types.ts @@ -1,8 +1,6 @@ -import { AxiosResponse } from 'axios'; import { FluxStandardAction } from 'flux-standard-action'; import { AnyAction } from 'redux'; -import { ThunkAction } from 'redux-thunk'; -import { Dict, SubpathParams } from '../utils'; +import { Dict, SubpathParams, ThunkResponse } from '../utils'; export type ItemGroup = Dict; export type ItemStoreMutable = { [K in keyof T]: ItemGroup }; @@ -33,19 +31,19 @@ export interface ItemsInterface { itemType: keyof T, itemId: string, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; updateItem: ( type: keyof T, id: string, data: any, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; patchItem: ( type: keyof T, id: string, data: any, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; clearItem: (itemType: keyof T, subgroup?: string) => AnyAction; actionItem: ( type: keyof T, @@ -53,34 +51,23 @@ export interface ItemsInterface { action: string, data: any, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; }; itemAtSubpath: ( type: keyof T, params: SubpathParams ) => { actions: { - getItem: ( - itemId: string, - subgroup?: string - ) => ThunkAction>, any, null>; - updateItem: ( - id: string, - data: any, - subgroup?: string - ) => ThunkAction>, any, null>; - patchItem: ( - id: string, - data: any, - subgroup?: string - ) => ThunkAction>, any, null>; + getItem: (itemId: string, subgroup?: string) => ThunkResponse; + updateItem: (id: string, data: any, subgroup?: string) => ThunkResponse; + patchItem: (id: string, data: any, subgroup?: string) => ThunkResponse; clearItem: (subgroup?: string) => AnyAction; actionItem: ( id: string, action: string, data: any, subgroup?: string - ) => ThunkAction>, any, null>; + ) => ThunkResponse; }; getSubpathItem: ( store: ItemStore, diff --git a/src/utils.ts b/src/utils.ts index 4561e3e..de017e1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,13 @@ +import { AxiosResponse } from 'axios'; +import { ThunkAction } from 'redux-thunk'; + export type Dict = Readonly<{ [k: string]: T }>; export type RecordConstructor = (input: T) => U; +export type ThunkResponse = ThunkAction< + Promise | void>, + any, + null +>; export type TypeToRecordMapping = { [K in keyof T]: RecordConstructor From 93eab51db53773235e02d4d321e36e25cda11a85 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Wed, 20 Mar 2019 11:02:16 +0000 Subject: [PATCH 20/24] Correct exports, better type inference --- src/collections/reducers.ts | 13 ++++++++----- src/index.ts | 25 +++++-------------------- src/items/reducers.ts | 13 ++++++++----- src/types.ts | 2 +- 4 files changed, 22 insertions(+), 31 deletions(-) diff --git a/src/collections/reducers.ts b/src/collections/reducers.ts index 56378a2..e2fd061 100644 --- a/src/collections/reducers.ts +++ b/src/collections/reducers.ts @@ -16,6 +16,10 @@ import { } from './types'; import { getCollectionByName } from './utils'; +function isCollectionAction(action: any): action is CollectionResponseAction { + return isFSA(action) && !!action.meta; +} + function updateCollectionItemsFromResponse( collectionData: CollectionGroup, action: CollectionResponseAction, @@ -58,9 +62,8 @@ export function setCollectionFromResponseAction>( action: AnyAction, typeToRecordMapping: TypeToRecordMapping ): CollectionStore { - if (isFSA(action) && action.meta) { - const castAction = action as CollectionResponseAction; - const collectionType = castAction.meta.tag; + if (isCollectionAction(action)) { + const collectionType = action.meta.tag; if (collectionType in typeToRecordMapping) { const looseMapping: TypeToRecordMappingLoose = typeToRecordMapping as any; // We know it's indexable, as it's constrained elsewhere const stateLoose: CollectionStoreLoose = state as any; // We also know this is indexable @@ -82,7 +85,7 @@ export function addCollectionItem>( action: AnyAction, typeToRecordMapping: TypeToRecordMapping ): CollectionStore { - if (isFSA(action) && action.meta) { + if (isCollectionAction(action)) { const meta = action.meta as Dict; const collectionType = meta.tag; const subgroup = meta.subgroup || ''; @@ -119,7 +122,7 @@ export function deleteCollectionItem>( action: AnyAction, typeToRecordMapping: TypeToRecordMapping ): CollectionStore { - if (isFSA(action) && action.meta) { + if (isCollectionAction(action)) { const meta = action.meta as Dict; const collectionType = meta.tag; const subgroup = meta.subgroup; diff --git a/src/index.ts b/src/index.ts index c6f08ef..af54e2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,31 +1,16 @@ import { collectionsFunctor } from './collections'; import { itemsFunctor } from './items'; -import { CollectionOptions, CollectionsInterface } from './types'; +import { CollectionConfig, CollectionsInterface } from './types'; import { IdKeyedMap, TypeToRecordMapping } from './utils'; -export { - ADD_TO_COLLECTION, - CLEAR_COLLECTION, - DELETE_FROM_COLLECTION, - GET_COLLECTION, - getCollectionResultsByName, - CollectionStore, - getCollectionByName, - formatCollectionQueryParams, -} from './collections'; -export { - CLEAR_ITEM, - GET_ITEM, - getItemByName, - ItemStore, - UPDATE_ITEM, -} from './items'; -export { CollectionsInterface, CollectionOptions } from './types'; +export * from './collections'; +export * from './items'; +export * from './types'; export function Collections, U extends IdKeyedMap>( collectionToRecordMapping: TypeToRecordMapping, itemToRecordMapping: TypeToRecordMapping, - collectionOptions: CollectionOptions = {} + collectionOptions: CollectionConfig = {} ): CollectionsInterface { const baseUrl = collectionOptions.baseUrl || '/api/'; diff --git a/src/items/reducers.ts b/src/items/reducers.ts index 4b0bfc6..9e0123c 100644 --- a/src/items/reducers.ts +++ b/src/items/reducers.ts @@ -9,6 +9,10 @@ import { } from '../utils'; import { ItemResponseAction, ItemStore, ItemStoreLoose } from './types'; +function isItemAction(action: any): action is ItemResponseAction { + return isFSA(action) && !!action.meta; +} + export function clearItem>( state: ItemStore, action: AnyAction, @@ -36,17 +40,16 @@ export function setItemFromResponseAction>( action: AnyAction, typeToRecordMapping: TypeToRecordMapping ): ItemStore { - if (isFSA(action) && action.meta) { - const castAction = action as ItemResponseAction; - const itemType = castAction.meta.tag; - const subgroup = castAction.meta.subgroup || ''; + if (isItemAction(action)) { + const itemType = action.meta.tag; + const subgroup = action.meta.subgroup || ''; if (itemType in typeToRecordMapping) { const stateLoose: ItemStoreLoose = state as any; // We know this is indexable const mappingLoose: TypeToRecordMappingLoose = typeToRecordMapping as any; // We know this is indexable const recordBuilder = mappingLoose[itemType]; return _.extend({}, stateLoose, { [itemType]: _.extend({}, stateLoose[itemType], { - [subgroup]: recordBuilder(castAction.payload.data), + [subgroup]: recordBuilder(action.payload.data), }), }); } diff --git a/src/types.ts b/src/types.ts index 900648a..71614fe 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5,7 +5,7 @@ import { import { ItemReducerPlugin, ItemsInterface } from './items/types'; import { IdKeyedMap } from './utils'; -export type CollectionOptions, U> = Readonly< +export type CollectionConfig, U> = Readonly< Partial<{ baseUrl: string; collectionReducerPlugin: CollectionReducerPlugin; From a2666fff9415f93757e43f3b19cbd704681e6d26 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Wed, 20 Mar 2019 11:23:50 +0000 Subject: [PATCH 21/24] Tidyup --- .travis.yml | 9 --------- src/items/index.ts | 13 ++++++------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7947fcf..c7839d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,12 +8,3 @@ install: script: - npm test - npm run dist - -deploy: - provider: npm - email: npm@dabapps.com - on: - tags: true - api_key: - secure: NiEYS2mfHM0O7HxZ+tLFe9YCjkaZB2cy2tHLGqGnWUdNM4CLRugbAreYRgewylbWoqwm3ge5G2PbDKpf19t6aB/RSDtjm4OcSfPZF2MM/s0K2Cnoh62TRbEnZHmaDF6v73GI1H6sxp3EQvHpGt3JyPblNelBkW1MbnlFPAmxiivRIBjEDPyCtwUE3SnnoTJM8ojmFOZL5sidXWH1S4iJslO3i4Y8LUISKOqr9etII9HuaxrIuf0H5rL8uWBnhw9A4y+dCRt6yBkfm4jTPg0s2T1oPQYLsu9OV2vmbmctu3D3qF2RG3k2m2NeWpIdicaEsLl2W9yBdXy1NRfNst85s40Gr5VW3DeHhC34In801rYHSSXcs/bMwXJ+pIFyAg/Q1BaJgbcLyXJghQznqXzWHyErmbi/0nnkVkny3QVajAZBialdNt+6Qh2bI7cDERkEA+ViOaRYoO48Xioxv8GqWPmdm1x/bsBU6CZlUgCd/7+Qdro9TFjAg/qPODpw8csORGWpFGDfk5z0r3Ki6XX6/ZunnMXZ88B91Hw+d29YlxuXOIljVZIWri1aVXymIa0OM6o+6lznIpJEBa73UiLdnafoY8ytxN0iWeQAET56WwfZepqgO2L+sRNiAWmnKOikJ3EmS7eGIXTgZ6X0pynLvLBDK/Wm2NCR1UiGKkzAiwo= - skip_cleanup: true diff --git a/src/items/index.ts b/src/items/index.ts index 7b00160..8255ff9 100644 --- a/src/items/index.ts +++ b/src/items/index.ts @@ -5,15 +5,14 @@ export * from './utils'; import { request, UrlMethod } from '@dabapps/redux-requests'; -import { AxiosResponse } from 'axios'; import * as pathToRegexp from 'path-to-regexp'; import { AnyAction } from 'redux'; -import { ThunkAction } from 'redux-thunk'; import { buildSubgroup, Dict, IdKeyedMap, SubpathParams, + ThunkResponse, TypeToRecordMapping, } from '../utils'; import { CLEAR_ITEM, GET_ITEM, UPDATE_ITEM } from './actions'; @@ -34,7 +33,7 @@ export function itemsFunctor>( itemId: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { return request(UPDATE_ITEM, url, method, data, { tag: `${itemType}`, metaData: { @@ -50,7 +49,7 @@ export function itemsFunctor>( action: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { const url = overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`; @@ -71,7 +70,7 @@ export function itemsFunctor>( itemType: keyof T, itemId: string, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { const url = overrideUrl ? `${overrideUrl}${itemId}/` : `${baseUrl}${itemType}/${itemId}/`; @@ -89,7 +88,7 @@ export function itemsFunctor>( id: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { return _updateItem( type, overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`, @@ -105,7 +104,7 @@ export function itemsFunctor>( id: string, data: any, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { return _updateItem( type, overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`, From 48862264ccfb7d1048449629770547621c66c0b7 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Wed, 20 Mar 2019 11:36:30 +0000 Subject: [PATCH 22/24] Remove unnecessary casts --- src/collections/reducers.ts | 3 +-- src/items/index.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/collections/reducers.ts b/src/collections/reducers.ts index e2fd061..fffb4df 100644 --- a/src/collections/reducers.ts +++ b/src/collections/reducers.ts @@ -135,8 +135,7 @@ export function deleteCollectionItem>( subgroup ); const results = existingCollection.results.filter( - // FIXME: IdKeyedMap should make this cast unneccesary - item => (item as any).id !== itemId + item => item.id !== itemId ); const updatedCollection = { ...existingCollection, diff --git a/src/items/index.ts b/src/items/index.ts index 8255ff9..ac80919 100644 --- a/src/items/index.ts +++ b/src/items/index.ts @@ -145,8 +145,7 @@ export function itemsFunctor>( const subgroup = (action.meta as Dict).subgroup || ''; if (itemType in typeToRecordMapping) { const item = getItemByName(state, itemType as keyof T, subgroup); - // FIXME: IdKeyedMap should make this cast unneccesary - if (!item || (item as any).id === action.payload.data.id) { + if (!item || item.id === action.payload.data.id) { newState = setItemFromResponseAction( state, action, From 0d083841afd88771ec97effd060f0d4be510ff9a Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Wed, 20 Mar 2019 11:45:21 +0000 Subject: [PATCH 23/24] Remove shedloads of unneccesary casts --- src/collections/reducers.ts | 12 ++++++------ src/collections/utils.ts | 4 ++-- src/items/reducers.ts | 6 +++--- src/items/utils.ts | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/collections/reducers.ts b/src/collections/reducers.ts index fffb4df..3164049 100644 --- a/src/collections/reducers.ts +++ b/src/collections/reducers.ts @@ -65,8 +65,8 @@ export function setCollectionFromResponseAction>( if (isCollectionAction(action)) { const collectionType = action.meta.tag; if (collectionType in typeToRecordMapping) { - const looseMapping: TypeToRecordMappingLoose = typeToRecordMapping as any; // We know it's indexable, as it's constrained elsewhere - const stateLoose: CollectionStoreLoose = state as any; // We also know this is indexable + const looseMapping: TypeToRecordMappingLoose = typeToRecordMapping; + const stateLoose: CollectionStoreLoose = state; const recordBuilder = looseMapping[collectionType]; return _.extend({}, stateLoose, { [collectionType]: updateCollectionItemsFromResponse( @@ -91,8 +91,8 @@ export function addCollectionItem>( const subgroup = meta.subgroup || ''; if (collectionType in typeToRecordMapping) { - const looseMapping: TypeToRecordMappingLoose = typeToRecordMapping as any; // We know it's indexable, as it's constrained elsewhere - const stateLoose: CollectionStoreLoose = state as any; // We also know this is indexable + const looseMapping: TypeToRecordMappingLoose = typeToRecordMapping; + const stateLoose: CollectionStoreLoose = state; const recordBuilder = looseMapping[collectionType]; const existingCollection = getCollectionByName( state, @@ -142,7 +142,7 @@ export function deleteCollectionItem>( count: results.length, results, }; - const stateLoose: CollectionStoreLoose = state as any; // We know this is indexable + const stateLoose: CollectionStoreLoose = state; return _.extend({}, stateLoose, { [collectionType]: _.extend({}, stateLoose[collectionType], { [subgroup]: updatedCollection, @@ -169,7 +169,7 @@ export function clearCollection>( count: 0, results: [], }; - const stateLoose: CollectionStoreLoose = state as any; // We know this is indexable + const stateLoose: CollectionStoreLoose = state; return _.extend({}, stateLoose, { [collectionType]: _.extend({}, stateLoose[collectionType], { [subgroup]: updatedCollection, diff --git a/src/collections/utils.ts b/src/collections/utils.ts index 6dbc910..f82159e 100644 --- a/src/collections/utils.ts +++ b/src/collections/utils.ts @@ -36,7 +36,7 @@ export function buildCollectionsStore>( ): CollectionStore { const store = {} as CollectionStoreMutable; for (const key of Object.keys(mapping)) { - (store as any)[key] = {} as any; + store[key as keyof T] = {}; } return store; } @@ -46,7 +46,7 @@ export function getCollectionByName>( key: keyof T, subgroup: string = '' ): Collection { - const collection = (collectionStore[key] as any)[subgroup]; + const collection = collectionStore[key][subgroup]; return ( collection || { page: 1, diff --git a/src/items/reducers.ts b/src/items/reducers.ts index 9e0123c..906cc64 100644 --- a/src/items/reducers.ts +++ b/src/items/reducers.ts @@ -24,7 +24,7 @@ export function clearItem>( const subgroup = payload.subgroup || ''; if (itemType in typeToRecordMapping) { - const stateLoose: ItemStoreLoose = state as any; // We know this is indexable + const stateLoose: ItemStoreLoose = state; return _.extend({}, stateLoose, { [itemType]: _.extend({}, stateLoose[itemType], { [subgroup]: undefined, @@ -44,8 +44,8 @@ export function setItemFromResponseAction>( const itemType = action.meta.tag; const subgroup = action.meta.subgroup || ''; if (itemType in typeToRecordMapping) { - const stateLoose: ItemStoreLoose = state as any; // We know this is indexable - const mappingLoose: TypeToRecordMappingLoose = typeToRecordMapping as any; // We know this is indexable + const stateLoose: ItemStoreLoose = state; + const mappingLoose: TypeToRecordMappingLoose = typeToRecordMapping; const recordBuilder = mappingLoose[itemType]; return _.extend({}, stateLoose, { [itemType]: _.extend({}, stateLoose[itemType], { diff --git a/src/items/utils.ts b/src/items/utils.ts index 979d732..c5a8c38 100644 --- a/src/items/utils.ts +++ b/src/items/utils.ts @@ -6,7 +6,7 @@ export function buildItemStore>( ): ItemStore { const store = {} as ItemStoreMutable; for (const key of Object.keys(mapping)) { - (store as any)[key] = {}; // We know this is indexable + store[key as keyof T] = {}; } return store; } @@ -16,5 +16,5 @@ export function getItemByName>( key: keyof T, subgroup: string = '' ): T[keyof T] | undefined { - return (itemStore[key] as any)[subgroup]; + return itemStore[key as keyof T][subgroup]; } From 35f252080e64de7fd2ec1f50666b44a29c39bf37 Mon Sep 17 00:00:00 2001 From: Tony Aldridge Date: Wed, 20 Mar 2019 11:51:25 +0000 Subject: [PATCH 24/24] More type aliasing --- src/collections/index.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/collections/index.ts b/src/collections/index.ts index edb47b6..852bf00 100644 --- a/src/collections/index.ts +++ b/src/collections/index.ts @@ -4,14 +4,13 @@ export * from './types'; export * from './utils'; import { request } from '@dabapps/redux-requests'; -import { AxiosResponse } from 'axios'; import * as pathToRegexp from 'path-to-regexp'; import { AnyAction } from 'redux'; -import { ThunkAction } from 'redux-thunk'; import { buildSubgroup, IdKeyedMap, SubpathParams, + ThunkResponse, TypeToRecordMapping, } from '../utils'; import { @@ -52,7 +51,7 @@ export function collectionsFunctor>( data: any, subgroup?: string, url?: string - ): ThunkAction, any, null> { + ): ThunkResponse { return request( ADD_TO_COLLECTION, url || overrideUrl || `${baseUrl}${type}/`, @@ -82,7 +81,7 @@ export function collectionsFunctor>( type: keyof T, id: string, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { const url = overrideUrl ? `${overrideUrl}${id}/` : `${baseUrl}${type}/${id}/`; @@ -99,7 +98,7 @@ export function collectionsFunctor>( type: keyof T, opts?: CollectionOptionsNoPageSize, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { return getCollectionAction( type, { @@ -114,7 +113,7 @@ export function collectionsFunctor>( type: keyof T, options: CollectionOptions = {}, subgroup?: string - ): ThunkAction, any, null> { + ): ThunkResponse { const url = overrideUrl || `${baseUrl}${type}/`; const metaData = { subgroup: buildSubgroup(overrideUrl, subgroup),