From dd72ec0c0b4a6d7443a56a3071c376d8ea496efa Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Sun, 27 Oct 2019 21:57:23 +0100 Subject: [PATCH 001/136] chore: Set up repository Closes #2. --- .eslintrc.json | 100 + .gitignore | 124 + .nycrc.json | 4 + .prettierignore | 3 + .prettierrc.json | 6 + .travis.yml | 13 + package-lock.json | 4894 ++++++++++++++++++++++++++++++++ package.json | 76 + scripts/check-release-tag.mjs | 33 + scripts/sync-sonar-version.mjs | 23 + src/main.ts | 0 test/specs/empty.test.ts | 0 tsconfig.json | 18 + tsconfig.test.json | 18 + 14 files changed, 5312 insertions(+) create mode 100644 .eslintrc.json create mode 100644 .gitignore create mode 100644 .nycrc.json create mode 100644 .prettierignore create mode 100644 .prettierrc.json create mode 100644 .travis.yml create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 scripts/check-release-tag.mjs create mode 100644 scripts/sync-sonar-version.mjs create mode 100644 src/main.ts create mode 100644 test/specs/empty.test.ts create mode 100644 tsconfig.json create mode 100644 tsconfig.test.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..9df9ebe --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,100 @@ +{ + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "prettier/@typescript-eslint", + "plugin:import/errors", + "plugin:import/warnings", + "plugin:import/typescript", + "plugin:promise/recommended", + "plugin:prettier/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module", + "project": "./tsconfig.json" + }, + "plugins": ["@typescript-eslint/eslint-plugin", "import", "promise"], + "rules": { + "no-console": ["error"], + "no-extra-parens": ["error"], + "no-import-assign": ["error"], + "no-template-curly-in-string": ["error"], + "curly": ["error", "all"], + "eqeqeq": ["error"], + "max-classes-per-file": ["error", 1], + "no-alert": ["error"], + "no-caller": ["error"], + "no-div-regex": ["error"], + "no-else-return": ["error", { "allowElseIf": false }], + "no-eq-null": ["error"], + "no-eval": ["error"], + "no-extend-native": ["error"], + "no-extra-bind": ["error"], + "no-extra-label": ["error"], + "no-floating-decimal": ["error"], + "no-implicit-coercion": ["error"], + "no-implicit-globals": ["error"], + "no-implied-eval": ["error"], + "no-invalid-this": ["error"], + "no-iterator": ["error"], + "no-labels": ["error"], + "no-lone-blocks": ["error"], + "no-loop-func": ["error"], + "no-multi-spaces": ["error"], + "no-multi-str": ["error"], + "no-new": ["error"], + "no-new-func": ["error"], + "no-new-wrappers": ["error"], + "no-octal-escape": ["error"], + "no-param-reassign": ["error"], + "no-proto": ["error"], + "no-return-assign": ["error", "always"], + "no-return-await": ["error"], + "no-script-url": ["error"], + "no-self-compare": ["error"], + "no-sequences": ["error"], + "no-throw-literal": ["error"], + "no-unmodified-loop-condition": ["error"], + "no-useless-call": ["error"], + "no-useless-concat": ["error"], + "no-useless-return": ["error"], + "prefer-named-capture-group": ["error"], + "prefer-promise-reject-errors": ["error"], + "prefer-regex-literals": ["error"], + "radix": ["error", "always"], + "require-unicode-regexp": ["error"], + "wrap-iife": ["error", "inside"], + "yoda": ["error", "never"], + "array-bracket-spacing": ["error", "never"], + "brace-style": ["error"], + "camelcase": ["error"], + "func-call-spacing": ["error"], + "no-lonely-if": ["error"], + "no-nested-ternary": ["error"], + "no-new-object": ["error"], + "no-trailing-spaces": ["error"], + "semi-spacing": ["error", { "before": false, "after": true }], + "promise/prefer-await-to-then": ["error"], + "promise/prefer-await-to-callbacks": ["error"], + "import/first": ["error"], + "import/exports-last": ["error"], + "import/extensions": ["error"], + "import/newline-after-import": ["error"], + "import/no-unassigned-import": ["error"], + "import/no-named-default": ["error"], + "import/no-default-export": ["error"], + "@typescript-eslint/array-type": ["error", { "default": "array-simple" }], + "@typescript-eslint/consistent-type-definitions": ["error", "interface"], + "@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }], + "@typescript-eslint/prefer-for-of": ["error"], + "@typescript-eslint/prefer-readonly": ["error"], + "@typescript-eslint/promise-function-async": ["error"], + "@typescript-eslint/restrict-plus-operands": ["error"], + "@typescript-eslint/strict-boolean-expressions": ["error"], + "@typescript-eslint/unified-signatures": ["error"] + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1879c54 --- /dev/null +++ b/.gitignore @@ -0,0 +1,124 @@ +# Created by https://www.gitignore.io/api/node,macos,visualstudiocode +# Edit at https://www.gitignore.io/?templates=node,macos,visualstudiocode + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# FuseBox cache +.fusebox/ + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history + +# End of https://www.gitignore.io/api/node,macos,visualstudiocode + +### Built files ### +dist/ diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 0000000..079e2e9 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,4 @@ +{ + "extension": [".ts"], + "include": ["src/**/*.ts"] +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..82f6022 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +package.json +package-lock.json +tsconfig.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..6a667b9 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all", + "tabWidth": 4 +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6425420 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +dist: trusty + +language: node_js + +node_js: + - node + - lts/* + +install: npm ci + +script: + - commitlint-travis + - npm run build-and-test-everything diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..26f6701 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4894 @@ +{ + "name": "@diplomatiq/resily", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz", + "integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==", + "dev": true, + "requires": { + "@babel/types": "^7.6.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.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 + } + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz", + "integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A==", + "dev": true + }, + "@babel/template": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", + "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.6.0", + "@babel/types": "^7.6.0" + } + }, + "@babel/traverse": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz", + "integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.6.3", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.6.3", + "@babel/types": "^7.6.3", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", + "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@commitlint/cli": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-8.2.0.tgz", + "integrity": "sha512-8fJ5pmytc38yw2QWbTTJmXLfSiWPwMkHH4govo9zJ/+ERPBF2jvlxD/dQvk24ezcizjKc6LFka2edYC4OQ+Dgw==", + "dev": true, + "requires": { + "@commitlint/format": "^8.2.0", + "@commitlint/lint": "^8.2.0", + "@commitlint/load": "^8.2.0", + "@commitlint/read": "^8.2.0", + "babel-polyfill": "6.26.0", + "chalk": "2.4.2", + "get-stdin": "7.0.0", + "lodash": "4.17.14", + "meow": "5.0.0", + "resolve-from": "5.0.0", + "resolve-global": "1.0.0" + } + }, + "@commitlint/ensure": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-8.2.0.tgz", + "integrity": "sha512-XZZih/kcRrqK7lEORbSYCfqQw6byfsFbLygRGVdJMlCPGu9E2MjpwCtoj5z7y/lKfUB3MJaBhzn2muJqS1gC6A==", + "dev": true, + "requires": { + "lodash": "4.17.14" + } + }, + "@commitlint/execute-rule": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-8.2.0.tgz", + "integrity": "sha512-9MBRthHaulbWTa8ReG2Oii2qc117NuvzhZdnkuKuYLhker7sUXGFcVhLanuWUKGyfyI2o9zVr/NHsNbCCsTzAA==", + "dev": true + }, + "@commitlint/format": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-8.2.0.tgz", + "integrity": "sha512-sA77agkDEMsEMrlGhrLtAg8vRexkOofEEv/CZX+4xlANyAz2kNwJvMg33lcL65CBhqKEnRRJRxfZ1ZqcujdKcQ==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "@commitlint/is-ignored": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-8.2.0.tgz", + "integrity": "sha512-ADaGnKfbfV6KD1pETp0Qf7XAyc75xTy3WJlbvPbwZ4oPdBMsXF0oXEEGMis6qABfU2IXan5/KAJgAFX3vdd0jA==", + "dev": true, + "requires": { + "@types/semver": "^6.0.1", + "semver": "6.2.0" + } + }, + "@commitlint/lint": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-8.2.0.tgz", + "integrity": "sha512-ch9JN8aR37ufdjoWv50jLfvFz9rWMgLW5HEkMGLsM/51gjekmQYS5NJg8S2+6F5+jmralAO7VkUMI6FukXKX0A==", + "dev": true, + "requires": { + "@commitlint/is-ignored": "^8.2.0", + "@commitlint/parse": "^8.2.0", + "@commitlint/rules": "^8.2.0", + "babel-runtime": "^6.23.0", + "lodash": "4.17.14" + } + }, + "@commitlint/load": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-8.2.0.tgz", + "integrity": "sha512-EV6PfAY/p83QynNd1llHxJiNxKmp43g8+7dZbyfHFbsGOdokrCnoelAVZ+WGgktXwLN/uXyfkcIAxwac015UYw==", + "dev": true, + "requires": { + "@commitlint/execute-rule": "^8.2.0", + "@commitlint/resolve-extends": "^8.2.0", + "babel-runtime": "^6.23.0", + "chalk": "2.4.2", + "cosmiconfig": "^5.2.0", + "lodash": "4.17.14", + "resolve-from": "^5.0.0" + } + }, + "@commitlint/message": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-8.2.0.tgz", + "integrity": "sha512-LNsSwDLIFgE3nb/Sb1PIluYNy4Q8igdf4tpJCdv5JJDf7CZCZt3ZTglj0YutZZorpRRuHJsVIB2+dI4bVH3bFw==", + "dev": true + }, + "@commitlint/parse": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-8.2.0.tgz", + "integrity": "sha512-vzouqroTXG6QXApkrps0gbeSYW6w5drpUk7QAeZIcaCSPsQXDM8eqqt98ZzlzLJHo5oPNXPX1AAVSTrssvHemA==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^1.3.3", + "conventional-commits-parser": "^2.1.0", + "lodash": "^4.17.11" + } + }, + "@commitlint/read": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-8.2.0.tgz", + "integrity": "sha512-1tBai1VuSQmsOTsvJr3Fi/GZqX3zdxRqYe/yN4i3cLA5S2Y4QGJ5I3l6nGZlKgm/sSelTCVKHltrfWU8s5H7SA==", + "dev": true, + "requires": { + "@commitlint/top-level": "^8.2.0", + "@marionebl/sander": "^0.6.0", + "babel-runtime": "^6.23.0", + "git-raw-commits": "^1.3.0" + } + }, + "@commitlint/resolve-extends": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-8.2.0.tgz", + "integrity": "sha512-cwi0HUsDcD502HBP8huXfTkVuWmeo1Fiz3GKxNwMBBsJV4+bKa7QrtxbNpXhVuarX7QjWfNTvmW6KmFS7YK9uw==", + "dev": true, + "requires": { + "@types/node": "^12.0.2", + "import-fresh": "^3.0.0", + "lodash": "4.17.14", + "resolve-from": "^5.0.0", + "resolve-global": "^1.0.0" + } + }, + "@commitlint/rules": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-8.2.0.tgz", + "integrity": "sha512-FlqSBBP2Gxt5Ibw+bxdYpzqYR6HI8NIBpaTBhAjSEAduQtdWFMOhF0zsgkwH7lHN7opaLcnY2fXxAhbzTmJQQA==", + "dev": true, + "requires": { + "@commitlint/ensure": "^8.2.0", + "@commitlint/message": "^8.2.0", + "@commitlint/to-lines": "^8.2.0", + "babel-runtime": "^6.23.0" + } + }, + "@commitlint/to-lines": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-8.2.0.tgz", + "integrity": "sha512-LXTYG3sMenlN5qwyTZ6czOULVcx46uMy+MEVqpvCgptqr/MZcV/C2J+S2o1DGwj1gOEFMpqrZaE3/1R2Q+N8ng==", + "dev": true + }, + "@commitlint/top-level": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-8.2.0.tgz", + "integrity": "sha512-Yaw4KmYNy31/HhRUuZ+fupFcDalnfpdu4JGBgGAqS9aBHdMSSWdWqtAaDaxdtWjTZeN3O0sA2gOhXwvKwiDwvw==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "@commitlint/travis-cli": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@commitlint/travis-cli/-/travis-cli-8.2.0.tgz", + "integrity": "sha512-SXZh9qpAWwvzW2KlG5HOxnci1KMkUZOqr2wKMzgXuV+BS5jhkZaPsKvrrs85FZtUWdJuqFNHTVXKoetgWgMXpQ==", + "dev": true, + "requires": { + "@commitlint/cli": "^8.2.0", + "babel-runtime": "6.26.0", + "execa": "0.11.0" + } + }, + "@marionebl/sander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@marionebl/sander/-/sander-0.6.1.tgz", + "integrity": "sha1-GViWWHTyS8Ub5Ih1/rUNZC/EH3s=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.3", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.2" + } + }, + "@sinonjs/commons": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.6.0.tgz", + "integrity": "sha512-w4/WHG7C4WWFyE5geCieFJF6MZkbW4VAriol5KlmQXpAQdxvV0p26sqNZOW6Qyw6Y0l9K4g+cHvvczR2sEEpqg==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/formatio": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", + "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@types/chai": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.4.tgz", + "integrity": "sha512-7qvf9F9tMTzo0akeswHPGqgUx/gIaJqrOEET/FCD8CFRkSUHlygQiM5yB6OvjrtdxBVLSyw7COJubsFYs0683g==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", + "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==", + "dev": true + }, + "@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", + "dev": true + }, + "@types/node": { + "version": "12.11.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.11.7.tgz", + "integrity": "sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-1OzrNb4RuAzIT7wHSsgZRlMBlNsJl+do6UblR7JMW4oB7bbR+uBEYtUh7gEc/jM84GGilh68lSOokyM/zNUlBA==", + "dev": true + }, + "@types/sinon": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.0.tgz", + "integrity": "sha512-NyzhuSBy97B/zE58cDw4NyGvByQbAHNP9069KVSgnXt/sc0T6MFRh0InKAeBVHJWdSXG1S3+PxgVIgKo9mTHbw==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.5.0.tgz", + "integrity": "sha512-ddrJZxp5ns1Lh5ofZQYk3P8RyvKfyz/VcRR4ZiJLHO/ljnQAO8YvTfj268+WJOOadn99mvDiqJA65+HAKoeSPA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.5.0", + "eslint-utils": "^1.4.2", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "tsutils": "^3.17.1" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.5.0.tgz", + "integrity": "sha512-UgcQGE0GKJVChyRuN1CWqDW8Pnu7+mVst0aWrhiyuUD1J9c+h8woBdT4XddCvhcXDodTDVIfE3DzGHVjp7tUeQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.5.0", + "eslint-scope": "^5.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.5.0.tgz", + "integrity": "sha512-9UBMiAwIDWSl79UyogaBdj3hidzv6exjKUx60OuZuFnJf56tq/UMpdPcX09YmGqE8f4AnAueYtBxV8IcAT3jdQ==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.5.0", + "@typescript-eslint/typescript-estree": "2.5.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.5.0.tgz", + "integrity": "sha512-AXURyF8NcA3IsnbjNX1v9qbwa0dDoY9YPcKYR2utvMHoUcu3636zrz0gRWtVAyxbPCkhyKuGg6WZIyi2Fc79CA==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "glob": "^7.1.4", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "dev": true + }, + "add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", + "dev": true + }, + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-escapes": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", + "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", + "dev": true, + "requires": { + "type-fest": "^0.5.2" + } + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" + } + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "arg": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", + "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "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 + }, + "caching-transform": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", + "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "dev": true, + "requires": { + "hasha": "^3.0.0", + "make-dir": "^2.0.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.4.2" + } + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + } + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "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" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "conventional-changelog": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.12.tgz", + "integrity": "sha512-zyGKwii8Z5zOq1nGFm5jn9Ou1jQ6UBoRT0+nqBIU8fEzh64+AcVxrY97tVuK77Ati0xwpBiFHpDXAW7pkq1jEw==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^5.0.5", + "conventional-changelog-atom": "^2.0.3", + "conventional-changelog-codemirror": "^2.0.3", + "conventional-changelog-conventionalcommits": "^4.2.1", + "conventional-changelog-core": "^4.0.2", + "conventional-changelog-ember": "^2.0.4", + "conventional-changelog-eslint": "^3.0.4", + "conventional-changelog-express": "^2.0.1", + "conventional-changelog-jquery": "^3.0.6", + "conventional-changelog-jshint": "^2.0.3", + "conventional-changelog-preset-loader": "^2.2.0" + }, + "dependencies": { + "conventional-changelog-angular": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.5.tgz", + "integrity": "sha512-RrkdWnL/TVyWV1ayWmSsrWorsTDqjL/VwG5ZSEneBQrd65ONcfeA1cW7FLtNweQyMiKOyriCMTKRSlk18DjTrw==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + } + } + } + }, + "conventional-changelog-angular": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", + "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + } + }, + "conventional-changelog-atom": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-2.0.3.tgz", + "integrity": "sha512-szZe2ut97qNO6vCCMkm1I/tWu6ol4Rr8a9Lx0y/VlpDnpY0PNp+oGpFgU55lplhx+I3Lro9Iv4/gRj0knfgjzg==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-cli": { + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.25.tgz", + "integrity": "sha512-b0zNygHrFI4HjNmgPzDLSqoltIwo3pIfilWZFNH/1w6QIZoZHeA4SxojRgih9aCc0Eeg1RH7lXIPaRgHa9cv7A==", + "dev": true, + "requires": { + "add-stream": "^1.0.0", + "conventional-changelog": "^3.1.12", + "lodash": "^4.14.14", + "meow": "^4.0.0", + "tempfile": "^3.0.0" + }, + "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + } + } + }, + "conventional-changelog-codemirror": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.3.tgz", + "integrity": "sha512-t2afackdgFV2yBdHhWPqrKbpaQeVnz2hSJKdWqjasPo5EpIB6TBL0er3cOP1mnGQmuzk9JSvimNSuqjWGDtU5Q==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-conventionalcommits": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.1.tgz", + "integrity": "sha512-vC02KucnkNNap+foDKFm7BVUSDAXktXrUJqGszUuYnt6T0J2azsbYz/w9TDc3VsrW2v6JOtiQWVcgZnporHr4Q==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "lodash": "^4.2.1", + "q": "^1.5.1" + } + }, + "conventional-changelog-core": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.0.2.tgz", + "integrity": "sha512-vQh7J+emZlcIA5alvI2xGikID2/iYKyk39dHmHEyU7/xvB9L9kq+3BzqbCXVstu7SD7isDfem27m/Qzu7R0BRA==", + "dev": true, + "requires": { + "conventional-changelog-writer": "^4.0.9", + "conventional-commits-parser": "^3.0.5", + "dateformat": "^3.0.0", + "get-pkg-repo": "^1.0.0", + "git-raw-commits": "2.0.0", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^3.0.0", + "lodash": "^4.2.1", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0", + "through2": "^3.0.0" + }, + "dependencies": { + "conventional-commits-parser": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.5.tgz", + "integrity": "sha512-qVz9+5JwdJzsbt7JbJ6P7NOXBGt8CyLFJYSjKAuPSgO+5UGfcsbk9EMR+lI8Unlvx6qwIc2YDJlrGIfay2ehNA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^2.0.0", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^3.0.0", + "trim-off-newlines": "^1.0.0" + } + }, + "git-raw-commits": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz", + "integrity": "sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==", + "dev": true, + "requires": { + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "is-text-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", + "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", + "dev": true, + "requires": { + "text-extensions": "^2.0.0" + } + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "text-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.0.0.tgz", + "integrity": "sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ==", + "dev": true + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, + "conventional-changelog-ember": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.4.tgz", + "integrity": "sha512-q1u73sO9uCnxN4TSw8xu6MRU8Y1h9kpwtcdJuNRwu/LSKI1IE/iuNSH5eQ6aLlQ3HTyrIpTfUuVybW4W0F17rA==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-eslint": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.4.tgz", + "integrity": "sha512-CPwTUENzhLGl3auunrJxiIEWncAGaby7gOFCdj2gslIuOFJ0KPJVOUhRz4Da/I53sdo/7UncUJkiLg94jEsjxg==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-express": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.1.tgz", + "integrity": "sha512-G6uCuCaQhLxdb4eEfAIHpcfcJ2+ao3hJkbLrw/jSK/eROeNfnxCJasaWdDAfFkxsbpzvQT4W01iSynU3OoPLIw==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-jquery": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.6.tgz", + "integrity": "sha512-gHAABCXUNA/HjnZEm+vxAfFPJkgtrZvCDIlCKfdPVXtCIo/Q0lN5VKpx8aR5p8KdVRQFF3OuTlvv5kv6iPuRqA==", + "dev": true, + "requires": { + "q": "^1.5.1" + } + }, + "conventional-changelog-jshint": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.3.tgz", + "integrity": "sha512-Pc2PnMPcez634ckzr4EOWviwRSpZcURaK7bjyD9oK6N5fsC/a+3G7LW5m/JpcHPhA9ZxsfIbm7uqZ3ZDGsQ/sw==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + } + }, + "conventional-changelog-preset-loader": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.2.0.tgz", + "integrity": "sha512-zXB+5vF7D5Y3Cb/rJfSyCCvFphCVmF8mFqOdncX3BmjZwAtGAPfYrBcT225udilCKvBbHgyzgxqz2GWDB5xShQ==", + "dev": true + }, + "conventional-changelog-writer": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.9.tgz", + "integrity": "sha512-2Y3QfiAM37WvDMjkVNaRtZgxVzWKj73HE61YQ/95T53yle+CRwTVSl6Gbv/lWVKXeZcM5af9n9TDVf0k7Xh+cw==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "conventional-commits-filter": "^2.0.2", + "dateformat": "^3.0.0", + "handlebars": "^4.4.0", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^3.0.0" + }, + "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, + "conventional-commits-filter": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz", + "integrity": "sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ==", + "dev": true, + "requires": { + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" + } + }, + "conventional-commits-parser": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", + "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.0", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0", + "trim-off-newlines": "^1.0.0" + }, + "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + } + } + }, + "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" + } + }, + "core-js": { + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", + "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "dependencies": { + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, + "cp-file": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", + "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "make-dir": "^2.0.0", + "nested-error-stacks": "^2.0.0", + "pify": "^4.0.1", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "cross-env": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", + "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.0.tgz", + "integrity": "sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.1.tgz", + "integrity": "sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "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=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", + "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.0", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" + } + }, + "es-to-primitive": { + "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.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.6.0.tgz", + "integrity": "sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-config-prettier": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.5.0.tgz", + "integrity": "sha512-cjXp8SbO9VFGW/Z7mbTydqS9to8Z58E5aYhj3e1+Hx7lS9s6gL5ILKNpCqZAFOVYRcSkWPFYljHrEh8QFEK5EQ==", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" + }, + "dependencies": { + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + } + } + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.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" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^2.0.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" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.4.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.0", + "read-pkg-up": "^2.0.0", + "resolve": "^1.11.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" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.1.tgz", + "integrity": "sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-promise": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", + "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", + "dev": true + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", + "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "dev": true, + "requires": { + "acorn": "^7.1.0", + "acorn-jsx": "^5.1.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "execa": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.11.0.tgz", + "integrity": "sha512-k5AR22vCt1DcfeiRixW46U5tMLtBg44ssdJM9PiXw3D8Bn5qyxFCSnKY/eR22y+ctFDGPqafpaXg2G4Emyua4A==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "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.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true + }, + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "meow": "^3.3.0", + "normalize-package-data": "^2.3.0", + "parse-github-repo-url": "^1.3.0", + "through2": "^2.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "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" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "get-stdin": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", + "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "git-raw-commits": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", + "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", + "dev": true, + "requires": { + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + } + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "dev": true, + "requires": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "git-semver-tags": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-3.0.0.tgz", + "integrity": "sha512-T4C/gJ9k2Bnxz+PubtcyiMtUUKrC+Nh9Q4zaECcnmVMwJgPhrNyP/Rf+YpdRqsJbCV/+kYrCH24Xg+IeAmbOPg==", + "dev": true, + "requires": { + "meow": "^4.0.0", + "semver": "^6.0.0" + }, + "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + } + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "dev": true, + "requires": { + "ini": "^1.3.2" + } + }, + "glob": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz", + "integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==", + "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" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "^1.3.4" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "handlebars": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.5.tgz", + "integrity": "sha512-0Ce31oWVB7YidkaTq33ZxEbN+UDxMMgThvCe8ptgQViymL5DPis9uLdTA13MiRPhgvqyxIegugrP97iK3JeBHg==", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "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 + }, + "hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "husky": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/husky/-/husky-3.0.9.tgz", + "integrity": "sha512-Yolhupm7le2/MqC1VYLk/cNmYxsSsqKkTyBhzQHhPK1jFnC89mmmNVuGtLNabjDI6Aj8UNIr0KpRNuBkiC4+sg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "ci-info": "^2.0.0", + "cosmiconfig": "^5.2.1", + "execa": "^1.0.0", + "get-stdin": "^7.0.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^4.2.0", + "please-upgrade-node": "^3.2.0", + "read-pkg": "^5.2.0", + "run-node": "^1.0.0", + "slash": "^3.0.0" + }, + "dependencies": { + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + } + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "iconv-lite": { + "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" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", + "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^2.4.2", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^4.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "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-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "^1.0.0" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "requires": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + } + }, + "istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", + "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "dev": true, + "requires": { + "handlebars": "^4.1.2" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "just-extend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "lolex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", + "dev": true + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "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", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", + "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.0", + "yargs-parser": "13.1.1", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "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" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "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" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "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 + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "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 + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "nested-error-stacks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", + "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nise": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.2.tgz", + "integrity": "sha512-/6RhOUlicRCbE9s+94qCUsyE+pKlVJ5AhIv+jEE7ESKwnbXqulKZ1FYU+XAtHHWE9TinYvAxDUJAb912PwPoWA==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^4.1.0", + "path-to-regexp": "^1.7.0" + } + }, + "node-environment-flags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-package-data": { + "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", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nyc": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", + "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "caching-transform": "^3.0.2", + "convert-source-map": "^1.6.0", + "cp-file": "^6.2.0", + "find-cache-dir": "^2.1.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "make-dir": "^2.1.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.2.3", + "uuid": "^3.3.2", + "yargs": "^13.2.2", + "yargs-parser": "^13.0.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", + "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "dev": true + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "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": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prettier": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", + "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve-global": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz", + "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", + "dev": true, + "requires": { + "global-dirs": "^0.1.1" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", + "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", + "dev": true + }, + "rxjs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sinon": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", + "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.3", + "diff": "^3.5.0", + "lolex": "^4.2.0", + "nise": "^1.5.2", + "supports-color": "^5.5.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "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 + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "spawn-wrap": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", + "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "spdx-correct": { + "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", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "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": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "dev": true, + "requires": { + "through2": "^2.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz", + "integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^5.2.0" + } + }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "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": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.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 + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "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" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true + }, + "tempfile": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-3.0.0.tgz", + "integrity": "sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==", + "dev": true, + "requires": { + "temp-dir": "^2.0.0", + "uuid": "^3.3.2" + } + }, + "test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "requires": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + } + } + }, + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "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.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "ts-node": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz", + "integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.6", + "yn": "^3.0.0" + }, + "dependencies": { + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "dev": true + } + } + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", + "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", + "dev": true + }, + "typescript": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", + "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==", + "dev": true + }, + "uglify-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.4.tgz", + "integrity": "sha512-9Yc2i881pF4BPGhjteCXQNaXx1DCwm3dtOyBaG2hitHjLWOczw/ki8vD1bqyT3u6K0Ms/FpCShkmfg+FtlOfYA==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.3", + "source-map": "~0.6.1" + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 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 + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.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" + } + } + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..e644d75 --- /dev/null +++ b/package.json @@ -0,0 +1,76 @@ +{ + "name": "@diplomatiq/resily", + "version": "0.0.0", + "description": "Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by App-vNext/Polly.", + "main": "dist/main.js", + "module": "dist/main.js", + "types": "dist/main.d.ts", + "engines": { + "node": ">=9.0.0" + }, + "scripts": { + "build": "tsc", + "build-and-test-everything": "npm run lint && npm run build && npm run test", + "check-release-tag": "node --experimental-modules scripts/check-release-tag.mjs", + "clean": "rm -r ./dist/", + "lint": "eslint ./src/ --ext .ts", + "prepare": "npm run build-and-test-everything", + "prepublishOnly": "npm run check-release-tag", + "test": "cross-env-shell TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text mocha --require ts-node/register --require source-map-support/register --recursive test/specs/**/*.test.ts", + "version": "node --experimental-modules scripts/sync-sonar-version.mjs && conventional-changelog -p angular -i CHANGELOG.md -s && git add sonar-project.properties CHANGELOG.md" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Diplomatiq/resily.git" + }, + "keywords": [ + "resilience", + "fault-handling", + "retry", + "circuit-breaker", + "timeout", + "bulkhead-isolation", + "fallback" + ], + "author": "Diplomatiq", + "license": "MIT", + "bugs": { + "url": "https://github.com/Diplomatiq/resily/issues" + }, + "homepage": "https://github.com/Diplomatiq/resily#readme", + "devDependencies": { + "@commitlint/cli": "^8.1.0", + "@commitlint/travis-cli": "^8.1.0", + "@types/chai": "^4.1.7", + "@types/mocha": "^5.2.7", + "@types/node": "^12.0.7", + "@types/sinon": "^7.0.12", + "@typescript-eslint/eslint-plugin": "^2.3.0", + "@typescript-eslint/parser": "^2.3.0", + "chai": "^4.2.0", + "conventional-changelog-cli": "^2.0.25", + "cross-env": "^6.0.0", + "eslint": "^6.4.0", + "eslint-config-prettier": "^6.3.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-prettier": "^3.1.0", + "eslint-plugin-promise": "^4.2.1", + "husky": "^3.0.5", + "mocha": "^6.1.4", + "nyc": "^14.1.1", + "prettier": "^1.18.2", + "sinon": "^7.3.2", + "source-map-support": "^0.5.12", + "ts-node": "^8.2.0", + "typescript": "^3.5.1" + }, + "files": [ + "dist/**/*" + ], + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-push": "npm run build-and-test-everything" + } + } +} diff --git a/scripts/check-release-tag.mjs b/scripts/check-release-tag.mjs new file mode 100644 index 0000000..e927bd7 --- /dev/null +++ b/scripts/check-release-tag.mjs @@ -0,0 +1,33 @@ +/** + * This script reads the version field from package.json + * and checks if the current git HEAD has a matching tag. + * + * E.g. if the current version is '1.0.0', the matching tag is 'v1.0.0'. + * + * Runs automatically on `npm publish`. + */ + +import { spawnSync } from 'child_process'; +import { readFileSync } from 'fs'; +import { dirname, join } from 'path'; +import { fileURLToPath } from 'url'; + +const { stdout } = spawnSync('git', ['describe', '--tags', '--exact-match'], { encoding: 'utf-8' }); +const tag = stdout.trim(); + +const currentDir = dirname(fileURLToPath(import.meta.url)); +const packageJsonPath = join(currentDir, '..', 'package.json'); +const packageJsonContents = readFileSync(packageJsonPath, { encoding: 'utf-8' }); +const packageJson = JSON.parse(packageJsonContents); +const packageVersion = packageJson.version; + +if (tag !== `v${packageVersion}`) { + if (tag) { + console.log( + `Current tag (${tag}) does not match package version (${packageVersion}). Publishing from wrong branch?`, + ); + } else { + console.log(`Current commit has no tag. Publishing from wrong branch?`); + } + process.exit(1); +} diff --git a/scripts/sync-sonar-version.mjs b/scripts/sync-sonar-version.mjs new file mode 100644 index 0000000..d9314f9 --- /dev/null +++ b/scripts/sync-sonar-version.mjs @@ -0,0 +1,23 @@ +/** + * This script reads the version from package.json and writes it into + * the sonar-project.properties file's sonar.projectVersion field. + * + * Runs automatically on `npm version`. + */ + +import { readFileSync, writeFileSync } from 'fs'; +import { dirname, join } from 'path'; +import { fileURLToPath } from 'url'; + +const sonarVersionRegex = /(sonar\.projectVersion=)[^\s]*/; + +const currentDir = dirname(fileURLToPath(import.meta.url)); + +const packageJsonPath = join(currentDir, '..', 'package.json'); +const packageJsonContents = readFileSync(packageJsonPath, { encoding: 'utf-8' }); +const packageJson = JSON.parse(packageJsonContents); + +const sonarPropsPath = join(currentDir, '..', 'sonar-project.properties'); +let sonarProps = readFileSync(sonarPropsPath, { encoding: 'utf-8' }); +sonarProps = sonarProps.replace(sonarVersionRegex, `$1${packageJson.version}`); +writeFileSync(sonarPropsPath, sonarProps, { encoding: 'utf-8' }); diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..e69de29 diff --git a/test/specs/empty.test.ts b/test/specs/empty.test.ts new file mode 100644 index 0000000..e69de29 diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..49cd075 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "declarationDir": "dist", + "module": "esnext", + "moduleResolution": "node", + "noErrorTruncation": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "dist", + "rootDir": "src", + "strict": true, + "target": "esnext" + }, + "files": ["src/main.ts"] +} diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..35845f8 --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "declaration": true, + "declarationDir": "dist", + "module": "commonjs", + "moduleResolution": "node", + "noErrorTruncation": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "dist", + "rootDir": "src", + "strict": true, + "target": "es2017" + }, + "files": ["src/main.ts"] +} From 55803ebd6dbf2ee7da866d82cdd182e5d0018716 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Sun, 27 Oct 2019 22:27:51 +0100 Subject: [PATCH 002/136] ci: Set up SonarCloud Closes #4. --- .travis.yml | 7 +++++++ sonar-project.properties | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 sonar-project.properties diff --git a/.travis.yml b/.travis.yml index 6425420..ab3e4b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,15 @@ node_js: - node - lts/* +addons: + sonarcloud: + organization: diplomatiq + token: + secure: OuO5PTGVrqinpQk1pj/WoivbcFglhS56Hxddzh6r2zZJ4DfTESWJhFS9b4SD7bwPoNLEDDrjMM5cdNy+S3j0pR1g46iNWDLbhBsYf4+l006QEIajjf3vt5CkkREhLtA4EMiHIgW68sHUKKoq4vdUlOQ+L0hvpScahtNUkP48uUvKJpKnGvaL/hcMzYz2TAv3/jvd8oYNAY0k0G5w3kCxwLZfJkhhSDtZEX5tEQ5ARBu9A24X9Xsza3JegrHESzLIto2XMLfJcy9m34I5OfXnVYEyiydO5bOxW00bCn7o41HNLhlx7vPD+JatYvwEHbVdDb9QOdHTHyXqAO00JbNsHyslVhTLcVFWNGvltDueY/pmjluxR40YCBJbEOz3WE4V+LsSjM71vFWj/xZRVBWGSbPVNDYL+3+4YfSSvdxFtowDFP3PEjXb9GBWWCoiSmyqZjMbkneCS7P8W1oLVJCuqDgVmWSsRSiVpS0zAhcbe+LOV4WLIUuAMrIMUpx091BBLNEA9V4O0ML080enuyrwhNH7/D626GjfTbTEntPF5h6P2gtV3/1yp8bOJXpJQkHjVP8kedFSZJBDdcwvCsc5E9WsTRrYjMs2bpk8MqwV5D54yzVwnkXtrzOjB4jPvF2oQwUIGC1kgIOIKn52IUGUnagDgO4meUPS+Y8bAcpSZiM= + install: npm ci script: - commitlint-travis - npm run build-and-test-everything + - sonar-scanner diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..0cc9f53 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,17 @@ +# Standard properties +sonar.projectKey=Diplomatiq_resily +sonar.projectName=resily +sonar.projectVersion=0.0.0 + +sonar.sources=src +sonar.tests=test +sonar.sourceEncoding=UTF-8 + +# Meta-data for the project +sonar.links.homepage=https://github.com/Diplomatiq/resily +sonar.links.ci=https://travis-ci.org/Diplomatiq/resily +sonar.links.scm=https://github.com/Diplomatiq/resily +sonar.links.issue=https://github.com/Diplomatiq/resily/issues + +# TypeScript-specific properties +sonar.typescript.lcov.reportPaths=coverage/lcov.info From 6de3bce63456bc05d00b9012c8e37cfb8b58d845 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2019 17:06:09 +0000 Subject: [PATCH 003/136] chore: bump @typescript-eslint/parser from 2.5.0 to 2.6.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.6.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 42 +++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 26f6701..54be5b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -458,15 +458,47 @@ } }, "@typescript-eslint/parser": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.5.0.tgz", - "integrity": "sha512-9UBMiAwIDWSl79UyogaBdj3hidzv6exjKUx60OuZuFnJf56tq/UMpdPcX09YmGqE8f4AnAueYtBxV8IcAT3jdQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.6.0.tgz", + "integrity": "sha512-AvLejMmkcjRTJ2KD72v565W4slSrrzUIzkReu1JN34b8JnsEsxx7S9Xx/qXEuMQas0mkdUfETr0j3zOhq2DIqQ==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.5.0", - "@typescript-eslint/typescript-estree": "2.5.0", + "@typescript-eslint/experimental-utils": "2.6.0", + "@typescript-eslint/typescript-estree": "2.6.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.0.tgz", + "integrity": "sha512-34BAFpNOwHXeqT+AvdalLxOvcPYnCxA5JGmBAFL64RGMdP0u65rXjii7l/nwpgk5aLEE1LaqF+SsCU0/Cb64xA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.6.0", + "eslint-scope": "^5.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.0.tgz", + "integrity": "sha512-A3lSBVIdj2Gp0lFEL6in2eSPqJ33uAc3Ko+Y4brhjkxzjbzLnwBH22CwsW2sCo+iwogfIyvb56/AJri15H0u5Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "glob": "^7.1.4", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index e644d75..ed8d350 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.0.7", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.3.0", - "@typescript-eslint/parser": "^2.3.0", + "@typescript-eslint/parser": "^2.6.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.25", "cross-env": "^6.0.0", From 02cc2e68a8e31f8bef9f0d0c27a5f7fda5ea58d1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2019 19:03:49 +0000 Subject: [PATCH 004/136] chore: bump @typescript-eslint/eslint-plugin from 2.5.0 to 2.6.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.6.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54be5b5..5e69407 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,12 +434,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.5.0.tgz", - "integrity": "sha512-ddrJZxp5ns1Lh5ofZQYk3P8RyvKfyz/VcRR4ZiJLHO/ljnQAO8YvTfj268+WJOOadn99mvDiqJA65+HAKoeSPA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.6.0.tgz", + "integrity": "sha512-iCcXREU4RciLmLniwKLRPCOFVXrkF7z27XuHq5DrykpREv/mz6ztKAyLg2fdkM0hQC7659p5ZF5uStH7uzAJ/w==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.5.0", + "@typescript-eslint/experimental-utils": "2.6.0", "eslint-utils": "^1.4.2", "functional-red-black-tree": "^1.0.1", "regexpp": "^2.0.1", @@ -447,13 +447,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.5.0.tgz", - "integrity": "sha512-UgcQGE0GKJVChyRuN1CWqDW8Pnu7+mVst0aWrhiyuUD1J9c+h8woBdT4XddCvhcXDodTDVIfE3DzGHVjp7tUeQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.0.tgz", + "integrity": "sha512-34BAFpNOwHXeqT+AvdalLxOvcPYnCxA5JGmBAFL64RGMdP0u65rXjii7l/nwpgk5aLEE1LaqF+SsCU0/Cb64xA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.5.0", + "@typescript-eslint/typescript-estree": "2.6.0", "eslint-scope": "^5.0.0" } }, @@ -502,9 +502,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.5.0.tgz", - "integrity": "sha512-AXURyF8NcA3IsnbjNX1v9qbwa0dDoY9YPcKYR2utvMHoUcu3636zrz0gRWtVAyxbPCkhyKuGg6WZIyi2Fc79CA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.0.tgz", + "integrity": "sha512-A3lSBVIdj2Gp0lFEL6in2eSPqJ33uAc3Ko+Y4brhjkxzjbzLnwBH22CwsW2sCo+iwogfIyvb56/AJri15H0u5Q==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index ed8d350..96297cd 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.0.7", "@types/sinon": "^7.0.12", - "@typescript-eslint/eslint-plugin": "^2.3.0", + "@typescript-eslint/eslint-plugin": "^2.6.0", "@typescript-eslint/parser": "^2.6.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.25", From 2502fd9f3d00c3ccf7a2bde12b0b18e6756dac70 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2019 20:11:32 +0000 Subject: [PATCH 005/136] chore: bump source-map-support from 0.5.13 to 0.5.15 Bumps [source-map-support](https://github.com/evanw/node-source-map-support) from 0.5.13 to 0.5.15. - [Release notes](https://github.com/evanw/node-source-map-support/releases) - [Commits](https://github.com/evanw/node-source-map-support/compare/v0.5.13...v0.5.15) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e69407..5bf66c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4196,9 +4196,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.15.tgz", + "integrity": "sha512-wYF5aX1J0+V51BDT3Om7uXNn0ct2FWiV4bvwiGVefxkm+1S1o5jsecE5lb2U28DDblzxzxeIDbTVpXHI9D/9hA==", "dev": true, "requires": { "buffer-from": "^1.0.0", diff --git a/package.json b/package.json index 96297cd..428d481 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "nyc": "^14.1.1", "prettier": "^1.18.2", "sinon": "^7.3.2", - "source-map-support": "^0.5.12", + "source-map-support": "^0.5.15", "ts-node": "^8.2.0", "typescript": "^3.5.1" }, From 41b4275b34733e7821486be627a3522d9ac91b5d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2019 23:51:08 +0000 Subject: [PATCH 006/136] chore: bump source-map-support from 0.5.15 to 0.5.16 Bumps [source-map-support](https://github.com/evanw/node-source-map-support) from 0.5.15 to 0.5.16. - [Release notes](https://github.com/evanw/node-source-map-support/releases) - [Commits](https://github.com/evanw/node-source-map-support/compare/v0.5.15...v0.5.16) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5bf66c8..0c6a056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4196,9 +4196,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.15.tgz", - "integrity": "sha512-wYF5aX1J0+V51BDT3Om7uXNn0ct2FWiV4bvwiGVefxkm+1S1o5jsecE5lb2U28DDblzxzxeIDbTVpXHI9D/9hA==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", diff --git a/package.json b/package.json index 428d481..24a868d 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "nyc": "^14.1.1", "prettier": "^1.18.2", "sinon": "^7.3.2", - "source-map-support": "^0.5.15", + "source-map-support": "^0.5.16", "ts-node": "^8.2.0", "typescript": "^3.5.1" }, From 88a354bdc8cc8e1359fd6a9fcdee11f2d5ed6073 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2019 18:15:41 +0000 Subject: [PATCH 007/136] chore: bump @types/node from 12.11.7 to 12.12.5 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.11.7 to 12.12.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c6a056..246107f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.11.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.11.7.tgz", - "integrity": "sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==", + "version": "12.12.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.5.tgz", + "integrity": "sha512-KEjODidV4XYUlJBF3XdjSH5FWoMCtO0utnhtdLf1AgeuZLOrRbvmU/gaRCVg7ZaQDjVf3l84egiY0mRNe5xE4A==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 24a868d..94068ef 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.0.7", + "@types/node": "^12.12.5", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.6.0", "@typescript-eslint/parser": "^2.6.0", From 67e1845095fa2366dd474edf3804ba69ce1481f6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2019 18:06:55 +0000 Subject: [PATCH 008/136] chore: bump @typescript-eslint/eslint-plugin from 2.6.0 to 2.6.1 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.6.1/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 25 +++++++++++++------------ package.json | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 246107f..2b30054 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,12 +434,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.6.0.tgz", - "integrity": "sha512-iCcXREU4RciLmLniwKLRPCOFVXrkF7z27XuHq5DrykpREv/mz6ztKAyLg2fdkM0hQC7659p5ZF5uStH7uzAJ/w==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.6.1.tgz", + "integrity": "sha512-Z0rddsGqioKbvqfohg7BwkFC3PuNLsB+GE9QkFza7tiDzuHoy0y823Y+oGNDzxNZrYyLjqkZtCTl4vCqOmEN4g==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.6.0", + "@typescript-eslint/experimental-utils": "2.6.1", "eslint-utils": "^1.4.2", "functional-red-black-tree": "^1.0.1", "regexpp": "^2.0.1", @@ -447,13 +447,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.0.tgz", - "integrity": "sha512-34BAFpNOwHXeqT+AvdalLxOvcPYnCxA5JGmBAFL64RGMdP0u65rXjii7l/nwpgk5aLEE1LaqF+SsCU0/Cb64xA==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.1.tgz", + "integrity": "sha512-EVrrUhl5yBt7fC7c62lWmriq4MIc49zpN3JmrKqfiFXPXCM5ErfEcZYfKOhZXkW6MBjFcJ5kGZqu1b+lyyExUw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.6.0", + "@typescript-eslint/typescript-estree": "2.6.1", "eslint-scope": "^5.0.0" } }, @@ -502,16 +502,17 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.0.tgz", - "integrity": "sha512-A3lSBVIdj2Gp0lFEL6in2eSPqJ33uAc3Ko+Y4brhjkxzjbzLnwBH22CwsW2sCo+iwogfIyvb56/AJri15H0u5Q==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.1.tgz", + "integrity": "sha512-+sTnssW6bcbDZKE8Ce7VV6LdzkQz2Bxk7jzk1J8H1rovoTxnm6iXvYIyncvNsaB/kBCOM63j/LNJfm27bNdUoA==", "dev": true, "requires": { "debug": "^4.1.1", "glob": "^7.1.4", "is-glob": "^4.0.1", "lodash.unescape": "4.0.1", - "semver": "^6.3.0" + "semver": "^6.3.0", + "tsutils": "^3.17.1" }, "dependencies": { "semver": { diff --git a/package.json b/package.json index 94068ef..ae40cf3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.12.5", "@types/sinon": "^7.0.12", - "@typescript-eslint/eslint-plugin": "^2.6.0", + "@typescript-eslint/eslint-plugin": "^2.6.1", "@typescript-eslint/parser": "^2.6.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.25", From 0e8a6f198e0616495d6691cfa16bfbc1e1c66b9d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2019 21:25:53 +0000 Subject: [PATCH 009/136] chore: bump @typescript-eslint/parser from 2.6.0 to 2.6.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.6.1/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 42 +++++------------------------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2b30054..d213661 100644 --- a/package-lock.json +++ b/package-lock.json @@ -458,47 +458,15 @@ } }, "@typescript-eslint/parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.6.0.tgz", - "integrity": "sha512-AvLejMmkcjRTJ2KD72v565W4slSrrzUIzkReu1JN34b8JnsEsxx7S9Xx/qXEuMQas0mkdUfETr0j3zOhq2DIqQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.6.1.tgz", + "integrity": "sha512-PDPkUkZ4c7yA+FWqigjwf3ngPUgoLaGjMlFh6TRtbjhqxFBnkElDfckSjm98q9cMr4xRzZ15VrS/xKm6QHYf0w==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.6.0", - "@typescript-eslint/typescript-estree": "2.6.0", + "@typescript-eslint/experimental-utils": "2.6.1", + "@typescript-eslint/typescript-estree": "2.6.1", "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.0.tgz", - "integrity": "sha512-34BAFpNOwHXeqT+AvdalLxOvcPYnCxA5JGmBAFL64RGMdP0u65rXjii7l/nwpgk5aLEE1LaqF+SsCU0/Cb64xA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.6.0", - "eslint-scope": "^5.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.0.tgz", - "integrity": "sha512-A3lSBVIdj2Gp0lFEL6in2eSPqJ33uAc3Ko+Y4brhjkxzjbzLnwBH22CwsW2sCo+iwogfIyvb56/AJri15H0u5Q==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "glob": "^7.1.4", - "is-glob": "^4.0.1", - "lodash.unescape": "4.0.1", - "semver": "^6.3.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index ae40cf3..e5c4410 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.12.5", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.6.1", - "@typescript-eslint/parser": "^2.6.0", + "@typescript-eslint/parser": "^2.6.1", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.25", "cross-env": "^6.0.0", From 07c592d3291ccd133c349dcef99cccd204acbb6f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2019 05:54:56 +0000 Subject: [PATCH 010/136] chore: bump typescript from 3.6.4 to 3.7.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.6.4 to 3.7.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d213661..f8a6664 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4559,9 +4559,9 @@ "dev": true }, "typescript": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", - "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", + "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index e5c4410..bad6901 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "sinon": "^7.3.2", "source-map-support": "^0.5.16", "ts-node": "^8.2.0", - "typescript": "^3.5.1" + "typescript": "^3.7.2" }, "files": [ "dist/**/*" From bcb4fc6a42a1e000ce6be8417ce67d3ed7940647 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2019 13:36:45 +0000 Subject: [PATCH 011/136] chore: bump @types/node from 12.12.5 to 12.12.6 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.5 to 12.12.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8a6664..9605bc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.5.tgz", - "integrity": "sha512-KEjODidV4XYUlJBF3XdjSH5FWoMCtO0utnhtdLf1AgeuZLOrRbvmU/gaRCVg7ZaQDjVf3l84egiY0mRNe5xE4A==", + "version": "12.12.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.6.tgz", + "integrity": "sha512-FjsYUPzEJdGXjwKqSpE0/9QEh6kzhTAeObA54rn6j3rR4C/mzpI9L0KNfoeASSPMMdxIsoJuCLDWcM/rVjIsSA==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index bad6901..754b05e 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.5", + "@types/node": "^12.12.6", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.6.1", "@typescript-eslint/parser": "^2.6.1", From ed22a5b579f18fcb7408d5f1739cb852c7169b0d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2019 12:49:04 +0000 Subject: [PATCH 012/136] chore: bump prettier from 1.18.2 to 1.19.1 Bumps [prettier](https://github.com/prettier/prettier) from 1.18.2 to 1.19.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/1.18.2...1.19.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9605bc5..020d1a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3852,9 +3852,9 @@ "dev": true }, "prettier": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", - "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", "dev": true }, "prettier-linter-helpers": { diff --git a/package.json b/package.json index 754b05e..b29f256 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "husky": "^3.0.5", "mocha": "^6.1.4", "nyc": "^14.1.1", - "prettier": "^1.18.2", + "prettier": "^1.19.1", "sinon": "^7.3.2", "source-map-support": "^0.5.16", "ts-node": "^8.2.0", From a3b3e6d6d1b56bd1bd9bfcff3006bf9e72db8893 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 10 Nov 2019 12:51:01 +0000 Subject: [PATCH 013/136] chore: bump @types/node from 12.12.6 to 12.12.7 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.6 to 12.12.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 020d1a4..cb320d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.6.tgz", - "integrity": "sha512-FjsYUPzEJdGXjwKqSpE0/9QEh6kzhTAeObA54rn6j3rR4C/mzpI9L0KNfoeASSPMMdxIsoJuCLDWcM/rVjIsSA==", + "version": "12.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", + "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index b29f256..eb56925 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.6", + "@types/node": "^12.12.7", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.6.1", "@typescript-eslint/parser": "^2.6.1", From 2e9e61c5bdb82f964215486f4fda368044f0f70d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2019 03:08:33 +0000 Subject: [PATCH 014/136] chore: bump ts-node from 8.4.1 to 8.5.0 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.4.1 to 8.5.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.4.1...v8.5.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index cb320d4..c67a138 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4502,9 +4502,9 @@ "dev": true }, "ts-node": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz", - "integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.0.tgz", + "integrity": "sha512-fbG32iZEupNV2E2Fd2m2yt1TdAwR3GTCrJQBHDevIiEBNy1A8kqnyl1fv7jmRmmbtcapFab2glZXHJvfD1ed0Q==", "dev": true, "requires": { "arg": "^4.1.0", diff --git a/package.json b/package.json index eb56925..b16bccc 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "prettier": "^1.19.1", "sinon": "^7.3.2", "source-map-support": "^0.5.16", - "ts-node": "^8.2.0", + "ts-node": "^8.5.0", "typescript": "^3.7.2" }, "files": [ From 2084226f49f3806f5813c40bd7fa48f7f1bfa213 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 03:06:27 +0000 Subject: [PATCH 015/136] chore: bump ts-node from 8.5.0 to 8.5.2 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.5.0 to 8.5.2. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.5.0...v8.5.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c67a138..5bb1cad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4502,9 +4502,9 @@ "dev": true }, "ts-node": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.0.tgz", - "integrity": "sha512-fbG32iZEupNV2E2Fd2m2yt1TdAwR3GTCrJQBHDevIiEBNy1A8kqnyl1fv7jmRmmbtcapFab2glZXHJvfD1ed0Q==", + "version": "8.5.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.2.tgz", + "integrity": "sha512-W1DK/a6BGoV/D4x/SXXm6TSQx6q3blECUzd5TN+j56YEMX3yPVMpHsICLedUw3DvGF3aTQ8hfdR9AKMaHjIi+A==", "dev": true, "requires": { "arg": "^4.1.0", diff --git a/package.json b/package.json index b16bccc..7071bb3 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "prettier": "^1.19.1", "sinon": "^7.3.2", "source-map-support": "^0.5.16", - "ts-node": "^8.5.0", + "ts-node": "^8.5.2", "typescript": "^3.7.2" }, "files": [ From 1c4f0b998c10d0218cb8574bbcaee2b4e883b5e4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 20:16:34 +0000 Subject: [PATCH 016/136] chore: bump @types/node from 12.12.7 to 12.12.8 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.7 to 12.12.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5bb1cad..daff020 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", - "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==", + "version": "12.12.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.8.tgz", + "integrity": "sha512-XLla8N+iyfjvsa0KKV+BP/iGSoTmwxsu5Ci5sM33z9TjohF72DEz95iNvD6pPmemvbQgxAv/909G73gUn8QR7w==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 7071bb3..f540b70 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.7", + "@types/node": "^12.12.8", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.6.1", "@typescript-eslint/parser": "^2.6.1", From 353eca2f297d4a26971950fa34d056b8d74bdb43 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2019 17:25:46 +0000 Subject: [PATCH 017/136] chore: bump @types/chai from 4.2.4 to 4.2.5 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.4 to 4.2.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index daff020..bfc1732 100644 --- a/package-lock.json +++ b/package-lock.json @@ -386,9 +386,9 @@ "dev": true }, "@types/chai": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.4.tgz", - "integrity": "sha512-7qvf9F9tMTzo0akeswHPGqgUx/gIaJqrOEET/FCD8CFRkSUHlygQiM5yB6OvjrtdxBVLSyw7COJubsFYs0683g==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.5.tgz", + "integrity": "sha512-YvbLiIc0DbbhiANrfVObdkLEHJksQZVq0Uvfg550SRAKVYaEJy+V70j65BVe2WNp6E3HtKsUczeijHFCjba3og==", "dev": true }, "@types/eslint-visitor-keys": { diff --git a/package.json b/package.json index f540b70..39d7dd8 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@commitlint/cli": "^8.1.0", "@commitlint/travis-cli": "^8.1.0", - "@types/chai": "^4.1.7", + "@types/chai": "^4.2.5", "@types/mocha": "^5.2.7", "@types/node": "^12.12.8", "@types/sinon": "^7.0.12", From 3185f36007d69f0d97a4f12ac090859bbc39344c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2019 17:50:42 +0000 Subject: [PATCH 018/136] chore: bump @typescript-eslint/parser from 2.6.1 to 2.7.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.6.1 to 2.7.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.7.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 43 ++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index bfc1732..1d71b33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -458,15 +458,48 @@ } }, "@typescript-eslint/parser": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.6.1.tgz", - "integrity": "sha512-PDPkUkZ4c7yA+FWqigjwf3ngPUgoLaGjMlFh6TRtbjhqxFBnkElDfckSjm98q9cMr4xRzZ15VrS/xKm6QHYf0w==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.7.0.tgz", + "integrity": "sha512-ctC0g0ZvYclxMh/xI+tyqP0EC2fAo6KicN9Wm2EIao+8OppLfxji7KAGJosQHSGBj3TcqUrA96AjgXuKa5ob2g==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.6.1", - "@typescript-eslint/typescript-estree": "2.6.1", + "@typescript-eslint/experimental-utils": "2.7.0", + "@typescript-eslint/typescript-estree": "2.7.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.7.0.tgz", + "integrity": "sha512-9/L/OJh2a5G2ltgBWJpHRfGnt61AgDeH6rsdg59BH0naQseSwR7abwHq3D5/op0KYD/zFT4LS5gGvWcMmegTEg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.7.0", + "eslint-scope": "^5.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.7.0.tgz", + "integrity": "sha512-vVCE/DY72N4RiJ/2f10PTyYekX2OLaltuSIBqeHYI44GQ940VCYioInIb8jKMrK9u855OEJdFC+HmWAZTnC+Ag==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "glob": "^7.1.4", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index 39d7dd8..48eb64c 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.12.8", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.6.1", - "@typescript-eslint/parser": "^2.6.1", + "@typescript-eslint/parser": "^2.7.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.25", "cross-env": "^6.0.0", From ddfe1fc20d881e40453bad8633743d8925c47693 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2019 18:01:48 +0000 Subject: [PATCH 019/136] chore: bump @typescript-eslint/eslint-plugin from 2.6.1 to 2.7.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.6.1 to 2.7.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.7.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d71b33..9c106d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,12 +434,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.6.1.tgz", - "integrity": "sha512-Z0rddsGqioKbvqfohg7BwkFC3PuNLsB+GE9QkFza7tiDzuHoy0y823Y+oGNDzxNZrYyLjqkZtCTl4vCqOmEN4g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.7.0.tgz", + "integrity": "sha512-H5G7yi0b0FgmqaEUpzyBlVh0d9lq4cWG2ap0RKa6BkF3rpBb6IrAoubt1NWh9R2kRs/f0k6XwRDiDz3X/FqXhQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.6.1", + "@typescript-eslint/experimental-utils": "2.7.0", "eslint-utils": "^1.4.2", "functional-red-black-tree": "^1.0.1", "regexpp": "^2.0.1", @@ -447,13 +447,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.6.1.tgz", - "integrity": "sha512-EVrrUhl5yBt7fC7c62lWmriq4MIc49zpN3JmrKqfiFXPXCM5ErfEcZYfKOhZXkW6MBjFcJ5kGZqu1b+lyyExUw==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.7.0.tgz", + "integrity": "sha512-9/L/OJh2a5G2ltgBWJpHRfGnt61AgDeH6rsdg59BH0naQseSwR7abwHq3D5/op0KYD/zFT4LS5gGvWcMmegTEg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.6.1", + "@typescript-eslint/typescript-estree": "2.7.0", "eslint-scope": "^5.0.0" } }, @@ -503,9 +503,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.1.tgz", - "integrity": "sha512-+sTnssW6bcbDZKE8Ce7VV6LdzkQz2Bxk7jzk1J8H1rovoTxnm6iXvYIyncvNsaB/kBCOM63j/LNJfm27bNdUoA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.7.0.tgz", + "integrity": "sha512-vVCE/DY72N4RiJ/2f10PTyYekX2OLaltuSIBqeHYI44GQ940VCYioInIb8jKMrK9u855OEJdFC+HmWAZTnC+Ag==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 48eb64c..60183a9 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.12.8", "@types/sinon": "^7.0.12", - "@typescript-eslint/eslint-plugin": "^2.6.1", + "@typescript-eslint/eslint-plugin": "^2.7.0", "@typescript-eslint/parser": "^2.7.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.25", From 2ac8a08d607683384bc479439aac8cce1a8bd74b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2019 18:22:44 +0000 Subject: [PATCH 020/136] chore: bump conventional-changelog-cli from 2.0.25 to 2.0.27 Bumps [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog) from 2.0.25 to 2.0.27. - [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases) - [Commits](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-cli@2.0.25...conventional-changelog-cli@2.0.27) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 113 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 63 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c106d6..719452d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -933,28 +933,28 @@ "dev": true }, "conventional-changelog": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.12.tgz", - "integrity": "sha512-zyGKwii8Z5zOq1nGFm5jn9Ou1jQ6UBoRT0+nqBIU8fEzh64+AcVxrY97tVuK77Ati0xwpBiFHpDXAW7pkq1jEw==", + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.14.tgz", + "integrity": "sha512-utfeyIrLKBjIhxFW64W425tVjnu/rqpVrI4/ylje2figIEfGHQ1YoMkkT8ZwX65MxzTtqQR1SCl7CX1y0/0JrA==", "dev": true, "requires": { - "conventional-changelog-angular": "^5.0.5", + "conventional-changelog-angular": "^5.0.6", "conventional-changelog-atom": "^2.0.3", "conventional-changelog-codemirror": "^2.0.3", - "conventional-changelog-conventionalcommits": "^4.2.1", - "conventional-changelog-core": "^4.0.2", + "conventional-changelog-conventionalcommits": "^4.2.3", + "conventional-changelog-core": "^4.1.0", "conventional-changelog-ember": "^2.0.4", "conventional-changelog-eslint": "^3.0.4", "conventional-changelog-express": "^2.0.1", "conventional-changelog-jquery": "^3.0.6", "conventional-changelog-jshint": "^2.0.3", - "conventional-changelog-preset-loader": "^2.2.0" + "conventional-changelog-preset-loader": "^2.3.0" }, "dependencies": { "conventional-changelog-angular": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.5.tgz", - "integrity": "sha512-RrkdWnL/TVyWV1ayWmSsrWorsTDqjL/VwG5ZSEneBQrd65ONcfeA1cW7FLtNweQyMiKOyriCMTKRSlk18DjTrw==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz", + "integrity": "sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA==", "dev": true, "requires": { "compare-func": "^1.3.1", @@ -983,18 +983,24 @@ } }, "conventional-changelog-cli": { - "version": "2.0.25", - "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.25.tgz", - "integrity": "sha512-b0zNygHrFI4HjNmgPzDLSqoltIwo3pIfilWZFNH/1w6QIZoZHeA4SxojRgih9aCc0Eeg1RH7lXIPaRgHa9cv7A==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.27.tgz", + "integrity": "sha512-SK71zMVyAlfYua44WFCLRZqWO76He57NLsp9wfTAsHkCgbrWtWGbXA/UuGq49H5lAlWMcaqYR6OYcssqmFw6aQ==", "dev": true, "requires": { "add-stream": "^1.0.0", - "conventional-changelog": "^3.1.12", - "lodash": "^4.14.14", + "conventional-changelog": "^3.1.14", + "lodash": "^4.17.15", "meow": "^4.0.0", "tempfile": "^3.0.0" }, "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, "meow": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", @@ -1024,30 +1030,38 @@ } }, "conventional-changelog-conventionalcommits": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.1.tgz", - "integrity": "sha512-vC02KucnkNNap+foDKFm7BVUSDAXktXrUJqGszUuYnt6T0J2azsbYz/w9TDc3VsrW2v6JOtiQWVcgZnporHr4Q==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz", + "integrity": "sha512-atGa+R4vvEhb8N/8v3IoW59gCBJeeFiX6uIbPu876ENAmkMwsenyn0R21kdDHJFLQdy6zW4J6b4xN8KI3b9oww==", "dev": true, "requires": { "compare-func": "^1.3.1", - "lodash": "^4.2.1", + "lodash": "^4.17.15", "q": "^1.5.1" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } } }, "conventional-changelog-core": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.0.2.tgz", - "integrity": "sha512-vQh7J+emZlcIA5alvI2xGikID2/iYKyk39dHmHEyU7/xvB9L9kq+3BzqbCXVstu7SD7isDfem27m/Qzu7R0BRA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.0.tgz", + "integrity": "sha512-2m2udIRAPbQL5It0ABNjsQZKJQJPNuf3anxLhcOLkEW+M4z3C343BMDUyJy9Y7tKAweqK458xxW81bG8FYrBwA==", "dev": true, "requires": { - "conventional-changelog-writer": "^4.0.9", - "conventional-commits-parser": "^3.0.5", + "conventional-changelog-writer": "^4.0.10", + "conventional-commits-parser": "^3.0.7", "dateformat": "^3.0.0", "get-pkg-repo": "^1.0.0", "git-raw-commits": "2.0.0", "git-remote-origin-url": "^2.0.0", "git-semver-tags": "^3.0.0", - "lodash": "^4.2.1", + "lodash": "^4.17.15", "normalize-package-data": "^2.3.5", "q": "^1.5.1", "read-pkg": "^3.0.0", @@ -1056,14 +1070,14 @@ }, "dependencies": { "conventional-commits-parser": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.5.tgz", - "integrity": "sha512-qVz9+5JwdJzsbt7JbJ6P7NOXBGt8CyLFJYSjKAuPSgO+5UGfcsbk9EMR+lI8Unlvx6qwIc2YDJlrGIfay2ehNA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.7.tgz", + "integrity": "sha512-4mx/FRC92z0yIiXGyRVYQFhn0jWDwvxnj2UuLaUi3hJSG4Thall6GXA8YOPHQK2qvotciJandJIVmuSvLgDLbQ==", "dev": true, "requires": { "JSONStream": "^1.0.4", - "is-text-path": "^2.0.0", - "lodash": "^4.2.1", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", "meow": "^4.0.0", "split2": "^2.0.0", "through2": "^3.0.0", @@ -1095,14 +1109,11 @@ } } }, - "is-text-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", - "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", - "dev": true, - "requires": { - "text-extensions": "^2.0.0" - } + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true }, "meow": { "version": "4.0.1", @@ -1121,12 +1132,6 @@ "trim-newlines": "^2.0.0" } }, - "text-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.0.0.tgz", - "integrity": "sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ==", - "dev": true - }, "through2": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", @@ -1185,15 +1190,15 @@ } }, "conventional-changelog-preset-loader": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.2.0.tgz", - "integrity": "sha512-zXB+5vF7D5Y3Cb/rJfSyCCvFphCVmF8mFqOdncX3BmjZwAtGAPfYrBcT225udilCKvBbHgyzgxqz2GWDB5xShQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz", + "integrity": "sha512-/rHb32J2EJnEXeK4NpDgMaAVTFZS3o1ExmjKMtYVgIC4MQn0vkNSbYpdGRotkfGGRWiqk3Ri3FBkiZGbAfIfOQ==", "dev": true }, "conventional-changelog-writer": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.9.tgz", - "integrity": "sha512-2Y3QfiAM37WvDMjkVNaRtZgxVzWKj73HE61YQ/95T53yle+CRwTVSl6Gbv/lWVKXeZcM5af9n9TDVf0k7Xh+cw==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.10.tgz", + "integrity": "sha512-vtO9vBAVh7XnSpGLTB1BOGgsGTz1MdvFjzbSXLrtapWCHWwuVOZFgwdLhlS0MaXwlF1dksWdEb6tnr42Ie2INw==", "dev": true, "requires": { "compare-func": "^1.3.1", @@ -1201,13 +1206,19 @@ "dateformat": "^3.0.0", "handlebars": "^4.4.0", "json-stringify-safe": "^5.0.1", - "lodash": "^4.2.1", + "lodash": "^4.17.15", "meow": "^4.0.0", "semver": "^6.0.0", "split": "^1.0.0", "through2": "^3.0.0" }, "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, "meow": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", diff --git a/package.json b/package.json index 60183a9..1d7da2d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@typescript-eslint/eslint-plugin": "^2.7.0", "@typescript-eslint/parser": "^2.7.0", "chai": "^4.2.0", - "conventional-changelog-cli": "^2.0.25", + "conventional-changelog-cli": "^2.0.27", "cross-env": "^6.0.0", "eslint": "^6.4.0", "eslint-config-prettier": "^6.3.0", From 8bdb849b7f4d78d88ddfd2e3cb172bfc7ebd00c4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2019 01:09:48 +0000 Subject: [PATCH 021/136] chore: bump eslint-config-prettier from 6.5.0 to 6.6.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.5.0 to 6.6.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.5.0...v6.6.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 719452d..32d901f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1661,9 +1661,9 @@ } }, "eslint-config-prettier": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.5.0.tgz", - "integrity": "sha512-cjXp8SbO9VFGW/Z7mbTydqS9to8Z58E5aYhj3e1+Hx7lS9s6gL5ILKNpCqZAFOVYRcSkWPFYljHrEh8QFEK5EQ==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.6.0.tgz", + "integrity": "sha512-6RGaj7jD+HeuSVHoIT6A0WkBhVEk0ULg74kp2FAWIwkYrOERae0TjIO09Cw33oN//gJWmt7aFhVJErEVta7uvA==", "dev": true, "requires": { "get-stdin": "^6.0.0" diff --git a/package.json b/package.json index 1d7da2d..f13c5c6 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "conventional-changelog-cli": "^2.0.27", "cross-env": "^6.0.0", "eslint": "^6.4.0", - "eslint-config-prettier": "^6.3.0", + "eslint-config-prettier": "^6.6.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-promise": "^4.2.1", From 33d24d11c8fb55459125771761ebe5fbb645774a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2019 13:57:23 +0000 Subject: [PATCH 022/136] chore: bump conventional-changelog-cli from 2.0.27 to 2.0.28 Bumps [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog) from 2.0.27 to 2.0.28. - [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases) - [Commits](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-cli@2.0.27...conventional-changelog-cli@2.0.28) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 141 +++++++++++++++------------------------------- package.json | 2 +- 2 files changed, 45 insertions(+), 98 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32d901f..cfd83b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -933,16 +933,16 @@ "dev": true }, "conventional-changelog": { - "version": "3.1.14", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.14.tgz", - "integrity": "sha512-utfeyIrLKBjIhxFW64W425tVjnu/rqpVrI4/ylje2figIEfGHQ1YoMkkT8ZwX65MxzTtqQR1SCl7CX1y0/0JrA==", + "version": "3.1.15", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.15.tgz", + "integrity": "sha512-CoWM+Z9bYyF00QzNpTnxkCLiuLAeRocJz3C/foFjvhsdltdtkJgMChp7GytQNjm4pT7JFBVJTpqLHTpxNtOzaA==", "dev": true, "requires": { "conventional-changelog-angular": "^5.0.6", "conventional-changelog-atom": "^2.0.3", "conventional-changelog-codemirror": "^2.0.3", "conventional-changelog-conventionalcommits": "^4.2.3", - "conventional-changelog-core": "^4.1.0", + "conventional-changelog-core": "^4.1.1", "conventional-changelog-ember": "^2.0.4", "conventional-changelog-eslint": "^3.0.4", "conventional-changelog-express": "^2.0.1", @@ -983,15 +983,15 @@ } }, "conventional-changelog-cli": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.27.tgz", - "integrity": "sha512-SK71zMVyAlfYua44WFCLRZqWO76He57NLsp9wfTAsHkCgbrWtWGbXA/UuGq49H5lAlWMcaqYR6OYcssqmFw6aQ==", + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.28.tgz", + "integrity": "sha512-ioagYxYI4GGs3p5APfEgSqjK21Fwl0mTa05MkIH85R64MqtUvNygtjHZWoXtdpM29OONJzxrebWDSyNHX6Fssg==", "dev": true, "requires": { "add-stream": "^1.0.0", - "conventional-changelog": "^3.1.14", + "conventional-changelog": "^3.1.15", "lodash": "^4.17.15", - "meow": "^4.0.0", + "meow": "^5.0.0", "tempfile": "^3.0.0" }, "dependencies": { @@ -1000,23 +1000,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true - }, - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } } } }, @@ -1049,18 +1032,18 @@ } }, "conventional-changelog-core": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.0.tgz", - "integrity": "sha512-2m2udIRAPbQL5It0ABNjsQZKJQJPNuf3anxLhcOLkEW+M4z3C343BMDUyJy9Y7tKAweqK458xxW81bG8FYrBwA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.1.tgz", + "integrity": "sha512-fBre5P6U9n914Da6Cj82vIfRU2DhTLGr1eDPXWA7AamxTpd4cd0jgdS7Aieas5Vn5WXOJNFRDNl6PrYLEonImg==", "dev": true, "requires": { - "conventional-changelog-writer": "^4.0.10", - "conventional-commits-parser": "^3.0.7", + "conventional-changelog-writer": "^4.0.11", + "conventional-commits-parser": "^3.0.8", "dateformat": "^3.0.0", "get-pkg-repo": "^1.0.0", "git-raw-commits": "2.0.0", "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "^3.0.0", + "git-semver-tags": "^3.0.1", "lodash": "^4.17.15", "normalize-package-data": "^2.3.5", "q": "^1.5.1", @@ -1070,15 +1053,15 @@ }, "dependencies": { "conventional-commits-parser": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.7.tgz", - "integrity": "sha512-4mx/FRC92z0yIiXGyRVYQFhn0jWDwvxnj2UuLaUi3hJSG4Thall6GXA8YOPHQK2qvotciJandJIVmuSvLgDLbQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz", + "integrity": "sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ==", "dev": true, "requires": { "JSONStream": "^1.0.4", "is-text-path": "^1.0.1", "lodash": "^4.17.15", - "meow": "^4.0.0", + "meow": "^5.0.0", "split2": "^2.0.0", "through2": "^3.0.0", "trim-off-newlines": "^1.0.0" @@ -1097,6 +1080,23 @@ "through2": "^2.0.0" }, "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -1115,23 +1115,6 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } - }, "through2": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", @@ -1196,9 +1179,9 @@ "dev": true }, "conventional-changelog-writer": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.10.tgz", - "integrity": "sha512-vtO9vBAVh7XnSpGLTB1BOGgsGTz1MdvFjzbSXLrtapWCHWwuVOZFgwdLhlS0MaXwlF1dksWdEb6tnr42Ie2INw==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz", + "integrity": "sha512-g81GQOR392I+57Cw3IyP1f+f42ME6aEkbR+L7v1FBBWolB0xkjKTeCWVguzRrp6UiT1O6gBpJbEy2eq7AnV1rw==", "dev": true, "requires": { "compare-func": "^1.3.1", @@ -1207,7 +1190,7 @@ "handlebars": "^4.4.0", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.15", - "meow": "^4.0.0", + "meow": "^5.0.0", "semver": "^6.0.0", "split": "^1.0.0", "through2": "^3.0.0" @@ -1219,23 +1202,6 @@ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } - }, "through2": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", @@ -2401,32 +2367,13 @@ } }, "git-semver-tags": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-3.0.0.tgz", - "integrity": "sha512-T4C/gJ9k2Bnxz+PubtcyiMtUUKrC+Nh9Q4zaECcnmVMwJgPhrNyP/Rf+YpdRqsJbCV/+kYrCH24Xg+IeAmbOPg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-3.0.1.tgz", + "integrity": "sha512-Hzd1MOHXouITfCasrpVJbRDg9uvW7LfABk3GQmXYZByerBDrfrEMP9HXpNT7RxAbieiocP6u+xq20DkvjwxnCA==", "dev": true, "requires": { - "meow": "^4.0.0", + "meow": "^5.0.0", "semver": "^6.0.0" - }, - "dependencies": { - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } - } } }, "gitconfiglocal": { diff --git a/package.json b/package.json index f13c5c6..d7ebae6 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@typescript-eslint/eslint-plugin": "^2.7.0", "@typescript-eslint/parser": "^2.7.0", "chai": "^4.2.0", - "conventional-changelog-cli": "^2.0.27", + "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", "eslint": "^6.4.0", "eslint-config-prettier": "^6.6.0", From 3a58867f86b7181ff87691e76de4bffb2414b50c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2019 02:57:02 +0000 Subject: [PATCH 023/136] chore: bump husky from 3.0.9 to 3.1.0 Bumps [husky](https://github.com/typicode/husky) from 3.0.9 to 3.1.0. - [Release notes](https://github.com/typicode/husky/releases) - [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md) - [Commits](https://github.com/typicode/husky/compare/v3.0.9...v3.1.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index cfd83b1..c320ed7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2490,9 +2490,9 @@ "dev": true }, "husky": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/husky/-/husky-3.0.9.tgz", - "integrity": "sha512-Yolhupm7le2/MqC1VYLk/cNmYxsSsqKkTyBhzQHhPK1jFnC89mmmNVuGtLNabjDI6Aj8UNIr0KpRNuBkiC4+sg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-3.1.0.tgz", + "integrity": "sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ==", "dev": true, "requires": { "chalk": "^2.4.2", diff --git a/package.json b/package.json index d7ebae6..0feffff 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "eslint-plugin-import": "^2.18.2", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-promise": "^4.2.1", - "husky": "^3.0.5", + "husky": "^3.1.0", "mocha": "^6.1.4", "nyc": "^14.1.1", "prettier": "^1.19.1", From 65486bd594a131640dfea848e9b51231f59df127 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2019 18:07:19 +0000 Subject: [PATCH 024/136] chore: bump @typescript-eslint/parser from 2.7.0 to 2.8.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.8.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 41 ++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index c320ed7..fc36866 100644 --- a/package-lock.json +++ b/package-lock.json @@ -458,42 +458,57 @@ } }, "@typescript-eslint/parser": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.7.0.tgz", - "integrity": "sha512-ctC0g0ZvYclxMh/xI+tyqP0EC2fAo6KicN9Wm2EIao+8OppLfxji7KAGJosQHSGBj3TcqUrA96AjgXuKa5ob2g==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.8.0.tgz", + "integrity": "sha512-NseXWzhkucq+JM2HgqAAoKEzGQMb5LuTRjFPLQzGIdLthXMNUfuiskbl7QSykvWW6mvzCtYbw1fYWGa2EIaekw==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.7.0", - "@typescript-eslint/typescript-estree": "2.7.0", + "@typescript-eslint/experimental-utils": "2.8.0", + "@typescript-eslint/typescript-estree": "2.8.0", "eslint-visitor-keys": "^1.1.0" }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.7.0.tgz", - "integrity": "sha512-9/L/OJh2a5G2ltgBWJpHRfGnt61AgDeH6rsdg59BH0naQseSwR7abwHq3D5/op0KYD/zFT4LS5gGvWcMmegTEg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.8.0.tgz", + "integrity": "sha512-jZ05E4SxCbbXseQGXOKf3ESKcsGxT8Ucpkp1jiVp55MGhOvZB2twmWKf894PAuVQTCgbPbJz9ZbRDqtUWzP8xA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.7.0", + "@typescript-eslint/typescript-estree": "2.8.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.7.0.tgz", - "integrity": "sha512-vVCE/DY72N4RiJ/2f10PTyYekX2OLaltuSIBqeHYI44GQ940VCYioInIb8jKMrK9u855OEJdFC+HmWAZTnC+Ag==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.8.0.tgz", + "integrity": "sha512-ksvjBDTdbAQ04cR5JyFSDX113k66FxH1tAXmi+dj6hufsl/G0eMc/f1GgLjEVPkYClDbRKv+rnBFuE5EusomUw==", "dev": true, "requires": { "debug": "^4.1.1", - "glob": "^7.1.4", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", "is-glob": "^4.0.1", "lodash.unescape": "4.0.1", "semver": "^6.3.0", "tsutils": "^3.17.1" } }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "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" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", diff --git a/package.json b/package.json index 0feffff..7c18512 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.12.8", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.7.0", - "@typescript-eslint/parser": "^2.7.0", + "@typescript-eslint/parser": "^2.8.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", From 29e35107e47557641a0b706dee1668ef977058a7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2019 18:36:00 +0000 Subject: [PATCH 025/136] chore: bump @typescript-eslint/eslint-plugin from 2.7.0 to 2.8.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.8.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 51 ++++++++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index fc36866..b3f1e16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,26 +434,34 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.7.0.tgz", - "integrity": "sha512-H5G7yi0b0FgmqaEUpzyBlVh0d9lq4cWG2ap0RKa6BkF3rpBb6IrAoubt1NWh9R2kRs/f0k6XwRDiDz3X/FqXhQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.8.0.tgz", + "integrity": "sha512-ohqul5s6XEB0AzPWZCuJF5Fd6qC0b4+l5BGEnrlpmvXxvyymb8yw8Bs4YMF8usNAeuCJK87eFIHy8g8GFvOtGA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.7.0", - "eslint-utils": "^1.4.2", + "@typescript-eslint/experimental-utils": "2.8.0", + "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", - "regexpp": "^2.0.1", + "regexpp": "^3.0.0", "tsutils": "^3.17.1" + }, + "dependencies": { + "regexpp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "dev": true + } } }, "@typescript-eslint/experimental-utils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.7.0.tgz", - "integrity": "sha512-9/L/OJh2a5G2ltgBWJpHRfGnt61AgDeH6rsdg59BH0naQseSwR7abwHq3D5/op0KYD/zFT4LS5gGvWcMmegTEg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.8.0.tgz", + "integrity": "sha512-jZ05E4SxCbbXseQGXOKf3ESKcsGxT8Ucpkp1jiVp55MGhOvZB2twmWKf894PAuVQTCgbPbJz9ZbRDqtUWzP8xA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.7.0", + "@typescript-eslint/typescript-estree": "2.8.0", "eslint-scope": "^5.0.0" } }, @@ -518,19 +526,34 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.7.0.tgz", - "integrity": "sha512-vVCE/DY72N4RiJ/2f10PTyYekX2OLaltuSIBqeHYI44GQ940VCYioInIb8jKMrK9u855OEJdFC+HmWAZTnC+Ag==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.8.0.tgz", + "integrity": "sha512-ksvjBDTdbAQ04cR5JyFSDX113k66FxH1tAXmi+dj6hufsl/G0eMc/f1GgLjEVPkYClDbRKv+rnBFuE5EusomUw==", "dev": true, "requires": { "debug": "^4.1.1", - "glob": "^7.1.4", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", "is-glob": "^4.0.1", "lodash.unescape": "4.0.1", "semver": "^6.3.0", "tsutils": "^3.17.1" }, "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "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" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", diff --git a/package.json b/package.json index 7c18512..86150c1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.12.8", "@types/sinon": "^7.0.12", - "@typescript-eslint/eslint-plugin": "^2.7.0", + "@typescript-eslint/eslint-plugin": "^2.8.0", "@typescript-eslint/parser": "^2.8.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", From 56bba32dba8f389175691434464a4bab4e29a6d2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2019 20:59:02 +0000 Subject: [PATCH 026/136] chore: bump @types/node from 12.12.8 to 12.12.9 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.8 to 12.12.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b3f1e16..a82720e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.8.tgz", - "integrity": "sha512-XLla8N+iyfjvsa0KKV+BP/iGSoTmwxsu5Ci5sM33z9TjohF72DEz95iNvD6pPmemvbQgxAv/909G73gUn8QR7w==", + "version": "12.12.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.9.tgz", + "integrity": "sha512-kV3w4KeLsRBW+O2rKhktBwENNJuqAUQHS3kf4ia2wIaF/MN6U7ANgTsx7tGremcA0Pk3Yh0Hl0iKiLPuBdIgmw==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 86150c1..cde3ba3 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.5", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.8", + "@types/node": "^12.12.9", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.8.0", "@typescript-eslint/parser": "^2.8.0", From 27b9a2ae0e847293bc46d511df357d6a7e41b2f7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2019 08:40:47 +0000 Subject: [PATCH 027/136] chore: bump eslint-config-prettier from 6.6.0 to 6.7.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.6.0 to 6.7.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a82720e..a4bd1db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1665,9 +1665,9 @@ } }, "eslint-config-prettier": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.6.0.tgz", - "integrity": "sha512-6RGaj7jD+HeuSVHoIT6A0WkBhVEk0ULg74kp2FAWIwkYrOERae0TjIO09Cw33oN//gJWmt7aFhVJErEVta7uvA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.7.0.tgz", + "integrity": "sha512-FamQVKM3jjUVwhG4hEMnbtsq7xOIDm+SY5iBPfR8gKsJoAB2IQnNF+bk1+8Fy44Nq7PPJaLvkRxILYdJWoguKQ==", "dev": true, "requires": { "get-stdin": "^6.0.0" diff --git a/package.json b/package.json index cde3ba3..f58f3e3 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", "eslint": "^6.4.0", - "eslint-config-prettier": "^6.6.0", + "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-promise": "^4.2.1", From c9636e2a77022f802e508060867825a0cf45e66e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2019 05:56:29 +0000 Subject: [PATCH 028/136] chore: bump @types/node from 12.12.9 to 12.12.11 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.9 to 12.12.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a4bd1db..0ec5fd1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.9.tgz", - "integrity": "sha512-kV3w4KeLsRBW+O2rKhktBwENNJuqAUQHS3kf4ia2wIaF/MN6U7ANgTsx7tGremcA0Pk3Yh0Hl0iKiLPuBdIgmw==", + "version": "12.12.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.11.tgz", + "integrity": "sha512-O+x6uIpa6oMNTkPuHDa9MhMMehlxLAd5QcOvKRjAFsBVpeFWTOPnXbDvILvFgFFZfQ1xh1EZi1FbXxUix+zpsQ==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index f58f3e3..85a45ad 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.5", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.9", + "@types/node": "^12.12.11", "@types/sinon": "^7.0.12", "@typescript-eslint/eslint-plugin": "^2.8.0", "@typescript-eslint/parser": "^2.8.0", From 2cf2126776828542c9a9d88d2f7fcbf9cf609b2b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2019 23:04:16 +0000 Subject: [PATCH 029/136] chore: bump @types/sinon from 7.5.0 to 7.5.1 Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 7.5.0 to 7.5.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0ec5fd1..67eca0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -428,9 +428,9 @@ "dev": true }, "@types/sinon": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.0.tgz", - "integrity": "sha512-NyzhuSBy97B/zE58cDw4NyGvByQbAHNP9069KVSgnXt/sc0T6MFRh0InKAeBVHJWdSXG1S3+PxgVIgKo9mTHbw==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.1.tgz", + "integrity": "sha512-EZQUP3hSZQyTQRfiLqelC9NMWd1kqLcmQE0dMiklxBkgi84T+cHOhnKpgk4NnOWpGX863yE6+IaGnOXUNFqDnQ==", "dev": true }, "@typescript-eslint/eslint-plugin": { diff --git a/package.json b/package.json index 85a45ad..b4c9f4a 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@types/chai": "^4.2.5", "@types/mocha": "^5.2.7", "@types/node": "^12.12.11", - "@types/sinon": "^7.0.12", + "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.8.0", "@typescript-eslint/parser": "^2.8.0", "chai": "^4.2.0", From b7a6b7bad116556ba687253740b23d91331a6229 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2019 18:25:33 +0000 Subject: [PATCH 030/136] chore: bump eslint from 6.6.0 to 6.7.0 Bumps [eslint](https://github.com/eslint/eslint) from 6.6.0 to 6.7.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v6.6.0...v6.7.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 84 +++++++++++++++++++++++++++++++---------------- package.json | 2 +- 2 files changed, 56 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 67eca0a..8c306fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -609,12 +609,12 @@ "dev": true }, "ansi-escapes": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", - "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", + "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", "dev": true, "requires": { - "type-fest": "^0.5.2" + "type-fest": "^0.8.1" } }, "ansi-regex": { @@ -1620,9 +1620,9 @@ "dev": true }, "eslint": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.6.0.tgz", - "integrity": "sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.0.tgz", + "integrity": "sha512-dQpj+PaHKHfXHQ2Imcw5d853PTvkUGbHk/MR68KQUl98EgKDCdh4vLRH1ZxhqeQjQFJeg8fgN0UwmNhN3l8dDQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1640,7 +1640,7 @@ "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", - "globals": "^11.7.0", + "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -1653,7 +1653,7 @@ "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", + "optionator": "^0.8.3", "progress": "^2.0.0", "regexpp": "^2.0.1", "semver": "^6.1.2", @@ -1662,6 +1662,17 @@ "table": "^5.2.3", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "globals": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + } } }, "eslint-config-prettier": { @@ -3679,25 +3690,17 @@ } }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } + "word-wrap": "~1.2.3" } }, "os-homedir": { @@ -4274,14 +4277,31 @@ "dev": true }, "string-width": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz", - "integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^5.2.0" + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "string.prototype.trimleft": { @@ -4582,9 +4602,9 @@ "dev": true }, "type-fest": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", - "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "typescript": { @@ -4698,6 +4718,12 @@ } } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", diff --git a/package.json b/package.json index b4c9f4a..60acf68 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", - "eslint": "^6.4.0", + "eslint": "^6.7.0", "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-prettier": "^3.1.0", From 4e01096172df2193f5ac93d1d86ee0c07c8f78e8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 23 Nov 2019 01:11:50 +0000 Subject: [PATCH 031/136] chore: bump @types/node from 12.12.11 to 12.12.12 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.11 to 12.12.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c306fa..942db1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.11.tgz", - "integrity": "sha512-O+x6uIpa6oMNTkPuHDa9MhMMehlxLAd5QcOvKRjAFsBVpeFWTOPnXbDvILvFgFFZfQ1xh1EZi1FbXxUix+zpsQ==", + "version": "12.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.12.tgz", + "integrity": "sha512-MGuvYJrPU0HUwqF7LqvIj50RZUX23Z+m583KBygKYUZLlZ88n6w28XRNJRJgsHukLEnLz6w6SvxZoLgbr5wLqQ==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 60acf68..96e59f0 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.5", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.11", + "@types/node": "^12.12.12", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.8.0", "@typescript-eslint/parser": "^2.8.0", From 162dd19e627aca299907ca4e376359fcee70ef74 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2019 03:38:39 +0000 Subject: [PATCH 032/136] chore: bump eslint from 6.7.0 to 6.7.1 Bumps [eslint](https://github.com/eslint/eslint) from 6.7.0 to 6.7.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v6.7.0...v6.7.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 942db1a..6862db4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1620,9 +1620,9 @@ "dev": true }, "eslint": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.0.tgz", - "integrity": "sha512-dQpj+PaHKHfXHQ2Imcw5d853PTvkUGbHk/MR68KQUl98EgKDCdh4vLRH1ZxhqeQjQFJeg8fgN0UwmNhN3l8dDQ==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.1.tgz", + "integrity": "sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", diff --git a/package.json b/package.json index 96e59f0..eea2296 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", - "eslint": "^6.7.0", + "eslint": "^6.7.1", "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-prettier": "^3.1.0", From c718678fac78b038f0a1b1d79851400e79969bcf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2019 06:13:01 +0000 Subject: [PATCH 033/136] chore: bump @typescript-eslint/eslint-plugin from 2.8.0 to 2.9.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.9.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6862db4..90c1d97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,12 +434,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.8.0.tgz", - "integrity": "sha512-ohqul5s6XEB0AzPWZCuJF5Fd6qC0b4+l5BGEnrlpmvXxvyymb8yw8Bs4YMF8usNAeuCJK87eFIHy8g8GFvOtGA==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.9.0.tgz", + "integrity": "sha512-98rfOt3NYn5Gr9wekTB8TexxN6oM8ZRvYuphPs1Atfsy419SDLYCaE30aJkRiiTCwGEY98vOhFsEVm7Zs4toQQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.8.0", + "@typescript-eslint/experimental-utils": "2.9.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -455,13 +455,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.8.0.tgz", - "integrity": "sha512-jZ05E4SxCbbXseQGXOKf3ESKcsGxT8Ucpkp1jiVp55MGhOvZB2twmWKf894PAuVQTCgbPbJz9ZbRDqtUWzP8xA==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.9.0.tgz", + "integrity": "sha512-0lOLFdpdJsCMqMSZT7l7W2ta0+GX8A3iefG3FovJjrX+QR8y6htFlFdU7aOVPL6pDvt6XcsOb8fxk5sq+girTw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.8.0", + "@typescript-eslint/typescript-estree": "2.9.0", "eslint-scope": "^5.0.0" } }, @@ -526,9 +526,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.8.0.tgz", - "integrity": "sha512-ksvjBDTdbAQ04cR5JyFSDX113k66FxH1tAXmi+dj6hufsl/G0eMc/f1GgLjEVPkYClDbRKv+rnBFuE5EusomUw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.9.0.tgz", + "integrity": "sha512-v6btSPXEWCP594eZbM+JCXuFoXWXyF/z8kaSBSdCb83DF+Y7+xItW29SsKtSULgLemqJBT+LpT+0ZqdfH7QVmA==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index eea2296..1a47aac 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.12.12", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.8.0", + "@typescript-eslint/eslint-plugin": "^2.9.0", "@typescript-eslint/parser": "^2.8.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", From a64b8baf1ed9de2d2c2b9116b37fd04a51cae57a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2019 06:31:04 +0000 Subject: [PATCH 034/136] chore: bump @typescript-eslint/parser from 2.8.0 to 2.9.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.9.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 58 ++++------------------------------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90c1d97..f504001 100644 --- a/package-lock.json +++ b/package-lock.json @@ -466,63 +466,15 @@ } }, "@typescript-eslint/parser": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.8.0.tgz", - "integrity": "sha512-NseXWzhkucq+JM2HgqAAoKEzGQMb5LuTRjFPLQzGIdLthXMNUfuiskbl7QSykvWW6mvzCtYbw1fYWGa2EIaekw==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.9.0.tgz", + "integrity": "sha512-fJ+dNs3CCvEsJK2/Vg5c2ZjuQ860ySOAsodDPwBaVlrGvRN+iCNC8kUfLFL8cT49W4GSiLPa/bHiMjYXA7EhKQ==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.8.0", - "@typescript-eslint/typescript-estree": "2.8.0", + "@typescript-eslint/experimental-utils": "2.9.0", + "@typescript-eslint/typescript-estree": "2.9.0", "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.8.0.tgz", - "integrity": "sha512-jZ05E4SxCbbXseQGXOKf3ESKcsGxT8Ucpkp1jiVp55MGhOvZB2twmWKf894PAuVQTCgbPbJz9ZbRDqtUWzP8xA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.8.0", - "eslint-scope": "^5.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.8.0.tgz", - "integrity": "sha512-ksvjBDTdbAQ04cR5JyFSDX113k66FxH1tAXmi+dj6hufsl/G0eMc/f1GgLjEVPkYClDbRKv+rnBFuE5EusomUw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash.unescape": "4.0.1", - "semver": "^6.3.0", - "tsutils": "^3.17.1" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "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" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index 1a47aac..7bc22c2 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.12.12", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.9.0", - "@typescript-eslint/parser": "^2.8.0", + "@typescript-eslint/parser": "^2.9.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", From 2de8e4aa8755f5e0411cb430c6b0900168b89b53 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2019 06:50:54 +0000 Subject: [PATCH 035/136] chore: bump @types/node from 12.12.12 to 12.12.14 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.12 to 12.12.14. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f504001..c53e765 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.12.tgz", - "integrity": "sha512-MGuvYJrPU0HUwqF7LqvIj50RZUX23Z+m583KBygKYUZLlZ88n6w28XRNJRJgsHukLEnLz6w6SvxZoLgbr5wLqQ==", + "version": "12.12.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz", + "integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 7bc22c2..0ee51e6 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.5", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.12", + "@types/node": "^12.12.14", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.9.0", "@typescript-eslint/parser": "^2.9.0", From 789394c87ade81abc5c5b1a750ede9dd761b760d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2019 05:16:27 +0000 Subject: [PATCH 036/136] chore: bump ts-node from 8.5.2 to 8.5.3 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.5.2 to 8.5.3. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.5.2...v8.5.3) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c53e765..59919a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -600,9 +600,9 @@ "dev": true }, "arg": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", - "integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.2.tgz", + "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==", "dev": true }, "argparse": { @@ -4503,9 +4503,9 @@ "dev": true }, "ts-node": { - "version": "8.5.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.2.tgz", - "integrity": "sha512-W1DK/a6BGoV/D4x/SXXm6TSQx6q3blECUzd5TN+j56YEMX3yPVMpHsICLedUw3DvGF3aTQ8hfdR9AKMaHjIi+A==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.3.tgz", + "integrity": "sha512-B4dYs62o9ioIilzh7Npby5grYvw3lLwttTSIzf7QObf1FWUCzt+ELtyZJd+xYgxJ/n3A5nQJ2oG6VaZgwMMcjA==", "dev": true, "requires": { "arg": "^4.1.0", diff --git a/package.json b/package.json index 0ee51e6..04f6a15 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "prettier": "^1.19.1", "sinon": "^7.3.2", "source-map-support": "^0.5.16", - "ts-node": "^8.5.2", + "ts-node": "^8.5.3", "typescript": "^3.7.2" }, "files": [ From 9b369fbf638edd3653129170dcfb3fc99c8062bd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2019 17:00:31 +0000 Subject: [PATCH 037/136] chore: bump ts-node from 8.5.3 to 8.5.4 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.5.3 to 8.5.4. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.5.3...v8.5.4) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 59919a5..b9daf2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4503,9 +4503,9 @@ "dev": true }, "ts-node": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.3.tgz", - "integrity": "sha512-B4dYs62o9ioIilzh7Npby5grYvw3lLwttTSIzf7QObf1FWUCzt+ELtyZJd+xYgxJ/n3A5nQJ2oG6VaZgwMMcjA==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.4.tgz", + "integrity": "sha512-izbVCRV68EasEPQ8MSIGBNK9dc/4sYJJKYA+IarMQct1RtEot6Xp0bXuClsbUSnKpg50ho+aOAx8en5c+y4OFw==", "dev": true, "requires": { "arg": "^4.1.0", diff --git a/package.json b/package.json index 04f6a15..294652a 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "prettier": "^1.19.1", "sinon": "^7.3.2", "source-map-support": "^0.5.16", - "ts-node": "^8.5.3", + "ts-node": "^8.5.4", "typescript": "^3.7.2" }, "files": [ From 6751806868b4150acbcd19f68805e57a162640c2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 30 Nov 2019 17:17:42 +0000 Subject: [PATCH 038/136] chore: bump eslint from 6.7.1 to 6.7.2 Bumps [eslint](https://github.com/eslint/eslint) from 6.7.1 to 6.7.2. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v6.7.1...v6.7.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9daf2b..6a341bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1572,9 +1572,9 @@ "dev": true }, "eslint": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.1.tgz", - "integrity": "sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.2.tgz", + "integrity": "sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", diff --git a/package.json b/package.json index 294652a..a664db3 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", - "eslint": "^6.7.1", + "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-prettier": "^3.1.0", From 90403e05d02f2f33d4f7b1e89e16db1378eb5e75 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Sat, 30 Nov 2019 21:20:10 +0100 Subject: [PATCH 039/136] ci: Srticten eslint config Closes #53. --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index 9df9ebe..804c16a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -89,6 +89,7 @@ "import/no-default-export": ["error"], "@typescript-eslint/array-type": ["error", { "default": "array-simple" }], "@typescript-eslint/consistent-type-definitions": ["error", "interface"], + "@typescript-eslint/explicit-function-return-type": ["error"], "@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }], "@typescript-eslint/prefer-for-of": ["error"], "@typescript-eslint/prefer-readonly": ["error"], From de4b92341d5719a63b02103812ec87c59a682d80 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2019 18:06:57 +0000 Subject: [PATCH 040/136] chore: bump @typescript-eslint/parser from 2.9.0 to 2.10.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.10.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 58 +++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6a341bd..9da0123 100644 --- a/package-lock.json +++ b/package-lock.json @@ -466,15 +466,63 @@ } }, "@typescript-eslint/parser": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.9.0.tgz", - "integrity": "sha512-fJ+dNs3CCvEsJK2/Vg5c2ZjuQ860ySOAsodDPwBaVlrGvRN+iCNC8kUfLFL8cT49W4GSiLPa/bHiMjYXA7EhKQ==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.10.0.tgz", + "integrity": "sha512-wQNiBokcP5ZsTuB+i4BlmVWq6o+oAhd8en2eSm/EE9m7BgZUIfEeYFd6z3S+T7bgNuloeiHA1/cevvbBDLr98g==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.9.0", - "@typescript-eslint/typescript-estree": "2.9.0", + "@typescript-eslint/experimental-utils": "2.10.0", + "@typescript-eslint/typescript-estree": "2.10.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.10.0.tgz", + "integrity": "sha512-FZhWq6hWWZBP76aZ7bkrfzTMP31CCefVIImrwP3giPLcoXocmLTmr92NLZxuIcTL4GTEOE33jQMWy9PwelL+yQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.10.0", + "eslint-scope": "^5.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.10.0.tgz", + "integrity": "sha512-oOYnplddQNm/LGVkqbkAwx4TIBuuZ36cAQq9v3nFIU9FmhemHuVzAesMSXNQDdAzCa5bFgCrfD3JWhYVKlRN2g==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "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" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index a664db3..892f47e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.12.14", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.9.0", - "@typescript-eslint/parser": "^2.9.0", + "@typescript-eslint/parser": "^2.10.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", "cross-env": "^6.0.0", From 7d99de3b074cd903d7444de5d965a1ffe0667cd0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2019 17:55:14 +0000 Subject: [PATCH 041/136] chore: bump @typescript-eslint/eslint-plugin from 2.9.0 to 2.10.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.10.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9da0123..e6a45f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,12 +434,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.9.0.tgz", - "integrity": "sha512-98rfOt3NYn5Gr9wekTB8TexxN6oM8ZRvYuphPs1Atfsy419SDLYCaE30aJkRiiTCwGEY98vOhFsEVm7Zs4toQQ==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.10.0.tgz", + "integrity": "sha512-rT51fNLW0u3fnDGnAHVC5nu+Das+y2CpW10yqvf6/j5xbuUV3FxA3mBaIbM24CXODXjbgUznNb4Kg9XZOUxKAw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.9.0", + "@typescript-eslint/experimental-utils": "2.10.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -455,13 +455,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.9.0.tgz", - "integrity": "sha512-0lOLFdpdJsCMqMSZT7l7W2ta0+GX8A3iefG3FovJjrX+QR8y6htFlFdU7aOVPL6pDvt6XcsOb8fxk5sq+girTw==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.10.0.tgz", + "integrity": "sha512-FZhWq6hWWZBP76aZ7bkrfzTMP31CCefVIImrwP3giPLcoXocmLTmr92NLZxuIcTL4GTEOE33jQMWy9PwelL+yQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.9.0", + "@typescript-eslint/typescript-estree": "2.10.0", "eslint-scope": "^5.0.0" } }, @@ -526,9 +526,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.9.0.tgz", - "integrity": "sha512-v6btSPXEWCP594eZbM+JCXuFoXWXyF/z8kaSBSdCb83DF+Y7+xItW29SsKtSULgLemqJBT+LpT+0ZqdfH7QVmA==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.10.0.tgz", + "integrity": "sha512-oOYnplddQNm/LGVkqbkAwx4TIBuuZ36cAQq9v3nFIU9FmhemHuVzAesMSXNQDdAzCa5bFgCrfD3JWhYVKlRN2g==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 892f47e..50c3b2a 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.12.14", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.9.0", + "@typescript-eslint/eslint-plugin": "^2.10.0", "@typescript-eslint/parser": "^2.10.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.28", From dd3dd7ec601399e1117045273019c31a9508b03c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2019 18:05:25 +0000 Subject: [PATCH 042/136] chore: bump @types/chai from 4.2.5 to 4.2.6 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.5 to 4.2.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6a45f9..0e8f403 100644 --- a/package-lock.json +++ b/package-lock.json @@ -386,9 +386,9 @@ "dev": true }, "@types/chai": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.5.tgz", - "integrity": "sha512-YvbLiIc0DbbhiANrfVObdkLEHJksQZVq0Uvfg550SRAKVYaEJy+V70j65BVe2WNp6E3HtKsUczeijHFCjba3og==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.6.tgz", + "integrity": "sha512-HF8faEUA4JurIm+68VaA2KedtZf5LYdXpQEAbIAN79DwWQbO82BNTksZgCH3UMqbZHXex9C6TrBfg7OUInRISQ==", "dev": true }, "@types/eslint-visitor-keys": { diff --git a/package.json b/package.json index 50c3b2a..e846a67 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@commitlint/cli": "^8.1.0", "@commitlint/travis-cli": "^8.1.0", - "@types/chai": "^4.2.5", + "@types/chai": "^4.2.6", "@types/mocha": "^5.2.7", "@types/node": "^12.12.14", "@types/sinon": "^7.5.1", From 2b927526fb25246eb33b337cce09a1b969dbcbd7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2019 21:04:08 +0000 Subject: [PATCH 043/136] chore: bump conventional-changelog-cli from 2.0.28 to 2.0.30 Bumps [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog) from 2.0.28 to 2.0.30. - [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases) - [Commits](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-cli@2.0.28...conventional-changelog-cli@2.0.30) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 23 ++++++++++++----------- package.json | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e8f403..353df78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -971,16 +971,16 @@ "dev": true }, "conventional-changelog": { - "version": "3.1.15", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.15.tgz", - "integrity": "sha512-CoWM+Z9bYyF00QzNpTnxkCLiuLAeRocJz3C/foFjvhsdltdtkJgMChp7GytQNjm4pT7JFBVJTpqLHTpxNtOzaA==", + "version": "3.1.17", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.17.tgz", + "integrity": "sha512-Z6VIYdgtgRPpQ9ZVMKp9e8j7g35uttelb2OGBXhldqWd2lY+h7EXgQH777r2AmMJzWkkLumXz02kIhr1Z1oM4A==", "dev": true, "requires": { "conventional-changelog-angular": "^5.0.6", "conventional-changelog-atom": "^2.0.3", "conventional-changelog-codemirror": "^2.0.3", "conventional-changelog-conventionalcommits": "^4.2.3", - "conventional-changelog-core": "^4.1.1", + "conventional-changelog-core": "^4.1.3", "conventional-changelog-ember": "^2.0.4", "conventional-changelog-eslint": "^3.0.4", "conventional-changelog-express": "^2.0.1", @@ -1021,13 +1021,13 @@ } }, "conventional-changelog-cli": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.28.tgz", - "integrity": "sha512-ioagYxYI4GGs3p5APfEgSqjK21Fwl0mTa05MkIH85R64MqtUvNygtjHZWoXtdpM29OONJzxrebWDSyNHX6Fssg==", + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.30.tgz", + "integrity": "sha512-k2qSrlOpMxtv1xOtUxICNQ2dsanvoNy4PElMdLDof2lvP9BFfGPtEXjoMBcRoTSN98KeUalYA8X2UdNBNFttoA==", "dev": true, "requires": { "add-stream": "^1.0.0", - "conventional-changelog": "^3.1.15", + "conventional-changelog": "^3.1.17", "lodash": "^4.17.15", "meow": "^5.0.0", "tempfile": "^3.0.0" @@ -1070,11 +1070,12 @@ } }, "conventional-changelog-core": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.1.tgz", - "integrity": "sha512-fBre5P6U9n914Da6Cj82vIfRU2DhTLGr1eDPXWA7AamxTpd4cd0jgdS7Aieas5Vn5WXOJNFRDNl6PrYLEonImg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.3.tgz", + "integrity": "sha512-VNDecw0N/osMiFHbb20R1PzxwbSZMdyCyJmc95mmElPrruOsJuKEozMBi0JJuOY7kXJ7kO/TbFDRviJg4z0feA==", "dev": true, "requires": { + "add-stream": "^1.0.0", "conventional-changelog-writer": "^4.0.11", "conventional-commits-parser": "^3.0.8", "dateformat": "^3.0.0", diff --git a/package.json b/package.json index e846a67..24bef0f 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@typescript-eslint/eslint-plugin": "^2.10.0", "@typescript-eslint/parser": "^2.10.0", "chai": "^4.2.0", - "conventional-changelog-cli": "^2.0.28", + "conventional-changelog-cli": "^2.0.30", "cross-env": "^6.0.0", "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", From 50be4a98d49e07e69a4b3eef1491caee0ce94a77 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2019 21:22:52 +0000 Subject: [PATCH 044/136] chore: bump typescript from 3.7.2 to 3.7.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.2 to 3.7.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v3.7.2...v3.7.3) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 353df78..866ea45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4609,9 +4609,9 @@ "dev": true }, "typescript": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", - "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz", + "integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 24bef0f..684fae8 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "sinon": "^7.3.2", "source-map-support": "^0.5.16", "ts-node": "^8.5.4", - "typescript": "^3.7.2" + "typescript": "^3.7.3" }, "files": [ "dist/**/*" From 77c23d090820f5280d082bd80850e1106e9d48e6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2019 18:19:36 +0000 Subject: [PATCH 045/136] chore: bump eslint-plugin-import from 2.18.2 to 2.19.1 Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.18.2 to 2.19.1. - [Release notes](https://github.com/benmosher/eslint-plugin-import/releases) - [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md) - [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.18.2...v2.19.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 30 +++++++++++++++++++++--------- package.json | 2 +- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 866ea45..b560270 100644 --- a/package-lock.json +++ b/package-lock.json @@ -690,6 +690,17 @@ "es-abstract": "^1.7.0" } }, + "array.prototype.flat": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.2.tgz", + "integrity": "sha512-VXjh7lAL4KXKF2hY4FnEW9eRW6IhdvFW1sN/JwLbmECbCgACCnBHNyP3lFiYuttr0jxRN9Bsc5+G27dMseSWqQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.15.0", + "function-bind": "^1.1.1" + } + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -1721,12 +1732,12 @@ } }, "eslint-module-utils": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", - "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz", + "integrity": "sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==", "dev": true, "requires": { - "debug": "^2.6.8", + "debug": "^2.6.9", "pkg-dir": "^2.0.0" }, "dependencies": { @@ -1748,22 +1759,23 @@ } }, "eslint-plugin-import": { - "version": "2.18.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", - "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "version": "2.19.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.19.1.tgz", + "integrity": "sha512-x68131aKoCZlCae7rDXKSAQmbT5DQuManyXo2sK6fJJ0aK5CWAkv6A6HJZGgqC8IhjQxYPgo6/IY4Oz8AFsbBw==", "dev": true, "requires": { "array-includes": "^3.0.3", + "array.prototype.flat": "^1.2.1", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.0", + "eslint-module-utils": "^2.4.1", "has": "^1.0.3", "minimatch": "^3.0.4", "object.values": "^1.1.0", "read-pkg-up": "^2.0.0", - "resolve": "^1.11.0" + "resolve": "^1.12.0" }, "dependencies": { "debug": { diff --git a/package.json b/package.json index 684fae8..ea51c4c 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "cross-env": "^6.0.0", "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", - "eslint-plugin-import": "^2.18.2", + "eslint-plugin-import": "^2.19.1", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-promise": "^4.2.1", "husky": "^3.1.0", From 527a7c62b258aa2573ed68e1a4a9a89bef026749 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2019 19:24:21 +0000 Subject: [PATCH 046/136] chore: bump @types/chai from 4.2.6 to 4.2.7 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.6 to 4.2.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b560270..e24bb51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -386,9 +386,9 @@ "dev": true }, "@types/chai": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.6.tgz", - "integrity": "sha512-HF8faEUA4JurIm+68VaA2KedtZf5LYdXpQEAbIAN79DwWQbO82BNTksZgCH3UMqbZHXex9C6TrBfg7OUInRISQ==", + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.7.tgz", + "integrity": "sha512-luq8meHGYwvky0O7u0eQZdA7B4Wd9owUCqvbw2m3XCrCU8mplYOujMBbvyS547AxJkC+pGnd0Cm15eNxEUNU8g==", "dev": true }, "@types/eslint-visitor-keys": { diff --git a/package.json b/package.json index ea51c4c..475fc80 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@commitlint/cli": "^8.1.0", "@commitlint/travis-cli": "^8.1.0", - "@types/chai": "^4.2.6", + "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", "@types/node": "^12.12.14", "@types/sinon": "^7.5.1", From 2ac949ca7f1668c4b1bf72dda086697ada5ee908 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2019 18:08:34 +0000 Subject: [PATCH 047/136] chore: bump @typescript-eslint/parser from 2.10.0 to 2.11.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.10.0 to 2.11.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.11.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index e24bb51..ab9191e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -466,32 +466,32 @@ } }, "@typescript-eslint/parser": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.10.0.tgz", - "integrity": "sha512-wQNiBokcP5ZsTuB+i4BlmVWq6o+oAhd8en2eSm/EE9m7BgZUIfEeYFd6z3S+T7bgNuloeiHA1/cevvbBDLr98g==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.11.0.tgz", + "integrity": "sha512-DyGXeqhb3moMioEFZIHIp7oXBBh7dEfPTzGrlyP0Mi9ScCra4SWEGs3kPd18mG7Sy9Wy8z88zmrw5tSGL6r/6A==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.10.0", - "@typescript-eslint/typescript-estree": "2.10.0", + "@typescript-eslint/experimental-utils": "2.11.0", + "@typescript-eslint/typescript-estree": "2.11.0", "eslint-visitor-keys": "^1.1.0" }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.10.0.tgz", - "integrity": "sha512-FZhWq6hWWZBP76aZ7bkrfzTMP31CCefVIImrwP3giPLcoXocmLTmr92NLZxuIcTL4GTEOE33jQMWy9PwelL+yQ==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.11.0.tgz", + "integrity": "sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.10.0", + "@typescript-eslint/typescript-estree": "2.11.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.10.0.tgz", - "integrity": "sha512-oOYnplddQNm/LGVkqbkAwx4TIBuuZ36cAQq9v3nFIU9FmhemHuVzAesMSXNQDdAzCa5bFgCrfD3JWhYVKlRN2g==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.11.0.tgz", + "integrity": "sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 475fc80..b632194 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.12.14", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.10.0", - "@typescript-eslint/parser": "^2.10.0", + "@typescript-eslint/parser": "^2.11.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.30", "cross-env": "^6.0.0", From 4710c0e31ea6a1561c5ce3744d9daf1c9434ca01 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2019 18:48:40 +0000 Subject: [PATCH 048/136] chore: bump @typescript-eslint/eslint-plugin from 2.10.0 to 2.11.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.10.0 to 2.11.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.11.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab9191e..a850453 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,12 +434,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.10.0.tgz", - "integrity": "sha512-rT51fNLW0u3fnDGnAHVC5nu+Das+y2CpW10yqvf6/j5xbuUV3FxA3mBaIbM24CXODXjbgUznNb4Kg9XZOUxKAw==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.11.0.tgz", + "integrity": "sha512-G2HHA1vpMN0EEbUuWubiCCfd0R3a30BB+UdvnFkxwZIxYEGOrWEXDv8tBFO9f44CWc47Xv9lLM3VSn4ORLI2bA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.10.0", + "@typescript-eslint/experimental-utils": "2.11.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -455,13 +455,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.10.0.tgz", - "integrity": "sha512-FZhWq6hWWZBP76aZ7bkrfzTMP31CCefVIImrwP3giPLcoXocmLTmr92NLZxuIcTL4GTEOE33jQMWy9PwelL+yQ==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.11.0.tgz", + "integrity": "sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.10.0", + "@typescript-eslint/typescript-estree": "2.11.0", "eslint-scope": "^5.0.0" } }, @@ -526,9 +526,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.10.0.tgz", - "integrity": "sha512-oOYnplddQNm/LGVkqbkAwx4TIBuuZ36cAQq9v3nFIU9FmhemHuVzAesMSXNQDdAzCa5bFgCrfD3JWhYVKlRN2g==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.11.0.tgz", + "integrity": "sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index b632194..b828ff9 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.12.14", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.10.0", + "@typescript-eslint/eslint-plugin": "^2.11.0", "@typescript-eslint/parser": "^2.11.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.30", From 16867e5144057b928d47f62b2d949a116ddf17c1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2019 19:06:09 +0000 Subject: [PATCH 049/136] chore: bump @types/node from 12.12.14 to 12.12.17 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.14 to 12.12.17. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a850453..173ad18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz", - "integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==", + "version": "12.12.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz", + "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index b828ff9..87dcb82 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.14", + "@types/node": "^12.12.17", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.11.0", "@typescript-eslint/parser": "^2.11.0", From b67e8135116c486c0bf90495861729cce458e176 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2019 04:03:00 +0000 Subject: [PATCH 050/136] chore: bump eslint-plugin-prettier from 3.1.1 to 3.1.2 Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.1 to 3.1.2. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.1.1...v3.1.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 173ad18..ad99dfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1863,9 +1863,9 @@ } }, "eslint-plugin-prettier": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.1.tgz", - "integrity": "sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz", + "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" diff --git a/package.json b/package.json index 87dcb82..6c0b948 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.19.1", - "eslint-plugin-prettier": "^3.1.0", + "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", "husky": "^3.1.0", "mocha": "^6.1.4", From 1ea2d386b364a731a1761b85186cf4a085539cd1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2019 19:24:54 +0000 Subject: [PATCH 051/136] chore: bump conventional-changelog-cli from 2.0.30 to 2.0.31 Bumps [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog) from 2.0.30 to 2.0.31. - [Release notes](https://github.com/conventional-changelog/conventional-changelog/releases) - [Commits](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-cli@2.0.30...conventional-changelog-cli@2.0.31) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index ad99dfd..0456a48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -982,16 +982,16 @@ "dev": true }, "conventional-changelog": { - "version": "3.1.17", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.17.tgz", - "integrity": "sha512-Z6VIYdgtgRPpQ9ZVMKp9e8j7g35uttelb2OGBXhldqWd2lY+h7EXgQH777r2AmMJzWkkLumXz02kIhr1Z1oM4A==", + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.18.tgz", + "integrity": "sha512-aN6a3rjgV8qwAJj3sC/Lme2kvswWO7fFSGQc32gREcwIOsaiqBaO6f2p0NomFaPDnTqZ+mMZFLL3hlzvEnZ0mQ==", "dev": true, "requires": { "conventional-changelog-angular": "^5.0.6", "conventional-changelog-atom": "^2.0.3", "conventional-changelog-codemirror": "^2.0.3", "conventional-changelog-conventionalcommits": "^4.2.3", - "conventional-changelog-core": "^4.1.3", + "conventional-changelog-core": "^4.1.4", "conventional-changelog-ember": "^2.0.4", "conventional-changelog-eslint": "^3.0.4", "conventional-changelog-express": "^2.0.1", @@ -1032,13 +1032,13 @@ } }, "conventional-changelog-cli": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.30.tgz", - "integrity": "sha512-k2qSrlOpMxtv1xOtUxICNQ2dsanvoNy4PElMdLDof2lvP9BFfGPtEXjoMBcRoTSN98KeUalYA8X2UdNBNFttoA==", + "version": "2.0.31", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.0.31.tgz", + "integrity": "sha512-nMINylKAamBLM3OmD7/44d9TPZ3V58IDTXoGC/QtXxve+1Sj37BQTzIEW3TNaviZ2ZV/b5Dqg0eSk4DNP5fBdA==", "dev": true, "requires": { "add-stream": "^1.0.0", - "conventional-changelog": "^3.1.17", + "conventional-changelog": "^3.1.18", "lodash": "^4.17.15", "meow": "^5.0.0", "tempfile": "^3.0.0" @@ -1081,9 +1081,9 @@ } }, "conventional-changelog-core": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.3.tgz", - "integrity": "sha512-VNDecw0N/osMiFHbb20R1PzxwbSZMdyCyJmc95mmElPrruOsJuKEozMBi0JJuOY7kXJ7kO/TbFDRviJg4z0feA==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.4.tgz", + "integrity": "sha512-LO58ZbEpp1Ul+y/vOI8rJRsWkovsYkCFbOCVgi6UnVfU8WC0F8K8VQQwaBZWWUpb6JvEiN4GBR5baRP2txZ+Vg==", "dev": true, "requires": { "add-stream": "^1.0.0", diff --git a/package.json b/package.json index 6c0b948..9d5e1bf 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@typescript-eslint/eslint-plugin": "^2.11.0", "@typescript-eslint/parser": "^2.11.0", "chai": "^4.2.0", - "conventional-changelog-cli": "^2.0.30", + "conventional-changelog-cli": "^2.0.31", "cross-env": "^6.0.0", "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", From e14190a872750320a0f8813c418febff7a9f408a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2019 19:35:12 +0000 Subject: [PATCH 052/136] chore: bump @types/node from 12.12.17 to 12.12.18 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.17 to 12.12.18. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0456a48..b398eba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz", - "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==", + "version": "12.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.18.tgz", + "integrity": "sha512-DBkZuIMFuAfjJHiunyRc+aNvmXYNwV1IPMgGKGlwCp6zh6MKrVtmvjSWK/axWcD25KJffkXgkfvFra8ndenXAw==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 9d5e1bf..8f6b779 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.17", + "@types/node": "^12.12.18", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.11.0", "@typescript-eslint/parser": "^2.11.0", From fd9dc7faba0a0ebc6e099a4a2ba6a4006fd743b2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2019 19:45:04 +0000 Subject: [PATCH 053/136] chore: bump @typescript-eslint/parser from 2.11.0 to 2.12.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.11.0 to 2.12.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.12.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index b398eba..f18570a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -466,32 +466,32 @@ } }, "@typescript-eslint/parser": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.11.0.tgz", - "integrity": "sha512-DyGXeqhb3moMioEFZIHIp7oXBBh7dEfPTzGrlyP0Mi9ScCra4SWEGs3kPd18mG7Sy9Wy8z88zmrw5tSGL6r/6A==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.12.0.tgz", + "integrity": "sha512-lPdkwpdzxEfjI8TyTzZqPatkrswLSVu4bqUgnB03fHSOwpC7KSerPgJRgIAf11UGNf7HKjJV6oaPZI4AghLU6g==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.11.0", - "@typescript-eslint/typescript-estree": "2.11.0", + "@typescript-eslint/experimental-utils": "2.12.0", + "@typescript-eslint/typescript-estree": "2.12.0", "eslint-visitor-keys": "^1.1.0" }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.11.0.tgz", - "integrity": "sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.12.0.tgz", + "integrity": "sha512-jv4gYpw5N5BrWF3ntROvCuLe1IjRenLy5+U57J24NbPGwZFAjhnM45qpq0nDH1y/AZMb3Br25YiNVwyPbz6RkA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.11.0", + "@typescript-eslint/typescript-estree": "2.12.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.11.0.tgz", - "integrity": "sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.12.0.tgz", + "integrity": "sha512-rGehVfjHEn8Frh9UW02ZZIfJs6SIIxIu/K1bbci8rFfDE/1lQ8krIJy5OXOV3DVnNdDPtoiPOdEANkLMrwXbiQ==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 8f6b779..f3a2bfc 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^12.12.18", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.11.0", - "@typescript-eslint/parser": "^2.11.0", + "@typescript-eslint/parser": "^2.12.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^6.0.0", From d9ca451f684fa422d83e7fb9d0d46faed2e39316 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2019 19:52:33 +0000 Subject: [PATCH 054/136] chore: bump @typescript-eslint/eslint-plugin from 2.11.0 to 2.12.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.11.0 to 2.12.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.12.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index f18570a..d16a765 100644 --- a/package-lock.json +++ b/package-lock.json @@ -434,12 +434,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.11.0.tgz", - "integrity": "sha512-G2HHA1vpMN0EEbUuWubiCCfd0R3a30BB+UdvnFkxwZIxYEGOrWEXDv8tBFO9f44CWc47Xv9lLM3VSn4ORLI2bA==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.12.0.tgz", + "integrity": "sha512-1t4r9rpLuEwl3hgt90jY18wJHSyb0E3orVL3DaqwmpiSDHmHiSspVsvsFF78BJ/3NNG3qmeso836jpuBWYziAA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.11.0", + "@typescript-eslint/experimental-utils": "2.12.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -455,13 +455,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.11.0.tgz", - "integrity": "sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.12.0.tgz", + "integrity": "sha512-jv4gYpw5N5BrWF3ntROvCuLe1IjRenLy5+U57J24NbPGwZFAjhnM45qpq0nDH1y/AZMb3Br25YiNVwyPbz6RkA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.11.0", + "@typescript-eslint/typescript-estree": "2.12.0", "eslint-scope": "^5.0.0" } }, @@ -526,9 +526,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.11.0.tgz", - "integrity": "sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.12.0.tgz", + "integrity": "sha512-rGehVfjHEn8Frh9UW02ZZIfJs6SIIxIu/K1bbci8rFfDE/1lQ8krIJy5OXOV3DVnNdDPtoiPOdEANkLMrwXbiQ==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index f3a2bfc..065e937 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^12.12.18", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.11.0", + "@typescript-eslint/eslint-plugin": "^2.12.0", "@typescript-eslint/parser": "^2.12.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From dab86f9737c7a1c412b7752dba205563135768c4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2019 18:15:34 +0000 Subject: [PATCH 055/136] chore: bump @types/node from 12.12.18 to 12.12.20 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.18 to 12.12.20. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d16a765..678b016 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.18.tgz", - "integrity": "sha512-DBkZuIMFuAfjJHiunyRc+aNvmXYNwV1IPMgGKGlwCp6zh6MKrVtmvjSWK/axWcD25KJffkXgkfvFra8ndenXAw==", + "version": "12.12.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.20.tgz", + "integrity": "sha512-VAe+DiwpnC/g448uN+/3gRl4th0BTdrR9gSLIOHA+SUQskaYZQDOHG7xmjiE7JUhjbXnbXytf6Ih+/pA6CtMFQ==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 065e937..f9f8702 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.18", + "@types/node": "^12.12.20", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.12.0", "@typescript-eslint/parser": "^2.12.0", From e9e1d5c7271c4e25b5dca05215463b9d79dc770c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2019 14:44:20 +0000 Subject: [PATCH 056/136] chore: bump @types/node from 12.12.20 to 12.12.21 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.20 to 12.12.21. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 678b016..392cb20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -410,9 +410,9 @@ "dev": true }, "@types/node": { - "version": "12.12.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.20.tgz", - "integrity": "sha512-VAe+DiwpnC/g448uN+/3gRl4th0BTdrR9gSLIOHA+SUQskaYZQDOHG7xmjiE7JUhjbXnbXytf6Ih+/pA6CtMFQ==", + "version": "12.12.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.21.tgz", + "integrity": "sha512-8sRGhbpU+ck1n0PGAUgVrWrWdjSW2aqNeyC15W88GRsMpSwzv6RJGlLhE7s2RhVSOdyDmxbqlWSeThq4/7xqlA==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index f9f8702..1ab967a 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.20", + "@types/node": "^12.12.21", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.12.0", "@typescript-eslint/parser": "^2.12.0", From cca4d034fc454b8573fe968d84725bf8cd798960 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2019 21:09:08 +0000 Subject: [PATCH 057/136] chore: bump eslint from 6.7.2 to 6.8.0 Bumps [eslint](https://github.com/eslint/eslint) from 6.7.2 to 6.8.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v6.7.2...v6.8.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 20 ++++++++++---------- package.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 392cb20..bd70fc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1632,9 +1632,9 @@ "dev": true }, "eslint": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.2.tgz", - "integrity": "sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1988,9 +1988,9 @@ "dev": true }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { @@ -2743,9 +2743,9 @@ "dev": true }, "inquirer": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", - "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz", + "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", @@ -2757,7 +2757,7 @@ "lodash": "^4.17.15", "mute-stream": "0.0.8", "run-async": "^2.2.0", - "rxjs": "^6.4.0", + "rxjs": "^6.5.3", "string-width": "^4.1.0", "strip-ansi": "^5.1.0", "through": "^2.3.6" diff --git a/package.json b/package.json index 1ab967a..d12028a 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^6.0.0", - "eslint": "^6.7.2", + "eslint": "^6.8.0", "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-prettier": "^3.1.2", From 8753553e79c5391f94736fa523037f86c3acf672 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2019 18:48:19 +0000 Subject: [PATCH 058/136] chore: bump typescript from 3.7.3 to 3.7.4 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.3 to 3.7.4. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index bd70fc3..3a85366 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4621,9 +4621,9 @@ "dev": true }, "typescript": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz", - "integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz", + "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index d12028a..dad623c 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "sinon": "^7.3.2", "source-map-support": "^0.5.16", "ts-node": "^8.5.4", - "typescript": "^3.7.3" + "typescript": "^3.7.4" }, "files": [ "dist/**/*" From eb91b2d29ec551df39718d97b57b35a493f7e2e9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2019 16:32:31 +0000 Subject: [PATCH 059/136] chore: bump sinon from 7.5.0 to 8.0.0 Bumps [sinon](https://github.com/sinonjs/sinon) from 7.5.0 to 8.0.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v7.5.0...v8.0.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 107 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 67 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3a85366..caa165d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -342,41 +342,33 @@ } }, "@sinonjs/commons": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.6.0.tgz", - "integrity": "sha512-w4/WHG7C4WWFyE5geCieFJF6MZkbW4VAriol5KlmQXpAQdxvV0p26sqNZOW6Qyw6Y0l9K4g+cHvvczR2sEEpqg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.0.tgz", + "integrity": "sha512-qbk9AP+cZUsKdW1GJsBpxPKFmCJ0T8swwzVje3qFd+AkQb74Q/tiuzrdfFg8AD2g5HH/XbE/I8Uc1KYHVYWfhg==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/formatio": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", - "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-4.0.1.tgz", + "integrity": "sha512-asIdlLFrla/WZybhm0C8eEzaDNNrzymiTqHMeJl6zPW2881l3uuVRpm0QlRQEjqYWv6CcKMGYME3LbrLJsORBw==", "dev": true, "requires": { "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^3.1.0" + "@sinonjs/samsam": "^4.2.0" } }, "@sinonjs/samsam": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", - "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-4.2.0.tgz", + "integrity": "sha512-yG7QbUz38ZPIegfuSMEcbOo0kkLGmPa8a0Qlz4dk7+cXYALDScWjIZzAm/u2+Frh+bcdZF6wZJZwwuJjY0WAjA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.3.0", + "@sinonjs/commons": "^1.6.0", "array-from": "^2.1.1", - "lodash": "^4.17.15" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } + "lodash.get": "^4.4.2" } }, "@sinonjs/text-encoding": { @@ -3088,6 +3080,12 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, "lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -3129,10 +3127,13 @@ } }, "lolex": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", - "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", - "dev": true + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", + "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } }, "loud-rejection": { "version": "1.6.0", @@ -3443,15 +3444,16 @@ "dev": true }, "nise": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.2.tgz", - "integrity": "sha512-/6RhOUlicRCbE9s+94qCUsyE+pKlVJ5AhIv+jEE7ESKwnbXqulKZ1FYU+XAtHHWE9TinYvAxDUJAb912PwPoWA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-3.0.0.tgz", + "integrity": "sha512-EObFx5tioBMePHpU/gGczaY2YDqL255iwjmZwswu2CiwEW8xIGrr3E2xij+efIppS1nLQo9NyXSIUySGHUOhHQ==", "dev": true, "requires": { - "@sinonjs/formatio": "^3.2.1", + "@sinonjs/commons": "^1.7.0", + "@sinonjs/formatio": "^4.0.1", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", - "lolex": "^4.1.0", + "lolex": "^5.0.1", "path-to-regexp": "^1.7.0" } }, @@ -3820,9 +3822,9 @@ "dev": true }, "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "dev": true, "requires": { "isarray": "0.0.1" @@ -4164,18 +4166,41 @@ "dev": true }, "sinon": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", - "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.0.0.tgz", + "integrity": "sha512-9ugfO9tMrxTzqViG0hGhJoLXj8M01FZwfXMpYSmQT1AuV2jyXDJZUMpbENHBY9/2c2u6RKkHOcbYINx2FttUkg==", "dev": true, "requires": { "@sinonjs/commons": "^1.4.0", - "@sinonjs/formatio": "^3.2.1", - "@sinonjs/samsam": "^3.3.3", - "diff": "^3.5.0", - "lolex": "^4.2.0", - "nise": "^1.5.2", - "supports-color": "^5.5.0" + "@sinonjs/formatio": "^4.0.1", + "@sinonjs/samsam": "^4.0.1", + "diff": "^4.0.1", + "lolex": "^5.1.2", + "nise": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "slash": { diff --git a/package.json b/package.json index dad623c..8239d9f 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "mocha": "^6.1.4", "nyc": "^14.1.1", "prettier": "^1.19.1", - "sinon": "^7.3.2", + "sinon": "^8.0.0", "source-map-support": "^0.5.16", "ts-node": "^8.5.4", "typescript": "^3.7.4" From b08b6978119dbea4a914fd1de0a57b2f7477cc74 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2019 09:06:48 +0000 Subject: [PATCH 060/136] chore: bump nyc from 14.1.1 to 15.0.0 Bumps [nyc](https://github.com/istanbuljs/nyc) from 14.1.1 to 15.0.0. - [Release notes](https://github.com/istanbuljs/nyc/releases) - [Changelog](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md) - [Commits](https://github.com/istanbuljs/nyc/compare/v14.1.1...v15.0.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 1030 ++++++++++++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 690 insertions(+), 342 deletions(-) diff --git a/package-lock.json b/package-lock.json index caa165d..5e391f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,49 @@ "@babel/highlight": "^7.0.0" } }, + "@babel/core": { + "version": "7.7.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.7.tgz", + "integrity": "sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.7", + "@babel/helpers": "^7.7.4", + "@babel/parser": "^7.7.7", + "@babel/template": "^7.7.4", + "@babel/traverse": "^7.7.4", + "@babel/types": "^7.7.4", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, "@babel/generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz", - "integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==", + "version": "7.7.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", + "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", "dev": true, "requires": { - "@babel/types": "^7.6.3", + "@babel/types": "^7.7.4", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -34,32 +70,43 @@ } }, "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", + "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/helper-get-function-arity": "^7.7.4", + "@babel/template": "^7.7.4", + "@babel/types": "^7.7.4" } }, "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", + "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.7.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", + "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", "dev": true, "requires": { - "@babel/types": "^7.4.4" + "@babel/types": "^7.7.4" + } + }, + "@babel/helpers": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.4.tgz", + "integrity": "sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg==", + "dev": true, + "requires": { + "@babel/template": "^7.7.4", + "@babel/traverse": "^7.7.4", + "@babel/types": "^7.7.4" } }, "@babel/highlight": { @@ -74,43 +121,43 @@ } }, "@babel/parser": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz", - "integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A==", + "version": "7.7.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", + "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", "dev": true }, "@babel/template": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.6.0.tgz", - "integrity": "sha512-5AEH2EXD8euCk446b7edmgFdub/qfH1SN6Nii3+fyXP807QRx9Q73A2N5hNwRRslC2H9sNzaFhsPubkS4L8oNQ==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", + "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.6.0", - "@babel/types": "^7.6.0" + "@babel/parser": "^7.7.4", + "@babel/types": "^7.7.4" } }, "@babel/traverse": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz", - "integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", + "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", "dev": true, "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.3", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.6.3", - "@babel/types": "^7.6.3", + "@babel/generator": "^7.7.4", + "@babel/helper-function-name": "^7.7.4", + "@babel/helper-split-export-declaration": "^7.7.4", + "@babel/parser": "^7.7.4", + "@babel/types": "^7.7.4", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" } }, "@babel/types": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", - "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", + "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -330,6 +377,81 @@ "execa": "0.11.0" } }, + "@istanbuljs/load-nyc-config": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", + "integrity": "sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "dev": true + }, "@marionebl/sander": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/@marionebl/sander/-/sander-0.6.1.tgz", @@ -383,6 +505,12 @@ "integrity": "sha512-luq8meHGYwvky0O7u0eQZdA7B4Wd9owUCqvbw2m3XCrCU8mplYOujMBbvyS547AxJkC+pGnd0Cm15eNxEUNU8g==", "dev": true }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, "@types/eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -582,6 +710,24 @@ "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", "dev": true }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + } + } + }, "ajv": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", @@ -625,12 +771,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": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, "requires": { - "default-require-extensions": "^2.0.0" + "default-require-extensions": "^3.0.0" } }, "archy": { @@ -769,15 +915,15 @@ "dev": true }, "caching-transform": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", - "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, "requires": { - "hasha": "^3.0.0", - "make-dir": "^2.0.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.4.2" + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" } }, "caller-callsite": { @@ -872,6 +1018,12 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -1300,9 +1452,9 @@ } }, "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==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -1350,27 +1502,6 @@ } } }, - "cp-file": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", - "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "make-dir": "^2.0.0", - "nested-error-stacks": "^2.0.0", - "pify": "^4.0.1", - "safe-buffer": "^5.0.1" - }, - "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - } - } - }, "cross-env": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", @@ -1517,12 +1648,20 @@ "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": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", "dev": true, "requires": { - "strip-bom": "^3.0.0" + "strip-bom": "^4.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + } } }, "define-properties": { @@ -2010,33 +2149,33 @@ } }, "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", + "integrity": "sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg==", "dev": true, "requires": { "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" + "make-dir": "^3.0.0", + "pkg-dir": "^4.1.0" }, "dependencies": { "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "p-limit": { @@ -2049,12 +2188,12 @@ } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-try": { @@ -2063,13 +2202,19 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "find-up": "^3.0.0" + "find-up": "^4.0.0" } } } @@ -2121,27 +2266,64 @@ "dev": true }, "foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" }, "dependencies": { "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "isexe": "^2.0.0" } } } }, + "fromentries": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", + "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2523,12 +2705,21 @@ "dev": true }, "hasha": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", - "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.1.0.tgz", + "integrity": "sha512-OFPDWmzPN1l7atOV1TgBVmNtBxaIysToK6Ve9DK+vT6pYuklw/nPNT+HJbZi0KDcI6vWB+9tgvZ5YD7fA3CXcA==", "dev": true, "requires": { - "is-stream": "^1.0.1" + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "dependencies": { + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + } } }, "he": { @@ -2543,6 +2734,12 @@ "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", "dev": true }, + "html-escaper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.0.tgz", + "integrity": "sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig==", + "dev": true + }, "husky": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/husky/-/husky-3.1.0.tgz", @@ -2874,12 +3071,24 @@ "text-extensions": "^1.0.0" } }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2893,77 +3102,157 @@ "dev": true }, "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", "dev": true }, "istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, "requires": { - "append-transform": "^1.0.0" + "append-transform": "^2.0.0" } }, "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.0.tgz", + "integrity": "sha512-Nm4wVHdo7ZXSG30KjZ2Wl5SU/Bw7bDx1PdaiIFzEStdjs0H12mOTncn1GVYuqQSaZxpg87VGBRsVRPGD2cD1AQ==", "dev": true, "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" + "@babel/core": "^7.7.5", + "@babel/parser": "^7.7.5", + "@babel/template": "^7.7.4", + "@babel/traverse": "^7.7.4", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, - "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" }, "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } - } - } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "rimraf": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", + "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } }, "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", "dev": true, "requires": { "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", + "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" } }, "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A==", "dev": true, "requires": { - "handlebars": "^4.1.2" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" } }, "js-tokens": { @@ -3012,6 +3301,15 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "json5": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -3145,38 +3443,13 @@ "signal-exit": "^3.0.0" } }, - "lru-cache": { - "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", - "yallist": "^2.1.2" - } - }, "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", + "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", "dev": true, "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "dependencies": { - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "semver": "^6.0.0" } }, "make-error": { @@ -3208,15 +3481,6 @@ "yargs-parser": "^10.0.0" } }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - } - }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -3431,12 +3695,6 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, - "nested-error-stacks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", - "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", - "dev": true - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -3475,6 +3733,15 @@ } } }, + "node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "requires": { + "process-on-spawn": "^1.0.0" + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -3511,61 +3778,120 @@ "dev": true }, "nyc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", - "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "caching-transform": "^3.0.2", - "convert-source-map": "^1.6.0", - "cp-file": "^6.2.0", - "find-cache-dir": "^2.1.0", - "find-up": "^3.0.0", - "foreground-child": "^1.5.6", - "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.0.0.tgz", + "integrity": "sha512-qcLBlNCKMDVuKb7d1fpxjPR8sHeMVX0CHarXAVzrVWoFrigCkYR8xcrjfXSPi5HXM7EU78L6ywO7w1c5rZNCNg==", + "dev": true, + "requires": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.0", "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "merge-source-map": "^1.1.0", - "resolve-from": "^4.0.0", - "rimraf": "^2.6.3", + "make-dir": "^3.0.0", + "node-preload": "^0.2.0", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", "signal-exit": "^3.0.2", - "spawn-wrap": "^1.4.2", - "test-exclude": "^5.2.3", - "uuid": "^3.3.2", - "yargs": "^13.2.2", - "yargs-parser": "^13.0.0" + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "uuid": "^3.3.3", + "yargs": "^15.0.2" }, "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.0.tgz", + "integrity": "sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "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" } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "p-limit": { @@ -3578,12 +3904,12 @@ } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-try": { @@ -3592,16 +3918,64 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "resolve-from": { + "path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, + "rimraf": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", + "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.0.2.tgz", + "integrity": "sha512-GH/X/hYt+x5hOat4LMnCqMd8r5Cv78heOMIJn1hr7QPPBqfeC6p89Y78+WB9yGDvfpCvgasfmWLzNzEioOUD9Q==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^16.1.0" + } + }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", + "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -3718,12 +4092,6 @@ "word-wrap": "~1.2.3" } }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -3754,6 +4122,15 @@ "p-limit": "^1.1.0" } }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -3761,13 +4138,13 @@ "dev": true }, "package-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", - "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, "requires": { "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", + "hasha": "^5.0.0", "lodash.flattendeep": "^4.4.0", "release-zalgo": "^1.0.0" } @@ -3919,18 +4296,21 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "requires": { + "fromentries": "^1.2.0" + } + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -4245,17 +4625,37 @@ } }, "spawn-wrap": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", - "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", "signal-exit": "^3.0.2", - "which": "^1.3.0" + "which": "^2.0.1" + }, + "dependencies": { + "rimraf": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", + "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, "spdx-correct": { @@ -4467,70 +4867,14 @@ } }, "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - } + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" } }, "text-extensions": { @@ -4645,6 +4989,15 @@ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "typescript": { "version": "3.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz", @@ -4820,14 +5173,15 @@ } }, "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.1.tgz", + "integrity": "sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } }, "xtend": { @@ -4842,12 +5196,6 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, "yargs": { "version": "13.3.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", diff --git a/package.json b/package.json index 8239d9f..5b256fd 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "eslint-plugin-promise": "^4.2.1", "husky": "^3.1.0", "mocha": "^6.1.4", - "nyc": "^14.1.1", + "nyc": "^15.0.0", "prettier": "^1.19.1", "sinon": "^8.0.0", "source-map-support": "^0.5.16", From a2dbae07888af0bef72d4c04939b80fdc58504cb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2019 11:23:19 +0000 Subject: [PATCH 061/136] chore: bump sinon from 8.0.0 to 8.0.1 Bumps [sinon](https://github.com/sinonjs/sinon) from 8.0.0 to 8.0.1. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v8.0.0...v8.0.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e391f3..6ee8686 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4546,12 +4546,12 @@ "dev": true }, "sinon": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.0.0.tgz", - "integrity": "sha512-9ugfO9tMrxTzqViG0hGhJoLXj8M01FZwfXMpYSmQT1AuV2jyXDJZUMpbENHBY9/2c2u6RKkHOcbYINx2FttUkg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.0.1.tgz", + "integrity": "sha512-vbXMHBszVioyPsuRDLEiPEgvkZnbjfdCFvLYV4jONNJqZNLWTwZ/gYSNh3SuiT1w9MRXUz+S7aX0B4Ar2XI8iw==", "dev": true, "requires": { - "@sinonjs/commons": "^1.4.0", + "@sinonjs/commons": "^1.7.0", "@sinonjs/formatio": "^4.0.1", "@sinonjs/samsam": "^4.0.1", "diff": "^4.0.1", diff --git a/package.json b/package.json index 5b256fd..fb8683d 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "mocha": "^6.1.4", "nyc": "^15.0.0", "prettier": "^1.19.1", - "sinon": "^8.0.0", + "sinon": "^8.0.1", "source-map-support": "^0.5.16", "ts-node": "^8.5.4", "typescript": "^3.7.4" From 4042501c18495a9bfa219dd5528eb8a6b0f04283 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2019 17:05:43 +0000 Subject: [PATCH 062/136] chore: bump @types/node from 12.12.21 to 13.1.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.21 to 13.1.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 14 +++++++++++--- package.json | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6ee8686..586bd4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -286,6 +286,14 @@ "lodash": "4.17.14", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0" + }, + "dependencies": { + "@types/node": { + "version": "12.12.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.22.tgz", + "integrity": "sha512-r5i93jqbPWGXYXxianGATOxTelkp6ih/U0WVnvaqAvTqM+0U6J3kw6Xk6uq/dWNRkEVw/0SLcO5ORXbVNz4FMQ==", + "dev": true + } } }, "@commitlint/rules": { @@ -530,9 +538,9 @@ "dev": true }, "@types/node": { - "version": "12.12.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.21.tgz", - "integrity": "sha512-8sRGhbpU+ck1n0PGAUgVrWrWdjSW2aqNeyC15W88GRsMpSwzv6RJGlLhE7s2RhVSOdyDmxbqlWSeThq4/7xqlA==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.0.tgz", + "integrity": "sha512-zwrxviZS08kRX40nqBrmERElF2vpw4IUTd5khkhBTfFH8AOaeoLVx48EC4+ZzS2/Iga7NevncqnsUSYjM4OWYA==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index fb8683d..55185eb 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^12.12.21", + "@types/node": "^13.1.0", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.12.0", "@typescript-eslint/parser": "^2.12.0", From f94719a3ef1f24c5e088cbec490513bd8cc1809c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 11:10:19 +0000 Subject: [PATCH 063/136] chore: bump @typescript-eslint/eslint-plugin from 2.12.0 to 2.13.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.12.0 to 2.13.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.13.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 586bd4a..e8d04cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -562,12 +562,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.12.0.tgz", - "integrity": "sha512-1t4r9rpLuEwl3hgt90jY18wJHSyb0E3orVL3DaqwmpiSDHmHiSspVsvsFF78BJ/3NNG3qmeso836jpuBWYziAA==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.13.0.tgz", + "integrity": "sha512-QoiANo0MMGNa8ej/yX3BrW5dZj5d8HYcKiM2fyYUlezECqn8Xc7T/e4EUdiGinn8jhBrn+9X47E9TWaaup3u1g==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.12.0", + "@typescript-eslint/experimental-utils": "2.13.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -583,13 +583,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.12.0.tgz", - "integrity": "sha512-jv4gYpw5N5BrWF3ntROvCuLe1IjRenLy5+U57J24NbPGwZFAjhnM45qpq0nDH1y/AZMb3Br25YiNVwyPbz6RkA==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.13.0.tgz", + "integrity": "sha512-+Hss3clwa6aNiC8ZjA45wEm4FutDV5HsVXPl/rDug1THq6gEtOYRGLqS3JlTk7mSnL5TbJz0LpEbzbPnKvY6sw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.12.0", + "@typescript-eslint/typescript-estree": "2.13.0", "eslint-scope": "^5.0.0" } }, @@ -654,9 +654,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.12.0.tgz", - "integrity": "sha512-rGehVfjHEn8Frh9UW02ZZIfJs6SIIxIu/K1bbci8rFfDE/1lQ8krIJy5OXOV3DVnNdDPtoiPOdEANkLMrwXbiQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.13.0.tgz", + "integrity": "sha512-t21Mg5cc8T3ADEUGwDisHLIubgXKjuNRbkpzDMLb7/JMmgCe/gHM9FaaujokLey+gwTuLF5ndSQ7/EfQqrQx4g==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 55185eb..3efa0c1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^13.1.0", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.12.0", + "@typescript-eslint/eslint-plugin": "^2.13.0", "@typescript-eslint/parser": "^2.12.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From 1e136d4216a85c82c18519c97d5ca87f879860a2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 11:31:23 +0000 Subject: [PATCH 064/136] chore: bump @typescript-eslint/parser from 2.12.0 to 2.13.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.12.0 to 2.13.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.13.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 58 ++++------------------------------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8d04cf..270797b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -594,63 +594,15 @@ } }, "@typescript-eslint/parser": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.12.0.tgz", - "integrity": "sha512-lPdkwpdzxEfjI8TyTzZqPatkrswLSVu4bqUgnB03fHSOwpC7KSerPgJRgIAf11UGNf7HKjJV6oaPZI4AghLU6g==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.13.0.tgz", + "integrity": "sha512-vbDeLr5QRJ1K7x5iRK8J9wuGwR9OVyd1zDAY9XFAQvAosHVjSVbDgkm328ayE6hx2QWVGhwvGaEhedcqAbfQcA==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.12.0", - "@typescript-eslint/typescript-estree": "2.12.0", + "@typescript-eslint/experimental-utils": "2.13.0", + "@typescript-eslint/typescript-estree": "2.13.0", "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.12.0.tgz", - "integrity": "sha512-jv4gYpw5N5BrWF3ntROvCuLe1IjRenLy5+U57J24NbPGwZFAjhnM45qpq0nDH1y/AZMb3Br25YiNVwyPbz6RkA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.12.0", - "eslint-scope": "^5.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.12.0.tgz", - "integrity": "sha512-rGehVfjHEn8Frh9UW02ZZIfJs6SIIxIu/K1bbci8rFfDE/1lQ8krIJy5OXOV3DVnNdDPtoiPOdEANkLMrwXbiQ==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash.unescape": "4.0.1", - "semver": "^6.3.0", - "tsutils": "^3.17.1" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "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" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index 3efa0c1..c3f63cb 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^13.1.0", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.13.0", - "@typescript-eslint/parser": "^2.12.0", + "@typescript-eslint/parser": "^2.13.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^6.0.0", From 352e345e606afe232db95cdcc634ec40074ccd6e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 23:55:25 +0000 Subject: [PATCH 065/136] chore: bump eslint-config-prettier from 6.7.0 to 6.8.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.7.0 to 6.8.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/commits/v6.8.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 270797b..79ccfcd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1779,9 +1779,9 @@ } }, "eslint-config-prettier": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.7.0.tgz", - "integrity": "sha512-FamQVKM3jjUVwhG4hEMnbtsq7xOIDm+SY5iBPfR8gKsJoAB2IQnNF+bk1+8Fy44Nq7PPJaLvkRxILYdJWoguKQ==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.8.0.tgz", + "integrity": "sha512-aq4M7mjjVregZ2l45O9qz6Mv6f5zVMl/IqfmUL8hNOoDAzVKYMhYPJytbqE/lPIVO1iMDXIFqjiEE59BfJZpZw==", "dev": true, "requires": { "get-stdin": "^6.0.0" diff --git a/package.json b/package.json index c3f63cb..601bfd9 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "conventional-changelog-cli": "^2.0.31", "cross-env": "^6.0.0", "eslint": "^6.8.0", - "eslint-config-prettier": "^6.7.0", + "eslint-config-prettier": "^6.8.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", From f83e6adda7ea2fa4b2038c72fe2d67ba0d3fd186 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2019 17:39:38 +0000 Subject: [PATCH 066/136] chore: bump @types/node from 13.1.0 to 13.1.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.0 to 13.1.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 79ccfcd..7be543b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -538,9 +538,9 @@ "dev": true }, "@types/node": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.0.tgz", - "integrity": "sha512-zwrxviZS08kRX40nqBrmERElF2vpw4IUTd5khkhBTfFH8AOaeoLVx48EC4+ZzS2/Iga7NevncqnsUSYjM4OWYA==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.1.tgz", + "integrity": "sha512-hx6zWtudh3Arsbl3cXay+JnkvVgCKzCWKv42C9J01N2T2np4h8w5X8u6Tpz5mj38kE3M9FM0Pazx8vKFFMnjLQ==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 601bfd9..b7369be 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^13.1.0", + "@types/node": "^13.1.1", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.13.0", "@typescript-eslint/parser": "^2.13.0", From 8eca5a3be44f212111cc10e7286ab2662ff2c297 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2019 12:04:23 +0000 Subject: [PATCH 067/136] chore: bump eslint-config-prettier from 6.8.0 to 6.9.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.8.0 to 6.9.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.8.0...v6.9.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7be543b..2992b50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1779,9 +1779,9 @@ } }, "eslint-config-prettier": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.8.0.tgz", - "integrity": "sha512-aq4M7mjjVregZ2l45O9qz6Mv6f5zVMl/IqfmUL8hNOoDAzVKYMhYPJytbqE/lPIVO1iMDXIFqjiEE59BfJZpZw==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz", + "integrity": "sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA==", "dev": true, "requires": { "get-stdin": "^6.0.0" diff --git a/package.json b/package.json index b7369be..83ca57f 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "conventional-changelog-cli": "^2.0.31", "cross-env": "^6.0.0", "eslint": "^6.8.0", - "eslint-config-prettier": "^6.8.0", + "eslint-config-prettier": "^6.9.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", From 477302a01916adc62b37680b58ae88237f1ef019 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2019 18:16:45 +0000 Subject: [PATCH 068/136] chore: bump @typescript-eslint/eslint-plugin from 2.13.0 to 2.14.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.13.0 to 2.14.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.14.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 54 +++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2992b50..80e2d66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -562,23 +562,69 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.13.0.tgz", - "integrity": "sha512-QoiANo0MMGNa8ej/yX3BrW5dZj5d8HYcKiM2fyYUlezECqn8Xc7T/e4EUdiGinn8jhBrn+9X47E9TWaaup3u1g==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.14.0.tgz", + "integrity": "sha512-sneOJ3Hu0m5whJiVIxGBZZZMxMJ7c0LhAJzeMJgHo+n5wFs+/6rSR/gl7crkdR2kNwfOOSdzdc0gMvatG4dX2Q==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.13.0", + "@typescript-eslint/experimental-utils": "2.14.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" }, "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.14.0.tgz", + "integrity": "sha512-KcyKS7G6IWnIgl3ZpyxyBCxhkBPV+0a5Jjy2g5HxlrbG2ZLQNFeneIBVXdaBCYOVjvGmGGFKom1kgiAY75SDeQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.14.0", + "eslint-scope": "^5.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.14.0.tgz", + "integrity": "sha512-pnLpUcMNG7GfFFfNQbEX6f1aPa5fMnH2G9By+A1yovYI4VIOK2DzkaRuUlIkbagpAcrxQHLqovI1YWqEcXyRnA==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "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" + } + }, "regexpp": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, diff --git a/package.json b/package.json index 83ca57f..788a873 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^13.1.1", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.13.0", + "@typescript-eslint/eslint-plugin": "^2.14.0", "@typescript-eslint/parser": "^2.13.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From eae8ea224d7dab878f852605b0348a8c5ae659c7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2020 13:36:35 +0000 Subject: [PATCH 069/136] chore: bump @typescript-eslint/parser from 2.13.0 to 2.14.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.13.0 to 2.14.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.14.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 80e2d66..8bcda4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -629,32 +629,32 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.13.0.tgz", - "integrity": "sha512-+Hss3clwa6aNiC8ZjA45wEm4FutDV5HsVXPl/rDug1THq6gEtOYRGLqS3JlTk7mSnL5TbJz0LpEbzbPnKvY6sw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.14.0.tgz", + "integrity": "sha512-KcyKS7G6IWnIgl3ZpyxyBCxhkBPV+0a5Jjy2g5HxlrbG2ZLQNFeneIBVXdaBCYOVjvGmGGFKom1kgiAY75SDeQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.13.0", + "@typescript-eslint/typescript-estree": "2.14.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.13.0.tgz", - "integrity": "sha512-vbDeLr5QRJ1K7x5iRK8J9wuGwR9OVyd1zDAY9XFAQvAosHVjSVbDgkm328ayE6hx2QWVGhwvGaEhedcqAbfQcA==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.14.0.tgz", + "integrity": "sha512-haS+8D35fUydIs+zdSf4BxpOartb/DjrZ2IxQ5sR8zyGfd77uT9ZJZYF8+I0WPhzqHmfafUBx8MYpcp8pfaoSA==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.13.0", - "@typescript-eslint/typescript-estree": "2.13.0", + "@typescript-eslint/experimental-utils": "2.14.0", + "@typescript-eslint/typescript-estree": "2.14.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.13.0.tgz", - "integrity": "sha512-t21Mg5cc8T3ADEUGwDisHLIubgXKjuNRbkpzDMLb7/JMmgCe/gHM9FaaujokLey+gwTuLF5ndSQ7/EfQqrQx4g==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.14.0.tgz", + "integrity": "sha512-pnLpUcMNG7GfFFfNQbEX6f1aPa5fMnH2G9By+A1yovYI4VIOK2DzkaRuUlIkbagpAcrxQHLqovI1YWqEcXyRnA==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 788a873..2cf49d5 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^13.1.1", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.14.0", - "@typescript-eslint/parser": "^2.13.0", + "@typescript-eslint/parser": "^2.14.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^6.0.0", From b1eb714bb0008bc41a1713d9590169728b453401 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2020 05:54:47 +0000 Subject: [PATCH 070/136] chore: bump @types/node from 13.1.1 to 13.1.2 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.1 to 13.1.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8bcda4b..f29ae6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -538,9 +538,9 @@ "dev": true }, "@types/node": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.1.tgz", - "integrity": "sha512-hx6zWtudh3Arsbl3cXay+JnkvVgCKzCWKv42C9J01N2T2np4h8w5X8u6Tpz5mj38kE3M9FM0Pazx8vKFFMnjLQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.2.tgz", + "integrity": "sha512-B8emQA1qeKerqd1dmIsQYnXi+mmAzTB7flExjmy5X1aVAKFNNNDubkavwR13kR6JnpeLp3aLoJhwn9trWPAyFQ==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 2cf49d5..b383940 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^13.1.1", + "@types/node": "^13.1.2", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.14.0", "@typescript-eslint/parser": "^2.14.0", From a8d1a4813b40273e4e5100f82f8a8c3e14c04434 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2020 18:54:12 +0000 Subject: [PATCH 071/136] chore: bump sinon from 8.0.1 to 8.0.2 Bumps [sinon](https://github.com/sinonjs/sinon) from 8.0.1 to 8.0.2. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v8.0.1...v8.0.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 32 +++++++++++++------------------- package.json | 2 +- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index f29ae6c..0349de7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -491,14 +491,14 @@ } }, "@sinonjs/samsam": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-4.2.0.tgz", - "integrity": "sha512-yG7QbUz38ZPIegfuSMEcbOo0kkLGmPa8a0Qlz4dk7+cXYALDScWjIZzAm/u2+Frh+bcdZF6wZJZwwuJjY0WAjA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-4.2.1.tgz", + "integrity": "sha512-7+5S4C4wpug5pzHS+z/63+XUwsH7dtyYELDafoT1QnfruFh7eFjlDWwZXltUB0GLk6y5eMeAt34Bjx8wJ4KfSA==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", - "array-from": "^2.1.1", - "lodash.get": "^4.4.2" + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" } }, "@sinonjs/text-encoding": { @@ -812,12 +812,6 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, - "array-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", - "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", - "dev": true - }, "array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", @@ -3708,9 +3702,9 @@ "dev": true }, "nise": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-3.0.0.tgz", - "integrity": "sha512-EObFx5tioBMePHpU/gGczaY2YDqL255iwjmZwswu2CiwEW8xIGrr3E2xij+efIppS1nLQo9NyXSIUySGHUOhHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-3.0.1.tgz", + "integrity": "sha512-fYcH9y0drBGSoi88kvhpbZEsenX58Yr+wOJ4/Mi1K4cy+iGP/a73gNoyNhu5E9QxPdgTlVChfIaAlnyOy/gHUA==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", @@ -4552,17 +4546,17 @@ "dev": true }, "sinon": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.0.1.tgz", - "integrity": "sha512-vbXMHBszVioyPsuRDLEiPEgvkZnbjfdCFvLYV4jONNJqZNLWTwZ/gYSNh3SuiT1w9MRXUz+S7aX0B4Ar2XI8iw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.0.2.tgz", + "integrity": "sha512-8W1S7BnCyvk7SK+Xi15B1QAVLuS81G/NGmWefPb31+ly6xI3fXaug/g5oUdfc8+7ruC4Ay51AxuLlYm8diq6kA==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", "@sinonjs/formatio": "^4.0.1", - "@sinonjs/samsam": "^4.0.1", + "@sinonjs/samsam": "^4.2.1", "diff": "^4.0.1", "lolex": "^5.1.2", - "nise": "^3.0.0", + "nise": "^3.0.1", "supports-color": "^7.1.0" }, "dependencies": { diff --git a/package.json b/package.json index b383940..4a686fc 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "mocha": "^6.1.4", "nyc": "^15.0.0", "prettier": "^1.19.1", - "sinon": "^8.0.1", + "sinon": "^8.0.2", "source-map-support": "^0.5.16", "ts-node": "^8.5.4", "typescript": "^3.7.4" From 531fc0e7412f57144bd3194d650dddda5da4a103 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2020 19:24:06 +0000 Subject: [PATCH 072/136] chore: bump mocha from 6.2.2 to 7.0.0 Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.2 to 7.0.0. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v6.2.2...v7.0.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 218 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 201 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0349de7..f20a9d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -776,6 +776,16 @@ "color-convert": "^1.9.0" } }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "append-transform": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", @@ -892,6 +902,12 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -902,6 +918,15 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1012,6 +1037,22 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", @@ -2148,6 +2189,15 @@ "flat-cache": "^2.0.1" } }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, "find-cache-dir": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", @@ -2330,6 +2380,13 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -2966,6 +3023,15 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-buffer": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", @@ -3020,6 +3086,12 @@ "is-extglob": "^2.1.1" } }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, "is-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", @@ -3530,13 +3602,14 @@ } }, "mocha": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", - "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.0.tgz", + "integrity": "sha512-CirsOPbO3jU86YKjjMzFLcXIb5YiGLUrjrXFHoJ3e2z9vWiaZVCZQ2+gtRGMPWF+nFhN6AWwLM/juzAQ6KRkbA==", "dev": true, "requires": { "ansi-colors": "3.2.3", "browser-stdout": "1.3.1", + "chokidar": "3.3.0", "debug": "3.2.6", "diff": "3.5.0", "escape-string-regexp": "1.0.5", @@ -3549,7 +3622,7 @@ "minimatch": "3.0.4", "mkdirp": "0.5.1", "ms": "2.1.1", - "node-environment-flags": "1.0.5", + "node-environment-flags": "1.0.6", "object.assign": "4.1.0", "strip-json-comments": "2.0.1", "supports-color": "6.0.0", @@ -3615,9 +3688,9 @@ "dev": true }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -3716,9 +3789,9 @@ } }, "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", "dev": true, "requires": { "object.getownpropertydescriptors": "^2.0.3", @@ -3762,6 +3835,12 @@ } } }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -4015,13 +4094,92 @@ } }, "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", + "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + } } }, "object.values": { @@ -4230,6 +4388,12 @@ "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", "dev": true }, + "picomatch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", + "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==", + "dev": true + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -4375,6 +4539,15 @@ "util-deprecate": "~1.0.1" } }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, "redent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", @@ -4920,6 +5093,15 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "trim-newlines": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", @@ -5252,9 +5434,9 @@ } }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, "requires": { "p-try": "^2.0.0" diff --git a/package.json b/package.json index 4a686fc..7d77207 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", "husky": "^3.1.0", - "mocha": "^6.1.4", + "mocha": "^7.0.0", "nyc": "^15.0.0", "prettier": "^1.19.1", "sinon": "^8.0.2", From 9d59e8b911b976990558ae962689b5c9f23f8f55 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2020 15:14:44 +0000 Subject: [PATCH 073/136] chore: bump sinon from 8.0.2 to 8.1.1 Bumps [sinon](https://github.com/sinonjs/sinon) from 8.0.2 to 8.1.1. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md) - [Commits](https://github.com/sinonjs/sinon/compare/v8.0.2...v8.1.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index f20a9d8..41b1282 100644 --- a/package-lock.json +++ b/package-lock.json @@ -491,9 +491,9 @@ } }, "@sinonjs/samsam": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-4.2.1.tgz", - "integrity": "sha512-7+5S4C4wpug5pzHS+z/63+XUwsH7dtyYELDafoT1QnfruFh7eFjlDWwZXltUB0GLk6y5eMeAt34Bjx8wJ4KfSA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-4.2.2.tgz", + "integrity": "sha512-z9o4LZUzSD9Hl22zV38aXNykgFeVj8acqfFabCY6FY83n/6s/XwNJyYYldz6/9lBJanpno9h+oL6HTISkviweA==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -4719,24 +4719,24 @@ "dev": true }, "sinon": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.0.2.tgz", - "integrity": "sha512-8W1S7BnCyvk7SK+Xi15B1QAVLuS81G/NGmWefPb31+ly6xI3fXaug/g5oUdfc8+7ruC4Ay51AxuLlYm8diq6kA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.1.1.tgz", + "integrity": "sha512-E+tWr3acRdoe1nXbHMu86SSqA1WGM7Yw3jZRLvlCMnXwTHP8lgFFVn5BnKnF26uc5SfZ3D7pA9sN7S3Y2jG4Ew==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", "@sinonjs/formatio": "^4.0.1", - "@sinonjs/samsam": "^4.2.1", - "diff": "^4.0.1", + "@sinonjs/samsam": "^4.2.2", + "diff": "^4.0.2", "lolex": "^5.1.2", "nise": "^3.0.1", "supports-color": "^7.1.0" }, "dependencies": { "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, "has-flag": { diff --git a/package.json b/package.json index 7d77207..3546602 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "mocha": "^7.0.0", "nyc": "^15.0.0", "prettier": "^1.19.1", - "sinon": "^8.0.2", + "sinon": "^8.1.1", "source-map-support": "^0.5.16", "ts-node": "^8.5.4", "typescript": "^3.7.4" From b3b6a1800de16db2a41bc8d995eced5616040c57 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 25 Jan 2020 18:56:17 +0000 Subject: [PATCH 074/136] chore: bump cross-env from 6.0.3 to 7.0.0 Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 6.0.3 to 7.0.0. - [Release notes](https://github.com/kentcdodds/cross-env/releases) - [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md) - [Commits](https://github.com/kentcdodds/cross-env/compare/v6.0.3...v7.0.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 20 ++++++++++---------- package.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 41b1282..7580c78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1544,12 +1544,12 @@ } }, "cross-env": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz", - "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.0.tgz", + "integrity": "sha512-rV6M9ldNgmwP7bx5u6rZsTbYidzwvrwIYZnT08hSGLcQCcggofgFW+sNe7IhA1SRauPS0QuLbbX+wdNtpqE5CQ==", "dev": true, "requires": { - "cross-spawn": "^7.0.0" + "cross-spawn": "^7.0.1" }, "dependencies": { "cross-spawn": { @@ -1564,9 +1564,9 @@ } }, "path-key": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.0.tgz", - "integrity": "sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "shebang-command": { @@ -1585,9 +1585,9 @@ "dev": true }, "which": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.1.tgz", - "integrity": "sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" diff --git a/package.json b/package.json index 3546602..1a8efb4 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@typescript-eslint/parser": "^2.14.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", - "cross-env": "^6.0.0", + "cross-env": "^7.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.9.0", "eslint-plugin-import": "^2.19.1", From 5a11ffcd990d76d5ad1b324a966def07015e4e68 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 26 Jan 2020 12:16:30 +0000 Subject: [PATCH 075/136] chore: bump typescript from 3.7.4 to 3.7.5 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.4 to 3.7.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v3.7.4...v3.7.5) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7580c78..ee02354 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5181,9 +5181,9 @@ } }, "typescript": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz", - "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==", + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", + "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 1a8efb4..3dddcfc 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "sinon": "^8.1.1", "source-map-support": "^0.5.16", "ts-node": "^8.5.4", - "typescript": "^3.7.4" + "typescript": "^3.7.5" }, "files": [ "dist/**/*" From 69550bc449b6a609cc45aadf79b8007020ffcd8d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 18:07:55 +0000 Subject: [PATCH 076/136] chore: bump @typescript-eslint/eslint-plugin from 2.14.0 to 2.18.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.14.0 to 2.18.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.18.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 30 ++++++++++++++++++------------ package.json | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee02354..bc0193d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -562,12 +562,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.14.0.tgz", - "integrity": "sha512-sneOJ3Hu0m5whJiVIxGBZZZMxMJ7c0LhAJzeMJgHo+n5wFs+/6rSR/gl7crkdR2kNwfOOSdzdc0gMvatG4dX2Q==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.18.0.tgz", + "integrity": "sha512-kuO8WQjV+RCZvAXVRJfXWiJ8iYEtfHlKgcqqqXg9uUkIolEHuUaMmm8/lcO4xwCOtaw6mY0gStn2Lg4/eUXXYQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.14.0", + "@typescript-eslint/experimental-utils": "2.18.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -575,27 +575,27 @@ }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.14.0.tgz", - "integrity": "sha512-KcyKS7G6IWnIgl3ZpyxyBCxhkBPV+0a5Jjy2g5HxlrbG2ZLQNFeneIBVXdaBCYOVjvGmGGFKom1kgiAY75SDeQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz", + "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.14.0", + "@typescript-eslint/typescript-estree": "2.18.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.14.0.tgz", - "integrity": "sha512-pnLpUcMNG7GfFFfNQbEX6f1aPa5fMnH2G9By+A1yovYI4VIOK2DzkaRuUlIkbagpAcrxQHLqovI1YWqEcXyRnA==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz", + "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==", "dev": true, "requires": { "debug": "^4.1.1", "eslint-visitor-keys": "^1.1.0", "glob": "^7.1.6", "is-glob": "^4.0.1", - "lodash.unescape": "4.0.1", + "lodash": "^4.17.15", "semver": "^6.3.0", "tsutils": "^3.17.1" } @@ -614,6 +614,12 @@ "path-is-absolute": "^1.0.0" } }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, "regexpp": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", diff --git a/package.json b/package.json index 3dddcfc..f1c8071 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^5.2.7", "@types/node": "^13.1.2", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.14.0", + "@typescript-eslint/eslint-plugin": "^2.18.0", "@typescript-eslint/parser": "^2.14.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From a476f567c6356bac7b5225bdf1e9793c9e99b5dd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 18:51:36 +0000 Subject: [PATCH 077/136] chore: bump @typescript-eslint/parser from 2.14.0 to 2.18.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.14.0 to 2.18.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.18.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 38 +++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc0193d..9c0cdb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -635,39 +635,39 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.14.0.tgz", - "integrity": "sha512-KcyKS7G6IWnIgl3ZpyxyBCxhkBPV+0a5Jjy2g5HxlrbG2ZLQNFeneIBVXdaBCYOVjvGmGGFKom1kgiAY75SDeQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz", + "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.14.0", + "@typescript-eslint/typescript-estree": "2.18.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.14.0.tgz", - "integrity": "sha512-haS+8D35fUydIs+zdSf4BxpOartb/DjrZ2IxQ5sR8zyGfd77uT9ZJZYF8+I0WPhzqHmfafUBx8MYpcp8pfaoSA==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.18.0.tgz", + "integrity": "sha512-SJJPxFMEYEWkM6pGfcnjLU+NJIPo+Ko1QrCBL+i0+zV30ggLD90huEmMMhKLHBpESWy9lVEeWlQibweNQzyc+A==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.14.0", - "@typescript-eslint/typescript-estree": "2.14.0", + "@typescript-eslint/experimental-utils": "2.18.0", + "@typescript-eslint/typescript-estree": "2.18.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.14.0.tgz", - "integrity": "sha512-pnLpUcMNG7GfFFfNQbEX6f1aPa5fMnH2G9By+A1yovYI4VIOK2DzkaRuUlIkbagpAcrxQHLqovI1YWqEcXyRnA==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz", + "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==", "dev": true, "requires": { "debug": "^4.1.1", "eslint-visitor-keys": "^1.1.0", "glob": "^7.1.6", "is-glob": "^4.0.1", - "lodash.unescape": "4.0.1", + "lodash": "^4.17.15", "semver": "^6.3.0", "tsutils": "^3.17.1" }, @@ -686,6 +686,12 @@ "path-is-absolute": "^1.0.0" } }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -3487,12 +3493,6 @@ "lodash._reinterpolate": "^3.0.0" } }, - "lodash.unescape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", - "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", - "dev": true - }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", diff --git a/package.json b/package.json index f1c8071..a837461 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^13.1.2", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.18.0", - "@typescript-eslint/parser": "^2.14.0", + "@typescript-eslint/parser": "^2.18.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.0", From 22193c31586ffc339a03211df7ed791fdb549abd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 19:03:17 +0000 Subject: [PATCH 078/136] chore: bump @types/node from 13.1.2 to 13.5.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.2 to 13.5.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c0cdb3..20395d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -538,9 +538,9 @@ "dev": true }, "@types/node": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.2.tgz", - "integrity": "sha512-B8emQA1qeKerqd1dmIsQYnXi+mmAzTB7flExjmy5X1aVAKFNNNDubkavwR13kR6JnpeLp3aLoJhwn9trWPAyFQ==", + "version": "13.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.0.tgz", + "integrity": "sha512-Onhn+z72D2O2Pb2ql2xukJ55rglumsVo1H6Fmyi8mlU9SvKdBk/pUSUAiBY/d9bAOF7VVWajX3sths/+g6ZiAQ==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index a837461..d593daa 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^13.1.2", + "@types/node": "^13.5.0", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.18.0", "@typescript-eslint/parser": "^2.18.0", From 237730a2869c4b2dd8c18e1509510ee8353ba95b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2020 09:56:18 +0000 Subject: [PATCH 079/136] chore: bump eslint-config-prettier from 6.9.0 to 6.10.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.9.0 to 6.10.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.9.0...v6.10.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20395d5..75c2be5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1872,9 +1872,9 @@ } }, "eslint-config-prettier": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz", - "integrity": "sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz", + "integrity": "sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==", "dev": true, "requires": { "get-stdin": "^6.0.0" diff --git a/package.json b/package.json index d593daa..6c3b4fe 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.0", "eslint": "^6.8.0", - "eslint-config-prettier": "^6.9.0", + "eslint-config-prettier": "^6.10.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", From 9cc5912b5e94e31dab5119d3e2f2eec784d7fab8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2020 20:04:47 +0000 Subject: [PATCH 080/136] chore: bump @types/node from 13.5.0 to 13.5.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.0 to 13.5.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 75c2be5..5f52730 100644 --- a/package-lock.json +++ b/package-lock.json @@ -538,9 +538,9 @@ "dev": true }, "@types/node": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.0.tgz", - "integrity": "sha512-Onhn+z72D2O2Pb2ql2xukJ55rglumsVo1H6Fmyi8mlU9SvKdBk/pUSUAiBY/d9bAOF7VVWajX3sths/+g6ZiAQ==", + "version": "13.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.1.tgz", + "integrity": "sha512-Jj2W7VWQ2uM83f8Ls5ON9adxN98MvyJsMSASYFuSvrov8RMRY64Ayay7KV35ph1TSGIJ2gG9ZVDdEq3c3zaydA==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 6c3b4fe..435d51d 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.1.0", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", - "@types/node": "^13.5.0", + "@types/node": "^13.5.1", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.18.0", "@typescript-eslint/parser": "^2.18.0", From cc84de4ab180201ddbdcf235d8e3c136ae21d466 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2020 20:19:19 +0000 Subject: [PATCH 081/136] chore: bump mocha from 7.0.0 to 7.0.1 Bumps [mocha](https://github.com/mochajs/mocha) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v7.0.0...v7.0.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f52730..54a2635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3608,9 +3608,9 @@ } }, "mocha": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.0.tgz", - "integrity": "sha512-CirsOPbO3jU86YKjjMzFLcXIb5YiGLUrjrXFHoJ3e2z9vWiaZVCZQ2+gtRGMPWF+nFhN6AWwLM/juzAQ6KRkbA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.1.tgz", + "integrity": "sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -4110,9 +4110,9 @@ }, "dependencies": { "es-abstract": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", - "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -4395,9 +4395,9 @@ "dev": true }, "picomatch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", - "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", + "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==", "dev": true }, "pify": { diff --git a/package.json b/package.json index 435d51d..cfcc5c8 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", "husky": "^3.1.0", - "mocha": "^7.0.0", + "mocha": "^7.0.1", "nyc": "^15.0.0", "prettier": "^1.19.1", "sinon": "^8.1.1", From 369ffa6f728750c0a45a0ac2f55e05bd121350e3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 16:52:04 +0000 Subject: [PATCH 082/136] chore: bump husky from 3.1.0 to 4.2.1 Bumps [husky](https://github.com/typicode/husky) from 3.1.0 to 4.2.1. - [Release notes](https://github.com/typicode/husky/releases) - [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md) - [Commits](https://github.com/typicode/husky/compare/v3.1.0...v4.2.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 178 +++++++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 131 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54a2635..8a381d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -126,6 +126,23 @@ "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", "dev": true }, + "@babel/runtime": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.3.tgz", + "integrity": "sha512-fVHx1rzEmwB130VTkLnxR+HmxcTjGzH12LYQcFFoBwakMd3aOMD4OsRN7tGG/UOYE2ektgFrS8uACAoRk1CY0w==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", + "dev": true + } + } + }, "@babel/template": { "version": "7.7.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", @@ -543,10 +560,10 @@ "integrity": "sha512-Jj2W7VWQ2uM83f8Ls5ON9adxN98MvyJsMSASYFuSvrov8RMRY64Ayay7KV35ph1TSGIJ2gG9ZVDdEq3c3zaydA==", "dev": true }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, "@types/semver": { @@ -1166,6 +1183,12 @@ "dot-prop": "^3.0.0" } }, + "compare-versions": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz", + "integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2290,6 +2313,15 @@ "locate-path": "^2.0.0" } }, + "find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "requires": { + "semver-regex": "^2.0.0" + } + }, "flat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", @@ -2810,37 +2842,69 @@ "dev": true }, "husky": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-3.1.0.tgz", - "integrity": "sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.1.tgz", + "integrity": "sha512-Qa0lRreeIf4Tl92sSs42ER6qc3hzoyQPPorzOrFWfPEVbdi6LuvJEqWKPk905fOWIR76iBpp7ECZNIwk+a8xuQ==", "dev": true, "requires": { - "chalk": "^2.4.2", + "chalk": "^3.0.0", "ci-info": "^2.0.0", - "cosmiconfig": "^5.2.1", - "execa": "^1.0.0", - "get-stdin": "^7.0.0", + "compare-versions": "^3.5.1", + "cosmiconfig": "^6.0.0", + "find-versions": "^3.2.0", "opencollective-postinstall": "^2.0.2", "pkg-dir": "^4.2.0", "please-upgrade-node": "^3.2.0", - "read-pkg": "^5.2.0", - "run-node": "^1.0.0", - "slash": "^3.0.0" + "slash": "^3.0.0", + "which-pm-runs": "^1.0.0" }, "dependencies": { - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" } }, "find-up": { @@ -2853,6 +2917,12 @@ "path-exists": "^4.0.0" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -2863,9 +2933,9 @@ } }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -2904,6 +2974,12 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -2913,23 +2989,14 @@ "find-up": "^4.0.0" } }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true } } }, @@ -4658,12 +4725,6 @@ "is-promise": "^2.1.0" } }, - "run-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", - "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", - "dev": true - }, "rxjs": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", @@ -4697,6 +4758,12 @@ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, + "semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -5255,6 +5322,12 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true + }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", @@ -5384,6 +5457,15 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, + "yaml": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz", + "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.6.3" + } + }, "yargs": { "version": "13.3.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", diff --git a/package.json b/package.json index cfcc5c8..c9ddbad 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "eslint-plugin-import": "^2.19.1", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "husky": "^3.1.0", + "husky": "^4.2.1", "mocha": "^7.0.1", "nyc": "^15.0.0", "prettier": "^1.19.1", From 1dc88259214b982f100133a6d7823377487da4c6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 16:58:20 +0000 Subject: [PATCH 083/136] chore: bump eslint-plugin-import from 2.19.1 to 2.20.0 Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.19.1 to 2.20.0. - [Release notes](https://github.com/benmosher/eslint-plugin-import/releases) - [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md) - [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.19.1...v2.20.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 130 +++++++++++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 78 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a381d7..8e2d75a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -858,24 +858,24 @@ "dev": true }, "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" } }, "array.prototype.flat": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.2.tgz", - "integrity": "sha512-VXjh7lAL4KXKF2hY4FnEW9eRW6IhdvFW1sN/JwLbmECbCgACCnBHNyP3lFiYuttr0jxRN9Bsc5+G27dMseSWqQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", "dev": true, "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.15.0", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.0-next.1" } }, "arrify": { @@ -1798,27 +1798,36 @@ } }, "es-abstract": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", - "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.0", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.6.0", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + } } }, "es-to-primitive": { - "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==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { "is-callable": "^1.1.4", @@ -1912,13 +1921,13 @@ } }, "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", + "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", "dev": true, "requires": { "debug": "^2.6.9", - "resolve": "^1.5.0" + "resolve": "^1.13.1" }, "dependencies": { "debug": { @@ -1935,13 +1944,22 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "resolve": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz", + "integrity": "sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } } } }, "eslint-module-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz", - "integrity": "sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz", + "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==", "dev": true, "requires": { "debug": "^2.6.9", @@ -1966,9 +1984,9 @@ } }, "eslint-plugin-import": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.19.1.tgz", - "integrity": "sha512-x68131aKoCZlCae7rDXKSAQmbT5DQuManyXo2sK6fJJ0aK5CWAkv6A6HJZGgqC8IhjQxYPgo6/IY4Oz8AFsbBw==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz", + "integrity": "sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ==", "dev": true, "requires": { "array-includes": "^3.0.3", @@ -3118,9 +3136,9 @@ "dev": true }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", "dev": true }, "is-date-object": { @@ -3190,12 +3208,12 @@ "dev": true }, "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", "dev": true, "requires": { - "has": "^1.0.1" + "has": "^1.0.3" } }, "is-stream": { @@ -3204,6 +3222,12 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, "is-symbol": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", @@ -4143,9 +4167,9 @@ "dev": true }, "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", "dev": true }, "object-keys": { @@ -4256,13 +4280,13 @@ } }, "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", "dev": true, "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", + "es-abstract": "^1.17.0-next.1", "function-bind": "^1.1.1", "has": "^1.0.3" } @@ -4989,9 +5013,9 @@ } }, "string.prototype.trimleft": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", - "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", "dev": true, "requires": { "define-properties": "^1.1.3", @@ -4999,9 +5023,9 @@ } }, "string.prototype.trimright": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", - "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", "dev": true, "requires": { "define-properties": "^1.1.3", diff --git a/package.json b/package.json index c9ddbad..0a58805 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "cross-env": "^7.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.0", - "eslint-plugin-import": "^2.19.1", + "eslint-plugin-import": "^2.20.0", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", "husky": "^4.2.1", From e86890d8973b9acd9e5321b7b4f3c7469779a8cc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 17:07:08 +0000 Subject: [PATCH 084/136] chore: bump @commitlint/travis-cli from 8.2.0 to 8.3.5 Bumps [@commitlint/travis-cli](https://github.com/conventional-changelog/commitlint) from 8.2.0 to 8.3.5. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.5) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 256 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 253 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e2d75a..020684c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -392,14 +392,262 @@ } }, "@commitlint/travis-cli": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/travis-cli/-/travis-cli-8.2.0.tgz", - "integrity": "sha512-SXZh9qpAWwvzW2KlG5HOxnci1KMkUZOqr2wKMzgXuV+BS5jhkZaPsKvrrs85FZtUWdJuqFNHTVXKoetgWgMXpQ==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/travis-cli/-/travis-cli-8.3.5.tgz", + "integrity": "sha512-E456A36Ya9Zrr0+ONfkPoHNdWnX4zfR6seHjuzTy0393iSHNc9cZ250mGw0SKQiYQu8x1QHrQyWwyRXLb2iASw==", "dev": true, "requires": { - "@commitlint/cli": "^8.2.0", + "@commitlint/cli": "^8.3.5", "babel-runtime": "6.26.0", "execa": "0.11.0" + }, + "dependencies": { + "@commitlint/cli": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-8.3.5.tgz", + "integrity": "sha512-6+L0vbw55UEdht71pgWOE55SRgb+8OHcEwGDB234VlIBFGK9P2QOBU7MHiYJ5cjdjCQ0rReNrGjOHmJ99jwf0w==", + "dev": true, + "requires": { + "@commitlint/format": "^8.3.4", + "@commitlint/lint": "^8.3.5", + "@commitlint/load": "^8.3.5", + "@commitlint/read": "^8.3.4", + "babel-polyfill": "6.26.0", + "chalk": "2.4.2", + "get-stdin": "7.0.0", + "lodash": "4.17.15", + "meow": "5.0.0", + "resolve-from": "5.0.0", + "resolve-global": "1.0.0" + } + }, + "@commitlint/ensure": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-8.3.4.tgz", + "integrity": "sha512-8NW77VxviLhD16O3EUd02lApMFnrHexq10YS4F4NftNoErKbKaJ0YYedktk2boKrtNRf/gQHY/Qf65edPx4ipw==", + "dev": true, + "requires": { + "lodash": "4.17.15" + } + }, + "@commitlint/execute-rule": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-8.3.4.tgz", + "integrity": "sha512-f4HigYjeIBn9f7OuNv5zh2y5vWaAhNFrfeul8CRJDy82l3Y+09lxOTGxfF3uMXKrZq4LmuK6qvvRCZ8mUrVvzQ==", + "dev": true + }, + "@commitlint/format": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-8.3.4.tgz", + "integrity": "sha512-809wlQ/ND6CLZON+w2Rb3YM2TLNDfU2xyyqpZeqzf2reJNpySMSUAeaO/fNDJSOKIsOsR3bI01rGu6hv28k+Nw==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "@commitlint/is-ignored": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-8.3.5.tgz", + "integrity": "sha512-Zo+8a6gJLFDTqyNRx53wQi/XTiz8mncvmWf/4oRG+6WRcBfjSSHY7KPVj5Y6UaLy2EgZ0WQ2Tt6RdTDeQiQplA==", + "dev": true, + "requires": { + "semver": "6.3.0" + } + }, + "@commitlint/lint": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-8.3.5.tgz", + "integrity": "sha512-02AkI0a6PU6rzqUvuDkSi6rDQ2hUgkq9GpmdJqfai5bDbxx2939mK4ZO+7apbIh4H6Pae7EpYi7ffxuJgm+3hQ==", + "dev": true, + "requires": { + "@commitlint/is-ignored": "^8.3.5", + "@commitlint/parse": "^8.3.4", + "@commitlint/rules": "^8.3.4", + "babel-runtime": "^6.23.0", + "lodash": "4.17.15" + } + }, + "@commitlint/load": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-8.3.5.tgz", + "integrity": "sha512-poF7R1CtQvIXRmVIe63FjSQmN9KDqjRtU5A6hxqXBga87yB2VUJzic85TV6PcQc+wStk52cjrMI+g0zFx+Zxrw==", + "dev": true, + "requires": { + "@commitlint/execute-rule": "^8.3.4", + "@commitlint/resolve-extends": "^8.3.5", + "babel-runtime": "^6.23.0", + "chalk": "2.4.2", + "cosmiconfig": "^5.2.0", + "lodash": "4.17.15", + "resolve-from": "^5.0.0" + } + }, + "@commitlint/message": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-8.3.4.tgz", + "integrity": "sha512-nEj5tknoOKXqBsaQtCtgPcsAaf5VCg3+fWhss4Vmtq40633xLq0irkdDdMEsYIx8rGR0XPBTukqzln9kAWCkcA==", + "dev": true + }, + "@commitlint/parse": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-8.3.4.tgz", + "integrity": "sha512-b3uQvpUQWC20EBfKSfMRnyx5Wc4Cn778bVeVOFErF/cXQK725L1bYFvPnEjQO/GT8yGVzq2wtLaoEqjm1NJ/Bw==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^1.3.3", + "conventional-commits-parser": "^3.0.0", + "lodash": "^4.17.11" + } + }, + "@commitlint/read": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-8.3.4.tgz", + "integrity": "sha512-FKv1kHPrvcAG5j+OSbd41IWexsbLhfIXpxVC/YwQZO+FR0EHmygxQNYs66r+GnhD1EfYJYM4WQIqd5bJRx6OIw==", + "dev": true, + "requires": { + "@commitlint/top-level": "^8.3.4", + "@marionebl/sander": "^0.6.0", + "babel-runtime": "^6.23.0", + "git-raw-commits": "^2.0.0" + } + }, + "@commitlint/resolve-extends": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-8.3.5.tgz", + "integrity": "sha512-nHhFAK29qiXNe6oH6uG5wqBnCR+BQnxlBW/q5fjtxIaQALgfoNLHwLS9exzbIRFqwJckpR6yMCfgMbmbAOtklQ==", + "dev": true, + "requires": { + "import-fresh": "^3.0.0", + "lodash": "4.17.15", + "resolve-from": "^5.0.0", + "resolve-global": "^1.0.0" + } + }, + "@commitlint/rules": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-8.3.4.tgz", + "integrity": "sha512-xuC9dlqD5xgAoDFgnbs578cJySvwOSkMLQyZADb1xD5n7BNcUJfP8WjT9W1Aw8K3Wf8+Ym/ysr9FZHXInLeaRg==", + "dev": true, + "requires": { + "@commitlint/ensure": "^8.3.4", + "@commitlint/message": "^8.3.4", + "@commitlint/to-lines": "^8.3.4", + "babel-runtime": "^6.23.0" + } + }, + "@commitlint/to-lines": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-8.3.4.tgz", + "integrity": "sha512-5AvcdwRsMIVq0lrzXTwpbbG5fKRTWcHkhn/hCXJJ9pm1JidsnidS1y0RGkb3O50TEHGewhXwNoavxW9VToscUA==", + "dev": true + }, + "@commitlint/top-level": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-8.3.4.tgz", + "integrity": "sha512-nOaeLBbAqSZNpKgEtO6NAxmui1G8ZvLG+0wb4rvv6mWhPDzK1GNZkCd8FUZPahCoJ1iHDoatw7F8BbJLg4nDjg==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "conventional-commits-parser": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz", + "integrity": "sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", + "meow": "^5.0.0", + "split2": "^2.0.0", + "through2": "^3.0.0", + "trim-off-newlines": "^1.0.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "git-raw-commits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.3.tgz", + "integrity": "sha512-SoSsFL5lnixVzctGEi2uykjA7B5I0AhO9x6kdzvGRHbxsa6JSEgrgy1esRKsfOKE1cgyOJ/KDR2Trxu157sb8w==", + "dev": true, + "requires": { + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^5.0.0", + "split2": "^2.0.0", + "through2": "^3.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "p-limit": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } } }, "@istanbuljs/load-nyc-config": { diff --git a/package.json b/package.json index 0a58805..7e954fe 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "homepage": "https://github.com/Diplomatiq/resily#readme", "devDependencies": { "@commitlint/cli": "^8.1.0", - "@commitlint/travis-cli": "^8.1.0", + "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", "@types/node": "^13.5.1", From 1b6d9501c88b00a229ff0317f763e1bb82e8b35b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 17:14:59 +0000 Subject: [PATCH 085/136] chore: bump ts-node from 8.5.4 to 8.6.2 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.5.4 to 8.6.2. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.5.4...v8.6.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 020684c..6b63259 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5460,22 +5460,22 @@ "dev": true }, "ts-node": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.5.4.tgz", - "integrity": "sha512-izbVCRV68EasEPQ8MSIGBNK9dc/4sYJJKYA+IarMQct1RtEot6Xp0bXuClsbUSnKpg50ho+aOAx8en5c+y4OFw==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.6.2.tgz", + "integrity": "sha512-4mZEbofxGqLL2RImpe3zMJukvEvcO1XP8bj8ozBPySdCUXEcU5cIRwR0aM3R+VoZq7iXc8N86NC0FspGRqP4gg==", "dev": true, "requires": { "arg": "^4.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", "source-map-support": "^0.5.6", - "yn": "^3.0.0" + "yn": "3.1.1" }, "dependencies": { "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true } } diff --git a/package.json b/package.json index 7e954fe..dacdaaf 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "prettier": "^1.19.1", "sinon": "^8.1.1", "source-map-support": "^0.5.16", - "ts-node": "^8.5.4", + "ts-node": "^8.6.2", "typescript": "^3.7.5" }, "files": [ From 1416ace26f2f86be53578e174cce4988beab0853 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 17:22:04 +0000 Subject: [PATCH 086/136] chore: bump @commitlint/cli from 8.2.0 to 8.3.5 Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint) from 8.2.0 to 8.3.5. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.5) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 254 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 139 insertions(+), 117 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6b63259..528679b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -183,158 +183,196 @@ } }, "@commitlint/cli": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-8.2.0.tgz", - "integrity": "sha512-8fJ5pmytc38yw2QWbTTJmXLfSiWPwMkHH4govo9zJ/+ERPBF2jvlxD/dQvk24ezcizjKc6LFka2edYC4OQ+Dgw==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-8.3.5.tgz", + "integrity": "sha512-6+L0vbw55UEdht71pgWOE55SRgb+8OHcEwGDB234VlIBFGK9P2QOBU7MHiYJ5cjdjCQ0rReNrGjOHmJ99jwf0w==", "dev": true, "requires": { - "@commitlint/format": "^8.2.0", - "@commitlint/lint": "^8.2.0", - "@commitlint/load": "^8.2.0", - "@commitlint/read": "^8.2.0", + "@commitlint/format": "^8.3.4", + "@commitlint/lint": "^8.3.5", + "@commitlint/load": "^8.3.5", + "@commitlint/read": "^8.3.4", "babel-polyfill": "6.26.0", "chalk": "2.4.2", "get-stdin": "7.0.0", - "lodash": "4.17.14", + "lodash": "4.17.15", "meow": "5.0.0", "resolve-from": "5.0.0", "resolve-global": "1.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } } }, "@commitlint/ensure": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-8.2.0.tgz", - "integrity": "sha512-XZZih/kcRrqK7lEORbSYCfqQw6byfsFbLygRGVdJMlCPGu9E2MjpwCtoj5z7y/lKfUB3MJaBhzn2muJqS1gC6A==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-8.3.4.tgz", + "integrity": "sha512-8NW77VxviLhD16O3EUd02lApMFnrHexq10YS4F4NftNoErKbKaJ0YYedktk2boKrtNRf/gQHY/Qf65edPx4ipw==", "dev": true, "requires": { - "lodash": "4.17.14" + "lodash": "4.17.15" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } } }, "@commitlint/execute-rule": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-8.2.0.tgz", - "integrity": "sha512-9MBRthHaulbWTa8ReG2Oii2qc117NuvzhZdnkuKuYLhker7sUXGFcVhLanuWUKGyfyI2o9zVr/NHsNbCCsTzAA==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-8.3.4.tgz", + "integrity": "sha512-f4HigYjeIBn9f7OuNv5zh2y5vWaAhNFrfeul8CRJDy82l3Y+09lxOTGxfF3uMXKrZq4LmuK6qvvRCZ8mUrVvzQ==", "dev": true }, "@commitlint/format": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-8.2.0.tgz", - "integrity": "sha512-sA77agkDEMsEMrlGhrLtAg8vRexkOofEEv/CZX+4xlANyAz2kNwJvMg33lcL65CBhqKEnRRJRxfZ1ZqcujdKcQ==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-8.3.4.tgz", + "integrity": "sha512-809wlQ/ND6CLZON+w2Rb3YM2TLNDfU2xyyqpZeqzf2reJNpySMSUAeaO/fNDJSOKIsOsR3bI01rGu6hv28k+Nw==", "dev": true, "requires": { "chalk": "^2.0.1" } }, "@commitlint/is-ignored": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-8.2.0.tgz", - "integrity": "sha512-ADaGnKfbfV6KD1pETp0Qf7XAyc75xTy3WJlbvPbwZ4oPdBMsXF0oXEEGMis6qABfU2IXan5/KAJgAFX3vdd0jA==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-8.3.5.tgz", + "integrity": "sha512-Zo+8a6gJLFDTqyNRx53wQi/XTiz8mncvmWf/4oRG+6WRcBfjSSHY7KPVj5Y6UaLy2EgZ0WQ2Tt6RdTDeQiQplA==", "dev": true, "requires": { - "@types/semver": "^6.0.1", - "semver": "6.2.0" + "semver": "6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@commitlint/lint": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-8.2.0.tgz", - "integrity": "sha512-ch9JN8aR37ufdjoWv50jLfvFz9rWMgLW5HEkMGLsM/51gjekmQYS5NJg8S2+6F5+jmralAO7VkUMI6FukXKX0A==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-8.3.5.tgz", + "integrity": "sha512-02AkI0a6PU6rzqUvuDkSi6rDQ2hUgkq9GpmdJqfai5bDbxx2939mK4ZO+7apbIh4H6Pae7EpYi7ffxuJgm+3hQ==", "dev": true, "requires": { - "@commitlint/is-ignored": "^8.2.0", - "@commitlint/parse": "^8.2.0", - "@commitlint/rules": "^8.2.0", + "@commitlint/is-ignored": "^8.3.5", + "@commitlint/parse": "^8.3.4", + "@commitlint/rules": "^8.3.4", "babel-runtime": "^6.23.0", - "lodash": "4.17.14" + "lodash": "4.17.15" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } } }, "@commitlint/load": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-8.2.0.tgz", - "integrity": "sha512-EV6PfAY/p83QynNd1llHxJiNxKmp43g8+7dZbyfHFbsGOdokrCnoelAVZ+WGgktXwLN/uXyfkcIAxwac015UYw==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-8.3.5.tgz", + "integrity": "sha512-poF7R1CtQvIXRmVIe63FjSQmN9KDqjRtU5A6hxqXBga87yB2VUJzic85TV6PcQc+wStk52cjrMI+g0zFx+Zxrw==", "dev": true, "requires": { - "@commitlint/execute-rule": "^8.2.0", - "@commitlint/resolve-extends": "^8.2.0", + "@commitlint/execute-rule": "^8.3.4", + "@commitlint/resolve-extends": "^8.3.5", "babel-runtime": "^6.23.0", "chalk": "2.4.2", "cosmiconfig": "^5.2.0", - "lodash": "4.17.14", + "lodash": "4.17.15", "resolve-from": "^5.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + } } }, "@commitlint/message": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-8.2.0.tgz", - "integrity": "sha512-LNsSwDLIFgE3nb/Sb1PIluYNy4Q8igdf4tpJCdv5JJDf7CZCZt3ZTglj0YutZZorpRRuHJsVIB2+dI4bVH3bFw==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-8.3.4.tgz", + "integrity": "sha512-nEj5tknoOKXqBsaQtCtgPcsAaf5VCg3+fWhss4Vmtq40633xLq0irkdDdMEsYIx8rGR0XPBTukqzln9kAWCkcA==", "dev": true }, "@commitlint/parse": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-8.2.0.tgz", - "integrity": "sha512-vzouqroTXG6QXApkrps0gbeSYW6w5drpUk7QAeZIcaCSPsQXDM8eqqt98ZzlzLJHo5oPNXPX1AAVSTrssvHemA==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-8.3.4.tgz", + "integrity": "sha512-b3uQvpUQWC20EBfKSfMRnyx5Wc4Cn778bVeVOFErF/cXQK725L1bYFvPnEjQO/GT8yGVzq2wtLaoEqjm1NJ/Bw==", "dev": true, "requires": { "conventional-changelog-angular": "^1.3.3", - "conventional-commits-parser": "^2.1.0", + "conventional-commits-parser": "^3.0.0", "lodash": "^4.17.11" } }, "@commitlint/read": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-8.2.0.tgz", - "integrity": "sha512-1tBai1VuSQmsOTsvJr3Fi/GZqX3zdxRqYe/yN4i3cLA5S2Y4QGJ5I3l6nGZlKgm/sSelTCVKHltrfWU8s5H7SA==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-8.3.4.tgz", + "integrity": "sha512-FKv1kHPrvcAG5j+OSbd41IWexsbLhfIXpxVC/YwQZO+FR0EHmygxQNYs66r+GnhD1EfYJYM4WQIqd5bJRx6OIw==", "dev": true, "requires": { - "@commitlint/top-level": "^8.2.0", + "@commitlint/top-level": "^8.3.4", "@marionebl/sander": "^0.6.0", "babel-runtime": "^6.23.0", - "git-raw-commits": "^1.3.0" + "git-raw-commits": "^2.0.0" } }, "@commitlint/resolve-extends": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-8.2.0.tgz", - "integrity": "sha512-cwi0HUsDcD502HBP8huXfTkVuWmeo1Fiz3GKxNwMBBsJV4+bKa7QrtxbNpXhVuarX7QjWfNTvmW6KmFS7YK9uw==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-8.3.5.tgz", + "integrity": "sha512-nHhFAK29qiXNe6oH6uG5wqBnCR+BQnxlBW/q5fjtxIaQALgfoNLHwLS9exzbIRFqwJckpR6yMCfgMbmbAOtklQ==", "dev": true, "requires": { - "@types/node": "^12.0.2", "import-fresh": "^3.0.0", - "lodash": "4.17.14", + "lodash": "4.17.15", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0" }, "dependencies": { - "@types/node": { - "version": "12.12.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.22.tgz", - "integrity": "sha512-r5i93jqbPWGXYXxianGATOxTelkp6ih/U0WVnvaqAvTqM+0U6J3kw6Xk6uq/dWNRkEVw/0SLcO5ORXbVNz4FMQ==", + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true } } }, "@commitlint/rules": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-8.2.0.tgz", - "integrity": "sha512-FlqSBBP2Gxt5Ibw+bxdYpzqYR6HI8NIBpaTBhAjSEAduQtdWFMOhF0zsgkwH7lHN7opaLcnY2fXxAhbzTmJQQA==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-8.3.4.tgz", + "integrity": "sha512-xuC9dlqD5xgAoDFgnbs578cJySvwOSkMLQyZADb1xD5n7BNcUJfP8WjT9W1Aw8K3Wf8+Ym/ysr9FZHXInLeaRg==", "dev": true, "requires": { - "@commitlint/ensure": "^8.2.0", - "@commitlint/message": "^8.2.0", - "@commitlint/to-lines": "^8.2.0", + "@commitlint/ensure": "^8.3.4", + "@commitlint/message": "^8.3.4", + "@commitlint/to-lines": "^8.3.4", "babel-runtime": "^6.23.0" } }, "@commitlint/to-lines": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-8.2.0.tgz", - "integrity": "sha512-LXTYG3sMenlN5qwyTZ6czOULVcx46uMy+MEVqpvCgptqr/MZcV/C2J+S2o1DGwj1gOEFMpqrZaE3/1R2Q+N8ng==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-8.3.4.tgz", + "integrity": "sha512-5AvcdwRsMIVq0lrzXTwpbbG5fKRTWcHkhn/hCXJJ9pm1JidsnidS1y0RGkb3O50TEHGewhXwNoavxW9VToscUA==", "dev": true }, "@commitlint/top-level": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-8.2.0.tgz", - "integrity": "sha512-Yaw4KmYNy31/HhRUuZ+fupFcDalnfpdu4JGBgGAqS9aBHdMSSWdWqtAaDaxdtWjTZeN3O0sA2gOhXwvKwiDwvw==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-8.3.4.tgz", + "integrity": "sha512-nOaeLBbAqSZNpKgEtO6NAxmui1G8ZvLG+0wb4rvv6mWhPDzK1GNZkCd8FUZPahCoJ1iHDoatw7F8BbJLg4nDjg==", "dev": true, "requires": { "find-up": "^4.0.0" @@ -360,9 +398,9 @@ } }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -814,12 +852,6 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "@types/semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-1OzrNb4RuAzIT7wHSsgZRlMBlNsJl+do6UblR7JMW4oB7bbR+uBEYtUh7gEc/jM84GGilh68lSOokyM/zNUlBA==", - "dev": true - }, "@types/sinon": { "version": "7.5.1", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.1.tgz", @@ -1742,35 +1774,33 @@ } }, "conventional-commits-parser": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", - "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz", + "integrity": "sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ==", "dev": true, "requires": { "JSONStream": "^1.0.4", - "is-text-path": "^1.0.0", - "lodash": "^4.2.1", - "meow": "^4.0.0", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", + "meow": "^5.0.0", "split2": "^2.0.0", - "through2": "^2.0.0", + "through2": "^3.0.0", "trim-off-newlines": "^1.0.0" }, "dependencies": { - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", "dev": true, "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" + "readable-stream": "2 || 3" } } } @@ -2920,33 +2950,25 @@ } }, "git-raw-commits": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", - "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.3.tgz", + "integrity": "sha512-SoSsFL5lnixVzctGEi2uykjA7B5I0AhO9x6kdzvGRHbxsa6JSEgrgy1esRKsfOKE1cgyOJ/KDR2Trxu157sb8w==", "dev": true, "requires": { "dargs": "^4.0.1", "lodash.template": "^4.0.2", - "meow": "^4.0.0", + "meow": "^5.0.0", "split2": "^2.0.0", - "through2": "^2.0.0" + "through2": "^3.0.0" }, "dependencies": { - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", "dev": true, "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" + "readable-stream": "2 || 3" } } } diff --git a/package.json b/package.json index dacdaaf..d50dff4 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ }, "homepage": "https://github.com/Diplomatiq/resily#readme", "devDependencies": { - "@commitlint/cli": "^8.1.0", + "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.7", "@types/mocha": "^5.2.7", From bccb6bfb23e2d551a7728bb4052436c06279fdc5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 19:18:58 +0000 Subject: [PATCH 087/136] chore: bump @types/chai from 4.2.7 to 4.2.8 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.7 to 4.2.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 528679b..2f1a5bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -811,9 +811,9 @@ "dev": true }, "@types/chai": { - "version": "4.2.7", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.7.tgz", - "integrity": "sha512-luq8meHGYwvky0O7u0eQZdA7B4Wd9owUCqvbw2m3XCrCU8mplYOujMBbvyS547AxJkC+pGnd0Cm15eNxEUNU8g==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.8.tgz", + "integrity": "sha512-U1bQiWbln41Yo6EeHMr+34aUhvrMVyrhn9lYfPSpLTCrZlGxU4Rtn1bocX+0p2Fc/Jkd2FanCEXdw0WNfHHM0w==", "dev": true }, "@types/color-name": { diff --git a/package.json b/package.json index d50dff4..0cb8d8e 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", - "@types/chai": "^4.2.7", + "@types/chai": "^4.2.8", "@types/mocha": "^5.2.7", "@types/node": "^13.5.1", "@types/sinon": "^7.5.1", From fec07c1d12297f6de6f15932e8bf139fa77f89a6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 22:17:10 +0000 Subject: [PATCH 088/136] chore: bump @types/mocha from 5.2.7 to 7.0.1 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 5.2.7 to 7.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2f1a5bd..34668d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -835,9 +835,9 @@ "dev": true }, "@types/mocha": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", - "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.1.tgz", + "integrity": "sha512-L/Nw/2e5KUaprNJoRA33oly+M8X8n0K+FwLTbYqwTcR14wdPWeRkigBLfSFpN/Asf9ENZTMZwLxjtjeYucAA4Q==", "dev": true }, "@types/node": { diff --git a/package.json b/package.json index 0cb8d8e..33c86bd 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.8", - "@types/mocha": "^5.2.7", + "@types/mocha": "^7.0.1", "@types/node": "^13.5.1", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.18.0", From 153d7795c4c0bffe8b8527733a0a2f9653416b0e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2020 23:04:16 +0000 Subject: [PATCH 089/136] chore: bump @types/node from 13.5.1 to 13.7.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.1 to 13.7.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 34668d7..fab5e39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -841,9 +841,9 @@ "dev": true }, "@types/node": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.1.tgz", - "integrity": "sha512-Jj2W7VWQ2uM83f8Ls5ON9adxN98MvyJsMSASYFuSvrov8RMRY64Ayay7KV35ph1TSGIJ2gG9ZVDdEq3c3zaydA==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.0.tgz", + "integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index 33c86bd..0acbb20 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.8", "@types/mocha": "^7.0.1", - "@types/node": "^13.5.1", + "@types/node": "^13.7.0", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.18.0", "@typescript-eslint/parser": "^2.18.0", From 3073ade1653a059cebecfe7c2269f7985bddd2de Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 2 Feb 2020 08:21:06 +0000 Subject: [PATCH 090/136] chore: bump eslint-plugin-import from 2.20.0 to 2.20.1 Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.20.0 to 2.20.1. - [Release notes](https://github.com/benmosher/eslint-plugin-import/releases) - [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md) - [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.20.0...v2.20.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index fab5e39..3e3d771 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2262,9 +2262,9 @@ } }, "eslint-plugin-import": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz", - "integrity": "sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz", + "integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==", "dev": true, "requires": { "array-includes": "^3.0.3", diff --git a/package.json b/package.json index 0acbb20..66d125a 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "cross-env": "^7.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.0", - "eslint-plugin-import": "^2.20.0", + "eslint-plugin-import": "^2.20.1", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", "husky": "^4.2.1", From 46bff7318623c5afd4f0d878f836b0a66b74d2f5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2020 18:38:22 +0000 Subject: [PATCH 091/136] chore: bump @typescript-eslint/eslint-plugin from 2.18.0 to 2.19.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.18.0 to 2.19.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3e3d771..a9e0eee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -859,12 +859,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.18.0.tgz", - "integrity": "sha512-kuO8WQjV+RCZvAXVRJfXWiJ8iYEtfHlKgcqqqXg9uUkIolEHuUaMmm8/lcO4xwCOtaw6mY0gStn2Lg4/eUXXYQ==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.0.tgz", + "integrity": "sha512-u7IcQ9qwsB6U806LupZmINRnQjC+RJyv36sV/ugaFWMHTbFm/hlLTRx3gGYJgHisxcGSTnf+I/fPDieRMhPSQQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.18.0", + "@typescript-eslint/experimental-utils": "2.19.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -872,20 +872,20 @@ }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz", - "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz", + "integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.18.0", + "@typescript-eslint/typescript-estree": "2.19.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz", - "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz", + "integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 66d125a..b89fa30 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^7.0.1", "@types/node": "^13.7.0", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.18.0", + "@typescript-eslint/eslint-plugin": "^2.19.0", "@typescript-eslint/parser": "^2.18.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From f4137282e276d293e80a6206a7adaaf8b49d22f3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2020 18:07:05 +0000 Subject: [PATCH 092/136] chore: bump @typescript-eslint/parser from 2.18.0 to 2.19.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.18.0 to 2.19.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9e0eee..abb3af4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -932,32 +932,32 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz", - "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz", + "integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.18.0", + "@typescript-eslint/typescript-estree": "2.19.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.18.0.tgz", - "integrity": "sha512-SJJPxFMEYEWkM6pGfcnjLU+NJIPo+Ko1QrCBL+i0+zV30ggLD90huEmMMhKLHBpESWy9lVEeWlQibweNQzyc+A==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.19.0.tgz", + "integrity": "sha512-s0jZoxAWjHnuidbbN7aA+BFVXn4TCcxEVGPV8lWMxZglSs3NRnFFAlL+aIENNmzB2/1jUJuySi6GiM6uACPmpg==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.18.0", - "@typescript-eslint/typescript-estree": "2.18.0", + "@typescript-eslint/experimental-utils": "2.19.0", + "@typescript-eslint/typescript-estree": "2.19.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz", - "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz", + "integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index b89fa30..e3193dd 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^13.7.0", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.19.0", - "@typescript-eslint/parser": "^2.18.0", + "@typescript-eslint/parser": "^2.19.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.0", From a5908115ab7921419d36316446b5e8c217dacdc9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2020 05:14:44 +0000 Subject: [PATCH 093/136] chore: bump @typescript-eslint/parser from 2.19.0 to 2.19.2 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.19.0 to 2.19.2. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.2/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index abb3af4..d532f59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -932,32 +932,32 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz", - "integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==", + "version": "2.19.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.2.tgz", + "integrity": "sha512-B88QuwT1wMJR750YvTJBNjMZwmiPpbmKYLm1yI7PCc3x0NariqPwqaPsoJRwU9DmUi0cd9dkhz1IqEnwfD+P1A==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.19.0", + "@typescript-eslint/typescript-estree": "2.19.2", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.19.0.tgz", - "integrity": "sha512-s0jZoxAWjHnuidbbN7aA+BFVXn4TCcxEVGPV8lWMxZglSs3NRnFFAlL+aIENNmzB2/1jUJuySi6GiM6uACPmpg==", + "version": "2.19.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.19.2.tgz", + "integrity": "sha512-8uwnYGKqX9wWHGPGdLB9sk9+12sjcdqEEYKGgbS8A0IvYX59h01o8os5qXUHMq2na8vpDRaV0suTLM7S8wraTA==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.19.0", - "@typescript-eslint/typescript-estree": "2.19.0", + "@typescript-eslint/experimental-utils": "2.19.2", + "@typescript-eslint/typescript-estree": "2.19.2", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz", - "integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==", + "version": "2.19.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.2.tgz", + "integrity": "sha512-Xu/qa0MDk6upQWqE4Qy2X16Xg8Vi32tQS2PR0AvnT/ZYS4YGDvtn2MStOh5y8Zy2mg4NuL06KUHlvCh95j9C6Q==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index e3193dd..7918885 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "^13.7.0", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.19.0", - "@typescript-eslint/parser": "^2.19.0", + "@typescript-eslint/parser": "^2.19.2", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.0", From 686ef0d3053730ec31a109212f8a006d54379774 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2020 08:06:00 +0000 Subject: [PATCH 094/136] chore: bump @typescript-eslint/eslint-plugin from 2.19.0 to 2.19.2 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.19.0 to 2.19.2. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.2/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 60 ++++------------------------------------------- package.json | 2 +- 2 files changed, 5 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index d532f59..199abb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -859,75 +859,23 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.0.tgz", - "integrity": "sha512-u7IcQ9qwsB6U806LupZmINRnQjC+RJyv36sV/ugaFWMHTbFm/hlLTRx3gGYJgHisxcGSTnf+I/fPDieRMhPSQQ==", + "version": "2.19.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.2.tgz", + "integrity": "sha512-HX2qOq2GOV04HNrmKnTpSIpHjfl7iwdXe3u/Nvt+/cpmdvzYvY0NHSiTkYN257jHnq4OM/yo+OsFgati+7LqJA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.19.0", + "@typescript-eslint/experimental-utils": "2.19.2", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" }, "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz", - "integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.19.0", - "eslint-scope": "^5.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz", - "integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^6.3.0", - "tsutils": "^3.17.1" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "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" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "regexpp": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true } } }, diff --git a/package.json b/package.json index 7918885..4d3e4aa 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^7.0.1", "@types/node": "^13.7.0", "@types/sinon": "^7.5.1", - "@typescript-eslint/eslint-plugin": "^2.19.0", + "@typescript-eslint/eslint-plugin": "^2.19.2", "@typescript-eslint/parser": "^2.19.2", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From d11d94d73179e3ad000862cc844c0a7fb8286568 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2020 17:11:49 +0000 Subject: [PATCH 095/136] chore: bump @types/chai from 4.2.8 to 4.2.9 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.8 to 4.2.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 199abb0..d8bee56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -811,9 +811,9 @@ "dev": true }, "@types/chai": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.8.tgz", - "integrity": "sha512-U1bQiWbln41Yo6EeHMr+34aUhvrMVyrhn9lYfPSpLTCrZlGxU4Rtn1bocX+0p2Fc/Jkd2FanCEXdw0WNfHHM0w==", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.9.tgz", + "integrity": "sha512-NeXgZj+MFL4izGqA4sapdYzkzQG+MtGra9vhQ58dnmDY++VgJaRUws+aLVV5zRJCYJl/8s9IjMmhiUw1WsKSmw==", "dev": true }, "@types/color-name": { diff --git a/package.json b/package.json index 4d3e4aa..8c3d654 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", - "@types/chai": "^4.2.8", + "@types/chai": "^4.2.9", "@types/mocha": "^7.0.1", "@types/node": "^13.7.0", "@types/sinon": "^7.5.1", From 76c995a33035ae78651a2a6ec2b1eb3584936bbe Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2020 17:43:06 +0000 Subject: [PATCH 096/136] chore: bump @types/node from 13.7.0 to 13.7.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.0 to 13.7.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8bee56..ffd3bd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -841,9 +841,9 @@ "dev": true }, "@types/node": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.0.tgz", - "integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==", + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", + "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index 8c3d654..350b3c1 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.9", "@types/mocha": "^7.0.1", - "@types/node": "^13.7.0", + "@types/node": "^13.7.1", "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.19.2", "@typescript-eslint/parser": "^2.19.2", From 55f5e218a3060387f4e3932c162187856066fb72 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2020 03:36:28 +0000 Subject: [PATCH 097/136] chore: bump husky from 4.2.1 to 4.2.2 Bumps [husky](https://github.com/typicode/husky) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/typicode/husky/releases) - [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md) - [Commits](https://github.com/typicode/husky/compare/v4.2.1...v4.2.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index ffd3bd4..1e4e7d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -127,9 +127,9 @@ "dev": true }, "@babel/runtime": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.3.tgz", - "integrity": "sha512-fVHx1rzEmwB130VTkLnxR+HmxcTjGzH12LYQcFFoBwakMd3aOMD4OsRN7tGG/UOYE2ektgFrS8uACAoRk1CY0w==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", "dev": true, "requires": { "regenerator-runtime": "^0.13.2" @@ -3078,9 +3078,9 @@ "dev": true }, "husky": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.1.tgz", - "integrity": "sha512-Qa0lRreeIf4Tl92sSs42ER6qc3hzoyQPPorzOrFWfPEVbdi6LuvJEqWKPk905fOWIR76iBpp7ECZNIwk+a8xuQ==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.2.tgz", + "integrity": "sha512-RAjZNO74zJyFJuRFESy+3LXTJvYbjGL+jhoSNJNF1DTKq2USrL5fEH70e1cJXEgvLaPyZt1NoGi0oNQQkPs4jA==", "dev": true, "requires": { "chalk": "^3.0.0", diff --git a/package.json b/package.json index 350b3c1..9f62bc9 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "eslint-plugin-import": "^2.20.1", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "husky": "^4.2.1", + "husky": "^4.2.2", "mocha": "^7.0.1", "nyc": "^15.0.0", "prettier": "^1.19.1", From d94fad4cc272e2595fe028dd44cd6babef595842 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2020 23:24:26 +0000 Subject: [PATCH 098/136] chore: bump husky from 4.2.2 to 4.2.3 Bumps [husky](https://github.com/typicode/husky) from 4.2.2 to 4.2.3. - [Release notes](https://github.com/typicode/husky/releases) - [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md) - [Commits](https://github.com/typicode/husky/compare/v4.2.2...v4.2.3) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e4e7d4..dd6bb2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3078,9 +3078,9 @@ "dev": true }, "husky": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.2.tgz", - "integrity": "sha512-RAjZNO74zJyFJuRFESy+3LXTJvYbjGL+jhoSNJNF1DTKq2USrL5fEH70e1cJXEgvLaPyZt1NoGi0oNQQkPs4jA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz", + "integrity": "sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==", "dev": true, "requires": { "chalk": "^3.0.0", diff --git a/package.json b/package.json index 9f62bc9..a654eb6 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "eslint-plugin-import": "^2.20.1", "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", - "husky": "^4.2.2", + "husky": "^4.2.3", "mocha": "^7.0.1", "nyc": "^15.0.0", "prettier": "^1.19.1", From 1b0ce44f0509e9140ae3aabb34f5141faabac830 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Mon, 25 Nov 2019 23:17:47 +0100 Subject: [PATCH 099/136] feat: Implement RetryPolicy Closes #46. --- .eslintrc.json | 2 +- README.md | 398 +++++- package-lock.json | 1183 ++++------------- package.json | 8 +- src/interfaces/randomGenerator.ts | 3 + src/main.ts | 2 + src/policies/policy.ts | 3 + src/policies/reactive/reactivePolicy.ts | 24 + .../retryPolicy/backoffStrategyFactory.ts | 47 + .../reactive/retryPolicy/retryPolicy.ts | 165 +++ src/types/predicate.ts | 1 + src/utils/predicateChecker.ts | 37 + test/specs/backoffStrategyFactory.test.ts | 167 +++ test/specs/empty.test.ts | 0 test/specs/predicateChecker.test.ts | 116 ++ test/specs/retryPolicy.test.ts | 825 ++++++++++++ test/utils/nodeJsEntropyProvider.ts | 16 + test/utils/windowMock.ts | 7 + 18 files changed, 2085 insertions(+), 919 deletions(-) create mode 100644 src/interfaces/randomGenerator.ts create mode 100644 src/policies/policy.ts create mode 100644 src/policies/reactive/reactivePolicy.ts create mode 100644 src/policies/reactive/retryPolicy/backoffStrategyFactory.ts create mode 100644 src/policies/reactive/retryPolicy/retryPolicy.ts create mode 100644 src/types/predicate.ts create mode 100644 src/utils/predicateChecker.ts create mode 100644 test/specs/backoffStrategyFactory.test.ts delete mode 100644 test/specs/empty.test.ts create mode 100644 test/specs/predicateChecker.test.ts create mode 100644 test/specs/retryPolicy.test.ts create mode 100644 test/utils/nodeJsEntropyProvider.ts create mode 100644 test/utils/windowMock.ts diff --git a/.eslintrc.json b/.eslintrc.json index 804c16a..d20d532 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,7 +20,7 @@ "plugins": ["@typescript-eslint/eslint-plugin", "import", "promise"], "rules": { "no-console": ["error"], - "no-extra-parens": ["error"], + "no-extra-parens": ["error", "all", { "enforceForArrowConditionals": false }], "no-import-assign": ["error"], "no-template-curly-in-string": ["error"], "curly": ["error", "all"], diff --git a/README.md b/README.md index 846e06d..0bca258 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,402 @@ # resily -Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by App-vNext/Polly. +Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by [App-vNext/Polly](https://github.com/App-vNext/Polly). + +

+ + build status + + + + languages used + + + + downloads from npm + + + + latest released version on npm + + + + license + +

+ +

+ + Quality Gate + + + + Coverage + + + + Maintainability Rating + + + + Reliability Rating + + + + Security Rating + + + + Dependabot + +

+ +

+ + Gitter + +

+ +--- + +## Installation + +Being an npm package, you can install resily with the following command: + +```bash +npm install -P @diplomatiq/resily +``` + +## Testing + +Run tests with the following: + +```bash +npm test +``` + +## Usage + +_Note: This package is built as an ES6 package. You will not be able to use `require()`._ + +After installation, you can import policies and other helper classes into your project, then wrap your code into one or more policies. + +Every policy extends the abstract `Policy` class, which has an `execute` method. Your code wrapped into the policy gets executed when you invoke `execute`. The `execute` method is asynchronous, so it returns a `Promise` resolving with the return value of the executed method. + +The wrapped method can be synchronous or asynchronous, it will be awaited in either case: + +```typescript +async function main() { + const policy = … // any policy + + // configure the policy before executing code, see below + + // then execute some code wrapped into the policy + // execute is async, so it returns a Promise + const result = await policy.execute( + // the wrapped method can be sync or async + async () => { + // the executed code + return 5; + }, + ); + + // the value of result is 5 +} +``` + +See concrete usage examples below at the policies' documentation. + +## Policies + +Resily offers **reactive** and **proactive** policies: + +- A **reactive** policy executes the wrapped method, then reacts to the outcome (which in practice is the result of or an exception thrown by the executed method) by acting as specified in the policy itself. Examples for reactive policies include retry, fallback, circuit-breaker. +- A **proactive** policy executes the wrapped method, then acts on its own as specified in the policy itself, regardless of the outcome of the executed code. Examples for proactive policies include timeout, bulkhead isolation, cache. + +#### Reactive policies + +| Policy | What does it claim? | How does it work? | +| ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------- | +| [**RetryPolicy**](#retrypolicy) | Many faults are transient and will not occur again after a delay. | Allows configuring automatic retries on specified conditions. | + +### Reactive policies + +Every reactive policy extends the `ReactivePolicy` class, which means they can be configured with predicates to react on specific results and/or exceptions: + +```typescript +const policy = … // any reactive policy + +// if the executed code returns 5, the policy will react +policy.handleResult(r => r === 5); + +// will be handled +await policy.execute(() => 5); + +// will be handled +await policy.execute(async () => 5); + +// will not be handled +await policy.execute(() => 2); + +// will not be handled +await policy.execute(async () => 2); +``` + +```typescript +const policy = … // any reactive policy + +// if the executed code throws a ConcurrentAccessException, the policy will react +policy.handleException(e => e instanceof ConcurrentAccessException); + +// will be handled +await policy.execute(() => { + throw new ConcurrentAccessException(); +}); + +// will be handled +await policy.execute(async () => { + throw new ConcurrentAccessException(); +}); + +// will not be handled +await policy.execute(() => { + throw new OutOfRangeException(); +}); + +// will not be handled +await policy.execute(async () => { + throw new OutOfRangeException(); +}); +``` + +If the policy is configured to handle multiple kinds of results or exceptions, it will react if any of them occurs: + +```typescript +const policy = … // any reactive policy + +policy.handleResult(r => r === 5); +policy.handleResult(r => r === 7); +policy.handleException(e => e instanceof ConcurrentAccessException); +policy.handleException(e => e instanceof InvalidArgumentException); + +// will be handled +await policy.execute(() => 5); + +// will be handled +await policy.execute(async () => 5); + +// will be handled +await policy.execute(() => 7); + +// will be handled +await policy.execute(async () => 7); + +// will be handled +await policy.execute(() => { + throw new ConcurrentAccessException(); +}); + +// will be handled +await policy.execute(async () => { + throw new ConcurrentAccessException(); +}); + +// will be handled +await policy.execute(() => { + throw new InvalidArgumentException(); +}); + +// will be handled +await policy.execute(async () => { + throw new InvalidArgumentException(); +}); + +// will not be handled +await policy.execute(() => 2); + +// will not be handled +await policy.execute(async () => 2); + +// will not be handled +await policy.execute(() => { + throw new OutOfRangeException(); +}); + +// will not be handled +await policy.execute(async () => { + throw new OutOfRangeException(); +}); +``` + +#### RetryPolicy + +RetryPolicy claims that many faults are transient and will not occur again after a delay. It allows configuring automatic retries on specified conditions. + +Configure how many retries you need or retry forever: + +```typescript +import { RetryPolicy } from '@diplomatiq/resily'; + +const policy = new RetryPolicy(); +policy.retryCount(3); + +// this overwrites the previous value +policy.retryCount(5); + +// this also overwrites the previous value +// this is the same as policy.retryCount(Number.POSITIVE_INFINITY) +policy.retryForever(); +``` + +Perform certain actions before retrying: + +```typescript +import { RetryPolicy } from '@diplomatiq/resily'; + +const policy = new RetryPolicy(); +policy.onRetry( + // onRetryFns can be sync or async, they will be awaited + async (result, error, currentRetryCount) => { + // this code will be executed before the currentRetryCount-th retry occurs + // result is undefined if reacting upon a thrown error + // error is undefined if reacting upon a result + }, +); + +// you can set multiple onRetryFns, they will run sequentially +policy.onRetry(async () => { + // this will be awaited first +}); +policy.onRetry(async () => { + // then this will be awaited +}); + +// errors thrown by an onRetryFn will be caught and ignored +policy.onRetry(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +Wait for the specified number of milliseconds before retrying: + +```typescript +import { RetryPolicy } from '@diplomatiq/resily'; + +const policy = new RetryPolicy(); + +// wait for 100 ms before each retry +policy.waitBeforeRetry(() => 100); + +// this overwrites the previous backoff strategy +// wait for 100 ms before the first retry, 200 ms before the second retry, etc. +policy.waitBeforeRetry(currentRetryCount => currentRetryCount * 100); +``` + +The waiting happens _before_ the execution of onRetryFns. + +Although you can code any kind of backoff, there are also predefined, ready-to-use backoff strategies: + +```typescript +import { BackoffStrategyFactory, RetryPolicy } from '@diplomatiq/resily'; + +const policy = new RetryPolicy(); + +// wait for 100 ms before each retry +// 100 100 100 100 100 … +policy.waitBeforeRetry(BackoffStrategyFactory.constantBackoff(100)); + +// retry immediately for the first time, then wait for 100 ms before each retry +// 0 100 100 100 100 … +policy.waitBeforeRetry(BackoffStrategyFactory.constantBackoff(100, true)); + +// wait for (currentRetryCount * 100) ms before each retry +// 100 200 300 400 500 … +policy.waitBeforeRetry(BackoffStrategyFactory.linearBackoff(100)); + +// retry immediately for the first time, then wait for ((currentRetryCount - 1) * 100) ms before each retry +// 0 100 200 300 400 … +policy.waitBeforeRetry(BackoffStrategyFactory.linearBackoff(100, true)); + +// wait for (100 * 2 ** (currentRetryCount - 1)) ms before each retry +// 100 200 400 800 1600 … +policy.waitBeforeRetry(BackoffStrategyFactory.exponentialBackoff(100)); + +// retry immediately for the first time, then wait for (100 * 2 ** (currentRetryCount - 2)) ms before each retry +// 0 100 200 400 800 … +policy.waitBeforeRetry(BackoffStrategyFactory.exponentialBackoff(100, true)); + +// wait for (100 * 3 ** (currentRetryCount - 1)) ms before each retry +// 100 300 900 2700 8100 … +policy.waitBeforeRetry(BackoffStrategyFactory.exponentialBackoff(100, false, 3)); + +// retry immediately for the first time, then wait for (100 * 3 ** (currentRetryCount - 2)) ms before each retry +// 0 100 300 900 2700 … +policy.waitBeforeRetry(BackoffStrategyFactory.exponentialBackoff(100, true, 3)); + +// wait for a [random between 0-100, inclusive] ms before each retry +policy.waitBeforeRetry(BackoffStrategyFactory.jitteredBackoff(0, 100)); + +// retry immediately for the first time, then wait for a [random between 0-100, inclusive] ms before each retry +policy.waitBeforeRetry(BackoffStrategyFactory.jitteredBackoff(0, 100, true)); +``` + +For using `jitteredBackoff` in Node.js environments, you will need to inject a Node.js-based entropy source into the default RandomGenerator ([@diplomatiq/crypto-random](https://github.com/Diplomatiq/crypto-random) requires `window.crypto.getRandomValues` to be available by default). Create the following in your project: + +```typescript +import { EntropyProvider, UnsignedTypedArray } from '@diplomatiq/crypto-random'; +import { randomFill } from 'crypto'; + +export class NodeJsEntropyProvider implements EntropyProvider { + public async getRandomValues(array: T): Promise { + return new Promise((resolve, reject): void => { + randomFill(array, (error: Error | null, array: T) => { + if (error !== null) { + reject(error); + return; + } + resolve(array); + }); + }); + } +} +``` + +Then use it as follows: + +```typescript +import { RandomGenerator } from '@diplomatiq/crypto-random'; +import { NodeJsEntropyProvider } from './nodeJsEntropyProvider'; + +const entropyProvider = new NodeJsEntropyProvider(); +const randomGenerator = new RandomGenerator(entropyProvider); + +const jitteredBackoff = BackoffStrategyFactory.jitteredBackoff(0, 100, true, randomGenerator); +``` + +Perform certain actions after the execution and all retries finished: + +```typescript +const policy = new RetryPolicy(); +policy.onFinally( + // onFinallyFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onFinallyFns, they will run sequentially +policy.onFinally(async () => { + // this will be awaited first +}); +policy.onFinally(async () => { + // then this will be awaited +}); + +// errors thrown by an onFinallyFn will be caught and ignored +policy.onFinally(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` --- diff --git a/package-lock.json b/package-lock.json index dd6bb2b..a52d447 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,29 +5,30 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" } }, "@babel/core": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.7.tgz", - "integrity": "sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", + "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.7", - "@babel/helpers": "^7.7.4", - "@babel/parser": "^7.7.7", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helpers": "^7.8.4", + "@babel/parser": "^7.8.4", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", @@ -50,12 +51,12 @@ } }, "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -70,49 +71,49 @@ } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" + "@babel/types": "^7.8.3" } }, "@babel/helpers": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.4.tgz", - "integrity": "sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", + "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", "dev": true, "requires": { - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3" } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", "dev": true, "requires": { "chalk": "^2.0.0", @@ -121,9 +122,9 @@ } }, "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", "dev": true }, "@babel/runtime": { @@ -144,37 +145,45 @@ } }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } } }, "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -199,14 +208,6 @@ "meow": "5.0.0", "resolve-from": "5.0.0", "resolve-global": "1.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@commitlint/ensure": { @@ -216,14 +217,6 @@ "dev": true, "requires": { "lodash": "4.17.15" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@commitlint/execute-rule": { @@ -248,14 +241,6 @@ "dev": true, "requires": { "semver": "6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "@commitlint/lint": { @@ -269,14 +254,6 @@ "@commitlint/rules": "^8.3.4", "babel-runtime": "^6.23.0", "lodash": "4.17.15" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@commitlint/load": { @@ -292,14 +269,6 @@ "cosmiconfig": "^5.2.0", "lodash": "4.17.15", "resolve-from": "^5.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@commitlint/message": { @@ -341,14 +310,6 @@ "lodash": "4.17.15", "resolve-from": "^5.0.0", "resolve-global": "^1.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@commitlint/rules": { @@ -438,256 +399,13 @@ "@commitlint/cli": "^8.3.5", "babel-runtime": "6.26.0", "execa": "0.11.0" - }, - "dependencies": { - "@commitlint/cli": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-8.3.5.tgz", - "integrity": "sha512-6+L0vbw55UEdht71pgWOE55SRgb+8OHcEwGDB234VlIBFGK9P2QOBU7MHiYJ5cjdjCQ0rReNrGjOHmJ99jwf0w==", - "dev": true, - "requires": { - "@commitlint/format": "^8.3.4", - "@commitlint/lint": "^8.3.5", - "@commitlint/load": "^8.3.5", - "@commitlint/read": "^8.3.4", - "babel-polyfill": "6.26.0", - "chalk": "2.4.2", - "get-stdin": "7.0.0", - "lodash": "4.17.15", - "meow": "5.0.0", - "resolve-from": "5.0.0", - "resolve-global": "1.0.0" - } - }, - "@commitlint/ensure": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-8.3.4.tgz", - "integrity": "sha512-8NW77VxviLhD16O3EUd02lApMFnrHexq10YS4F4NftNoErKbKaJ0YYedktk2boKrtNRf/gQHY/Qf65edPx4ipw==", - "dev": true, - "requires": { - "lodash": "4.17.15" - } - }, - "@commitlint/execute-rule": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-8.3.4.tgz", - "integrity": "sha512-f4HigYjeIBn9f7OuNv5zh2y5vWaAhNFrfeul8CRJDy82l3Y+09lxOTGxfF3uMXKrZq4LmuK6qvvRCZ8mUrVvzQ==", - "dev": true - }, - "@commitlint/format": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-8.3.4.tgz", - "integrity": "sha512-809wlQ/ND6CLZON+w2Rb3YM2TLNDfU2xyyqpZeqzf2reJNpySMSUAeaO/fNDJSOKIsOsR3bI01rGu6hv28k+Nw==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "@commitlint/is-ignored": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-8.3.5.tgz", - "integrity": "sha512-Zo+8a6gJLFDTqyNRx53wQi/XTiz8mncvmWf/4oRG+6WRcBfjSSHY7KPVj5Y6UaLy2EgZ0WQ2Tt6RdTDeQiQplA==", - "dev": true, - "requires": { - "semver": "6.3.0" - } - }, - "@commitlint/lint": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-8.3.5.tgz", - "integrity": "sha512-02AkI0a6PU6rzqUvuDkSi6rDQ2hUgkq9GpmdJqfai5bDbxx2939mK4ZO+7apbIh4H6Pae7EpYi7ffxuJgm+3hQ==", - "dev": true, - "requires": { - "@commitlint/is-ignored": "^8.3.5", - "@commitlint/parse": "^8.3.4", - "@commitlint/rules": "^8.3.4", - "babel-runtime": "^6.23.0", - "lodash": "4.17.15" - } - }, - "@commitlint/load": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-8.3.5.tgz", - "integrity": "sha512-poF7R1CtQvIXRmVIe63FjSQmN9KDqjRtU5A6hxqXBga87yB2VUJzic85TV6PcQc+wStk52cjrMI+g0zFx+Zxrw==", - "dev": true, - "requires": { - "@commitlint/execute-rule": "^8.3.4", - "@commitlint/resolve-extends": "^8.3.5", - "babel-runtime": "^6.23.0", - "chalk": "2.4.2", - "cosmiconfig": "^5.2.0", - "lodash": "4.17.15", - "resolve-from": "^5.0.0" - } - }, - "@commitlint/message": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-8.3.4.tgz", - "integrity": "sha512-nEj5tknoOKXqBsaQtCtgPcsAaf5VCg3+fWhss4Vmtq40633xLq0irkdDdMEsYIx8rGR0XPBTukqzln9kAWCkcA==", - "dev": true - }, - "@commitlint/parse": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-8.3.4.tgz", - "integrity": "sha512-b3uQvpUQWC20EBfKSfMRnyx5Wc4Cn778bVeVOFErF/cXQK725L1bYFvPnEjQO/GT8yGVzq2wtLaoEqjm1NJ/Bw==", - "dev": true, - "requires": { - "conventional-changelog-angular": "^1.3.3", - "conventional-commits-parser": "^3.0.0", - "lodash": "^4.17.11" - } - }, - "@commitlint/read": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-8.3.4.tgz", - "integrity": "sha512-FKv1kHPrvcAG5j+OSbd41IWexsbLhfIXpxVC/YwQZO+FR0EHmygxQNYs66r+GnhD1EfYJYM4WQIqd5bJRx6OIw==", - "dev": true, - "requires": { - "@commitlint/top-level": "^8.3.4", - "@marionebl/sander": "^0.6.0", - "babel-runtime": "^6.23.0", - "git-raw-commits": "^2.0.0" - } - }, - "@commitlint/resolve-extends": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-8.3.5.tgz", - "integrity": "sha512-nHhFAK29qiXNe6oH6uG5wqBnCR+BQnxlBW/q5fjtxIaQALgfoNLHwLS9exzbIRFqwJckpR6yMCfgMbmbAOtklQ==", - "dev": true, - "requires": { - "import-fresh": "^3.0.0", - "lodash": "4.17.15", - "resolve-from": "^5.0.0", - "resolve-global": "^1.0.0" - } - }, - "@commitlint/rules": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-8.3.4.tgz", - "integrity": "sha512-xuC9dlqD5xgAoDFgnbs578cJySvwOSkMLQyZADb1xD5n7BNcUJfP8WjT9W1Aw8K3Wf8+Ym/ysr9FZHXInLeaRg==", - "dev": true, - "requires": { - "@commitlint/ensure": "^8.3.4", - "@commitlint/message": "^8.3.4", - "@commitlint/to-lines": "^8.3.4", - "babel-runtime": "^6.23.0" - } - }, - "@commitlint/to-lines": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-8.3.4.tgz", - "integrity": "sha512-5AvcdwRsMIVq0lrzXTwpbbG5fKRTWcHkhn/hCXJJ9pm1JidsnidS1y0RGkb3O50TEHGewhXwNoavxW9VToscUA==", - "dev": true - }, - "@commitlint/top-level": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-8.3.4.tgz", - "integrity": "sha512-nOaeLBbAqSZNpKgEtO6NAxmui1G8ZvLG+0wb4rvv6mWhPDzK1GNZkCd8FUZPahCoJ1iHDoatw7F8BbJLg4nDjg==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "conventional-commits-parser": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz", - "integrity": "sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ==", - "dev": true, - "requires": { - "JSONStream": "^1.0.4", - "is-text-path": "^1.0.1", - "lodash": "^4.17.15", - "meow": "^5.0.0", - "split2": "^2.0.0", - "through2": "^3.0.0", - "trim-off-newlines": "^1.0.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "git-raw-commits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.3.tgz", - "integrity": "sha512-SoSsFL5lnixVzctGEi2uykjA7B5I0AhO9x6kdzvGRHbxsa6JSEgrgy1esRKsfOKE1cgyOJ/KDR2Trxu157sb8w==", - "dev": true, - "requires": { - "dargs": "^4.0.1", - "lodash.template": "^4.0.2", - "meow": "^5.0.0", - "split2": "^2.0.0", - "through2": "^3.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, - "requires": { - "readable-stream": "2 || 3" - } - } } }, + "@diplomatiq/crypto-random": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@diplomatiq/crypto-random/-/crypto-random-2.1.0.tgz", + "integrity": "sha512-WsA5Tm+zpNvVO3dKqlnX3mYXpDL9lxee4W9viXt1awj+mTFEQL10uffzBgHYE2PzJs2PzRPOzJEvJoPszY2d/A==" + }, "@istanbuljs/load-nyc-config": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", @@ -726,9 +444,9 @@ } }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -774,42 +492,6 @@ "rimraf": "^2.5.2" } }, - "@sinonjs/commons": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.0.tgz", - "integrity": "sha512-qbk9AP+cZUsKdW1GJsBpxPKFmCJ0T8swwzVje3qFd+AkQb74Q/tiuzrdfFg8AD2g5HH/XbE/I8Uc1KYHVYWfhg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/formatio": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-4.0.1.tgz", - "integrity": "sha512-asIdlLFrla/WZybhm0C8eEzaDNNrzymiTqHMeJl6zPW2881l3uuVRpm0QlRQEjqYWv6CcKMGYME3LbrLJsORBw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^4.2.0" - } - }, - "@sinonjs/samsam": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-4.2.2.tgz", - "integrity": "sha512-z9o4LZUzSD9Hl22zV38aXNykgFeVj8acqfFabCY6FY83n/6s/XwNJyYYldz6/9lBJanpno9h+oL6HTISkviweA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, "@types/chai": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.9.tgz", @@ -829,9 +511,9 @@ "dev": true }, "@types/json-schema": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", - "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", "dev": true }, "@types/mocha": { @@ -852,12 +534,6 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "@types/sinon": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.1.tgz", - "integrity": "sha512-EZQUP3hSZQyTQRfiLqelC9NMWd1kqLcmQE0dMiklxBkgi84T+cHOhnKpgk4NnOWpGX863yE6+IaGnOXUNFqDnQ==", - "dev": true - }, "@typescript-eslint/eslint-plugin": { "version": "2.19.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.2.tgz", @@ -869,14 +545,6 @@ "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", "tsutils": "^3.17.1" - }, - "dependencies": { - "regexpp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", - "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", - "dev": true - } } }, "@typescript-eslint/experimental-utils": { @@ -915,34 +583,6 @@ "lodash": "^4.17.15", "semver": "^6.3.0", "tsutils": "^3.17.1" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "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" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "JSONStream": { @@ -992,12 +632,12 @@ } }, "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", + "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -1019,9 +659,9 @@ } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { @@ -1059,9 +699,9 @@ "dev": true }, "arg": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.2.tgz", - "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, "argparse": { @@ -1412,9 +1052,9 @@ } }, "compare-versions": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz", - "integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", "dev": true }, "concat-map": { @@ -1490,14 +1130,6 @@ "lodash": "^4.17.15", "meow": "^5.0.0", "tempfile": "^3.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "conventional-changelog-codemirror": { @@ -1518,14 +1150,6 @@ "compare-func": "^1.3.1", "lodash": "^4.17.15", "q": "^1.5.1" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "conventional-changelog-core": { @@ -1550,21 +1174,6 @@ "through2": "^3.0.0" }, "dependencies": { - "conventional-commits-parser": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz", - "integrity": "sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ==", - "dev": true, - "requires": { - "JSONStream": "^1.0.4", - "is-text-path": "^1.0.1", - "lodash": "^4.17.15", - "meow": "^5.0.0", - "split2": "^2.0.0", - "through2": "^3.0.0", - "trim-off-newlines": "^1.0.0" - } - }, "git-raw-commits": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz", @@ -1578,23 +1187,6 @@ "through2": "^2.0.0" }, "dependencies": { - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } - }, "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -1607,20 +1199,28 @@ } } }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", "dev": true, "requires": { - "readable-stream": "2 || 3" + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true } } }, @@ -1692,23 +1292,6 @@ "semver": "^6.0.0", "split": "^1.0.0", "through2": "^3.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, - "requires": { - "readable-stream": "2 || 3" - } - } } }, "conventional-commits-filter": { @@ -1734,23 +1317,6 @@ "split2": "^2.0.0", "through2": "^3.0.0", "trim-off-newlines": "^1.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, - "requires": { - "readable-stream": "2 || 3" - } - } } }, "convert-source-map": { @@ -1763,9 +1329,9 @@ } }, "core-js": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", - "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", "dev": true }, "core-util-is": { @@ -2040,14 +1606,6 @@ "object.assign": "^4.1.0", "string.prototype.trimleft": "^2.1.1", "string.prototype.trimright": "^2.1.1" - }, - "dependencies": { - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - } } }, "es-to-primitive": { @@ -2118,14 +1676,11 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true } } }, @@ -2170,15 +1725,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true - }, - "resolve": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz", - "integrity": "sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } } } }, @@ -2353,6 +1899,12 @@ "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true }, + "esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true + }, "espree": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", @@ -2427,9 +1979,9 @@ } }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", "dev": true }, "fast-diff": { @@ -2508,9 +2060,9 @@ } }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -2687,6 +2239,12 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2790,6 +2348,12 @@ "trim-newlines": "^1.0.0" } }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -2874,6 +2438,16 @@ "get-stdin": "^4.0.1" } }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", @@ -2908,17 +2482,6 @@ "meow": "^5.0.0", "split2": "^2.0.0", "through2": "^3.0.0" - }, - "dependencies": { - "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, - "requires": { - "readable-stream": "2 || 3" - } - } } }, "git-remote-origin-url": { @@ -2959,9 +2522,9 @@ } }, "glob": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz", - "integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -2991,10 +2554,13 @@ } }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } }, "graceful-fs": { "version": "4.2.3", @@ -3009,9 +2575,9 @@ "dev": true }, "handlebars": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.5.tgz", - "integrity": "sha512-0Ce31oWVB7YidkaTq33ZxEbN+UDxMMgThvCe8ptgQViymL5DPis9uLdTA13MiRPhgvqyxIegugrP97iK3JeBHg==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.3.tgz", + "integrity": "sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -3036,9 +2602,9 @@ "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=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, "hasha": { @@ -3252,9 +2818,9 @@ "dev": true }, "import-fresh": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", - "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -3304,9 +2870,9 @@ "dev": true }, "inquirer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz", - "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", + "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", @@ -3322,14 +2888,6 @@ "string-width": "^4.1.0", "strip-ansi": "^5.1.0", "through": "^2.3.6" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "is-arrayish": { @@ -3360,9 +2918,9 @@ "dev": true }, "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, "is-directory": { @@ -3378,13 +2936,10 @@ "dev": true }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -3447,12 +3002,12 @@ "dev": true }, "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "has-symbols": "^1.0.0" + "has-symbols": "^1.0.1" } }, "is-text-path": { @@ -3510,9 +3065,9 @@ } }, "istanbul-lib-instrument": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.0.tgz", - "integrity": "sha512-Nm4wVHdo7ZXSG30KjZ2Wl5SU/Bw7bDx1PdaiIFzEStdjs0H12mOTncn1GVYuqQSaZxpg87VGBRsVRPGD2cD1AQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz", + "integrity": "sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg==", "dev": true, "requires": { "@babel/core": "^7.7.5", @@ -3522,14 +3077,6 @@ "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.0.0", "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "istanbul-lib-processinfo": { @@ -3565,9 +3112,9 @@ "dev": true }, "rimraf": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", - "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -3701,6 +3248,14 @@ "dev": true, "requires": { "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 + } } }, "jsonparse": { @@ -3709,12 +3264,6 @@ "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, - "just-extend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", - "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", - "dev": true - }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -3754,9 +3303,9 @@ } }, "lodash": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", - "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lodash._reinterpolate": { @@ -3771,12 +3320,6 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, "lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -3811,15 +3354,6 @@ "chalk": "^2.0.1" } }, - "lolex": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", - "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -3884,9 +3418,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "minimist-options": { @@ -3906,14 +3440,6 @@ "dev": true, "requires": { "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } } }, "mocha": { @@ -4089,20 +3615,6 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "nise": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-3.0.1.tgz", - "integrity": "sha512-fYcH9y0drBGSoi88kvhpbZEsenX58Yr+wOJ4/Mi1K4cy+iGP/a73gNoyNhu5E9QxPdgTlVChfIaAlnyOy/gHUA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/formatio": "^4.0.1", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "lolex": "^5.0.1", - "path-to-regexp": "^1.7.0" - } - }, "node-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", @@ -4207,16 +3719,10 @@ "yargs": "^15.0.2" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, "ansi-styles": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.0.tgz", - "integrity": "sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "dev": true, "requires": { "@types/color-name": "^1.1.1", @@ -4265,20 +3771,6 @@ "path-exists": "^4.0.0" } }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "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" - } - }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -4289,9 +3781,9 @@ } }, "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -4319,9 +3811,9 @@ "dev": true }, "rimraf": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", - "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -4348,9 +3840,9 @@ } }, "yargs": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.0.2.tgz", - "integrity": "sha512-GH/X/hYt+x5hOat4LMnCqMd8r5Cv78heOMIJn1hr7QPPBqfeC6p89Y78+WB9yGDvfpCvgasfmWLzNzEioOUD9Q==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.1.0.tgz", + "integrity": "sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg==", "dev": true, "requires": { "cliui": "^6.0.0", @@ -4416,85 +3908,6 @@ "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", - "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "dev": true - }, - "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - }, - "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" - } - } } }, "object.values": { @@ -4541,14 +3954,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": { @@ -4671,23 +4076,6 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, "path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -4840,9 +4228,9 @@ } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -4880,9 +4268,9 @@ "dev": true }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", "dev": true }, "release-zalgo": { @@ -4916,9 +4304,9 @@ "dev": true }, "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -4968,9 +4356,9 @@ } }, "rxjs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", - "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", + "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -4989,9 +4377,9 @@ "dev": true }, "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, "semver-compare": { @@ -5033,44 +4421,6 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, - "sinon": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.1.1.tgz", - "integrity": "sha512-E+tWr3acRdoe1nXbHMu86SSqA1WGM7Yw3jZRLvlCMnXwTHP8lgFFVn5BnKnF26uc5SfZ3D7pA9sN7S3Y2jG4Ew==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/formatio": "^4.0.1", - "@sinonjs/samsam": "^4.2.2", - "diff": "^4.0.2", - "lolex": "^5.1.2", - "nise": "^3.0.1", - "supports-color": "^7.1.0" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -5127,9 +4477,9 @@ }, "dependencies": { "rimraf": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz", - "integrity": "sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -5194,6 +4544,18 @@ "dev": true, "requires": { "through2": "^2.0.2" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } } }, "sprintf-js": { @@ -5213,12 +4575,6 @@ "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, "strip-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", @@ -5266,6 +4622,14 @@ "dev": true, "requires": { "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } } }, "strip-bom": { @@ -5384,13 +4748,12 @@ "dev": true }, "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", "dev": true, "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" + "readable-stream": "2 || 3" } }, "tmp": { @@ -5502,9 +4865,9 @@ "dev": true }, "uglify-js": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.4.tgz", - "integrity": "sha512-9Yc2i881pF4BPGhjteCXQNaXx1DCwm3dtOyBaG2hitHjLWOczw/ki8vD1bqyT3u6K0Ms/FpCShkmfg+FtlOfYA==", + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.7.tgz", + "integrity": "sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA==", "dev": true, "optional": true, "requires": { @@ -5528,9 +4891,9 @@ "dev": true }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, "v8-compile-cache": { @@ -5828,14 +5191,6 @@ "flat": "^4.1.0", "lodash": "^4.17.15", "yargs": "^13.3.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "yn": { diff --git a/package.json b/package.json index a654eb6..3592d02 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "lint": "eslint ./src/ --ext .ts", "prepare": "npm run build-and-test-everything", "prepublishOnly": "npm run check-release-tag", - "test": "cross-env-shell TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text mocha --require ts-node/register --require source-map-support/register --recursive test/specs/**/*.test.ts", + "test": "cross-env-shell TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text mocha --require ts-node/register --require source-map-support/register --require esm --recursive test/specs/**/*.test.ts", "version": "node --experimental-modules scripts/sync-sonar-version.mjs && conventional-changelog -p angular -i CHANGELOG.md -s && git add sonar-project.properties CHANGELOG.md" }, "repository": { @@ -44,7 +44,6 @@ "@types/chai": "^4.2.9", "@types/mocha": "^7.0.1", "@types/node": "^13.7.1", - "@types/sinon": "^7.5.1", "@typescript-eslint/eslint-plugin": "^2.19.2", "@typescript-eslint/parser": "^2.19.2", "chai": "^4.2.0", @@ -59,7 +58,7 @@ "mocha": "^7.0.1", "nyc": "^15.0.0", "prettier": "^1.19.1", - "sinon": "^8.1.1", + "esm": "^3.2.25", "source-map-support": "^0.5.16", "ts-node": "^8.6.2", "typescript": "^3.7.5" @@ -72,5 +71,8 @@ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", "pre-push": "npm run build-and-test-everything" } + }, + "dependencies": { + "@diplomatiq/crypto-random": "^2.1.0" } } diff --git a/src/interfaces/randomGenerator.ts b/src/interfaces/randomGenerator.ts new file mode 100644 index 0000000..ccf58a8 --- /dev/null +++ b/src/interfaces/randomGenerator.ts @@ -0,0 +1,3 @@ +export interface RandomGenerator { + integer(min: number, max: number): Promise; +} diff --git a/src/main.ts b/src/main.ts index e69de29..5c81691 100644 --- a/src/main.ts +++ b/src/main.ts @@ -0,0 +1,2 @@ +export { BackoffStrategyFactory } from './policies/reactive/retryPolicy/backoffStrategyFactory'; +export { RetryPolicy } from './policies/reactive/retryPolicy/retryPolicy'; diff --git a/src/policies/policy.ts b/src/policies/policy.ts new file mode 100644 index 0000000..74c70d2 --- /dev/null +++ b/src/policies/policy.ts @@ -0,0 +1,3 @@ +export abstract class Policy { + public abstract async execute(fn: () => ResultType | Promise): Promise; +} diff --git a/src/policies/reactive/reactivePolicy.ts b/src/policies/reactive/reactivePolicy.ts new file mode 100644 index 0000000..98bd547 --- /dev/null +++ b/src/policies/reactive/reactivePolicy.ts @@ -0,0 +1,24 @@ +import { Predicate } from '../../types/predicate'; +import { PredicateChecker } from '../../utils/predicateChecker'; +import { Policy } from '../policy'; + +export abstract class ReactivePolicy extends Policy { + protected resultPredicates: Array> = []; + protected exceptionPredicates: Array> = []; + + public handleResult(resultPredicate: Predicate): void { + this.resultPredicates.push(resultPredicate); + } + + public handleException(exceptionPredicate: Predicate): void { + this.exceptionPredicates.push(exceptionPredicate); + } + + protected async isResultHandled(result: ResultType): Promise { + return PredicateChecker.some(result, this.resultPredicates); + } + + protected async isExceptionHandled(exception: unknown): Promise { + return PredicateChecker.some(exception, this.exceptionPredicates); + } +} diff --git a/src/policies/reactive/retryPolicy/backoffStrategyFactory.ts b/src/policies/reactive/retryPolicy/backoffStrategyFactory.ts new file mode 100644 index 0000000..9bd8576 --- /dev/null +++ b/src/policies/reactive/retryPolicy/backoffStrategyFactory.ts @@ -0,0 +1,47 @@ +import { RandomGenerator as DefaultRandomGenerator } from '@diplomatiq/crypto-random'; +import { RandomGenerator } from '../../../interfaces/randomGenerator'; + +export class BackoffStrategyFactory { + public static constantBackoff(delayMs: number, fastFirst = false): (currentRetryCount: number) => number { + return fastFirst + ? (currentRetryCount: number): number => (currentRetryCount === 1 ? 0 : delayMs) + : (): number => delayMs; + } + + public static linearBackoff(delayMs: number, fastFirst = false): (currentRetryCount: number) => number { + return fastFirst + ? (currentRetryCount: number): number => delayMs * (currentRetryCount - 1) + : (currentRetryCount: number): number => delayMs * currentRetryCount; + } + + public static exponentialBackoff( + delayMs: number, + fastFirst = false, + base = 2, + ): (currentRetryCount: number) => number { + return fastFirst + ? (currentRetryCount: number): number => + currentRetryCount === 1 ? 0 : delayMs * base ** (currentRetryCount - 2) + : (currentRetryCount: number): number => delayMs * base ** (currentRetryCount - 1); + } + + public static jitteredBackoff( + minDelayMs: number, + maxDelayMs: number, + fastFirst = false, + randomGenerator: RandomGenerator = new DefaultRandomGenerator(), + ): (currentRetryCount: number) => Promise { + return fastFirst + ? async (currentRetryCount: number): Promise => { + if (currentRetryCount === 1) { + return 0; + } + const [ms] = await randomGenerator.integer(minDelayMs, maxDelayMs); + return ms; + } + : async (): Promise => { + const [ms] = await randomGenerator.integer(minDelayMs, maxDelayMs); + return ms; + }; + } +} diff --git a/src/policies/reactive/retryPolicy/retryPolicy.ts b/src/policies/reactive/retryPolicy/retryPolicy.ts new file mode 100644 index 0000000..6aa2c39 --- /dev/null +++ b/src/policies/reactive/retryPolicy/retryPolicy.ts @@ -0,0 +1,165 @@ +import { Predicate } from '../../../types/predicate'; +import { ReactivePolicy } from '../reactivePolicy'; + +export class RetryPolicy extends ReactivePolicy { + private totalRetryCount = 1; + private readonly onRetryFns: Array< + (result: ResultType | undefined, error: unknown | undefined, currentRetryCount: number) => void | Promise + > = []; + private backoffStrategy: (currentRetryCount: number) => number | Promise = () => 0; + private readonly onFinallyFns: Array<() => void | Promise> = []; + private executing = 0; + + public constructor() { + super(); + } + + public retryCount(retryCount: number): void { + if (!Number.isInteger(retryCount)) { + throw new Error('retryCount must be integer'); + } + + if (retryCount <= 0) { + throw new Error('retryCount must be greater than 0'); + } + + if (!Number.isSafeInteger(retryCount)) { + throw new Error('retryCount must be less than 2^53 - 1'); + } + + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.totalRetryCount = retryCount; + } + + public retryForever(): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.totalRetryCount = Number.POSITIVE_INFINITY; + } + + public onRetry( + fn: ( + result: ResultType | undefined, + error: unknown | undefined, + currentRetryCount: number, + ) => void | Promise, + ): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onRetryFns.push(fn); + } + + public waitBeforeRetry(strategy: (currentRetryCount: number) => number | Promise): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.backoffStrategy = strategy; + } + + public onFinally(fn: () => void | Promise): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onFinallyFns.push(fn); + } + + public async execute(fn: () => ResultType | Promise): Promise { + this.executing++; + + try { + let currentRetryCount = 0; + + // eslint-disable-next-line no-constant-condition + while (true) { + try { + const result = await fn(); + + currentRetryCount++; + const shouldRetry = await this.shouldRetryOnResult(result, currentRetryCount); + if (!shouldRetry) { + return result; + } + + const waitFor = await this.backoffStrategy(currentRetryCount); + await this.waitFor(waitFor); + + for (const onRetryFn of this.onRetryFns) { + try { + await onRetryFn(result, undefined, currentRetryCount); + } catch (onRetryError) { + // ignored + } + } + + continue; + } catch (ex) { + currentRetryCount++; + const shouldRetry = await this.shouldRetryOnException(ex, currentRetryCount); + if (!shouldRetry) { + throw ex; + } + + const waitFor = await this.backoffStrategy(currentRetryCount); + await this.waitFor(waitFor); + + for (const onRetryFn of this.onRetryFns) { + try { + await onRetryFn(undefined, ex, currentRetryCount); + } catch (onRetryError) { + // ignored + } + } + + continue; + } + } + } finally { + try { + for (const onFinallyFn of this.onFinallyFns) { + try { + await onFinallyFn(); + } catch (onFinallyError) { + // ignored + } + } + } finally { + this.executing--; + } + } + } + + private async shouldRetryOnResult(result: ResultType, currentRetryCount: number): Promise { + return this.shouldRetryOn(currentRetryCount, result, async result => this.isResultHandled(result)); + } + + private async shouldRetryOnException(exception: unknown, currentRetryCount: number): Promise { + return this.shouldRetryOn(currentRetryCount, exception, async exception => this.isExceptionHandled(exception)); + } + + private async shouldRetryOn( + currentRetryCount: number, + subject: T, + shouldRetryCb: Predicate, + ): Promise { + if (currentRetryCount > this.totalRetryCount) { + return false; + } + + return shouldRetryCb(subject); + } + + private async waitFor(ms: number): Promise { + return new Promise(resolve => { + setTimeout(resolve, ms); + }); + } +} diff --git a/src/types/predicate.ts b/src/types/predicate.ts new file mode 100644 index 0000000..17656f2 --- /dev/null +++ b/src/types/predicate.ts @@ -0,0 +1 @@ +export type Predicate = (subject: T) => boolean | Promise; diff --git a/src/utils/predicateChecker.ts b/src/utils/predicateChecker.ts new file mode 100644 index 0000000..84f918e --- /dev/null +++ b/src/utils/predicateChecker.ts @@ -0,0 +1,37 @@ +import { Predicate } from '../types/predicate'; + +export class PredicateChecker { + public static async single(subject: T, predicate: Predicate): Promise { + return predicate(subject); + } + + public static async some(subject: T, predicates: Array>): Promise { + if (predicates.length === 0) { + return false; + } + + for (const predicate of predicates) { + const positive = await predicate(subject); + if (positive) { + return true; + } + } + + return false; + } + + public static async every(subject: T, predicates: Array>): Promise { + if (predicates.length === 0) { + return false; + } + + for (const predicate of predicates) { + const positive = await predicate(subject); + if (!positive) { + return false; + } + } + + return true; + } +} diff --git a/test/specs/backoffStrategyFactory.test.ts b/test/specs/backoffStrategyFactory.test.ts new file mode 100644 index 0000000..d03c89c --- /dev/null +++ b/test/specs/backoffStrategyFactory.test.ts @@ -0,0 +1,167 @@ +import { RandomGenerator } from '@diplomatiq/crypto-random'; +import { expect } from 'chai'; +import { BackoffStrategyFactory } from '../../src/policies/reactive/retryPolicy/backoffStrategyFactory'; +import { NodeJsEntropyProvider } from '../utils/nodeJsEntropyProvider'; +import { windowMock } from '../utils/windowMock'; + +describe('BackoffStrategyFactory', () => { + describe('constantBackoff', () => { + it('should produce a constant backoff strategy', () => { + const strategy = BackoffStrategyFactory.constantBackoff(100); + expect(strategy(1)).to.equal(100); + expect(strategy(2)).to.equal(100); + expect(strategy(3)).to.equal(100); + expect(strategy(4)).to.equal(100); + expect(strategy(5)).to.equal(100); + }); + + it('should produce a constant backoff strategy with an immediate first retry if set', () => { + const strategy = BackoffStrategyFactory.constantBackoff(100, true); + expect(strategy(1)).to.equal(0); + expect(strategy(2)).to.equal(100); + expect(strategy(3)).to.equal(100); + expect(strategy(4)).to.equal(100); + expect(strategy(5)).to.equal(100); + }); + }); + + describe('linearBackoff', () => { + it('should produce a linear backoff strategy', () => { + const strategy = BackoffStrategyFactory.linearBackoff(100); + expect(strategy(1)).to.equal(100); + expect(strategy(2)).to.equal(200); + expect(strategy(3)).to.equal(300); + expect(strategy(4)).to.equal(400); + expect(strategy(5)).to.equal(500); + }); + + it('should produce a linear backoff strategy with an immediate first retry if set', () => { + const strategy = BackoffStrategyFactory.linearBackoff(100, true); + expect(strategy(1)).to.equal(0); + expect(strategy(2)).to.equal(100); + expect(strategy(3)).to.equal(200); + expect(strategy(4)).to.equal(300); + expect(strategy(5)).to.equal(400); + }); + }); + + describe('exponentialBackoff', () => { + it('should produce an exponential backoff strategy', () => { + const strategy = BackoffStrategyFactory.exponentialBackoff(100); + expect(strategy(1)).to.equal(100); + expect(strategy(2)).to.equal(200); + expect(strategy(3)).to.equal(400); + expect(strategy(4)).to.equal(800); + expect(strategy(5)).to.equal(1600); + }); + + it('should produce an exponential backoff strategy with an immediate first retry if set', () => { + const strategy = BackoffStrategyFactory.exponentialBackoff(100, true); + expect(strategy(1)).to.equal(0); + expect(strategy(2)).to.equal(100); + expect(strategy(3)).to.equal(200); + expect(strategy(4)).to.equal(400); + expect(strategy(5)).to.equal(800); + }); + + it('should produce an exponential backoff strategy with a custom base if set', () => { + const strategy = BackoffStrategyFactory.exponentialBackoff(100, false, 3); + expect(strategy(1)).to.equal(100); + expect(strategy(2)).to.equal(300); + expect(strategy(3)).to.equal(900); + expect(strategy(4)).to.equal(2700); + expect(strategy(5)).to.equal(8100); + }); + + it('should produce an exponential backoff strategy with an immediate first retry and a custom base if set', () => { + const strategy = BackoffStrategyFactory.exponentialBackoff(100, true, 3); + expect(strategy(1)).to.equal(0); + expect(strategy(2)).to.equal(100); + expect(strategy(3)).to.equal(300); + expect(strategy(4)).to.equal(900); + expect(strategy(5)).to.equal(2700); + }); + }); + + describe('jitteredBackoff', () => { + it('should produce a jittered backoff strategy', async () => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100, false, randomGenerator); + + expect(await strategy(1)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(2)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(3)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(4)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(5)) + .to.be.at.least(0) + .and.to.be.at.most(100); + }); + + it('should produce a jittered backoff strategy with an immediate first retry if set', async () => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100, true, randomGenerator); + + expect(await strategy(1)).to.equal(0); + + expect(await strategy(2)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(3)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(4)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(5)) + .to.be.at.least(0) + .and.to.be.at.most(100); + }); + + it('should work with the default random generator where window.crypto.getRandomValues() is available', async () => { + // @ts-ignore + global.window = windowMock(); + + const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100); + + expect(await strategy(1)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(2)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(3)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(4)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + expect(await strategy(5)) + .to.be.at.least(0) + .and.to.be.at.most(100); + + // @ts-ignore + global.window = undefined; + }); + }); +}); diff --git a/test/specs/empty.test.ts b/test/specs/empty.test.ts deleted file mode 100644 index e69de29..0000000 diff --git a/test/specs/predicateChecker.test.ts b/test/specs/predicateChecker.test.ts new file mode 100644 index 0000000..28891a8 --- /dev/null +++ b/test/specs/predicateChecker.test.ts @@ -0,0 +1,116 @@ +import { expect } from 'chai'; +import { PredicateChecker } from '../../src/utils/predicateChecker'; + +describe('PredicateChecker', () => { + describe('single', () => { + it('should return true, when the predicate returns true for the subject', async () => { + const result = await PredicateChecker.single( + 'Diplomatiq is cool.', + (subject: string) => subject === 'Diplomatiq is cool.', + ); + expect(result).to.be.true; + }); + + it('should return false, when the predicate returns false for the subject', async () => { + const result = await PredicateChecker.single( + 'Diplomatiq is not cool.', + (subject: string) => subject === 'Diplomatiq is cool.', + ); + expect(result).to.be.false; + }); + + it('should return true, when the async predicate returns true for the subject', async () => { + const result = await PredicateChecker.single( + 'Diplomatiq is cool.', + async (subject: string) => subject === 'Diplomatiq is cool.', + ); + expect(result).to.be.true; + }); + + it('should return false, when the async predicate returns false for the subject', async () => { + const result = await PredicateChecker.single( + 'Diplomatiq is not cool.', + async (subject: string) => subject === 'Diplomatiq is cool.', + ); + expect(result).to.be.false; + }); + }); + + describe('some', () => { + it('should return true if at least one of the predicates returns true for the subject', async () => { + const result = await PredicateChecker.some('Diplomatiq is cool.', [ + (subject: string) => subject === 'Diplomatiq is cool.', + (subject: string) => subject === 'Diplomatiq is the coolest.', + ]); + expect(result).to.be.true; + }); + + it('should return false if none of the predicates returns true for the subject', async () => { + const result = await PredicateChecker.some('Diplomatiq is not cool.', [ + (subject: string) => subject === 'Diplomatiq is cool.', + (subject: string) => subject === 'Diplomatiq is the coolest.', + ]); + expect(result).to.be.false; + }); + + it('should return true if at least one of the async predicates returns true for the subject', async () => { + const result = await PredicateChecker.some('Diplomatiq is cool.', [ + async (subject: string) => subject === 'Diplomatiq is cool.', + async (subject: string) => subject === 'Diplomatiq is the coolest.', + ]); + expect(result).to.be.true; + }); + + it('should return false if none of the async predicates returns true for the subject', async () => { + const result = await PredicateChecker.some('Diplomatiq is not cool.', [ + async (subject: string) => subject === 'Diplomatiq is cool.', + async (subject: string) => subject === 'Diplomatiq is the coolest.', + ]); + expect(result).to.be.false; + }); + + it('should return false if predicates is empty', async () => { + const result = await PredicateChecker.some('Diplomatiq is cool.', []); + expect(result).to.be.false; + }); + }); + + describe('all', () => { + it('should return true if all of the predicates returns true for the subject', async () => { + const result = await PredicateChecker.every('Diplomatiq is cool.', [ + (subject: string) => subject.includes('Diplomatiq'), + (subject: string) => subject.includes('cool'), + ]); + expect(result).to.be.true; + }); + + it('should return false if at least one of the predicates returns false for the subject', async () => { + const result = await PredicateChecker.every('Diplomatiq is cool.', [ + (subject: string) => subject.includes('Diplomatiq'), + (subject: string) => subject.includes('not cool'), + ]); + expect(result).to.be.false; + }); + + it('should return true if all of the async predicates returns true for the subject', async () => { + const result = await PredicateChecker.every('Diplomatiq is cool.', [ + async (subject: string) => subject.includes('Diplomatiq'), + async (subject: string) => subject.includes('cool'), + ]); + expect(result).to.be.true; + }); + + it('should return false if at least one of the async predicates returns false for the subject', async () => { + const result = await PredicateChecker.every('Diplomatiq is cool.', [ + async (subject: string) => subject.includes('Diplomatiq'), + async (subject: string) => subject.includes('not cool'), + ]); + expect(result).to.be.false; + }); + + it('should return false if predicates is empty', async () => { + const result = await PredicateChecker.every('Diplomatiq is cool.', []); + expect(result).to.be.false; + }); + }); +}); diff --git a/test/specs/retryPolicy.test.ts b/test/specs/retryPolicy.test.ts new file mode 100644 index 0000000..655a4bc --- /dev/null +++ b/test/specs/retryPolicy.test.ts @@ -0,0 +1,825 @@ +import { expect } from 'chai'; +import { RetryPolicy } from '../../src/policies/reactive/retryPolicy/retryPolicy'; + +describe('RetryPolicy', () => { + it('should run the execution callback and return its result by default', async () => { + const policy = new RetryPolicy(); + const result = await policy.execute(() => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the async execution callback and return its result by default', async () => { + const policy = new RetryPolicy(); + const result = await policy.execute(async () => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the execution callback and throw its exceptions by default', async () => { + const policy = new RetryPolicy(); + + try { + await policy.execute(() => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should run the async execution callback and throw its exceptions by default', async () => { + const policy = new RetryPolicy(); + + try { + await policy.execute(() => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should retry on a given result once, then return the result by default', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + + let executed = 0; + + const result = await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(2); + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should not retry on a not given result, but return the result', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is not cool.'); + + let executed = 0; + + const result = await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(1); + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should retry on a given result thrice when setting retryCount to 3, then return the result', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + + let executed = 0; + + const result = await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(4); + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should retry on multiple given results, then return the result', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.handleResult((r: string) => r === 'Diplomatiq is the coolest.'); + + let executed = 0; + let result: string; + + result = await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(2); + expect(result).to.equal('Diplomatiq is cool.'); + + result = await policy.execute(() => { + executed++; + return 'Diplomatiq is the coolest.'; + }); + + expect(executed).to.equal(4); + expect(result).to.equal('Diplomatiq is the coolest.'); + }); + + it('should retry on a given exception once, then throw by default', async () => { + const policy = new RetryPolicy(); + policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + + let executed = 0; + + try { + await policy.execute(() => { + executed++; + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(executed).to.equal(2); + }); + + it('should not retry on a not given exception, but throw', async () => { + const policy = new RetryPolicy(); + policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + + let executed = 0; + + try { + await policy.execute(() => { + executed++; + throw new Error('ArgumentException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('ArgumentException'); + } + + expect(executed).to.equal(1); + }); + + it('should retry on a given exception thrice when setting retryCount to 3, then throw', async () => { + const policy = new RetryPolicy(); + policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.retryCount(3); + + let executed = 0; + + try { + await policy.execute(() => { + executed++; + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(executed).to.equal(4); + }); + + it('should retry on multiple given exceptions, then throw', async () => { + const policy = new RetryPolicy(); + policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.handleException((e: unknown) => (e as Error).message === 'ArgumentException'); + + let executed = 0; + + try { + await policy.execute(() => { + executed++; + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(executed).to.equal(2); + + try { + await policy.execute(() => { + executed++; + throw new Error('ArgumentException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('ArgumentException'); + } + + expect(executed).to.equal(4); + }); + + it('should retry on a given result and on a given exception as well, then return/throw', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + + let executed = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(2); + + try { + await policy.execute(() => { + executed++; + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(executed).to.equal(4); + }); + + it('should not retry without a given result or exception to be handled', async () => { + const policy = new RetryPolicy(); + + let executed = 0; + + const result = await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(1); + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should retry forever if set', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryForever(); + + let executed = 0; + + await policy.execute(() => { + executed++; + + if (executed < 10) { + return 'Diplomatiq is cool.'; + } + + return ''; + }); + + expect(executed).to.equal(10); + }); + + it('should run onRetryFn with result filled on retry, before the retried execution', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + onRetryExecuted++; + expect(onRetryExecuted).to.equal(currentRetryCount); + }); + + let executed = 0; + let onRetryExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(2); + expect(onRetryExecuted).to.equal(1); + }); + + it('should run onRetryFn with result filled on retry, before the retried execution thrice when setting retryCount to 3', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + onRetryExecuted++; + expect(onRetryExecuted).to.equal(currentRetryCount); + }); + + let executed = 0; + let onRetryExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(4); + expect(onRetryExecuted).to.equal(3); + }); + + it('should run onRetryFn with error filled on retry, before the retried execution', async () => { + const policy = new RetryPolicy(); + policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal(undefined); + expect((error as Error).message).to.equal('TestException'); + expect(currentRetryCount).to.equal(executed); + + onRetryExecuted++; + expect(onRetryExecuted).to.equal(currentRetryCount); + }); + + let executed = 0; + let onRetryExecuted = 0; + + try { + await policy.execute(() => { + executed++; + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(executed).to.equal(2); + expect(onRetryExecuted).to.equal(1); + }); + + it('should run onRetryFn with error filled on retry, before the retried execution thrice when setting retryCount to 3', async () => { + const policy = new RetryPolicy(); + policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.retryCount(3); + policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal(undefined); + expect((error as Error).message).to.equal('TestException'); + expect(currentRetryCount).to.equal(executed); + + onRetryExecuted++; + expect(onRetryExecuted).to.equal(currentRetryCount); + }); + + let executed = 0; + let onRetryExecuted = 0; + + try { + await policy.execute(() => { + executed++; + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(executed).to.equal(4); + expect(onRetryExecuted).to.equal(3); + }); + + it('should await an async onRetryFn before retrying', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + onRetryExecuted++; + expect(onRetryExecuted).to.equal(currentRetryCount); + }); + + let executed = 0; + let onRetryExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(2); + expect(onRetryExecuted).to.equal(1); + }); + + it('should run multiple onRetryFns sequentially on retry', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); + }); + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); + }); + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 3); + }); + + let executed = 0; + let onRetryExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(4); + expect(onRetryExecuted).to.equal(9); + }); + + it('should run multiple async onRetryFns sequentially on retry', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); + }); + policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); + }); + policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 3); + }); + + let executed = 0; + let onRetryExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(4); + expect(onRetryExecuted).to.equal(9); + }); + + it('should run onFinallyFn after all execution and retries if retried', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + onRetryExecuted++; + expect(onRetryExecuted).to.equal(currentRetryCount); + }); + policy.onFinally(() => { + onFinallyExecuted++; + + expect(executed).to.equal(4); + expect(onRetryExecuted).to.equal(3); + }); + + let executed = 0; + let onRetryExecuted = 0; + let onFinallyExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(4); + expect(onRetryExecuted).to.equal(3); + expect(onFinallyExecuted).to.equal(1); + }); + + it('should run onFinallyFn after the execution if not retried', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is not cool.'); + policy.retryCount(3); + policy.onFinally(() => { + onFinallyExecuted++; + + expect(executed).to.equal(1); + }); + + let executed = 0; + let onFinallyExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(1); + expect(onFinallyExecuted).to.equal(1); + }); + + it('should run multiple onFinallyFns sequentially', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.onFinally(() => { + expect(onFinallyExecuted).to.equal(0); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(1); + }); + policy.onFinally(() => { + expect(onFinallyExecuted).to.equal(1); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(2); + }); + policy.onFinally(() => { + expect(onFinallyExecuted).to.equal(2); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(3); + }); + + let executed = 0; + let onFinallyExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(2); + expect(onFinallyExecuted).to.equal(3); + }); + + it('should run multiple async onFinallyFns sequentially', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.onFinally(async () => { + expect(onFinallyExecuted).to.equal(0); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(1); + }); + policy.onFinally(async () => { + expect(onFinallyExecuted).to.equal(1); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(2); + }); + policy.onFinally(async () => { + expect(onFinallyExecuted).to.equal(2); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(3); + }); + + let executed = 0; + let onFinallyExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(2); + expect(onFinallyExecuted).to.equal(3); + }); + + it('should run onFinallyFn once, regardless of retryCount', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.onFinally(() => { + onFinallyExecuted++; + }); + + let executed = 0; + let onFinallyExecuted = 0; + + await policy.execute(() => { + executed++; + return 'Diplomatiq is cool.'; + }); + + expect(executed).to.equal(4); + expect(onFinallyExecuted).to.equal(1); + }); + + it('should wait for the specified interval before retry if set', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.waitBeforeRetry(() => 100); + + const executionTimestamps: number[] = []; + + await policy.execute(() => { + executionTimestamps.push(Date.now()); + return 'Diplomatiq is cool.'; + }); + + expect(executionTimestamps[1] - executionTimestamps[0]) + .to.be.at.least(100) + .and.to.be.at.most(110); + }); + + it('should wait for the specified interval (depending on the current retry count) before retry if set', async () => { + const policy = new RetryPolicy(); + policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.retryCount(2); + policy.waitBeforeRetry((currentRetryCount: number) => currentRetryCount * 100); + + const executionTimestamps: number[] = []; + + await policy.execute(() => { + executionTimestamps.push(Date.now()); + return 'Diplomatiq is cool.'; + }); + + expect(executionTimestamps[1] - executionTimestamps[0]) + .to.be.at.least(100) + .and.to.be.at.most(110); + expect(executionTimestamps[2] - executionTimestamps[1]) + .to.be.at.least(200) + .and.to.be.at.most(210); + }); + + it('should not allow to set retryCount during execution', () => { + const policy = new RetryPolicy(); + policy.execute(async () => { + await new Promise(() => {}); + }); + + try { + policy.retryCount(2); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to set retryForever during execution', () => { + const policy = new RetryPolicy(); + policy.execute(async () => { + await new Promise(() => {}); + }); + + try { + policy.retryForever(); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onRetryFns during execution', () => { + const policy = new RetryPolicy(); + policy.execute(async () => { + await new Promise(() => {}); + }); + + try { + policy.onRetry(() => {}); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to set waitBeforeRetry during execution', () => { + const policy = new RetryPolicy(); + policy.execute(async () => { + await new Promise(() => {}); + }); + + try { + policy.waitBeforeRetry(() => 100); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onFinallyFns during execution', () => { + const policy = new RetryPolicy(); + policy.execute(async () => { + await new Promise(() => {}); + }); + + try { + policy.onFinally(() => {}); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it("should be properly mutex'd for running an instance multiple times simultaneously", async () => { + const policy = new RetryPolicy(); + + await Promise.all([ + ...new Array(100) + .fill(undefined) + .map(() => policy.execute(() => new Promise(resolve => setTimeout(resolve, 20)))), + ...new Array(100).fill(undefined).map(() => { + try { + policy.retryCount(1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ...new Array(100).fill(undefined).map(() => { + try { + policy.retryForever(); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ...new Array(100).fill(undefined).map(() => { + try { + policy.onRetry(() => {}); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ...new Array(100).fill(undefined).map(() => { + try { + policy.waitBeforeRetry(() => 100); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ...new Array(100).fill(undefined).map(() => { + try { + policy.onFinally(() => {}); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ]); + }); + + it('should throw error when setting retry count to 0', () => { + const policy = new RetryPolicy(); + try { + policy.retryCount(0); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('retryCount must be greater than 0'); + } + }); + + it('should throw error when setting retry count to <0', () => { + const policy = new RetryPolicy(); + try { + policy.retryCount(-1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('retryCount must be greater than 0'); + } + }); + + it('should throw error when setting retry count to a non-integer', () => { + const policy = new RetryPolicy(); + try { + policy.retryCount(0.1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('retryCount must be integer'); + } + }); + + it('should throw error when setting retry count to a non-safe integer', () => { + const policy = new RetryPolicy(); + try { + policy.retryCount(2 ** 53); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('retryCount must be less than 2^53 - 1'); + } + }); +}); diff --git a/test/utils/nodeJsEntropyProvider.ts b/test/utils/nodeJsEntropyProvider.ts new file mode 100644 index 0000000..2ebfe8c --- /dev/null +++ b/test/utils/nodeJsEntropyProvider.ts @@ -0,0 +1,16 @@ +import { EntropyProvider, UnsignedTypedArray } from '@diplomatiq/crypto-random'; +import { randomFill } from 'crypto'; + +export class NodeJsEntropyProvider implements EntropyProvider { + public async getRandomValues(array: T): Promise { + return new Promise((resolve, reject): void => { + randomFill(array, (error: Error | null, array: T) => { + if (error !== null) { + reject(error); + return; + } + resolve(array); + }); + }); + } +} diff --git a/test/utils/windowMock.ts b/test/utils/windowMock.ts new file mode 100644 index 0000000..33cb054 --- /dev/null +++ b/test/utils/windowMock.ts @@ -0,0 +1,7 @@ +import { randomFillSync } from 'crypto'; + +export const windowMock = () => ({ + crypto: { + getRandomValues: (array: Uint8Array) => randomFillSync(array), + }, +}); From d5d22694ddc25d843c2aedc7737787bf0508d70a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2020 18:05:54 +0000 Subject: [PATCH 100/136] chore: bump @typescript-eslint/parser from 2.19.2 to 2.20.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.19.2 to 2.20.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.20.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 38 +++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a52d447..e5e7222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -559,15 +559,43 @@ } }, "@typescript-eslint/parser": { - "version": "2.19.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.19.2.tgz", - "integrity": "sha512-8uwnYGKqX9wWHGPGdLB9sk9+12sjcdqEEYKGgbS8A0IvYX59h01o8os5qXUHMq2na8vpDRaV0suTLM7S8wraTA==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.20.0.tgz", + "integrity": "sha512-o8qsKaosLh2qhMZiHNtaHKTHyCHc3Triq6aMnwnWj7budm3xAY9owSZzV1uon5T9cWmJRJGzTFa90aex4m77Lw==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.19.2", - "@typescript-eslint/typescript-estree": "2.19.2", + "@typescript-eslint/experimental-utils": "2.20.0", + "@typescript-eslint/typescript-estree": "2.20.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.20.0.tgz", + "integrity": "sha512-fEBy9xYrwG9hfBLFEwGW2lKwDRTmYzH3DwTmYbT+SMycmxAoPl0eGretnBFj/s+NfYBG63w/5c3lsvqqz5mYag==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.20.0", + "eslint-scope": "^5.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.20.0.tgz", + "integrity": "sha512-WlFk8QtI8pPaE7JGQGxU7nGcnk1ccKAJkhbVookv94ZcAef3m6oCE/jEDL6dGte3JcD7reKrA0o55XhBRiVT3A==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + } + } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index 3592d02..9606aad 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^7.0.1", "@types/node": "^13.7.1", "@typescript-eslint/eslint-plugin": "^2.19.2", - "@typescript-eslint/parser": "^2.19.2", + "@typescript-eslint/parser": "^2.20.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.0", From 01285dbcb6af9ecb03ab55fd2edfca769128bded Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2020 19:53:51 +0000 Subject: [PATCH 101/136] chore: bump @typescript-eslint/eslint-plugin from 2.19.2 to 2.20.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.19.2 to 2.20.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.20.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5e7222..62f0c4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -535,12 +535,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.19.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.2.tgz", - "integrity": "sha512-HX2qOq2GOV04HNrmKnTpSIpHjfl7iwdXe3u/Nvt+/cpmdvzYvY0NHSiTkYN257jHnq4OM/yo+OsFgati+7LqJA==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.20.0.tgz", + "integrity": "sha512-cimIdVDV3MakiGJqMXw51Xci6oEDEoPkvh8ggJe2IIzcc0fYqAxOXN6Vbeanahz6dLZq64W+40iUEc9g32FLDQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.19.2", + "@typescript-eslint/experimental-utils": "2.20.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -548,13 +548,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.19.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.2.tgz", - "integrity": "sha512-B88QuwT1wMJR750YvTJBNjMZwmiPpbmKYLm1yI7PCc3x0NariqPwqaPsoJRwU9DmUi0cd9dkhz1IqEnwfD+P1A==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.20.0.tgz", + "integrity": "sha512-fEBy9xYrwG9hfBLFEwGW2lKwDRTmYzH3DwTmYbT+SMycmxAoPl0eGretnBFj/s+NfYBG63w/5c3lsvqqz5mYag==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.19.2", + "@typescript-eslint/typescript-estree": "2.20.0", "eslint-scope": "^5.0.0" } }, @@ -599,9 +599,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.19.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.2.tgz", - "integrity": "sha512-Xu/qa0MDk6upQWqE4Qy2X16Xg8Vi32tQS2PR0AvnT/ZYS4YGDvtn2MStOh5y8Zy2mg4NuL06KUHlvCh95j9C6Q==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.20.0.tgz", + "integrity": "sha512-WlFk8QtI8pPaE7JGQGxU7nGcnk1ccKAJkhbVookv94ZcAef3m6oCE/jEDL6dGte3JcD7reKrA0o55XhBRiVT3A==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index 9606aad..27afde9 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@types/chai": "^4.2.9", "@types/mocha": "^7.0.1", "@types/node": "^13.7.1", - "@typescript-eslint/eslint-plugin": "^2.19.2", + "@typescript-eslint/eslint-plugin": "^2.20.0", "@typescript-eslint/parser": "^2.20.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From b29839edf3ff7fa8d91a94d5ef8ecfb605594d01 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2020 20:26:49 +0000 Subject: [PATCH 102/136] chore: bump @types/node from 13.7.1 to 13.7.4 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.1 to 13.7.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62f0c4a..4850043 100644 --- a/package-lock.json +++ b/package-lock.json @@ -523,9 +523,9 @@ "dev": true }, "@types/node": { - "version": "13.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", - "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==", + "version": "13.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.4.tgz", + "integrity": "sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index 27afde9..9877320 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.9", "@types/mocha": "^7.0.1", - "@types/node": "^13.7.1", + "@types/node": "^13.7.4", "@typescript-eslint/eslint-plugin": "^2.20.0", "@typescript-eslint/parser": "^2.20.0", "chai": "^4.2.0", From 9245307a88fd84c2a0333c8024a58e88650d5153 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2020 22:49:53 +0000 Subject: [PATCH 103/136] chore: bump typescript from 3.7.5 to 3.8.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.5 to 3.8.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4850043..44ea8e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4887,9 +4887,9 @@ } }, "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.2.tgz", + "integrity": "sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 9877320..b1054f2 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "esm": "^3.2.25", "source-map-support": "^0.5.16", "ts-node": "^8.6.2", - "typescript": "^3.7.5" + "typescript": "^3.8.2" }, "files": [ "dist/**/*" From 9d997e43f6743259da613c3259897fadbbf91029 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2020 18:06:08 +0000 Subject: [PATCH 104/136] chore: bump @typescript-eslint/parser from 2.20.0 to 2.21.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.20.0 to 2.21.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.21.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44ea8e1..02dc85b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -559,32 +559,32 @@ } }, "@typescript-eslint/parser": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.20.0.tgz", - "integrity": "sha512-o8qsKaosLh2qhMZiHNtaHKTHyCHc3Triq6aMnwnWj7budm3xAY9owSZzV1uon5T9cWmJRJGzTFa90aex4m77Lw==", + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.21.0.tgz", + "integrity": "sha512-VrmbdrrrvvI6cPPOG7uOgGUFXNYTiSbnRq8ZMyuGa4+qmXJXVLEEz78hKuqupvkpwJQNk1Ucz1TenrRP90gmBg==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.20.0", - "@typescript-eslint/typescript-estree": "2.20.0", + "@typescript-eslint/experimental-utils": "2.21.0", + "@typescript-eslint/typescript-estree": "2.21.0", "eslint-visitor-keys": "^1.1.0" }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.20.0.tgz", - "integrity": "sha512-fEBy9xYrwG9hfBLFEwGW2lKwDRTmYzH3DwTmYbT+SMycmxAoPl0eGretnBFj/s+NfYBG63w/5c3lsvqqz5mYag==", + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.21.0.tgz", + "integrity": "sha512-olKw9JP/XUkav4lq0I7S1mhGgONJF9rHNhKFn9wJlpfRVjNo3PPjSvybxEldvCXnvD+WAshSzqH5cEjPp9CsBA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.20.0", + "@typescript-eslint/typescript-estree": "2.21.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.20.0.tgz", - "integrity": "sha512-WlFk8QtI8pPaE7JGQGxU7nGcnk1ccKAJkhbVookv94ZcAef3m6oCE/jEDL6dGte3JcD7reKrA0o55XhBRiVT3A==", + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.21.0.tgz", + "integrity": "sha512-NC/nogZNb9IK2MEFQqyDBAciOT8Lp8O3KgAfvHx2Skx6WBo+KmDqlU3R9KxHONaijfTIKtojRe3SZQyMjr3wBw==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index b1054f2..6e128e3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^7.0.1", "@types/node": "^13.7.4", "@typescript-eslint/eslint-plugin": "^2.20.0", - "@typescript-eslint/parser": "^2.20.0", + "@typescript-eslint/parser": "^2.21.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.0", From 6b4dad4edaa473c02e9752923472890994af6a7b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2020 21:26:08 +0000 Subject: [PATCH 105/136] chore: [security] bump acorn from 7.1.0 to 7.1.1 Bumps [acorn](https://github.com/acornjs/acorn) from 7.1.0 to 7.1.1. **This update includes a security fix.** - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/7.1.0...7.1.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02dc85b..78b37d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -624,9 +624,9 @@ } }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true }, "acorn-jsx": { From 1a4021827ff25b8883cbeeb5f128e631ea166b51 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2020 22:25:23 +0000 Subject: [PATCH 106/136] chore: bump @types/node from 13.7.4 to 13.9.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.4 to 13.9.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78b37d0..077d139 100644 --- a/package-lock.json +++ b/package-lock.json @@ -523,9 +523,9 @@ "dev": true }, "@types/node": { - "version": "13.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.4.tgz", - "integrity": "sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw==", + "version": "13.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz", + "integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index 6e128e3..e821a11 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.9", "@types/mocha": "^7.0.1", - "@types/node": "^13.7.4", + "@types/node": "^13.9.1", "@typescript-eslint/eslint-plugin": "^2.20.0", "@typescript-eslint/parser": "^2.21.0", "chai": "^4.2.0", From 7ec0feff2199423e5f2abaf79d282995a3becf39 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2020 22:40:31 +0000 Subject: [PATCH 107/136] chore: bump @typescript-eslint/eslint-plugin from 2.20.0 to 2.23.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.20.0 to 2.23.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.23.0/packages/eslint-plugin) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 077d139..9bc5987 100644 --- a/package-lock.json +++ b/package-lock.json @@ -535,12 +535,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.20.0.tgz", - "integrity": "sha512-cimIdVDV3MakiGJqMXw51Xci6oEDEoPkvh8ggJe2IIzcc0fYqAxOXN6Vbeanahz6dLZq64W+40iUEc9g32FLDQ==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.23.0.tgz", + "integrity": "sha512-8iA4FvRsz8qTjR0L/nK9RcRUN3QtIHQiOm69FzV7WS3SE+7P7DyGGwh3k4UNR2JBbk+Ej2Io+jLAaqKibNhmtw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.20.0", + "@typescript-eslint/experimental-utils": "2.23.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -548,13 +548,13 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.20.0.tgz", - "integrity": "sha512-fEBy9xYrwG9hfBLFEwGW2lKwDRTmYzH3DwTmYbT+SMycmxAoPl0eGretnBFj/s+NfYBG63w/5c3lsvqqz5mYag==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.23.0.tgz", + "integrity": "sha512-OswxY59RcXH3NNPmq+4Kis2CYZPurRU6mG5xPcn24CjFyfdVli5mySwZz/g/xDbJXgDsYqNGq7enV0IziWGXVQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.20.0", + "@typescript-eslint/typescript-estree": "2.23.0", "eslint-scope": "^5.0.0" } }, @@ -599,9 +599,9 @@ } }, "@typescript-eslint/typescript-estree": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.20.0.tgz", - "integrity": "sha512-WlFk8QtI8pPaE7JGQGxU7nGcnk1ccKAJkhbVookv94ZcAef3m6oCE/jEDL6dGte3JcD7reKrA0o55XhBRiVT3A==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.23.0.tgz", + "integrity": "sha512-pmf7IlmvXdlEXvE/JWNNJpEvwBV59wtJqA8MLAxMKLXNKVRC3HZBXR/SlZLPWTCcwOSg9IM7GeRSV3SIerGVqw==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index e821a11..15f13f0 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@types/chai": "^4.2.9", "@types/mocha": "^7.0.1", "@types/node": "^13.9.1", - "@typescript-eslint/eslint-plugin": "^2.20.0", + "@typescript-eslint/eslint-plugin": "^2.23.0", "@typescript-eslint/parser": "^2.21.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From 616c3009a6987a9121743f2150c7f3eb84855f15 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 01:43:35 +0000 Subject: [PATCH 108/136] chore: bump @types/chai from 4.2.9 to 4.2.11 Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.2.9 to 4.2.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bc5987..a5c4ca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -493,9 +493,9 @@ } }, "@types/chai": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.9.tgz", - "integrity": "sha512-NeXgZj+MFL4izGqA4sapdYzkzQG+MtGra9vhQ58dnmDY++VgJaRUws+aLVV5zRJCYJl/8s9IjMmhiUw1WsKSmw==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", + "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", "dev": true }, "@types/color-name": { diff --git a/package.json b/package.json index 15f13f0..95e2125 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", - "@types/chai": "^4.2.9", + "@types/chai": "^4.2.11", "@types/mocha": "^7.0.1", "@types/node": "^13.9.1", "@typescript-eslint/eslint-plugin": "^2.23.0", From 137f7cda522151d167f76fe57679c099d7d36c6c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 10:05:26 +0000 Subject: [PATCH 109/136] chore: bump @typescript-eslint/parser from 2.21.0 to 2.23.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.21.0 to 2.23.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.23.0/packages/parser) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 38 +++++--------------------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index a5c4ca0..4522f3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -559,43 +559,15 @@ } }, "@typescript-eslint/parser": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.21.0.tgz", - "integrity": "sha512-VrmbdrrrvvI6cPPOG7uOgGUFXNYTiSbnRq8ZMyuGa4+qmXJXVLEEz78hKuqupvkpwJQNk1Ucz1TenrRP90gmBg==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.23.0.tgz", + "integrity": "sha512-k61pn/Nepk43qa1oLMiyqApC6x5eP5ddPz6VUYXCAuXxbmRLqkPYzkFRKl42ltxzB2luvejlVncrEpflgQoSUg==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.21.0", - "@typescript-eslint/typescript-estree": "2.21.0", + "@typescript-eslint/experimental-utils": "2.23.0", + "@typescript-eslint/typescript-estree": "2.23.0", "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.21.0.tgz", - "integrity": "sha512-olKw9JP/XUkav4lq0I7S1mhGgONJF9rHNhKFn9wJlpfRVjNo3PPjSvybxEldvCXnvD+WAshSzqH5cEjPp9CsBA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.21.0", - "eslint-scope": "^5.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.21.0.tgz", - "integrity": "sha512-NC/nogZNb9IK2MEFQqyDBAciOT8Lp8O3KgAfvHx2Skx6WBo+KmDqlU3R9KxHONaijfTIKtojRe3SZQyMjr3wBw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^6.3.0", - "tsutils": "^3.17.1" - } - } } }, "@typescript-eslint/typescript-estree": { diff --git a/package.json b/package.json index 95e2125..d4d1aa9 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/mocha": "^7.0.1", "@types/node": "^13.9.1", "@typescript-eslint/eslint-plugin": "^2.23.0", - "@typescript-eslint/parser": "^2.21.0", + "@typescript-eslint/parser": "^2.23.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.0", From a2429f09db0148b90ad0f05547cf7a61444a64b3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 10:17:11 +0000 Subject: [PATCH 110/136] chore: bump @types/mocha from 7.0.1 to 7.0.2 Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 7.0.1 to 7.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4522f3f..1f9ae49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -517,9 +517,9 @@ "dev": true }, "@types/mocha": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.1.tgz", - "integrity": "sha512-L/Nw/2e5KUaprNJoRA33oly+M8X8n0K+FwLTbYqwTcR14wdPWeRkigBLfSFpN/Asf9ENZTMZwLxjtjeYucAA4Q==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", + "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", "dev": true }, "@types/node": { diff --git a/package.json b/package.json index d4d1aa9..2381f0a 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.11", - "@types/mocha": "^7.0.1", + "@types/mocha": "^7.0.2", "@types/node": "^13.9.1", "@typescript-eslint/eslint-plugin": "^2.23.0", "@typescript-eslint/parser": "^2.23.0", From 7ff7dd501ad930c4170b066861f0a49d499366a6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 10:27:01 +0000 Subject: [PATCH 111/136] chore: bump typescript from 3.8.2 to 3.8.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.2 to 3.8.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.2...v3.8.3) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f9ae49..0af9d10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4859,9 +4859,9 @@ } }, "typescript": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.2.tgz", - "integrity": "sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 2381f0a..c9eb945 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "esm": "^3.2.25", "source-map-support": "^0.5.16", "ts-node": "^8.6.2", - "typescript": "^3.8.2" + "typescript": "^3.8.3" }, "files": [ "dist/**/*" From f7db73fcfacf20710a29c3f9b6a1f507d46421e6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 10:44:49 +0000 Subject: [PATCH 112/136] chore: bump mocha from 7.0.1 to 7.1.0 Bumps [mocha](https://github.com/mochajs/mocha) from 7.0.1 to 7.1.0. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v7.0.1...v7.1.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0af9d10..f4c52c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3346,12 +3346,12 @@ } }, "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "^2.4.2" } }, "loud-rejection": { @@ -3443,9 +3443,9 @@ } }, "mocha": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.1.tgz", - "integrity": "sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.0.tgz", + "integrity": "sha512-MymHK8UkU0K15Q/zX7uflZgVoRWiTjy0fXE/QjKts6mowUvGxOdPhZ2qj3b0iZdUrNZlW9LAIMFHB4IW+2b3EQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -3459,7 +3459,7 @@ "growl": "1.10.5", "he": "1.2.0", "js-yaml": "3.13.1", - "log-symbols": "2.2.0", + "log-symbols": "3.0.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", "ms": "2.1.1", @@ -5162,9 +5162,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/package.json b/package.json index c9eb945..2206a42 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "eslint-plugin-prettier": "^3.1.2", "eslint-plugin-promise": "^4.2.1", "husky": "^4.2.3", - "mocha": "^7.0.1", + "mocha": "^7.1.0", "nyc": "^15.0.0", "prettier": "^1.19.1", "esm": "^3.2.25", From 1abb704e89cc9dd0390126b10be7b9b2ec4a6ac2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 16:47:32 +0000 Subject: [PATCH 113/136] chore: bump @diplomatiq/crypto-random from 2.1.0 to 2.2.0 Bumps [@diplomatiq/crypto-random](https://github.com/Diplomatiq/crypto-random) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/Diplomatiq/crypto-random/releases) - [Changelog](https://github.com/Diplomatiq/crypto-random/blob/develop/CHANGELOG.md) - [Commits](https://github.com/Diplomatiq/crypto-random/compare/v2.1.0...v2.2.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f4c52c6..438916b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -402,9 +402,9 @@ } }, "@diplomatiq/crypto-random": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@diplomatiq/crypto-random/-/crypto-random-2.1.0.tgz", - "integrity": "sha512-WsA5Tm+zpNvVO3dKqlnX3mYXpDL9lxee4W9viXt1awj+mTFEQL10uffzBgHYE2PzJs2PzRPOzJEvJoPszY2d/A==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@diplomatiq/crypto-random/-/crypto-random-2.2.0.tgz", + "integrity": "sha512-3B6EhsGLTxUzpK6ShaNwg4t3sqOknlMqI7q07z6CUupwplW2As295YgoJR5LWQ5HpzRwEQ37BseOyxs7VOmjFw==" }, "@istanbuljs/load-nyc-config": { "version": "1.0.0", diff --git a/package.json b/package.json index 2206a42..ddd5322 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,6 @@ } }, "dependencies": { - "@diplomatiq/crypto-random": "^2.1.0" + "@diplomatiq/crypto-random": "^2.2.0" } } From 634628bb53c4dad535d6dee7e027e747eacb83b5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2020 10:27:45 +0000 Subject: [PATCH 114/136] chore: bump cross-env from 7.0.0 to 7.0.2 Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 7.0.0 to 7.0.2. - [Release notes](https://github.com/kentcdodds/cross-env/releases) - [Changelog](https://github.com/kentcdodds/cross-env/blob/master/CHANGELOG.md) - [Commits](https://github.com/kentcdodds/cross-env/compare/v7.0.0...v7.0.2) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 438916b..03fcc17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1371,9 +1371,9 @@ } }, "cross-env": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.0.tgz", - "integrity": "sha512-rV6M9ldNgmwP7bx5u6rZsTbYidzwvrwIYZnT08hSGLcQCcggofgFW+sNe7IhA1SRauPS0QuLbbX+wdNtpqE5CQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz", + "integrity": "sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==", "dev": true, "requires": { "cross-spawn": "^7.0.1" diff --git a/package.json b/package.json index ddd5322..bebf8af 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@typescript-eslint/parser": "^2.23.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", - "cross-env": "^7.0.0", + "cross-env": "^7.0.2", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.0", "eslint-plugin-import": "^2.20.1", From 75bd2eebc2e875bf63edfa3137509c03bc2cc854 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Tue, 25 Feb 2020 19:48:12 +0100 Subject: [PATCH 115/136] feat: Implement TimeoutPolicy Closes #164. --- .eslintrc.json | 100 +--- README.md | 109 +++- package-lock.json | 314 ++++++---- package.json | 12 +- src/main.ts | 2 + src/policies/proactive/proactivePolicy.ts | 3 + .../timeoutPolicy/executionException.ts | 5 + .../timeoutPolicy/timeoutException.ts | 5 + .../proactive/timeoutPolicy/timeoutPolicy.ts | 85 +++ .../reactive/retryPolicy/retryPolicy.ts | 18 +- test/specs/backoffStrategyFactory.test.ts | 38 +- test/specs/predicateChecker.test.ts | 88 +-- test/specs/retryPolicy.test.ts | 545 ++++++++++-------- test/specs/timeoutPolicy.test.ts | 278 +++++++++ test/utils/nodeJsEntropyProvider.ts | 2 +- test/utils/windowMock.ts | 8 +- tsconfig.test.json | 2 +- 17 files changed, 1101 insertions(+), 513 deletions(-) create mode 100644 src/policies/proactive/proactivePolicy.ts create mode 100644 src/policies/proactive/timeoutPolicy/executionException.ts create mode 100644 src/policies/proactive/timeoutPolicy/timeoutException.ts create mode 100644 src/policies/proactive/timeoutPolicy/timeoutPolicy.ts create mode 100644 test/specs/timeoutPolicy.test.ts diff --git a/.eslintrc.json b/.eslintrc.json index d20d532..eb19536 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,101 +1,3 @@ { - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - "prettier/@typescript-eslint", - "plugin:import/errors", - "plugin:import/warnings", - "plugin:import/typescript", - "plugin:promise/recommended", - "plugin:prettier/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "plugins": ["@typescript-eslint/eslint-plugin", "import", "promise"], - "rules": { - "no-console": ["error"], - "no-extra-parens": ["error", "all", { "enforceForArrowConditionals": false }], - "no-import-assign": ["error"], - "no-template-curly-in-string": ["error"], - "curly": ["error", "all"], - "eqeqeq": ["error"], - "max-classes-per-file": ["error", 1], - "no-alert": ["error"], - "no-caller": ["error"], - "no-div-regex": ["error"], - "no-else-return": ["error", { "allowElseIf": false }], - "no-eq-null": ["error"], - "no-eval": ["error"], - "no-extend-native": ["error"], - "no-extra-bind": ["error"], - "no-extra-label": ["error"], - "no-floating-decimal": ["error"], - "no-implicit-coercion": ["error"], - "no-implicit-globals": ["error"], - "no-implied-eval": ["error"], - "no-invalid-this": ["error"], - "no-iterator": ["error"], - "no-labels": ["error"], - "no-lone-blocks": ["error"], - "no-loop-func": ["error"], - "no-multi-spaces": ["error"], - "no-multi-str": ["error"], - "no-new": ["error"], - "no-new-func": ["error"], - "no-new-wrappers": ["error"], - "no-octal-escape": ["error"], - "no-param-reassign": ["error"], - "no-proto": ["error"], - "no-return-assign": ["error", "always"], - "no-return-await": ["error"], - "no-script-url": ["error"], - "no-self-compare": ["error"], - "no-sequences": ["error"], - "no-throw-literal": ["error"], - "no-unmodified-loop-condition": ["error"], - "no-useless-call": ["error"], - "no-useless-concat": ["error"], - "no-useless-return": ["error"], - "prefer-named-capture-group": ["error"], - "prefer-promise-reject-errors": ["error"], - "prefer-regex-literals": ["error"], - "radix": ["error", "always"], - "require-unicode-regexp": ["error"], - "wrap-iife": ["error", "inside"], - "yoda": ["error", "never"], - "array-bracket-spacing": ["error", "never"], - "brace-style": ["error"], - "camelcase": ["error"], - "func-call-spacing": ["error"], - "no-lonely-if": ["error"], - "no-nested-ternary": ["error"], - "no-new-object": ["error"], - "no-trailing-spaces": ["error"], - "semi-spacing": ["error", { "before": false, "after": true }], - "promise/prefer-await-to-then": ["error"], - "promise/prefer-await-to-callbacks": ["error"], - "import/first": ["error"], - "import/exports-last": ["error"], - "import/extensions": ["error"], - "import/newline-after-import": ["error"], - "import/no-unassigned-import": ["error"], - "import/no-named-default": ["error"], - "import/no-default-export": ["error"], - "@typescript-eslint/array-type": ["error", { "default": "array-simple" }], - "@typescript-eslint/consistent-type-definitions": ["error", "interface"], - "@typescript-eslint/explicit-function-return-type": ["error"], - "@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }], - "@typescript-eslint/prefer-for-of": ["error"], - "@typescript-eslint/prefer-readonly": ["error"], - "@typescript-eslint/promise-function-async": ["error"], - "@typescript-eslint/restrict-plus-operands": ["error"], - "@typescript-eslint/strict-boolean-expressions": ["error"], - "@typescript-eslint/unified-signatures": ["error"] - } + "extends": ["@diplomatiq/eslint-config-tslib"] } diff --git a/README.md b/README.md index 0bca258..f40136b 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,12 @@ Resily offers **reactive** and **proactive** policies: | ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------- | | [**RetryPolicy**](#retrypolicy) | Many faults are transient and will not occur again after a delay. | Allows configuring automatic retries on specified conditions. | +#### Proactive policies + +| Policy | What does it claim? | How does it work? | +| ----------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------- | +| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | + ### Reactive policies Every reactive policy extends the `ReactivePolicy` class, which means they can be configured with predicates to react on specific results and/or exceptions: @@ -230,7 +236,7 @@ await policy.execute(async () => { #### RetryPolicy -RetryPolicy claims that many faults are transient and will not occur again after a delay. It allows configuring automatic retries on specified conditions. +`RetryPolicy` claims that many faults are transient and will not occur again after a delay. It allows configuring automatic retries on specified conditions. Configure how many retries you need or retry forever: @@ -350,7 +356,7 @@ import { randomFill } from 'crypto'; export class NodeJsEntropyProvider implements EntropyProvider { public async getRandomValues(array: T): Promise { return new Promise((resolve, reject): void => { - randomFill(array, (error: Error | null, array: T) => { + randomFill(array, (error: Error | null, array: T): void => { if (error !== null) { reject(error); return; @@ -398,6 +404,105 @@ policy.onFinally(() => { }); ``` +### Proactive policies + +Every proactive policy extends the `ProactivePolicy` class. + +#### TimeoutPolicy + +`TimeoutPolicy` claims that after some time, it is unlikely the call will be successful. It ensures the caller does not have to wait more than the specified timeout. + +Only asynchronous methods can be executed within a `TimeoutPolicy`, or else no timeout happens. `TimeoutPolicy` is implemented with `Promise.race()`, racing the promise returned by the executed method (`executionPromise`) with a promise that is rejected after the specified time elapses (`timeoutPromise`). If the executed method is not asynchronous (i.e. it does not have at least one point to pause its execution at), no timeout will happen even if the execution takes longer than the specified timeout duration, since there is no point in time for taking the control out from the executed method's hands to reject the `timeoutPromise`. + +The executed method is fully executed to its end (unless it throws an exception), regardless of whether a timeout has occured or not. `TimeoutPolicy` ensures that the caller does not have to wait more than the specified timeout, but it does neither cancel nor abort\* the execution of the method. This means that if the executed method has side effects, these side effects can occur even after the timeout happened. + +\*TypeScript/JavaScript has no _generic_ way of canceling or aborting an executing method, either synchronous or asynchronous. `TimeoutPolicy` runs arbitrary user-provided code: it cannot be assumed the code is prepared in any way (e.g. it has cancel points). The provided code _could_ be executed in a separate worker thread so it can be aborted instantaneously by terminating the worker, but run-time compiling a worker from user-provided code is ugly and error-prone. + +On timeout, the Promise returned by the policy's `execute` method is rejected with a `TimeoutException`: + +```typescript +import { TimeoutException, TimeoutPolicy } from '@diplomatiq/resily'; + +const policy = new TimeoutPolicy(); + +try { + const result = await policy.execute(async () => { + // the executed code + }); +} catch (ex) { + if (ex instanceof TimeoutException) { + // the operation timed out + } else { + // the executed method thrown an exception + } +} +``` + +Configure how long the waiting period should be: + +```typescript +import { TimeoutPolicy } from '@diplomatiq/resily'; + +const policy = new TimeoutPolicy(); +policy.timeoutAfter(1000); // timeout after 1000 ms +``` + +Perform certain actions on timeout: + +```typescript +import { TimeoutPolicy } from '@diplomatiq/resily'; + +const policy = new TimeoutPolicy(); +policy.onTimeout( + // onTimeoutFns can be sync or async, they will be awaited + async timedOutAfterMs => { + // the policy was configured to timeout after timedOutAfterMs + }, +); + +// you can set multiple onTimeoutFns, they will run sequentially +policy.onTimeout(async () => { + // this will be awaited first +}); +policy.onTimeout(async () => { + // then this will be awaited +}); + +// errors thrown by an onTimeoutFn will be caught and ignored +policy.onTimeout(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +Throwing a `TimeoutException` from the executed method is not a timeout, therefore it does not trigger running `onTimeout` functions: + +```typescript +import { TimeoutException, TimeoutPolicy } from '@diplomatiq/resily'; + +const policy = new TimeoutPolicy(); + +let onTimeoutRan = false; +policy.onTimeout(() => { + onTimeoutRan = true; +}); + +try { + await policy.execute(async () => { + throw new TimeoutException(); + }); +} catch (ex) { + // ex is a TimeoutException (thrown by the executed method) + const isTimeoutException = ex instanceof TimeoutException; // true +} + +// onTimeoutRan is false +``` + +## Development + +See [CONTRIBUTING.md](https://github.com/Diplomatiq/resily/blob/develop/CONTRIBUTING.md) for details. + --- Copyright (c) 2018 Diplomatiq diff --git a/package-lock.json b/package-lock.json index 03fcc17..8a1a677 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,18 +14,18 @@ } }, "@babel/core": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", - "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.7.tgz", + "integrity": "sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", + "@babel/generator": "^7.8.7", "@babel/helpers": "^7.8.4", - "@babel/parser": "^7.8.4", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3", + "@babel/parser": "^7.8.7", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -51,12 +51,12 @@ } }, "@babel/generator": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", - "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz", + "integrity": "sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg==", "dev": true, "requires": { - "@babel/types": "^7.8.3", + "@babel/types": "^7.8.7", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" @@ -122,51 +122,51 @@ } }, "@babel/parser": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", - "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz", + "integrity": "sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA==", "dev": true }, "@babel/runtime": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", - "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz", + "integrity": "sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==", "dev": true, "requires": { - "regenerator-runtime": "^0.13.2" + "regenerator-runtime": "^0.13.4" }, "dependencies": { "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", "dev": true } } }, "@babel/template": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", - "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" } }, "@babel/traverse": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", - "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz", + "integrity": "sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", + "@babel/generator": "^7.8.6", "@babel/helper-function-name": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.4", - "@babel/types": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" @@ -181,9 +181,9 @@ } }, "@babel/types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", - "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz", + "integrity": "sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -406,6 +406,23 @@ "resolved": "https://registry.npmjs.org/@diplomatiq/crypto-random/-/crypto-random-2.2.0.tgz", "integrity": "sha512-3B6EhsGLTxUzpK6ShaNwg4t3sqOknlMqI7q07z6CUupwplW2As295YgoJR5LWQ5HpzRwEQ37BseOyxs7VOmjFw==" }, + "@diplomatiq/eslint-config-tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@diplomatiq/eslint-config-tslib/-/eslint-config-tslib-2.5.0.tgz", + "integrity": "sha512-UaRcjQYCYeu4lX1W05fwNH1BrGT5vdOqZosf7VMbnCBirFOYJdqheZivrEpPnjVS9KMJPZKdFmEkG92oEr7Sag==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^2.19.2", + "@typescript-eslint/parser": "^2.19.2", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.10.0", + "eslint-plugin-import": "^2.20.1", + "eslint-plugin-prettier": "^3.1.2", + "eslint-plugin-promise": "^4.2.1", + "prettier": "^1.19.1", + "typescript": "^3.8.2" + } + }, "@istanbuljs/load-nyc-config": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", @@ -602,9 +619,9 @@ "dev": true }, "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", "dev": true }, "add-stream": { @@ -632,9 +649,9 @@ } }, "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -650,12 +667,20 @@ "dev": true }, "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } } }, "ansi-regex": { @@ -1217,9 +1242,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -1906,13 +1931,13 @@ "dev": true }, "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", "dev": true, "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } }, @@ -1923,9 +1948,9 @@ "dev": true }, "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz", + "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==", "dev": true, "requires": { "estraverse": "^4.0.0" @@ -2003,9 +2028,9 @@ "dev": true }, "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -2030,13 +2055,13 @@ } }, "find-cache-dir": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.2.0.tgz", - "integrity": "sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "dev": true, "requires": { "commondir": "^1.0.1", - "make-dir": "^3.0.0", + "make-dir": "^3.0.2", "pkg-dir": "^4.1.0" }, "dependencies": { @@ -2349,9 +2374,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "parse-json": { @@ -2554,9 +2579,9 @@ } }, "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "dev": true, "requires": { "type-fest": "^0.8.1" @@ -2608,9 +2633,9 @@ "dev": true }, "hasha": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.1.0.tgz", - "integrity": "sha512-OFPDWmzPN1l7atOV1TgBVmNtBxaIysToK6Ve9DK+vT6pYuklw/nPNT+HJbZi0KDcI6vWB+9tgvZ5YD7fA3CXcA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", + "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", "dev": true, "requires": { "is-stream": "^2.0.0", @@ -2632,9 +2657,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "html-escaper": { @@ -2870,24 +2895,85 @@ "dev": true }, "inquirer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", - "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", + "chalk": "^3.0.0", "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", "lodash": "^4.17.15", "mute-stream": "0.0.8", - "run-async": "^2.2.0", + "run-async": "^2.4.0", "rxjs": "^6.5.3", "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", + "strip-ansi": "^6.0.0", "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "is-arrayish": { @@ -3251,9 +3337,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -3365,18 +3451,18 @@ } }, "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", "dev": true, "requires": { "semver": "^6.0.0" } }, "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "map-obj": { @@ -3840,9 +3926,9 @@ } }, "yargs": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.1.0.tgz", - "integrity": "sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.0.tgz", + "integrity": "sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA==", "dev": true, "requires": { "cliui": "^6.0.0", @@ -3855,13 +3941,13 @@ "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^16.1.0" + "yargs-parser": "^18.1.0" } }, "yargs-parser": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", - "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.0.tgz", + "integrity": "sha512-o/Jr6JBOv6Yx3pL+5naWSoIA2jJ+ZkMYQG/ie9qFbukBe4uzmBatlXFOiu/tNKRWEtyf+n5w7jc/O16ufqOTdQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -4347,9 +4433,9 @@ } }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", "dev": true, "requires": { "is-promise": "^2.1.0" @@ -4814,9 +4900,9 @@ } }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", "dev": true }, "tsutils": { @@ -4865,9 +4951,9 @@ "dev": true }, "uglify-js": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.7.tgz", - "integrity": "sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.0.tgz", + "integrity": "sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ==", "dev": true, "optional": true, "requires": { @@ -5039,9 +5125,9 @@ } }, "write-file-atomic": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.1.tgz", - "integrity": "sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { "imurmurhash": "^0.1.4", @@ -5063,12 +5149,12 @@ "dev": true }, "yaml": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.7.2.tgz", - "integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.2.tgz", + "integrity": "sha512-omakb0d7FjMo3R1D2EbTKVIk6dAVLRxFXdLZMEUToeAvuqgG/YuHMuQOZ5fgk+vQ8cx+cnGKwyg+8g8PNT0xQg==", "dev": true, "requires": { - "@babel/runtime": "^7.6.3" + "@babel/runtime": "^7.8.7" } }, "yargs": { diff --git a/package.json b/package.json index bebf8af..4c0a65d 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "build-and-test-everything": "npm run lint && npm run build && npm run test", "check-release-tag": "node --experimental-modules scripts/check-release-tag.mjs", "clean": "rm -r ./dist/", - "lint": "eslint ./src/ --ext .ts", + "lint": "eslint ./src/ ./test/ --ext .ts", "prepare": "npm run build-and-test-everything", "prepublishOnly": "npm run check-release-tag", "test": "cross-env-shell TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text mocha --require ts-node/register --require source-map-support/register --require esm --recursive test/specs/**/*.test.ts", @@ -44,21 +44,15 @@ "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^13.9.1", - "@typescript-eslint/eslint-plugin": "^2.23.0", - "@typescript-eslint/parser": "^2.23.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.2", - "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-prettier": "^3.1.2", - "eslint-plugin-promise": "^4.2.1", + "@diplomatiq/eslint-config-tslib": "^2.5.0", + "esm": "^3.2.25", "husky": "^4.2.3", "mocha": "^7.1.0", "nyc": "^15.0.0", "prettier": "^1.19.1", - "esm": "^3.2.25", "source-map-support": "^0.5.16", "ts-node": "^8.6.2", "typescript": "^3.8.3" diff --git a/src/main.ts b/src/main.ts index 5c81691..b9d40f0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,2 +1,4 @@ +export { TimeoutException } from './policies/proactive/timeoutPolicy/timeoutException'; +export { TimeoutPolicy } from './policies/proactive/timeoutPolicy/timeoutPolicy'; export { BackoffStrategyFactory } from './policies/reactive/retryPolicy/backoffStrategyFactory'; export { RetryPolicy } from './policies/reactive/retryPolicy/retryPolicy'; diff --git a/src/policies/proactive/proactivePolicy.ts b/src/policies/proactive/proactivePolicy.ts new file mode 100644 index 0000000..c63986b --- /dev/null +++ b/src/policies/proactive/proactivePolicy.ts @@ -0,0 +1,3 @@ +import { Policy } from '../policy'; + +export abstract class ProactivePolicy extends Policy {} diff --git a/src/policies/proactive/timeoutPolicy/executionException.ts b/src/policies/proactive/timeoutPolicy/executionException.ts new file mode 100644 index 0000000..3381e09 --- /dev/null +++ b/src/policies/proactive/timeoutPolicy/executionException.ts @@ -0,0 +1,5 @@ +export class ExecutionException extends Error { + public constructor(public innerException: unknown) { + super(); + } +} diff --git a/src/policies/proactive/timeoutPolicy/timeoutException.ts b/src/policies/proactive/timeoutPolicy/timeoutException.ts new file mode 100644 index 0000000..989cca8 --- /dev/null +++ b/src/policies/proactive/timeoutPolicy/timeoutException.ts @@ -0,0 +1,5 @@ +export class TimeoutException extends Error { + public constructor(public readonly timedOutAfterMs: number) { + super(); + } +} diff --git a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts new file mode 100644 index 0000000..34b95fe --- /dev/null +++ b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts @@ -0,0 +1,85 @@ +import { ProactivePolicy } from '../proactivePolicy'; +import { ExecutionException } from './executionException'; +import { TimeoutException } from './timeoutException'; + +export class TimeoutPolicy extends ProactivePolicy { + private timeoutMs: number | undefined; + private readonly onTimeoutFns: Array<(timedOutAfter: number) => void | Promise> = []; + private executing = 0; + + public constructor() { + super(); + } + + public timeoutAfter(timeoutMs: number): void { + if (!Number.isInteger(timeoutMs)) { + throw new Error('timeoutMs must be integer'); + } + + if (timeoutMs < 0) { + throw new Error('timeoutMs must be greater than 0'); + } + + if (!Number.isSafeInteger(timeoutMs)) { + throw new Error('timeoutMs must be less than or equal to 2^53 - 1'); + } + + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.timeoutMs = timeoutMs; + } + + public onTimeout(fn: (timedOutAfterMs: number) => void | Promise): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onTimeoutFns.push(fn); + } + + public async execute(fn: () => Promise): Promise { + this.executing++; + + const executionPromise = (async (): Promise => { + try { + return await fn(); + } catch (ex) { + throw new ExecutionException(ex); + } + })(); + + let timeoutId; + const timeoutPromise = new Promise((_, reject): void => { + if (this.timeoutMs !== undefined) { + const currentTimeoutMs = this.timeoutMs; + timeoutId = setTimeout((): void => { + reject(new TimeoutException(currentTimeoutMs)); + }, this.timeoutMs); + } + }); + + try { + return await Promise.race([executionPromise, timeoutPromise]); + } catch (ex) { + const typedEx: ExecutionException | TimeoutException = ex; + if (typedEx instanceof TimeoutException) { + for (const onTimeoutFn of this.onTimeoutFns) { + try { + await onTimeoutFn(typedEx.timedOutAfterMs); + } catch (onTimeoutError) { + // ignored + } + } + + throw typedEx; + } + + throw typedEx.innerException; + } finally { + clearTimeout(timeoutId); + this.executing--; + } + } +} diff --git a/src/policies/reactive/retryPolicy/retryPolicy.ts b/src/policies/reactive/retryPolicy/retryPolicy.ts index 6aa2c39..d8aa44c 100644 --- a/src/policies/reactive/retryPolicy/retryPolicy.ts +++ b/src/policies/reactive/retryPolicy/retryPolicy.ts @@ -6,7 +6,7 @@ export class RetryPolicy extends ReactivePolicy { private readonly onRetryFns: Array< (result: ResultType | undefined, error: unknown | undefined, currentRetryCount: number) => void | Promise > = []; - private backoffStrategy: (currentRetryCount: number) => number | Promise = () => 0; + private backoffStrategy: (currentRetryCount: number) => number | Promise = (): number => 0; private readonly onFinallyFns: Array<() => void | Promise> = []; private executing = 0; @@ -24,7 +24,7 @@ export class RetryPolicy extends ReactivePolicy { } if (!Number.isSafeInteger(retryCount)) { - throw new Error('retryCount must be less than 2^53 - 1'); + throw new Error('retryCount must be less than or equal to 2^53 - 1'); } if (this.executing > 0) { @@ -138,11 +138,19 @@ export class RetryPolicy extends ReactivePolicy { } private async shouldRetryOnResult(result: ResultType, currentRetryCount: number): Promise { - return this.shouldRetryOn(currentRetryCount, result, async result => this.isResultHandled(result)); + return this.shouldRetryOn( + currentRetryCount, + result, + async (result): Promise => this.isResultHandled(result), + ); } private async shouldRetryOnException(exception: unknown, currentRetryCount: number): Promise { - return this.shouldRetryOn(currentRetryCount, exception, async exception => this.isExceptionHandled(exception)); + return this.shouldRetryOn( + currentRetryCount, + exception, + async (exception): Promise => this.isExceptionHandled(exception), + ); } private async shouldRetryOn( @@ -158,7 +166,7 @@ export class RetryPolicy extends ReactivePolicy { } private async waitFor(ms: number): Promise { - return new Promise(resolve => { + return new Promise((resolve): void => { setTimeout(resolve, ms); }); } diff --git a/test/specs/backoffStrategyFactory.test.ts b/test/specs/backoffStrategyFactory.test.ts index d03c89c..cf3e942 100644 --- a/test/specs/backoffStrategyFactory.test.ts +++ b/test/specs/backoffStrategyFactory.test.ts @@ -4,9 +4,9 @@ import { BackoffStrategyFactory } from '../../src/policies/reactive/retryPolicy/ import { NodeJsEntropyProvider } from '../utils/nodeJsEntropyProvider'; import { windowMock } from '../utils/windowMock'; -describe('BackoffStrategyFactory', () => { - describe('constantBackoff', () => { - it('should produce a constant backoff strategy', () => { +describe('BackoffStrategyFactory', (): void => { + describe('constantBackoff', (): void => { + it('should produce a constant backoff strategy', (): void => { const strategy = BackoffStrategyFactory.constantBackoff(100); expect(strategy(1)).to.equal(100); expect(strategy(2)).to.equal(100); @@ -15,7 +15,7 @@ describe('BackoffStrategyFactory', () => { expect(strategy(5)).to.equal(100); }); - it('should produce a constant backoff strategy with an immediate first retry if set', () => { + it('should produce a constant backoff strategy with an immediate first retry if set', (): void => { const strategy = BackoffStrategyFactory.constantBackoff(100, true); expect(strategy(1)).to.equal(0); expect(strategy(2)).to.equal(100); @@ -25,8 +25,8 @@ describe('BackoffStrategyFactory', () => { }); }); - describe('linearBackoff', () => { - it('should produce a linear backoff strategy', () => { + describe('linearBackoff', (): void => { + it('should produce a linear backoff strategy', (): void => { const strategy = BackoffStrategyFactory.linearBackoff(100); expect(strategy(1)).to.equal(100); expect(strategy(2)).to.equal(200); @@ -35,7 +35,7 @@ describe('BackoffStrategyFactory', () => { expect(strategy(5)).to.equal(500); }); - it('should produce a linear backoff strategy with an immediate first retry if set', () => { + it('should produce a linear backoff strategy with an immediate first retry if set', (): void => { const strategy = BackoffStrategyFactory.linearBackoff(100, true); expect(strategy(1)).to.equal(0); expect(strategy(2)).to.equal(100); @@ -45,8 +45,8 @@ describe('BackoffStrategyFactory', () => { }); }); - describe('exponentialBackoff', () => { - it('should produce an exponential backoff strategy', () => { + describe('exponentialBackoff', (): void => { + it('should produce an exponential backoff strategy', (): void => { const strategy = BackoffStrategyFactory.exponentialBackoff(100); expect(strategy(1)).to.equal(100); expect(strategy(2)).to.equal(200); @@ -55,7 +55,7 @@ describe('BackoffStrategyFactory', () => { expect(strategy(5)).to.equal(1600); }); - it('should produce an exponential backoff strategy with an immediate first retry if set', () => { + it('should produce an exponential backoff strategy with an immediate first retry if set', (): void => { const strategy = BackoffStrategyFactory.exponentialBackoff(100, true); expect(strategy(1)).to.equal(0); expect(strategy(2)).to.equal(100); @@ -64,7 +64,7 @@ describe('BackoffStrategyFactory', () => { expect(strategy(5)).to.equal(800); }); - it('should produce an exponential backoff strategy with a custom base if set', () => { + it('should produce an exponential backoff strategy with a custom base if set', (): void => { const strategy = BackoffStrategyFactory.exponentialBackoff(100, false, 3); expect(strategy(1)).to.equal(100); expect(strategy(2)).to.equal(300); @@ -73,7 +73,7 @@ describe('BackoffStrategyFactory', () => { expect(strategy(5)).to.equal(8100); }); - it('should produce an exponential backoff strategy with an immediate first retry and a custom base if set', () => { + it('should produce an exponential backoff strategy with an immediate first retry and a custom base if set', (): void => { const strategy = BackoffStrategyFactory.exponentialBackoff(100, true, 3); expect(strategy(1)).to.equal(0); expect(strategy(2)).to.equal(100); @@ -83,8 +83,8 @@ describe('BackoffStrategyFactory', () => { }); }); - describe('jitteredBackoff', () => { - it('should produce a jittered backoff strategy', async () => { + describe('jitteredBackoff', (): void => { + it('should produce a jittered backoff strategy', async (): Promise => { const entropyProvider = new NodeJsEntropyProvider(); const randomGenerator = new RandomGenerator(entropyProvider); const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100, false, randomGenerator); @@ -110,7 +110,9 @@ describe('BackoffStrategyFactory', () => { .and.to.be.at.most(100); }); - it('should produce a jittered backoff strategy with an immediate first retry if set', async () => { + it('should produce a jittered backoff strategy with an immediate first retry if set', async (): Promise< + void + > => { const entropyProvider = new NodeJsEntropyProvider(); const randomGenerator = new RandomGenerator(entropyProvider); const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100, true, randomGenerator); @@ -134,7 +136,10 @@ describe('BackoffStrategyFactory', () => { .and.to.be.at.most(100); }); - it('should work with the default random generator where window.crypto.getRandomValues() is available', async () => { + it('should work with the default random generator where window.crypto.getRandomValues() is available', async (): Promise< + void + > => { + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore global.window = windowMock(); @@ -160,6 +165,7 @@ describe('BackoffStrategyFactory', () => { .to.be.at.least(0) .and.to.be.at.most(100); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore global.window = undefined; }); diff --git a/test/specs/predicateChecker.test.ts b/test/specs/predicateChecker.test.ts index 28891a8..ec79a1f 100644 --- a/test/specs/predicateChecker.test.ts +++ b/test/specs/predicateChecker.test.ts @@ -1,114 +1,126 @@ import { expect } from 'chai'; import { PredicateChecker } from '../../src/utils/predicateChecker'; -describe('PredicateChecker', () => { - describe('single', () => { - it('should return true, when the predicate returns true for the subject', async () => { +describe('PredicateChecker', (): void => { + describe('single', (): void => { + it('should return true, when the predicate returns true for the subject', async (): Promise => { const result = await PredicateChecker.single( 'Diplomatiq is cool.', - (subject: string) => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', ); expect(result).to.be.true; }); - it('should return false, when the predicate returns false for the subject', async () => { + it('should return false, when the predicate returns false for the subject', async (): Promise => { const result = await PredicateChecker.single( 'Diplomatiq is not cool.', - (subject: string) => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', ); expect(result).to.be.false; }); - it('should return true, when the async predicate returns true for the subject', async () => { + it('should return true, when the async predicate returns true for the subject', async (): Promise => { const result = await PredicateChecker.single( 'Diplomatiq is cool.', - async (subject: string) => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', ); expect(result).to.be.true; }); - it('should return false, when the async predicate returns false for the subject', async () => { + it('should return false, when the async predicate returns false for the subject', async (): Promise => { const result = await PredicateChecker.single( 'Diplomatiq is not cool.', - async (subject: string) => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', ); expect(result).to.be.false; }); }); - describe('some', () => { - it('should return true if at least one of the predicates returns true for the subject', async () => { + describe('some', (): void => { + it('should return true if at least one of the predicates returns true for the subject', async (): Promise< + void + > => { const result = await PredicateChecker.some('Diplomatiq is cool.', [ - (subject: string) => subject === 'Diplomatiq is cool.', - (subject: string) => subject === 'Diplomatiq is the coolest.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is the coolest.', ]); expect(result).to.be.true; }); - it('should return false if none of the predicates returns true for the subject', async () => { + it('should return false if none of the predicates returns true for the subject', async (): Promise => { const result = await PredicateChecker.some('Diplomatiq is not cool.', [ - (subject: string) => subject === 'Diplomatiq is cool.', - (subject: string) => subject === 'Diplomatiq is the coolest.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is the coolest.', ]); expect(result).to.be.false; }); - it('should return true if at least one of the async predicates returns true for the subject', async () => { + it('should return true if at least one of the async predicates returns true for the subject', async (): Promise< + void + > => { const result = await PredicateChecker.some('Diplomatiq is cool.', [ - async (subject: string) => subject === 'Diplomatiq is cool.', - async (subject: string) => subject === 'Diplomatiq is the coolest.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is the coolest.', ]); expect(result).to.be.true; }); - it('should return false if none of the async predicates returns true for the subject', async () => { + it('should return false if none of the async predicates returns true for the subject', async (): Promise< + void + > => { const result = await PredicateChecker.some('Diplomatiq is not cool.', [ - async (subject: string) => subject === 'Diplomatiq is cool.', - async (subject: string) => subject === 'Diplomatiq is the coolest.', + (subject: string): boolean => subject === 'Diplomatiq is cool.', + (subject: string): boolean => subject === 'Diplomatiq is the coolest.', ]); expect(result).to.be.false; }); - it('should return false if predicates is empty', async () => { + it('should return false if predicates is empty', async (): Promise => { const result = await PredicateChecker.some('Diplomatiq is cool.', []); expect(result).to.be.false; }); }); - describe('all', () => { - it('should return true if all of the predicates returns true for the subject', async () => { + describe('all', (): void => { + it('should return true if all of the predicates returns true for the subject', async (): Promise => { const result = await PredicateChecker.every('Diplomatiq is cool.', [ - (subject: string) => subject.includes('Diplomatiq'), - (subject: string) => subject.includes('cool'), + (subject: string): boolean => subject.includes('Diplomatiq'), + (subject: string): boolean => subject.includes('cool'), ]); expect(result).to.be.true; }); - it('should return false if at least one of the predicates returns false for the subject', async () => { + it('should return false if at least one of the predicates returns false for the subject', async (): Promise< + void + > => { const result = await PredicateChecker.every('Diplomatiq is cool.', [ - (subject: string) => subject.includes('Diplomatiq'), - (subject: string) => subject.includes('not cool'), + (subject: string): boolean => subject.includes('Diplomatiq'), + (subject: string): boolean => subject.includes('not cool'), ]); expect(result).to.be.false; }); - it('should return true if all of the async predicates returns true for the subject', async () => { + it('should return true if all of the async predicates returns true for the subject', async (): Promise< + void + > => { const result = await PredicateChecker.every('Diplomatiq is cool.', [ - async (subject: string) => subject.includes('Diplomatiq'), - async (subject: string) => subject.includes('cool'), + (subject: string): boolean => subject.includes('Diplomatiq'), + (subject: string): boolean => subject.includes('cool'), ]); expect(result).to.be.true; }); - it('should return false if at least one of the async predicates returns false for the subject', async () => { + it('should return false if at least one of the async predicates returns false for the subject', async (): Promise< + void + > => { const result = await PredicateChecker.every('Diplomatiq is cool.', [ - async (subject: string) => subject.includes('Diplomatiq'), - async (subject: string) => subject.includes('not cool'), + (subject: string): boolean => subject.includes('Diplomatiq'), + (subject: string): boolean => subject.includes('not cool'), ]); expect(result).to.be.false; }); - it('should return false if predicates is empty', async () => { + it('should return false if predicates is empty', async (): Promise => { const result = await PredicateChecker.every('Diplomatiq is cool.', []); expect(result).to.be.false; }); diff --git a/test/specs/retryPolicy.test.ts b/test/specs/retryPolicy.test.ts index 655a4bc..15ae45b 100644 --- a/test/specs/retryPolicy.test.ts +++ b/test/specs/retryPolicy.test.ts @@ -1,30 +1,30 @@ import { expect } from 'chai'; import { RetryPolicy } from '../../src/policies/reactive/retryPolicy/retryPolicy'; -describe('RetryPolicy', () => { - it('should run the execution callback and return its result by default', async () => { +describe('RetryPolicy', (): void => { + it('should run the execution callback and return its result by default', async (): Promise => { const policy = new RetryPolicy(); - const result = await policy.execute(() => { + const result = await policy.execute((): string => { return 'Diplomatiq is cool.'; }); expect(result).to.equal('Diplomatiq is cool.'); }); - it('should run the async execution callback and return its result by default', async () => { + it('should run the async execution callback and return its result by default', async (): Promise => { const policy = new RetryPolicy(); - const result = await policy.execute(async () => { + const result = await policy.execute((): string => { return 'Diplomatiq is cool.'; }); expect(result).to.equal('Diplomatiq is cool.'); }); - it('should run the execution callback and throw its exceptions by default', async () => { + it('should run the execution callback and throw its exceptions by default', async (): Promise => { const policy = new RetryPolicy(); try { - await policy.execute(() => { + await policy.execute((): string => { throw new Error('TestException'); }); expect.fail('did not throw'); @@ -33,11 +33,11 @@ describe('RetryPolicy', () => { } }); - it('should run the async execution callback and throw its exceptions by default', async () => { - const policy = new RetryPolicy(); + it('should run the async execution callback and throw its exceptions by default', async (): Promise => { + const policy = new RetryPolicy(); try { - await policy.execute(() => { + await policy.execute((): unknown => { throw new Error('TestException'); }); expect.fail('did not throw'); @@ -46,13 +46,13 @@ describe('RetryPolicy', () => { } }); - it('should retry on a given result once, then return the result by default', async () => { + it('should retry on a given result once, then return the result by default', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); let executed = 0; - const result = await policy.execute(() => { + const result = await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -61,13 +61,13 @@ describe('RetryPolicy', () => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should not retry on a not given result, but return the result', async () => { + it('should not retry on a not given result, but return the result', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is not cool.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); let executed = 0; - const result = await policy.execute(() => { + const result = await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -76,14 +76,16 @@ describe('RetryPolicy', () => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should retry on a given result thrice when setting retryCount to 3, then return the result', async () => { + it('should retry on a given result thrice when setting retryCount to 3, then return the result', async (): Promise< + void + > => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); let executed = 0; - const result = await policy.execute(() => { + const result = await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -92,15 +94,15 @@ describe('RetryPolicy', () => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should retry on multiple given results, then return the result', async () => { + it('should retry on multiple given results, then return the result', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.handleResult((r: string) => r === 'Diplomatiq is the coolest.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is the coolest.'); let executed = 0; let result: string; - result = await policy.execute(() => { + result = await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -108,7 +110,7 @@ describe('RetryPolicy', () => { expect(executed).to.equal(2); expect(result).to.equal('Diplomatiq is cool.'); - result = await policy.execute(() => { + result = await policy.execute((): string => { executed++; return 'Diplomatiq is the coolest.'; }); @@ -117,14 +119,14 @@ describe('RetryPolicy', () => { expect(result).to.equal('Diplomatiq is the coolest.'); }); - it('should retry on a given exception once, then throw by default', async () => { + it('should retry on a given exception once, then throw by default', async (): Promise => { const policy = new RetryPolicy(); - policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); let executed = 0; try { - await policy.execute(() => { + await policy.execute((): unknown => { executed++; throw new Error('TestException'); }); @@ -136,14 +138,14 @@ describe('RetryPolicy', () => { expect(executed).to.equal(2); }); - it('should not retry on a not given exception, but throw', async () => { + it('should not retry on a not given exception, but throw', async (): Promise => { const policy = new RetryPolicy(); - policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); let executed = 0; try { - await policy.execute(() => { + await policy.execute((): unknown => { executed++; throw new Error('ArgumentException'); }); @@ -155,15 +157,15 @@ describe('RetryPolicy', () => { expect(executed).to.equal(1); }); - it('should retry on a given exception thrice when setting retryCount to 3, then throw', async () => { + it('should retry on a given exception thrice when setting retryCount to 3, then throw', async (): Promise => { const policy = new RetryPolicy(); - policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.retryCount(3); let executed = 0; try { - await policy.execute(() => { + await policy.execute((): unknown => { executed++; throw new Error('TestException'); }); @@ -175,15 +177,15 @@ describe('RetryPolicy', () => { expect(executed).to.equal(4); }); - it('should retry on multiple given exceptions, then throw', async () => { - const policy = new RetryPolicy(); - policy.handleException((e: unknown) => (e as Error).message === 'TestException'); - policy.handleException((e: unknown) => (e as Error).message === 'ArgumentException'); + it('should retry on multiple given exceptions, then throw', async (): Promise => { + const policy = new RetryPolicy(); + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.handleException((e: unknown): boolean => (e as Error).message === 'ArgumentException'); let executed = 0; try { - await policy.execute(() => { + await policy.execute((): unknown => { executed++; throw new Error('TestException'); }); @@ -195,7 +197,7 @@ describe('RetryPolicy', () => { expect(executed).to.equal(2); try { - await policy.execute(() => { + await policy.execute((): unknown => { executed++; throw new Error('ArgumentException'); }); @@ -207,14 +209,16 @@ describe('RetryPolicy', () => { expect(executed).to.equal(4); }); - it('should retry on a given result and on a given exception as well, then return/throw', async () => { + it('should retry on a given result and on a given exception as well, then return/throw', async (): Promise< + void + > => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); let executed = 0; - await policy.execute(() => { + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -222,7 +226,7 @@ describe('RetryPolicy', () => { expect(executed).to.equal(2); try { - await policy.execute(() => { + await policy.execute((): string => { executed++; throw new Error('TestException'); }); @@ -234,12 +238,12 @@ describe('RetryPolicy', () => { expect(executed).to.equal(4); }); - it('should not retry without a given result or exception to be handled', async () => { + it('should not retry without a given result or exception to be handled', async (): Promise => { const policy = new RetryPolicy(); let executed = 0; - const result = await policy.execute(() => { + const result = await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -248,14 +252,14 @@ describe('RetryPolicy', () => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should retry forever if set', async () => { + it('should retry forever if set', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryForever(); let executed = 0; - await policy.execute(() => { + await policy.execute((): string => { executed++; if (executed < 10) { @@ -268,10 +272,14 @@ describe('RetryPolicy', () => { expect(executed).to.equal(10); }); - it('should run onRetryFn with result filled on retry, before the retried execution', async () => { + it('should run onRetryFn with result filled on retry, before the retried execution', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + + let executed = 0; + let onRetryExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); expect(error).to.equal(undefined); expect(currentRetryCount).to.equal(executed); @@ -280,10 +288,7 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(currentRetryCount); }); - let executed = 0; - let onRetryExecuted = 0; - - await policy.execute(() => { + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -292,11 +297,17 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(1); }); - it('should run onRetryFn with result filled on retry, before the retried execution thrice when setting retryCount to 3', async () => { + it('should run onRetryFn with result filled on retry, before the retried execution thrice when setting retryCount to 3', async (): Promise< + void + > => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + + let executed = 0; + let onRetryExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); - policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); expect(error).to.equal(undefined); expect(currentRetryCount).to.equal(executed); @@ -305,10 +316,7 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(currentRetryCount); }); - let executed = 0; - let onRetryExecuted = 0; - - await policy.execute(() => { + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -317,10 +325,14 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(3); }); - it('should run onRetryFn with error filled on retry, before the retried execution', async () => { + it('should run onRetryFn with error filled on retry, before the retried execution', async (): Promise => { const policy = new RetryPolicy(); - policy.handleException((e: unknown) => (e as Error).message === 'TestException'); - policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number) => { + + let executed = 0; + let onRetryExecuted = 0; + + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal(undefined); expect((error as Error).message).to.equal('TestException'); expect(currentRetryCount).to.equal(executed); @@ -329,11 +341,8 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(currentRetryCount); }); - let executed = 0; - let onRetryExecuted = 0; - try { - await policy.execute(() => { + await policy.execute((): unknown => { executed++; throw new Error('TestException'); }); @@ -346,11 +355,17 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(1); }); - it('should run onRetryFn with error filled on retry, before the retried execution thrice when setting retryCount to 3', async () => { + it('should run onRetryFn with error filled on retry, before the retried execution thrice when setting retryCount to 3', async (): Promise< + void + > => { const policy = new RetryPolicy(); - policy.handleException((e: unknown) => (e as Error).message === 'TestException'); + + let executed = 0; + let onRetryExecuted = 0; + + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.retryCount(3); - policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number) => { + policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal(undefined); expect((error as Error).message).to.equal('TestException'); expect(currentRetryCount).to.equal(executed); @@ -359,11 +374,8 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(currentRetryCount); }); - let executed = 0; - let onRetryExecuted = 0; - try { - await policy.execute(() => { + await policy.execute((): unknown => { executed++; throw new Error('TestException'); }); @@ -376,22 +388,30 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(3); }); - it('should await an async onRetryFn before retrying', async () => { + it('should await an async onRetryFn before retrying', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { - expect(result).to.equal('Diplomatiq is cool.'); - expect(error).to.equal(undefined); - expect(currentRetryCount).to.equal(executed); - - onRetryExecuted++; - expect(onRetryExecuted).to.equal(currentRetryCount); - }); let executed = 0; let onRetryExecuted = 0; - await policy.execute(() => { + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.onRetry( + async ( + result: string | undefined, + error: unknown | undefined, + currentRetryCount: number, + // eslint-disable-next-line @typescript-eslint/require-await + ): Promise => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + onRetryExecuted++; + expect(onRetryExecuted).to.equal(currentRetryCount); + }, + ); + + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -400,11 +420,15 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(1); }); - it('should run multiple onRetryFns sequentially on retry', async () => { + it('should run multiple onRetryFns sequentially on retry', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + + let executed = 0; + let onRetryExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); - policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); expect(error).to.equal(undefined); expect(currentRetryCount).to.equal(executed); @@ -413,7 +437,7 @@ describe('RetryPolicy', () => { onRetryExecuted++; expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); }); - policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); expect(error).to.equal(undefined); expect(currentRetryCount).to.equal(executed); @@ -422,7 +446,7 @@ describe('RetryPolicy', () => { onRetryExecuted++; expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); }); - policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); expect(error).to.equal(undefined); expect(currentRetryCount).to.equal(executed); @@ -432,10 +456,7 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 3); }); - let executed = 0; - let onRetryExecuted = 0; - - await policy.execute(() => { + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -444,42 +465,64 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(9); }); - it('should run multiple async onRetryFns sequentially on retry', async () => { + it('should run multiple async onRetryFns sequentially on retry', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.retryCount(3); - policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { - expect(result).to.equal('Diplomatiq is cool.'); - expect(error).to.equal(undefined); - expect(currentRetryCount).to.equal(executed); - - expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3); - onRetryExecuted++; - expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); - }); - policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { - expect(result).to.equal('Diplomatiq is cool.'); - expect(error).to.equal(undefined); - expect(currentRetryCount).to.equal(executed); - - expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); - onRetryExecuted++; - expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); - }); - policy.onRetry(async (result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { - expect(result).to.equal('Diplomatiq is cool.'); - expect(error).to.equal(undefined); - expect(currentRetryCount).to.equal(executed); - - expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); - onRetryExecuted++; - expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 3); - }); let executed = 0; let onRetryExecuted = 0; - await policy.execute(() => { + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.onRetry( + async ( + result: string | undefined, + error: unknown | undefined, + currentRetryCount: number, + // eslint-disable-next-line @typescript-eslint/require-await + ): Promise => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); + }, + ); + policy.onRetry( + async ( + result: string | undefined, + error: unknown | undefined, + currentRetryCount: number, + // eslint-disable-next-line @typescript-eslint/require-await + ): Promise => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 1); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); + }, + ); + policy.onRetry( + async ( + result: string | undefined, + error: unknown | undefined, + currentRetryCount: number, + // eslint-disable-next-line @typescript-eslint/require-await + ): Promise => { + expect(result).to.equal('Diplomatiq is cool.'); + expect(error).to.equal(undefined); + expect(currentRetryCount).to.equal(executed); + + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 2); + onRetryExecuted++; + expect(onRetryExecuted).to.equal((currentRetryCount - 1) * 3 + 3); + }, + ); + + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -488,11 +531,16 @@ describe('RetryPolicy', () => { expect(onRetryExecuted).to.equal(9); }); - it('should run onFinallyFn after all execution and retries if retried', async () => { + it('should run onFinallyFn after all execution and retries if retried', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + + let executed = 0; + let onRetryExecuted = 0; + let onFinallyExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); - policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number) => { + policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); expect(error).to.equal(undefined); expect(currentRetryCount).to.equal(executed); @@ -500,18 +548,14 @@ describe('RetryPolicy', () => { onRetryExecuted++; expect(onRetryExecuted).to.equal(currentRetryCount); }); - policy.onFinally(() => { + policy.onFinally((): void => { onFinallyExecuted++; expect(executed).to.equal(4); expect(onRetryExecuted).to.equal(3); }); - let executed = 0; - let onRetryExecuted = 0; - let onFinallyExecuted = 0; - - await policy.execute(() => { + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -521,20 +565,21 @@ describe('RetryPolicy', () => { expect(onFinallyExecuted).to.equal(1); }); - it('should run onFinallyFn after the execution if not retried', async () => { + it('should run onFinallyFn after the execution if not retried', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is not cool.'); + + let executed = 0; + let onFinallyExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); policy.retryCount(3); - policy.onFinally(() => { + policy.onFinally((): void => { onFinallyExecuted++; expect(executed).to.equal(1); }); - let executed = 0; - let onFinallyExecuted = 0; - - await policy.execute(() => { + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -543,29 +588,30 @@ describe('RetryPolicy', () => { expect(onFinallyExecuted).to.equal(1); }); - it('should run multiple onFinallyFns sequentially', async () => { + it('should run multiple onFinallyFns sequentially', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.onFinally(() => { + + let executed = 0; + let onFinallyExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.onFinally((): void => { expect(onFinallyExecuted).to.equal(0); onFinallyExecuted++; expect(onFinallyExecuted).to.equal(1); }); - policy.onFinally(() => { + policy.onFinally((): void => { expect(onFinallyExecuted).to.equal(1); onFinallyExecuted++; expect(onFinallyExecuted).to.equal(2); }); - policy.onFinally(() => { + policy.onFinally((): void => { expect(onFinallyExecuted).to.equal(2); onFinallyExecuted++; expect(onFinallyExecuted).to.equal(3); }); - let executed = 0; - let onFinallyExecuted = 0; - - await policy.execute(() => { + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -574,29 +620,39 @@ describe('RetryPolicy', () => { expect(onFinallyExecuted).to.equal(3); }); - it('should run multiple async onFinallyFns sequentially', async () => { + it('should run multiple async onFinallyFns sequentially', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.onFinally(async () => { - expect(onFinallyExecuted).to.equal(0); - onFinallyExecuted++; - expect(onFinallyExecuted).to.equal(1); - }); - policy.onFinally(async () => { - expect(onFinallyExecuted).to.equal(1); - onFinallyExecuted++; - expect(onFinallyExecuted).to.equal(2); - }); - policy.onFinally(async () => { - expect(onFinallyExecuted).to.equal(2); - onFinallyExecuted++; - expect(onFinallyExecuted).to.equal(3); - }); let executed = 0; let onFinallyExecuted = 0; - await policy.execute(() => { + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.onFinally( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onFinallyExecuted).to.equal(0); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(1); + }, + ); + policy.onFinally( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onFinallyExecuted).to.equal(1); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(2); + }, + ); + policy.onFinally( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onFinallyExecuted).to.equal(2); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(3); + }, + ); + + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -605,18 +661,19 @@ describe('RetryPolicy', () => { expect(onFinallyExecuted).to.equal(3); }); - it('should run onFinallyFn once, regardless of retryCount', async () => { + it('should run onFinallyFn once, regardless of retryCount', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.retryCount(3); - policy.onFinally(() => { - onFinallyExecuted++; - }); let executed = 0; let onFinallyExecuted = 0; - await policy.execute(() => { + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.onFinally((): void => { + onFinallyExecuted++; + }); + + await policy.execute((): string => { executed++; return 'Diplomatiq is cool.'; }); @@ -625,14 +682,14 @@ describe('RetryPolicy', () => { expect(onFinallyExecuted).to.equal(1); }); - it('should wait for the specified interval before retry if set', async () => { + it('should wait for the specified interval before retry if set', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); - policy.waitBeforeRetry(() => 100); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.waitBeforeRetry((): number => 100); const executionTimestamps: number[] = []; - await policy.execute(() => { + await policy.execute((): string => { executionTimestamps.push(Date.now()); return 'Diplomatiq is cool.'; }); @@ -642,15 +699,17 @@ describe('RetryPolicy', () => { .and.to.be.at.most(110); }); - it('should wait for the specified interval (depending on the current retry count) before retry if set', async () => { + it('should wait for the specified interval (depending on the current retry count) before retry if set', async (): Promise< + void + > => { const policy = new RetryPolicy(); - policy.handleResult((r: string) => r === 'Diplomatiq is cool.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(2); - policy.waitBeforeRetry((currentRetryCount: number) => currentRetryCount * 100); + policy.waitBeforeRetry((currentRetryCount: number): number => currentRetryCount * 100); const executionTimestamps: number[] = []; - await policy.execute(() => { + await policy.execute((): string => { executionTimestamps.push(Date.now()); return 'Diplomatiq is cool.'; }); @@ -663,11 +722,15 @@ describe('RetryPolicy', () => { .and.to.be.at.most(210); }); - it('should not allow to set retryCount during execution', () => { + it('should not allow to set retryCount during execution', (): void => { const policy = new RetryPolicy(); - policy.execute(async () => { - await new Promise(() => {}); - }); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); try { policy.retryCount(2); @@ -677,11 +740,15 @@ describe('RetryPolicy', () => { } }); - it('should not allow to set retryForever during execution', () => { + it('should not allow to set retryForever during execution', (): void => { const policy = new RetryPolicy(); - policy.execute(async () => { - await new Promise(() => {}); - }); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); try { policy.retryForever(); @@ -691,56 +758,78 @@ describe('RetryPolicy', () => { } }); - it('should not allow to add onRetryFns during execution', () => { + it('should not allow to add onRetryFns during execution', (): void => { const policy = new RetryPolicy(); - policy.execute(async () => { - await new Promise(() => {}); - }); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); try { - policy.onRetry(() => {}); + policy.onRetry((): void => { + // empty + }); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('cannot modify policy during execution'); } }); - it('should not allow to set waitBeforeRetry during execution', () => { + it('should not allow to set waitBeforeRetry during execution', (): void => { const policy = new RetryPolicy(); - policy.execute(async () => { - await new Promise(() => {}); - }); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); try { - policy.waitBeforeRetry(() => 100); + policy.waitBeforeRetry((): number => 100); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('cannot modify policy during execution'); } }); - it('should not allow to add onFinallyFns during execution', () => { + it('should not allow to add onFinallyFns during execution', (): void => { const policy = new RetryPolicy(); - policy.execute(async () => { - await new Promise(() => {}); - }); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); try { - policy.onFinally(() => {}); + policy.onFinally((): void => { + // empty + }); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('cannot modify policy during execution'); } }); - it("should be properly mutex'd for running an instance multiple times simultaneously", async () => { + it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { const policy = new RetryPolicy(); await Promise.all([ - ...new Array(100) - .fill(undefined) - .map(() => policy.execute(() => new Promise(resolve => setTimeout(resolve, 20)))), - ...new Array(100).fill(undefined).map(() => { + ...new Array(100).fill(undefined).map( + async (): Promise => + policy.execute( + async (): Promise => + new Promise((resolve): void => { + setTimeout(resolve, 20); + }), + ), + ), + ...new Array(100).fill(undefined).map((): void => { try { policy.retryCount(1); expect.fail('did not throw'); @@ -748,7 +837,7 @@ describe('RetryPolicy', () => { expect((ex as Error).message).to.equal('cannot modify policy during execution'); } }), - ...new Array(100).fill(undefined).map(() => { + ...new Array(100).fill(undefined).map((): void => { try { policy.retryForever(); expect.fail('did not throw'); @@ -756,25 +845,29 @@ describe('RetryPolicy', () => { expect((ex as Error).message).to.equal('cannot modify policy during execution'); } }), - ...new Array(100).fill(undefined).map(() => { + ...new Array(100).fill(undefined).map((): void => { try { - policy.onRetry(() => {}); + policy.onRetry((): void => { + // empty + }); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('cannot modify policy during execution'); } }), - ...new Array(100).fill(undefined).map(() => { + ...new Array(100).fill(undefined).map((): void => { try { - policy.waitBeforeRetry(() => 100); + policy.waitBeforeRetry((): number => 100); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('cannot modify policy during execution'); } }), - ...new Array(100).fill(undefined).map(() => { + ...new Array(100).fill(undefined).map((): void => { try { - policy.onFinally(() => {}); + policy.onFinally((): void => { + // empty + }); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('cannot modify policy during execution'); @@ -783,7 +876,7 @@ describe('RetryPolicy', () => { ]); }); - it('should throw error when setting retry count to 0', () => { + it('should throw error when setting retry count to 0', (): void => { const policy = new RetryPolicy(); try { policy.retryCount(0); @@ -793,7 +886,7 @@ describe('RetryPolicy', () => { } }); - it('should throw error when setting retry count to <0', () => { + it('should throw error when setting retry count to <0', (): void => { const policy = new RetryPolicy(); try { policy.retryCount(-1); @@ -803,7 +896,7 @@ describe('RetryPolicy', () => { } }); - it('should throw error when setting retry count to a non-integer', () => { + it('should throw error when setting retry count to a non-integer', (): void => { const policy = new RetryPolicy(); try { policy.retryCount(0.1); @@ -813,13 +906,13 @@ describe('RetryPolicy', () => { } }); - it('should throw error when setting retry count to a non-safe integer', () => { + it('should throw error when setting retry count to a non-safe integer', (): void => { const policy = new RetryPolicy(); try { policy.retryCount(2 ** 53); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('retryCount must be less than 2^53 - 1'); + expect((ex as Error).message).to.equal('retryCount must be less than or equal to 2^53 - 1'); } }); }); diff --git a/test/specs/timeoutPolicy.test.ts b/test/specs/timeoutPolicy.test.ts new file mode 100644 index 0000000..115b542 --- /dev/null +++ b/test/specs/timeoutPolicy.test.ts @@ -0,0 +1,278 @@ +import { expect } from 'chai'; +import { TimeoutException } from '../../src/policies/proactive/timeoutPolicy/timeoutException'; +import { TimeoutPolicy } from '../../src/policies/proactive/timeoutPolicy/timeoutPolicy'; + +describe('TimeoutPolicy', (): void => { + it('should run the execution callback and return its result if no timeout is set', async (): Promise => { + const policy = new TimeoutPolicy(); + const result = await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the execution callback and throw its exceptions if no timeout is set', async (): Promise => { + const policy = new TimeoutPolicy(); + + try { + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new Error('TestException'); + }, + ); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should throw a TimeoutException if the execution takes more than the specified time', async (): Promise< + void + > => { + const policy = new TimeoutPolicy(); + policy.timeoutAfter(10); + + try { + await policy.execute( + async (): Promise => { + return new Promise((resolve): void => { + setTimeout(resolve, 20); + }); + }, + ); + } catch (ex) { + expect(ex instanceof TimeoutException).to.be.true; + } + }); + + it('should not throw a TimeoutException if the execution takes less than the specified time', async (): Promise< + void + > => { + const policy = new TimeoutPolicy(); + policy.timeoutAfter(20); + await policy.execute( + async (): Promise => { + return new Promise((resolve): void => { + setTimeout(resolve, 10); + }); + }, + ); + }); + + it('should run onTimeoutFn on timeout with timedOutAfter filled out', async (): Promise => { + const policy = new TimeoutPolicy(); + policy.timeoutAfter(10); + policy.onTimeout((timedOutAfter): void => { + expect(timedOutAfter).to.equal(10); + }); + + try { + await policy.execute( + async (): Promise => { + return new Promise((resolve): void => { + setTimeout(resolve, 20); + }); + }, + ); + } catch (ex) { + expect(ex instanceof TimeoutException).to.be.true; + } + }); + + it('should run multiple onTimeoutFns sequentially on timeout', async (): Promise => { + const policy = new TimeoutPolicy(); + policy.timeoutAfter(10); + + let onTimeoutCounter = 0; + policy.onTimeout((): void => { + expect(onTimeoutCounter).to.equal(0); + onTimeoutCounter++; + }); + policy.onTimeout((): void => { + expect(onTimeoutCounter).to.equal(1); + onTimeoutCounter++; + }); + policy.onTimeout((): void => { + expect(onTimeoutCounter).to.equal(2); + onTimeoutCounter++; + }); + + try { + await policy.execute( + async (): Promise => { + // empty + }, + ); + return new Promise((resolve): void => { + setTimeout(resolve, 20); + }); + } catch (ex) { + expect(ex instanceof TimeoutException).to.be.true; + } + }); + + it('should run multiple async onTimeoutFns sequentially on timeout', async (): Promise => { + const policy = new TimeoutPolicy(); + policy.timeoutAfter(10); + + let onTimeoutCounter = 0; + policy.onTimeout( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onTimeoutCounter).to.equal(0); + onTimeoutCounter++; + }, + ); + policy.onTimeout( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onTimeoutCounter).to.equal(1); + onTimeoutCounter++; + }, + ); + policy.onTimeout( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onTimeoutCounter).to.equal(2); + onTimeoutCounter++; + }, + ); + + try { + await policy.execute( + async (): Promise => { + return new Promise((resolve): void => { + setTimeout(resolve, 20); + }); + }, + ); + } catch (ex) { + expect(ex instanceof TimeoutException).to.be.true; + } + }); + + it('should not run onTimeoutFns if the execution callback throws a TimeoutException (if timeout is not set)', async (): Promise< + void + > => { + const policy = new TimeoutPolicy(); + + let onTimeoutCounter = 0; + policy.onTimeout((): void => { + onTimeoutCounter++; + }); + + try { + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new TimeoutException(1); + }, + ); + } catch (ex) { + expect(ex instanceof TimeoutException).to.be.true; + } + + expect(onTimeoutCounter).to.equal(0); + }); + + it('should not run onTimeoutFns if the execution callback throws a TimeoutException (if timeout is set)', async (): Promise< + void + > => { + const policy = new TimeoutPolicy(); + policy.timeoutAfter(1000); + + let onTimeoutCounter = 0; + policy.onTimeout((): void => { + onTimeoutCounter++; + }); + + try { + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new TimeoutException(1); + }, + ); + } catch (ex) { + expect(ex instanceof TimeoutException).to.be.true; + } + + expect(onTimeoutCounter).to.equal(0); + }); + + it('should not allow to set timeoutAfter during execution', (): void => { + const policy = new TimeoutPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.timeoutAfter(10); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onTimeoutFns during execution', (): void => { + const policy = new TimeoutPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.onTimeout((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should throw error when setting timeoutAfter to <0', (): void => { + const policy = new TimeoutPolicy(); + + try { + policy.timeoutAfter(-1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('timeoutMs must be greater than 0'); + } + }); + + it('should throw error when setting timeoutAfter to a non-integer', (): void => { + const policy = new TimeoutPolicy(); + + try { + policy.timeoutAfter(0.1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('timeoutMs must be integer'); + } + }); + + it('should throw error when setting timeoutAfter to a non-safe integer', (): void => { + const policy = new TimeoutPolicy(); + + try { + policy.timeoutAfter(2 ** 53); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('timeoutMs must be less than or equal to 2^53 - 1'); + } + }); +}); diff --git a/test/utils/nodeJsEntropyProvider.ts b/test/utils/nodeJsEntropyProvider.ts index 2ebfe8c..eced153 100644 --- a/test/utils/nodeJsEntropyProvider.ts +++ b/test/utils/nodeJsEntropyProvider.ts @@ -4,7 +4,7 @@ import { randomFill } from 'crypto'; export class NodeJsEntropyProvider implements EntropyProvider { public async getRandomValues(array: T): Promise { return new Promise((resolve, reject): void => { - randomFill(array, (error: Error | null, array: T) => { + randomFill(array, (error: Error | null, array: T): void => { if (error !== null) { reject(error); return; diff --git a/test/utils/windowMock.ts b/test/utils/windowMock.ts index 33cb054..618ac8c 100644 --- a/test/utils/windowMock.ts +++ b/test/utils/windowMock.ts @@ -1,7 +1,11 @@ import { randomFillSync } from 'crypto'; -export const windowMock = () => ({ +export const windowMock = (): { crypto: { - getRandomValues: (array: Uint8Array) => randomFillSync(array), + getRandomValues: (array: Uint8Array) => Uint8Array; + }; +} => ({ + crypto: { + getRandomValues: (array: Uint8Array): Uint8Array => randomFillSync(array), }, }); diff --git a/tsconfig.test.json b/tsconfig.test.json index 35845f8..77b1230 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -14,5 +14,5 @@ "strict": true, "target": "es2017" }, - "files": ["src/main.ts"] + "include": ["test/**/*.ts"] } From 7e0881d9116289456b2f8e5c312c01e64921f8b3 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Sun, 15 Mar 2020 17:04:33 +0100 Subject: [PATCH 116/136] refactor: Better errors in BackoffStrategyFactory Closes #161. --- README.md | 8 +- .../proactive/timeoutPolicy/timeoutPolicy.ts | 2 +- .../retryPolicy/backoffStrategyFactory.ts | 28 ++ test/specs/backoffStrategyFactory.test.ts | 244 +++++++++++++++++- test/specs/timeoutPolicy.test.ts | 11 + 5 files changed, 285 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f40136b..76ba351 100644 --- a/README.md +++ b/README.md @@ -340,11 +340,11 @@ policy.waitBeforeRetry(BackoffStrategyFactory.exponentialBackoff(100, false, 3)) // 0 100 300 900 2700 … policy.waitBeforeRetry(BackoffStrategyFactory.exponentialBackoff(100, true, 3)); -// wait for a [random between 0-100, inclusive] ms before each retry -policy.waitBeforeRetry(BackoffStrategyFactory.jitteredBackoff(0, 100)); +// wait for a [random between 1-100, inclusive] ms before each retry +policy.waitBeforeRetry(BackoffStrategyFactory.jitteredBackoff(1, 100)); -// retry immediately for the first time, then wait for a [random between 0-100, inclusive] ms before each retry -policy.waitBeforeRetry(BackoffStrategyFactory.jitteredBackoff(0, 100, true)); +// retry immediately for the first time, then wait for a [random between 1-100, inclusive] ms before each retry +policy.waitBeforeRetry(BackoffStrategyFactory.jitteredBackoff(1, 100, true)); ``` For using `jitteredBackoff` in Node.js environments, you will need to inject a Node.js-based entropy source into the default RandomGenerator ([@diplomatiq/crypto-random](https://github.com/Diplomatiq/crypto-random) requires `window.crypto.getRandomValues` to be available by default). Create the following in your project: diff --git a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts index 34b95fe..8b9a8d0 100644 --- a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts +++ b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts @@ -16,7 +16,7 @@ export class TimeoutPolicy extends ProactivePolicy { throw new Error('timeoutMs must be integer'); } - if (timeoutMs < 0) { + if (timeoutMs <= 0) { throw new Error('timeoutMs must be greater than 0'); } diff --git a/src/policies/reactive/retryPolicy/backoffStrategyFactory.ts b/src/policies/reactive/retryPolicy/backoffStrategyFactory.ts index 9bd8576..fb6e6b9 100644 --- a/src/policies/reactive/retryPolicy/backoffStrategyFactory.ts +++ b/src/policies/reactive/retryPolicy/backoffStrategyFactory.ts @@ -3,12 +3,16 @@ import { RandomGenerator } from '../../../interfaces/randomGenerator'; export class BackoffStrategyFactory { public static constantBackoff(delayMs: number, fastFirst = false): (currentRetryCount: number) => number { + this.validateNumericArgument(delayMs, 'delayMs'); + return fastFirst ? (currentRetryCount: number): number => (currentRetryCount === 1 ? 0 : delayMs) : (): number => delayMs; } public static linearBackoff(delayMs: number, fastFirst = false): (currentRetryCount: number) => number { + this.validateNumericArgument(delayMs, 'delayMs'); + return fastFirst ? (currentRetryCount: number): number => delayMs * (currentRetryCount - 1) : (currentRetryCount: number): number => delayMs * currentRetryCount; @@ -19,6 +23,9 @@ export class BackoffStrategyFactory { fastFirst = false, base = 2, ): (currentRetryCount: number) => number { + this.validateNumericArgument(delayMs, 'delayMs'); + this.validateNumericArgument(base, 'base'); + return fastFirst ? (currentRetryCount: number): number => currentRetryCount === 1 ? 0 : delayMs * base ** (currentRetryCount - 2) @@ -31,6 +38,13 @@ export class BackoffStrategyFactory { fastFirst = false, randomGenerator: RandomGenerator = new DefaultRandomGenerator(), ): (currentRetryCount: number) => Promise { + this.validateNumericArgument(minDelayMs, 'minDelayMs'); + this.validateNumericArgument(maxDelayMs, 'maxDelayMs'); + + if (maxDelayMs <= minDelayMs) { + throw new Error('maxDelayMs must be greater than minDelayMs'); + } + return fastFirst ? async (currentRetryCount: number): Promise => { if (currentRetryCount === 1) { @@ -44,4 +58,18 @@ export class BackoffStrategyFactory { return ms; }; } + + private static validateNumericArgument(arg: number, name: string): void { + if (!Number.isInteger(arg)) { + throw new Error(`${name} must be integer`); + } + + if (arg <= 0) { + throw new Error(`${name} must be greater than 0`); + } + + if (!Number.isSafeInteger(arg)) { + throw new Error(`${name} must be less than or equal to 2^53 - 1`); + } + } } diff --git a/test/specs/backoffStrategyFactory.test.ts b/test/specs/backoffStrategyFactory.test.ts index cf3e942..40dd134 100644 --- a/test/specs/backoffStrategyFactory.test.ts +++ b/test/specs/backoffStrategyFactory.test.ts @@ -23,6 +23,38 @@ describe('BackoffStrategyFactory', (): void => { expect(strategy(4)).to.equal(100); expect(strategy(5)).to.equal(100); }); + + it('should throw error when setting delayMs to 0', (): void => { + try { + BackoffStrategyFactory.constantBackoff(0); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be greater than 0'); + } + }); + + it('should throw error when setting delayMs to <0', (): void => { + try { + BackoffStrategyFactory.constantBackoff(-1); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be greater than 0'); + } + }); + + it('should throw error when setting delayMs to a non-integer', (): void => { + try { + BackoffStrategyFactory.constantBackoff(0.1); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be integer'); + } + }); + + it('should throw error when setting delayMs to a non-safe integer', (): void => { + try { + BackoffStrategyFactory.constantBackoff(2 ** 53); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be less than or equal to 2^53 - 1'); + } + }); }); describe('linearBackoff', (): void => { @@ -43,6 +75,38 @@ describe('BackoffStrategyFactory', (): void => { expect(strategy(4)).to.equal(300); expect(strategy(5)).to.equal(400); }); + + it('should throw error when setting delayMs to 0', (): void => { + try { + BackoffStrategyFactory.linearBackoff(0); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be greater than 0'); + } + }); + + it('should throw error when setting delayMs to <0', (): void => { + try { + BackoffStrategyFactory.linearBackoff(-1); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be greater than 0'); + } + }); + + it('should throw error when setting delayMs to a non-integer', (): void => { + try { + BackoffStrategyFactory.linearBackoff(0.1); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be integer'); + } + }); + + it('should throw error when setting delayMs to a non-safe integer', (): void => { + try { + BackoffStrategyFactory.linearBackoff(2 ** 53); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be less than or equal to 2^53 - 1'); + } + }); }); describe('exponentialBackoff', (): void => { @@ -81,13 +145,77 @@ describe('BackoffStrategyFactory', (): void => { expect(strategy(4)).to.equal(900); expect(strategy(5)).to.equal(2700); }); + + it('should throw error when setting delayMs to 0', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(0); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be greater than 0'); + } + }); + + it('should throw error when setting delayMs to <0', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(-1); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be greater than 0'); + } + }); + + it('should throw error when setting delayMs to a non-integer', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(0.1); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be integer'); + } + }); + + it('should throw error when setting delayMs to a non-safe integer', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(2 ** 53); + } catch (ex) { + expect((ex as Error).message).to.equal('delayMs must be less than or equal to 2^53 - 1'); + } + }); + + it('should throw error when setting base to 0', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(100, false, 0); + } catch (ex) { + expect((ex as Error).message).to.equal('base must be greater than 0'); + } + }); + + it('should throw error when setting base to <0', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(100, false, -1); + } catch (ex) { + expect((ex as Error).message).to.equal('base must be greater than 0'); + } + }); + + it('should throw error when setting base to a non-integer', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(100, false, 0.1); + } catch (ex) { + expect((ex as Error).message).to.equal('base must be integer'); + } + }); + + it('should throw error when setting base to a non-safe integer', (): void => { + try { + BackoffStrategyFactory.exponentialBackoff(100, false, 2 ** 53); + } catch (ex) { + expect((ex as Error).message).to.equal('base must be less than or equal to 2^53 - 1'); + } + }); }); describe('jitteredBackoff', (): void => { it('should produce a jittered backoff strategy', async (): Promise => { const entropyProvider = new NodeJsEntropyProvider(); const randomGenerator = new RandomGenerator(entropyProvider); - const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100, false, randomGenerator); + const strategy = BackoffStrategyFactory.jitteredBackoff(1, 100, false, randomGenerator); expect(await strategy(1)) .to.be.at.least(0) @@ -115,7 +243,7 @@ describe('BackoffStrategyFactory', (): void => { > => { const entropyProvider = new NodeJsEntropyProvider(); const randomGenerator = new RandomGenerator(entropyProvider); - const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100, true, randomGenerator); + const strategy = BackoffStrategyFactory.jitteredBackoff(1, 100, true, randomGenerator); expect(await strategy(1)).to.equal(0); @@ -143,7 +271,7 @@ describe('BackoffStrategyFactory', (): void => { // @ts-ignore global.window = windowMock(); - const strategy = BackoffStrategyFactory.jitteredBackoff(0, 100); + const strategy = BackoffStrategyFactory.jitteredBackoff(1, 100); expect(await strategy(1)) .to.be.at.least(0) @@ -169,5 +297,115 @@ describe('BackoffStrategyFactory', (): void => { // @ts-ignore global.window = undefined; }); + + it('should throw error when setting minDelayMs to 0', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(0, 100, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('minDelayMs must be greater than 0'); + } + }); + + it('should throw error when setting minDelayMs to <0', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(-1, 100, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('minDelayMs must be greater than 0'); + } + }); + + it('should throw error when setting minDelayMs to a non-integer', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(0.1, 100, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('minDelayMs must be integer'); + } + }); + + it('should throw error when setting minDelayMs to a non-safe integer', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(2 ** 53, 100, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('minDelayMs must be less than or equal to 2^53 - 1'); + } + }); + + it('should throw error when setting maxDelayMs to 0', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(1, 0, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('maxDelayMs must be greater than 0'); + } + }); + + it('should throw error when setting maxDelayMs to <0', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(1, -1, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('maxDelayMs must be greater than 0'); + } + }); + + it('should throw error when setting maxDelayMs to a non-integer', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(1, 0.1, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('maxDelayMs must be integer'); + } + }); + + it('should throw error when setting maxDelayMs to a non-safe integer', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(1, 2 ** 53, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('maxDelayMs must be less than or equal to 2^53 - 1'); + } + }); + + it('should throw error when setting minDelayMs = maxDelayMs', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(1, 1, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('maxDelayMs must be greater than minDelayMs'); + } + }); + + it('should throw error when setting minDelayMs > maxDelayMs', (): void => { + const entropyProvider = new NodeJsEntropyProvider(); + const randomGenerator = new RandomGenerator(entropyProvider); + + try { + BackoffStrategyFactory.jitteredBackoff(2, 1, false, randomGenerator); + } catch (ex) { + expect((ex as Error).message).to.equal('maxDelayMs must be greater than minDelayMs'); + } + }); }); }); diff --git a/test/specs/timeoutPolicy.test.ts b/test/specs/timeoutPolicy.test.ts index 115b542..5259d86 100644 --- a/test/specs/timeoutPolicy.test.ts +++ b/test/specs/timeoutPolicy.test.ts @@ -243,6 +243,17 @@ describe('TimeoutPolicy', (): void => { } }); + it('should throw error when setting timeoutAfter to 0', (): void => { + const policy = new TimeoutPolicy(); + + try { + policy.timeoutAfter(0); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('timeoutMs must be greater than 0'); + } + }); + it('should throw error when setting timeoutAfter to <0', (): void => { const policy = new TimeoutPolicy(); From ecb07d346a6fca58e080ff7ac6645728e9a2bd05 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 11:12:53 +0000 Subject: [PATCH 117/136] chore: bump mocha from 7.1.0 to 7.1.1 Bumps [mocha](https://github.com/mochajs/mocha) from 7.1.0 to 7.1.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v7.1.0...v7.1.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 41 ++++++++++++++++++++++++++++------------- package.json | 2 +- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a1a677..5e310e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3529,9 +3529,9 @@ } }, "mocha": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.0.tgz", - "integrity": "sha512-MymHK8UkU0K15Q/zX7uflZgVoRWiTjy0fXE/QjKts6mowUvGxOdPhZ2qj3b0iZdUrNZlW9LAIMFHB4IW+2b3EQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz", + "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -3547,7 +3547,7 @@ "js-yaml": "3.13.1", "log-symbols": "3.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.1", + "mkdirp": "0.5.3", "ms": "2.1.1", "node-environment-flags": "1.0.6", "object.assign": "4.1.0", @@ -3555,8 +3555,8 @@ "supports-color": "6.0.0", "which": "1.3.1", "wide-align": "1.1.3", - "yargs": "13.3.0", - "yargs-parser": "13.1.1", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", "yargs-unparser": "1.6.0" }, "dependencies": { @@ -3608,6 +3608,21 @@ "path-exists": "^3.0.0" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -3654,9 +3669,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -5158,9 +5173,9 @@ } }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -5172,7 +5187,7 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^13.1.2" }, "dependencies": { "camelcase": { diff --git a/package.json b/package.json index 4c0a65d..40fe1aa 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@diplomatiq/eslint-config-tslib": "^2.5.0", "esm": "^3.2.25", "husky": "^4.2.3", - "mocha": "^7.1.0", + "mocha": "^7.1.1", "nyc": "^15.0.0", "prettier": "^1.19.1", "source-map-support": "^0.5.16", From 5225f73c0f4a2ee0844e20a56efe5598bf947ae6 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Mon, 16 Mar 2020 23:17:40 +0100 Subject: [PATCH 118/136] feat: Implement FallbackPolicy Closes #185. --- README.md | 140 ++- src/main.ts | 2 + .../fallbackChainExhaustedException.ts | 1 + .../fallbackPolicy/fallbackChainLink.ts | 1 + .../reactive/fallbackPolicy/fallbackPolicy.ts | 112 ++ .../reactive/fallbackPolicy/onFallbackFn.ts | 4 + .../reactive/retryPolicy/backoffStrategy.ts | 1 + .../reactive/retryPolicy/onRetryFn.ts | 5 + .../reactive/retryPolicy/retryPolicy.ts | 72 +- src/types/onFinallyFn.ts | 1 + test/specs/fallbackPolicy.test.ts | 1085 +++++++++++++++++ test/specs/retryPolicy.test.ts | 58 +- test/specs/timeoutPolicy.test.ts | 34 + 13 files changed, 1441 insertions(+), 75 deletions(-) create mode 100644 src/policies/reactive/fallbackPolicy/fallbackChainExhaustedException.ts create mode 100644 src/policies/reactive/fallbackPolicy/fallbackChainLink.ts create mode 100644 src/policies/reactive/fallbackPolicy/fallbackPolicy.ts create mode 100644 src/policies/reactive/fallbackPolicy/onFallbackFn.ts create mode 100644 src/policies/reactive/retryPolicy/backoffStrategy.ts create mode 100644 src/policies/reactive/retryPolicy/onRetryFn.ts create mode 100644 src/types/onFinallyFn.ts create mode 100644 test/specs/fallbackPolicy.test.ts diff --git a/README.md b/README.md index 76ba351..5541123 100644 --- a/README.md +++ b/README.md @@ -113,13 +113,14 @@ Resily offers **reactive** and **proactive** policies: - A **reactive** policy executes the wrapped method, then reacts to the outcome (which in practice is the result of or an exception thrown by the executed method) by acting as specified in the policy itself. Examples for reactive policies include retry, fallback, circuit-breaker. - A **proactive** policy executes the wrapped method, then acts on its own as specified in the policy itself, regardless of the outcome of the executed code. Examples for proactive policies include timeout, bulkhead isolation, cache. -#### Reactive policies +#### Reactive policies summary -| Policy | What does it claim? | How does it work? | -| ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------- | -| [**RetryPolicy**](#retrypolicy) | Many faults are transient and will not occur again after a delay. | Allows configuring automatic retries on specified conditions. | +| Policy | What does it claim? | How does it work? | +| ------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | +| [**RetryPolicy**](#retrypolicy) | Many faults are transient and will not occur again after a delay. | Allows configuring automatic retries on specified conditions. | +| [**FallbackPolicy**](#fallbackpolicy) | Failures happen, and we can prepare for them. | Allows configuring substitute values or automated fallback actions. | -#### Proactive policies +#### Proactive policies summary | Policy | What does it claim? | How does it work? | | ----------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------- | @@ -234,16 +235,33 @@ await policy.execute(async () => { }); ``` +You can configure the policy to react on any result and/or to any exception: + +```typescript +const policy = … // any reactive policy + +// react on any result +policy.handleResult(() => true); + +// react on any exception +policy.handleException(() => true); +``` + #### RetryPolicy `RetryPolicy` claims that many faults are transient and will not occur again after a delay. It allows configuring automatic retries on specified conditions. +Since `RetryPolicy` is a reactive policy, you can configure the policy to retry the execution on specific results or exceptions with `handleResult` and `handleException`. See the [Reactive policies](#reactive-policies) section for details. + Configure how many retries you need or retry forever: ```typescript import { RetryPolicy } from '@diplomatiq/resily'; -const policy = new RetryPolicy(); +// the wrapped method is supposed to return a string +const policy = new RetryPolicy(); + +// retry until the result/exception is reactive, but maximum 3 times policy.retryCount(3); // this overwrites the previous value @@ -259,7 +277,9 @@ Perform certain actions before retrying: ```typescript import { RetryPolicy } from '@diplomatiq/resily'; -const policy = new RetryPolicy(); +// the wrapped method is supposed to return a string +const policy = new RetryPolicy(); + policy.onRetry( // onRetryFns can be sync or async, they will be awaited async (result, error, currentRetryCount) => { @@ -289,7 +309,8 @@ Wait for the specified number of milliseconds before retrying: ```typescript import { RetryPolicy } from '@diplomatiq/resily'; -const policy = new RetryPolicy(); +// the wrapped method is supposed to return a string +const policy = new RetryPolicy(); // wait for 100 ms before each retry policy.waitBeforeRetry(() => 100); @@ -306,7 +327,8 @@ Although you can code any kind of backoff, there are also predefined, ready-to-u ```typescript import { BackoffStrategyFactory, RetryPolicy } from '@diplomatiq/resily'; -const policy = new RetryPolicy(); +// the wrapped method is supposed to return a string +const policy = new RetryPolicy(); // wait for 100 ms before each retry // 100 100 100 100 100 … @@ -377,13 +399,107 @@ import { NodeJsEntropyProvider } from './nodeJsEntropyProvider'; const entropyProvider = new NodeJsEntropyProvider(); const randomGenerator = new RandomGenerator(entropyProvider); -const jitteredBackoff = BackoffStrategyFactory.jitteredBackoff(0, 100, true, randomGenerator); +const jitteredBackoff = BackoffStrategyFactory.jitteredBackoff(1, 100, true, randomGenerator); ``` Perform certain actions after the execution and all retries finished: ```typescript -const policy = new RetryPolicy(); +// the wrapped method is supposed to return a string +const policy = new RetryPolicy(); + +policy.onFinally( + // onFinallyFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onFinallyFns, they will run sequentially +policy.onFinally(async () => { + // this will be awaited first +}); +policy.onFinally(async () => { + // then this will be awaited +}); + +// errors thrown by an onFinallyFn will be caught and ignored +policy.onFinally(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +#### FallbackPolicy + +`FallbackPolicy` claims that failures happen, and we can prepare for them. It allows configuring substitute values or automated fallback actions. + +Since `FallbackPolicy` is a reactive policy, you can configure the policy to fallback along its fallback chain on specific results or exceptions with `handleResult` and `handleException`. See the [Reactive policies](#reactive-policies) section for details. + +Configure the fallback chain: + +```typescript +import { FallbackPolicy } from '@diplomatiq/resily'; + +// the wrapped method and its fallbacks are supposed to return a string +const policy = new FallbackPolicy(); + +// if the wrapped method's result/exception is reactive, configure a fallback method onto the fallback chain +policy.fallback( + // the fallback methods can be sync or async, they will be awaited + () => { + // do something + }, +); + +// if the previous fallback method's result/exception is reactive, configure another fallback onto the fallback chain +policy.fallback( + // the fallback methods can be sync or async, they will be awaited + async () => { + // do something + }, +); + +// you can configure any number of fallback methods onto the fallback chain +``` + +If there are no more elements on the fallback chain but the last result/exception is still reactive — meaning there are no more fallbacks when needed —, a `FallbackChainExhaustedException` is thrown. + +Perform certain actions before the fallback: + +```typescript +import { FallbackPolicy } from '@diplomatiq/resily'; + +// the wrapped method and its fallbacks are supposed to return a string +const policy = new FallbackPolicy(); + +policy.onFallback( + // onFallbackFns can be sync or async, they will be awaited + async (result, error) => { + // result is undefined if reacting upon a thrown error + // error is undefined if reacting upon a result + }, +); + +// you can set multiple onFallbackFns, they will run sequentially +policy.onFallback(async () => { + // this will be awaited first +}); +policy.onFallback(async () => { + // then this will be awaited +}); + +// errors thrown by an onFallbackFn will be caught and ignored +policy.onFallback(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +Perform certain actions after the execution and all fallbacks finished: + +```typescript +// the wrapped method and its fallbacks are supposed to return a string +const policy = new FallbackPolicy(); + policy.onFinally( // onFinallyFns can be sync or async, they will be awaited async () => {}, @@ -418,7 +534,7 @@ The executed method is fully executed to its end (unless it throws an exception) \*TypeScript/JavaScript has no _generic_ way of canceling or aborting an executing method, either synchronous or asynchronous. `TimeoutPolicy` runs arbitrary user-provided code: it cannot be assumed the code is prepared in any way (e.g. it has cancel points). The provided code _could_ be executed in a separate worker thread so it can be aborted instantaneously by terminating the worker, but run-time compiling a worker from user-provided code is ugly and error-prone. -On timeout, the Promise returned by the policy's `execute` method is rejected with a `TimeoutException`: +On timeout, the promise returned by the policy's `execute` method is rejected with a `TimeoutException`: ```typescript import { TimeoutException, TimeoutPolicy } from '@diplomatiq/resily'; diff --git a/src/main.ts b/src/main.ts index b9d40f0..3b9f08f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,6 @@ export { TimeoutException } from './policies/proactive/timeoutPolicy/timeoutException'; export { TimeoutPolicy } from './policies/proactive/timeoutPolicy/timeoutPolicy'; +export { FallbackChainExhaustedException } from './policies/reactive/fallbackPolicy/fallbackChainExhaustedException'; +export { FallbackPolicy } from './policies/reactive/fallbackPolicy/fallbackPolicy'; export { BackoffStrategyFactory } from './policies/reactive/retryPolicy/backoffStrategyFactory'; export { RetryPolicy } from './policies/reactive/retryPolicy/retryPolicy'; diff --git a/src/policies/reactive/fallbackPolicy/fallbackChainExhaustedException.ts b/src/policies/reactive/fallbackPolicy/fallbackChainExhaustedException.ts new file mode 100644 index 0000000..c245e28 --- /dev/null +++ b/src/policies/reactive/fallbackPolicy/fallbackChainExhaustedException.ts @@ -0,0 +1 @@ +export class FallbackChainExhaustedException extends Error {} diff --git a/src/policies/reactive/fallbackPolicy/fallbackChainLink.ts b/src/policies/reactive/fallbackPolicy/fallbackChainLink.ts new file mode 100644 index 0000000..ffd0819 --- /dev/null +++ b/src/policies/reactive/fallbackPolicy/fallbackChainLink.ts @@ -0,0 +1 @@ +export type FallbackChainLink = () => ResultType | Promise; diff --git a/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts b/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts new file mode 100644 index 0000000..30c2070 --- /dev/null +++ b/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts @@ -0,0 +1,112 @@ +import { OnFinallyFn } from '../../../types/onFinallyFn'; +import { ReactivePolicy } from '../reactivePolicy'; +import { FallbackChainExhaustedException } from './fallbackChainExhaustedException'; +import { FallbackChainLink } from './fallbackChainLink'; +import { OnFallbackFn } from './onFallbackFn'; + +export class FallbackPolicy extends ReactivePolicy { + private readonly fallbackChain: Array> = []; + private readonly onFallbackFns: Array> = []; + private readonly onFinallyFns: OnFinallyFn[] = []; + private executing = 0; + + public fallback(fallbackChainLink: FallbackChainLink): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.fallbackChain.push(fallbackChainLink); + } + + public onFallback(onFallbackFn: OnFallbackFn): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onFallbackFns.push(onFallbackFn); + } + + public onFinally(fn: OnFinallyFn): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onFinallyFns.push(fn); + } + + public async execute(fn: () => ResultType | Promise): Promise { + try { + this.executing++; + + const remainingFallbackChain = [...this.fallbackChain]; + let executor = fn; + + // eslint-disable-next-line no-constant-condition + while (true) { + try { + const result = await executor(); + + const shouldFallbackOnResult = await this.isResultHandled(result); + if (!shouldFallbackOnResult) { + return result; + } + + const nextExecutor = remainingFallbackChain.shift(); + if (nextExecutor === undefined) { + throw new FallbackChainExhaustedException(); + } + + executor = nextExecutor; + + for (const onFallbackFn of this.onFallbackFns) { + try { + await onFallbackFn(result, undefined); + } catch (onFallbackError) { + // ignored + } + } + + continue; + } catch (ex) { + if (ex instanceof FallbackChainExhaustedException) { + throw ex; + } + + const shouldFallbackOnException = await this.isExceptionHandled(ex); + if (!shouldFallbackOnException) { + throw ex; + } + + const nextExecutor = remainingFallbackChain.shift(); + if (nextExecutor === undefined) { + throw new FallbackChainExhaustedException(); + } + + executor = nextExecutor; + + for (const onFallbackFn of this.onFallbackFns) { + try { + await onFallbackFn(undefined, ex); + } catch (onFallbackError) { + // ignored + } + } + + continue; + } + } + } finally { + try { + for (const onFinallyFn of this.onFinallyFns) { + try { + await onFinallyFn(); + } catch (onFinallyError) { + // ignored + } + } + } finally { + this.executing--; + } + } + } +} diff --git a/src/policies/reactive/fallbackPolicy/onFallbackFn.ts b/src/policies/reactive/fallbackPolicy/onFallbackFn.ts new file mode 100644 index 0000000..cdd7487 --- /dev/null +++ b/src/policies/reactive/fallbackPolicy/onFallbackFn.ts @@ -0,0 +1,4 @@ +export type OnFallbackFn = ( + result: ResultType | undefined, + error: unknown | undefined, +) => void | Promise; diff --git a/src/policies/reactive/retryPolicy/backoffStrategy.ts b/src/policies/reactive/retryPolicy/backoffStrategy.ts new file mode 100644 index 0000000..06a52a4 --- /dev/null +++ b/src/policies/reactive/retryPolicy/backoffStrategy.ts @@ -0,0 +1 @@ +export type BackoffStrategy = (currentRetryCount: number) => number | Promise; diff --git a/src/policies/reactive/retryPolicy/onRetryFn.ts b/src/policies/reactive/retryPolicy/onRetryFn.ts new file mode 100644 index 0000000..e24e3cf --- /dev/null +++ b/src/policies/reactive/retryPolicy/onRetryFn.ts @@ -0,0 +1,5 @@ +export type OnRetryFn = ( + result: ResultType | undefined, + error: unknown | undefined, + currentRetryCount: number, +) => void | Promise; diff --git a/src/policies/reactive/retryPolicy/retryPolicy.ts b/src/policies/reactive/retryPolicy/retryPolicy.ts index d8aa44c..f3a1f66 100644 --- a/src/policies/reactive/retryPolicy/retryPolicy.ts +++ b/src/policies/reactive/retryPolicy/retryPolicy.ts @@ -1,13 +1,13 @@ -import { Predicate } from '../../../types/predicate'; +import { OnFinallyFn } from '../../../types/onFinallyFn'; import { ReactivePolicy } from '../reactivePolicy'; +import { BackoffStrategy } from './backoffStrategy'; +import { OnRetryFn } from './onRetryFn'; export class RetryPolicy extends ReactivePolicy { private totalRetryCount = 1; - private readonly onRetryFns: Array< - (result: ResultType | undefined, error: unknown | undefined, currentRetryCount: number) => void | Promise - > = []; - private backoffStrategy: (currentRetryCount: number) => number | Promise = (): number => 0; - private readonly onFinallyFns: Array<() => void | Promise> = []; + private readonly onRetryFns: Array> = []; + private backoffStrategy: BackoffStrategy = (): number => 0; + private readonly onFinallyFns: OnFinallyFn[] = []; private executing = 0; public constructor() { @@ -42,13 +42,7 @@ export class RetryPolicy extends ReactivePolicy { this.totalRetryCount = Number.POSITIVE_INFINITY; } - public onRetry( - fn: ( - result: ResultType | undefined, - error: unknown | undefined, - currentRetryCount: number, - ) => void | Promise, - ): void { + public onRetry(fn: OnRetryFn): void { if (this.executing > 0) { throw new Error('cannot modify policy during execution'); } @@ -56,7 +50,7 @@ export class RetryPolicy extends ReactivePolicy { this.onRetryFns.push(fn); } - public waitBeforeRetry(strategy: (currentRetryCount: number) => number | Promise): void { + public waitBeforeRetry(strategy: BackoffStrategy): void { if (this.executing > 0) { throw new Error('cannot modify policy during execution'); } @@ -64,7 +58,7 @@ export class RetryPolicy extends ReactivePolicy { this.backoffStrategy = strategy; } - public onFinally(fn: () => void | Promise): void { + public onFinally(fn: OnFinallyFn): void { if (this.executing > 0) { throw new Error('cannot modify policy during execution'); } @@ -73,9 +67,9 @@ export class RetryPolicy extends ReactivePolicy { } public async execute(fn: () => ResultType | Promise): Promise { - this.executing++; - try { + this.executing++; + let currentRetryCount = 0; // eslint-disable-next-line no-constant-condition @@ -83,9 +77,13 @@ export class RetryPolicy extends ReactivePolicy { try { const result = await fn(); + const shouldRetryOnResult = await this.isResultHandled(result); + if (!shouldRetryOnResult) { + return result; + } + currentRetryCount++; - const shouldRetry = await this.shouldRetryOnResult(result, currentRetryCount); - if (!shouldRetry) { + if (!this.hasRetryLeft(currentRetryCount)) { return result; } @@ -102,9 +100,13 @@ export class RetryPolicy extends ReactivePolicy { continue; } catch (ex) { + const shouldRetryOnException = await this.isExceptionHandled(ex); + if (!shouldRetryOnException) { + throw ex; + } + currentRetryCount++; - const shouldRetry = await this.shouldRetryOnException(ex, currentRetryCount); - if (!shouldRetry) { + if (!this.hasRetryLeft(currentRetryCount)) { throw ex; } @@ -137,32 +139,8 @@ export class RetryPolicy extends ReactivePolicy { } } - private async shouldRetryOnResult(result: ResultType, currentRetryCount: number): Promise { - return this.shouldRetryOn( - currentRetryCount, - result, - async (result): Promise => this.isResultHandled(result), - ); - } - - private async shouldRetryOnException(exception: unknown, currentRetryCount: number): Promise { - return this.shouldRetryOn( - currentRetryCount, - exception, - async (exception): Promise => this.isExceptionHandled(exception), - ); - } - - private async shouldRetryOn( - currentRetryCount: number, - subject: T, - shouldRetryCb: Predicate, - ): Promise { - if (currentRetryCount > this.totalRetryCount) { - return false; - } - - return shouldRetryCb(subject); + private hasRetryLeft(currentRetryCount: number): boolean { + return currentRetryCount <= this.totalRetryCount; } private async waitFor(ms: number): Promise { diff --git a/src/types/onFinallyFn.ts b/src/types/onFinallyFn.ts new file mode 100644 index 0000000..cc6a174 --- /dev/null +++ b/src/types/onFinallyFn.ts @@ -0,0 +1 @@ +export type OnFinallyFn = () => void | Promise; diff --git a/test/specs/fallbackPolicy.test.ts b/test/specs/fallbackPolicy.test.ts new file mode 100644 index 0000000..1d91946 --- /dev/null +++ b/test/specs/fallbackPolicy.test.ts @@ -0,0 +1,1085 @@ +import { expect } from 'chai'; +import { FallbackChainExhaustedException } from '../../src/policies/reactive/fallbackPolicy/fallbackChainExhaustedException'; +import { FallbackPolicy } from '../../src/policies/reactive/fallbackPolicy/fallbackPolicy'; + +describe('FallbackPolicy', (): void => { + it('should run the synchronous execution callback and return its result by default', async (): Promise => { + const policy = new FallbackPolicy(); + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the asynchronous execution callback and return its result by default', async (): Promise => { + const policy = new FallbackPolicy(); + const result = await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the synchronous execution callback and throw its exceptions by default', async (): Promise => { + const policy = new FallbackPolicy(); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should run the asynchronous execution callback and throw its exceptions by default', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + + try { + await policy.execute((): unknown => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should fallback on a given (i.e. wrong) result, then return the result of the synchronous fallback function', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.fallback((): string => { + return 'Diplomatiq is the coolest.'; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is the coolest.'); + }); + + it('should fallback on a given (i.e. wrong) result, then return the result of the asynchronous fallback function', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is the coolest.'; + }, + ); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is the coolest.'); + }); + + it('should not fallback on a not given (i.e. right) result, but return the result', async (): Promise => { + const policy = new FallbackPolicy(); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should fallback along a synchronous fallback chain sequentially while it produces the given (i.e. wrong) result until the first not given (i.e. good) result is produced', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is cool.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is cool.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is the coolest.'; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is the coolest.'); + expect(fallbacksExecuted).to.equal(3); + }); + + it('should fallback along an asynchronous fallback chain sequentially while it produces the given (i.e. wrong) result, until the first not given (i.e. good) result is produced', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is cool.'; + }, + ); + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is cool.'; + }, + ); + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is the coolest.'; + }, + ); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is the coolest.'); + expect(fallbacksExecuted).to.equal(3); + }); + + it('should fallback on multiple given (i.e. wrong) results if any of them occurs', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.handleResult((r: string): boolean => r === 'Diplomatiq is the worst.'); + + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is the worst.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is not cool.'; + }); + + expect(fallbacksExecuted).to.equal(3); + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should fallback on any result until an exception is thrown', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleResult((): boolean => true); + + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is cool.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is cool.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + throw new Error('TestException'); + }); + + try { + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(fallbacksExecuted).to.equal(3); + }); + + it('should fallback on a given exception, then return the result of the synchronous fallback function', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.fallback((): string => { + return 'Diplomatiq is cool.'; + }); + + const result = await policy.execute((): string => { + throw new Error('TestException'); + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should fallback on a given exception, then return the result of the asynchronous fallback function', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); + + const result = await policy.execute((): string => { + throw new Error('TestException'); + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should not fallback on a not given exception, but throw the exception', async (): Promise => { + const policy = new FallbackPolicy(); + policy.handleException((e: unknown): boolean => (e as Error).message === 'AnotherException'); + + try { + await policy.execute((): void => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should fallback along a synchronous fallback chain sequentially while it throws the given exception result until the first not given exception is thrown', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + throw new Error('TestException'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + throw new Error('TestException'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + + const result = await policy.execute((): string => { + throw new Error('TestException'); + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(3); + }); + + it('should fallback along an asynchronous fallback chain sequentially while it throws the given exception result until the first not given exception is thrown', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + throw new Error('TestException'); + }, + ); + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + throw new Error('TestException'); + }, + ); + policy.fallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }, + ); + + const result = await policy.execute((): string => { + throw new Error('TestException'); + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(3); + }); + + it('should fallback on multiple given exceptions if any of them occurs', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleException((e: unknown): boolean => (e as Error).message === 'ExceptionOne'); + policy.handleException((e: unknown): boolean => (e as Error).message === 'ExceptionTwo'); + policy.handleException((e: unknown): boolean => (e as Error).message === 'ExceptionThree'); + + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + throw new Error('ExceptionTwo'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + throw new Error('ExceptionThree'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + + const result = await policy.execute((): string => { + throw new Error('ExceptionOne'); + }); + + expect(fallbacksExecuted).to.equal(3); + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should fallback on any exception until a result is returned', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + + policy.handleException((): boolean => true); + + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + throw new Error('ExceptionTwo'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + throw new Error('ExceptionThree'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + + const result = await policy.execute((): string => { + throw new Error('ExceptionOne'); + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(3); + }); + + it('should throw FallbackChainExhaustedException if falling back on result and there are no (more) links on the fallback chain', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + policy.handleResult((): boolean => true); + + try { + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof FallbackChainExhaustedException).to.be.true; + } + }); + + it('should throw FallbackChainExhaustedException if falling back on exception and there are no (more) links on the fallback chain', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + policy.handleException((): boolean => true); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof FallbackChainExhaustedException).to.be.true; + } + }); + + it('should run onFallbackFn with result filled on fallback, before the fallback', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is cool.'; + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted); + + onFallbackExecuted++; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is bad.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(1); + expect(onFallbackExecuted).to.equal(1); + }); + + it('should run onFallbackFn with result filled on fallback, every time before a fallback', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted); + onFallbackExecuted++; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is bad.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(3); + expect(onFallbackExecuted).to.equal(3); + }); + + it('should run onFallbackFn with error filled on fallback, before the fallback', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is cool.'; + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal(undefined); + expect((error as Error).message).to.equal('TestException'); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted); + + onFallbackExecuted++; + }); + + const result = await policy.execute((): string => { + throw new Error('TestException'); + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(1); + expect(onFallbackExecuted).to.equal(1); + }); + + it('should run onFallbackFn with error filled on fallback, every time before a fallback', async (): Promise< + void + > => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + + policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + throw new Error('TestException'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + throw new Error('TestException'); + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal(undefined); + expect((error as Error).message).to.equal('TestException'); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted); + onFallbackExecuted++; + }); + + const result = await policy.execute((): string => { + throw new Error('TestException'); + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(3); + expect(onFallbackExecuted).to.equal(3); + }); + + it('should not run onFallbackFn if no fallback happened', async (): Promise => { + const policy = new FallbackPolicy(); + + let onFallbackExecuted = 0; + + policy.onFallback((): void => { + onFallbackExecuted++; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(onFallbackExecuted).to.equal(0); + }); + + it('should await an asynchronous onFallbackFn before fallback', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is cool.'; + }); + policy.onFallback( + async ( + result: string | undefined, + error: unknown | undefined, + // eslint-disable-next-line @typescript-eslint/require-await + ): Promise => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted); + onFallbackExecuted++; + }, + ); + + const result = await policy.execute((): string => { + return 'Diplomatiq is bad.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(1); + expect(onFallbackExecuted).to.equal(1); + }); + + it('should run multiple synchronous onFallbackFns sequentially on fallback', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3); + onFallbackExecuted++; + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 1); + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 1); + onFallbackExecuted++; + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 2); + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 2); + onFallbackExecuted++; + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 3); + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is bad.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(3); + expect(onFallbackExecuted).to.equal(9); + }); + + it('should run multiple asynchronous onFallbackFns sequentially on fallback', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + policy.onFallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (result: string | undefined, error: unknown | undefined): Promise => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3); + onFallbackExecuted++; + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 1); + }, + ); + policy.onFallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (result: string | undefined, error: unknown | undefined): Promise => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 1); + onFallbackExecuted++; + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 2); + }, + ); + policy.onFallback( + // eslint-disable-next-line @typescript-eslint/require-await + async (result: string | undefined, error: unknown | undefined): Promise => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 2); + onFallbackExecuted++; + expect(onFallbackExecuted).to.equal(fallbacksExecuted * 3 + 3); + }, + ); + + const result = await policy.execute((): string => { + return 'Diplomatiq is bad.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(fallbacksExecuted).to.equal(3); + expect(onFallbackExecuted).to.equal(9); + }); + + it('should run onFinallyFn after all execution and fallbacks if fallback happened', async (): Promise => { + const policy = new FallbackPolicy(); + + let fallbacksExecuted = 0; + let onFallbackExecuted = 0; + let onFinallyExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(0); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(1); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(1); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(2); + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + expect(fallbacksExecuted).to.equal(2); + fallbacksExecuted++; + expect(fallbacksExecuted).to.equal(3); + return 'Diplomatiq is cool.'; + }); + policy.onFallback((result: string | undefined, error: unknown | undefined): void => { + expect(result).to.equal('Diplomatiq is bad.'); + expect(error).to.equal(undefined); + + expect(onFallbackExecuted).to.equal(fallbacksExecuted); + onFallbackExecuted++; + }); + policy.onFinally((): void => { + onFinallyExecuted++; + + expect(fallbacksExecuted).to.equal(3); + expect(onFallbackExecuted).to.equal(3); + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is bad.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + + expect(fallbacksExecuted).to.equal(3); + expect(onFallbackExecuted).to.equal(3); + expect(onFinallyExecuted).to.equal(1); + }); + + it('should run onFinallyFn after the execution if no fallback happened', async (): Promise => { + const policy = new FallbackPolicy(); + + let onFinallyExecuted = 0; + + policy.onFinally((): void => { + onFinallyExecuted++; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(onFinallyExecuted).to.equal(1); + }); + + it('should run multiple synchronous onFinallyFns sequentially', async (): Promise => { + const policy = new FallbackPolicy(); + + let onFinallyExecuted = 0; + + policy.onFinally((): void => { + expect(onFinallyExecuted).to.equal(0); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(1); + }); + policy.onFinally((): void => { + expect(onFinallyExecuted).to.equal(1); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(2); + }); + policy.onFinally((): void => { + expect(onFinallyExecuted).to.equal(2); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(3); + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(onFinallyExecuted).to.equal(3); + }); + + it('should run multiple asynchronous onFinallyFns sequentially', async (): Promise => { + const policy = new FallbackPolicy(); + + let onFinallyExecuted = 0; + + policy.onFinally( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onFinallyExecuted).to.equal(0); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(1); + }, + ); + policy.onFinally( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onFinallyExecuted).to.equal(1); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(2); + }, + ); + policy.onFinally( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onFinallyExecuted).to.equal(2); + onFinallyExecuted++; + expect(onFinallyExecuted).to.equal(3); + }, + ); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(onFinallyExecuted).to.equal(3); + }); + + it('should run onFinallyFn once, regardless of how many link the fallback chain has', async (): Promise => { + const policy = new FallbackPolicy(); + + let onFinallyExecuted = 0; + + policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.fallback((): string => { + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + return 'Diplomatiq is bad.'; + }); + policy.fallback((): string => { + return 'Diplomatiq is cool.'; + }); + policy.onFinally((): void => { + onFinallyExecuted++; + }); + + const result = await policy.execute((): string => { + return 'Diplomatiq is bad.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + expect(onFinallyExecuted).to.equal(1); + }); + + it('should not allow to set fallback during execution', (): void => { + const policy = new FallbackPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.fallback((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to set onFallbackFns during execution', (): void => { + const policy = new FallbackPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.onFallback((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onFinallyFns during execution', (): void => { + const policy = new FallbackPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.onFinally((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { + const policy = new FallbackPolicy(); + + await Promise.all([ + ...new Array(100).fill(undefined).map( + async (): Promise => + policy.execute( + async (): Promise => + new Promise((resolve): void => { + setTimeout(resolve, 20); + }), + ), + ), + ...new Array(100).fill(undefined).map((): void => { + try { + policy.fallback((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ...new Array(100).fill(undefined).map((): void => { + try { + policy.onFallback((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ...new Array(100).fill(undefined).map((): void => { + try { + policy.onFinally((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ]); + }); +}); diff --git a/test/specs/retryPolicy.test.ts b/test/specs/retryPolicy.test.ts index 15ae45b..ee49373 100644 --- a/test/specs/retryPolicy.test.ts +++ b/test/specs/retryPolicy.test.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { RetryPolicy } from '../../src/policies/reactive/retryPolicy/retryPolicy'; describe('RetryPolicy', (): void => { - it('should run the execution callback and return its result by default', async (): Promise => { + it('should run the synchronous execution callback and return its result by default', async (): Promise => { const policy = new RetryPolicy(); const result = await policy.execute((): string => { return 'Diplomatiq is cool.'; @@ -11,16 +11,19 @@ describe('RetryPolicy', (): void => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should run the async execution callback and return its result by default', async (): Promise => { + it('should run the asynchronous execution callback and return its result by default', async (): Promise => { const policy = new RetryPolicy(); - const result = await policy.execute((): string => { - return 'Diplomatiq is cool.'; - }); + const result = await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); expect(result).to.equal('Diplomatiq is cool.'); }); - it('should run the execution callback and throw its exceptions by default', async (): Promise => { + it('should run the synchronous execution callback and throw its exceptions by default', async (): Promise => { const policy = new RetryPolicy(); try { @@ -33,13 +36,18 @@ describe('RetryPolicy', (): void => { } }); - it('should run the async execution callback and throw its exceptions by default', async (): Promise => { + it('should run the asynchronous execution callback and throw its exceptions by default', async (): Promise< + void + > => { const policy = new RetryPolicy(); try { - await policy.execute((): unknown => { - throw new Error('TestException'); - }); + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new Error('TestException'); + }, + ); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('TestException'); @@ -355,6 +363,24 @@ describe('RetryPolicy', (): void => { expect(onRetryExecuted).to.equal(1); }); + it('should not run onRetryFn if not retried', async (): Promise => { + const policy = new RetryPolicy(); + + let executed = 0; + let onRetryExecuted = 0; + + policy.onRetry((): void => { + onRetryExecuted++; + }); + + await policy.execute((): void => { + executed++; + }); + + expect(executed).to.equal(1); + expect(onRetryExecuted).to.equal(0); + }); + it('should run onRetryFn with error filled on retry, before the retried execution thrice when setting retryCount to 3', async (): Promise< void > => { @@ -388,7 +414,7 @@ describe('RetryPolicy', (): void => { expect(onRetryExecuted).to.equal(3); }); - it('should await an async onRetryFn before retrying', async (): Promise => { + it('should await an asynchronous onRetryFn before retrying', async (): Promise => { const policy = new RetryPolicy(); let executed = 0; @@ -588,7 +614,7 @@ describe('RetryPolicy', (): void => { expect(onFinallyExecuted).to.equal(1); }); - it('should run multiple onFinallyFns sequentially', async (): Promise => { + it('should run multiple synchronous onFinallyFns sequentially', async (): Promise => { const policy = new RetryPolicy(); let executed = 0; @@ -620,7 +646,7 @@ describe('RetryPolicy', (): void => { expect(onFinallyExecuted).to.equal(3); }); - it('should run multiple async onFinallyFns sequentially', async (): Promise => { + it('should run multiple asynchronous onFinallyFns sequentially', async (): Promise => { const policy = new RetryPolicy(); let executed = 0; @@ -695,7 +721,7 @@ describe('RetryPolicy', (): void => { }); expect(executionTimestamps[1] - executionTimestamps[0]) - .to.be.at.least(100) + .to.be.at.least(99) .and.to.be.at.most(110); }); @@ -715,10 +741,10 @@ describe('RetryPolicy', (): void => { }); expect(executionTimestamps[1] - executionTimestamps[0]) - .to.be.at.least(100) + .to.be.at.least(99) .and.to.be.at.most(110); expect(executionTimestamps[2] - executionTimestamps[1]) - .to.be.at.least(200) + .to.be.at.least(198) .and.to.be.at.most(210); }); diff --git a/test/specs/timeoutPolicy.test.ts b/test/specs/timeoutPolicy.test.ts index 5259d86..0261f37 100644 --- a/test/specs/timeoutPolicy.test.ts +++ b/test/specs/timeoutPolicy.test.ts @@ -243,6 +243,40 @@ describe('TimeoutPolicy', (): void => { } }); + it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { + const policy = new TimeoutPolicy(); + + await Promise.all([ + ...new Array(100).fill(undefined).map( + async (): Promise => + policy.execute( + async (): Promise => + new Promise((resolve): void => { + setTimeout(resolve, 20); + }), + ), + ), + ...new Array(100).fill(undefined).map((): void => { + try { + policy.timeoutAfter(1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ...new Array(100).fill(undefined).map((): void => { + try { + policy.onTimeout((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }), + ]); + }); + it('should throw error when setting timeoutAfter to 0', (): void => { const policy = new TimeoutPolicy(); From 045029c68bf4b5149d12cb404cd98169faec47f8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 21:08:44 +0000 Subject: [PATCH 119/136] chore: bump ts-node from 8.6.2 to 8.7.0 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.6.2 to 8.7.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.6.2...v8.7.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e310e5..159b40e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4894,9 +4894,9 @@ "dev": true }, "ts-node": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.6.2.tgz", - "integrity": "sha512-4mZEbofxGqLL2RImpe3zMJukvEvcO1XP8bj8ozBPySdCUXEcU5cIRwR0aM3R+VoZq7iXc8N86NC0FspGRqP4gg==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.7.0.tgz", + "integrity": "sha512-s659CsHrsxaRVDEleuOkGvbsA0rWHtszUNEt1r0CgAFN5ZZTQtDzpsluS7W5pOGJIa1xZE8R/zK4dEs+ldFezg==", "dev": true, "requires": { "arg": "^4.1.0", diff --git a/package.json b/package.json index 40fe1aa..e14cf46 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "nyc": "^15.0.0", "prettier": "^1.19.1", "source-map-support": "^0.5.16", - "ts-node": "^8.6.2", + "ts-node": "^8.7.0", "typescript": "^3.8.3" }, "files": [ From 0337b789fa26d169ef9a4ac9750acdba0f708cbc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2020 07:16:36 +0000 Subject: [PATCH 120/136] chore: bump @types/node from 13.9.1 to 13.9.2 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.1 to 13.9.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 159b40e..dfabaf5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -540,9 +540,9 @@ "dev": true }, "@types/node": { - "version": "13.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz", - "integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==", + "version": "13.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.2.tgz", + "integrity": "sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index e14cf46..a9d1152 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@commitlint/travis-cli": "^8.3.5", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", - "@types/node": "^13.9.1", + "@types/node": "^13.9.2", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.2", From 794047d3d103535ac7af627b5a2001bb638276df Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2020 02:08:56 +0000 Subject: [PATCH 121/136] chore: bump ts-node from 8.7.0 to 8.8.1 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.7.0 to 8.8.1. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v8.7.0...v8.8.1) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index dfabaf5..c8c4737 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4894,9 +4894,9 @@ "dev": true }, "ts-node": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.7.0.tgz", - "integrity": "sha512-s659CsHrsxaRVDEleuOkGvbsA0rWHtszUNEt1r0CgAFN5ZZTQtDzpsluS7W5pOGJIa1xZE8R/zK4dEs+ldFezg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.8.1.tgz", + "integrity": "sha512-10DE9ONho06QORKAaCBpPiFCdW+tZJuY/84tyypGtl6r+/C7Asq0dhqbRZURuUlLQtZxxDvT8eoj8cGW0ha6Bg==", "dev": true, "requires": { "arg": "^4.1.0", diff --git a/package.json b/package.json index a9d1152..a6491f7 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "nyc": "^15.0.0", "prettier": "^1.19.1", "source-map-support": "^0.5.16", - "ts-node": "^8.7.0", + "ts-node": "^8.8.1", "typescript": "^3.8.3" }, "files": [ From 1351ea152702bed1ea7a3ed381de807309019e78 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Thu, 19 Mar 2020 21:25:37 +0100 Subject: [PATCH 122/136] feat: Implement CircuitBreakerPolicy Closes #193. --- README.md | 267 +++- package-lock.json | 131 ++ package.json | 4 +- src/main.ts | 20 + .../proactive/timeoutPolicy/onTimeoutFn.ts | 1 + .../proactive/timeoutPolicy/timeoutPolicy.ts | 8 +- .../brokenCircuitException.ts | 1 + .../circuitBreakerPolicy.ts | 252 ++++ .../circuitBreakerPolicy/circuitState.ts | 1 + .../isolatedCircuitException.ts | 3 + .../onAttemptingCloseFn.ts | 1 + .../circuitBreakerPolicy/onCloseFn.ts | 1 + .../circuitBreakerPolicy/onIsolateFn.ts | 1 + .../reactive/circuitBreakerPolicy/onOpenFn.ts | 1 + .../reactive/fallbackPolicy/fallbackPolicy.ts | 5 +- src/policies/reactive/reactivePolicy.ts | 8 +- .../reactive/retryPolicy/retryPolicy.ts | 17 +- test/specs/circuitBreakerPolicy.test.ts | 1252 +++++++++++++++++ test/specs/fallbackPolicy.test.ts | 191 ++- test/specs/retryPolicy.test.ts | 343 +++-- test/specs/timeoutPolicy.test.ts | 88 +- 21 files changed, 2334 insertions(+), 262 deletions(-) create mode 100644 src/policies/proactive/timeoutPolicy/onTimeoutFn.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/brokenCircuitException.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/circuitState.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/isolatedCircuitException.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/onAttemptingCloseFn.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/onCloseFn.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/onIsolateFn.ts create mode 100644 src/policies/reactive/circuitBreakerPolicy/onOpenFn.ts create mode 100644 test/specs/circuitBreakerPolicy.test.ts diff --git a/README.md b/README.md index 5541123..b325d1e 100644 --- a/README.md +++ b/README.md @@ -115,10 +115,11 @@ Resily offers **reactive** and **proactive** policies: #### Reactive policies summary -| Policy | What does it claim? | How does it work? | -| ------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | -| [**RetryPolicy**](#retrypolicy) | Many faults are transient and will not occur again after a delay. | Allows configuring automatic retries on specified conditions. | -| [**FallbackPolicy**](#fallbackpolicy) | Failures happen, and we can prepare for them. | Allows configuring substitute values or automated fallback actions. | +| Policy | What does it claim? | How does it work? | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**RetryPolicy**](#retrypolicy) | Many faults are transient and will not occur again after a delay. | Allows configuring automatic retries on specified conditions. | +| [**FallbackPolicy**](#fallbackpolicy) | Failures happen, and we can prepare for them. | Allows configuring substitute values or automated fallback actions. | +| [**CircuitBreakerPolicy**](#circuitbreakerpolicy) | Systems faulting under heavy load can recover easier without even more load — in these cases it's better to fail fast than to keep callers on hold for a long time. | If there are more consecutive faulty responses than the configured number, it breaks the circuit (blocks the executions) for a specified time period. | #### Proactive policies summary @@ -134,18 +135,18 @@ Every reactive policy extends the `ReactivePolicy` class, which means they can b const policy = … // any reactive policy // if the executed code returns 5, the policy will react -policy.handleResult(r => r === 5); +policy.reactOnResult(r => r === 5); -// will be handled +// will react await policy.execute(() => 5); -// will be handled +// will react await policy.execute(async () => 5); -// will not be handled +// will not react await policy.execute(() => 2); -// will not be handled +// will not react await policy.execute(async () => 2); ``` @@ -153,83 +154,83 @@ await policy.execute(async () => 2); const policy = … // any reactive policy // if the executed code throws a ConcurrentAccessException, the policy will react -policy.handleException(e => e instanceof ConcurrentAccessException); +policy.reactOnException(e => e instanceof ConcurrentAccessException); -// will be handled +// will react await policy.execute(() => { throw new ConcurrentAccessException(); }); -// will be handled +// will react await policy.execute(async () => { throw new ConcurrentAccessException(); }); -// will not be handled +// will not react await policy.execute(() => { throw new OutOfRangeException(); }); -// will not be handled +// will not react await policy.execute(async () => { throw new OutOfRangeException(); }); ``` -If the policy is configured to handle multiple kinds of results or exceptions, it will react if any of them occurs: +If the policy is configured to react on multiple kinds of results or exceptions, it will react if any of them occurs: ```typescript const policy = … // any reactive policy -policy.handleResult(r => r === 5); -policy.handleResult(r => r === 7); -policy.handleException(e => e instanceof ConcurrentAccessException); -policy.handleException(e => e instanceof InvalidArgumentException); +policy.reactOnResult(r => r === 5); +policy.reactOnResult(r => r === 7); +policy.reactOnException(e => e instanceof ConcurrentAccessException); +policy.reactOnException(e => e instanceof InvalidArgumentException); -// will be handled +// will react await policy.execute(() => 5); -// will be handled +// will react await policy.execute(async () => 5); -// will be handled +// will react await policy.execute(() => 7); -// will be handled +// will react await policy.execute(async () => 7); -// will be handled +// will react await policy.execute(() => { throw new ConcurrentAccessException(); }); -// will be handled +// will react await policy.execute(async () => { throw new ConcurrentAccessException(); }); -// will be handled +// will react await policy.execute(() => { throw new InvalidArgumentException(); }); -// will be handled +// will react await policy.execute(async () => { throw new InvalidArgumentException(); }); -// will not be handled +// will not react await policy.execute(() => 2); -// will not be handled +// will not react await policy.execute(async () => 2); -// will not be handled +// will not react await policy.execute(() => { throw new OutOfRangeException(); }); -// will not be handled +// will not react await policy.execute(async () => { throw new OutOfRangeException(); }); @@ -241,17 +242,17 @@ You can configure the policy to react on any result and/or to any exception: const policy = … // any reactive policy // react on any result -policy.handleResult(() => true); +policy.reactOnResult(() => true); // react on any exception -policy.handleException(() => true); +policy.reactOnException(() => true); ``` #### RetryPolicy `RetryPolicy` claims that many faults are transient and will not occur again after a delay. It allows configuring automatic retries on specified conditions. -Since `RetryPolicy` is a reactive policy, you can configure the policy to retry the execution on specific results or exceptions with `handleResult` and `handleException`. See the [Reactive policies](#reactive-policies) section for details. +Since `RetryPolicy` is a reactive policy, you need to configure the policy to retry the execution on specific results or exceptions with `reactOnResult` and `reactOnException`. See the [Reactive policies](#reactive-policies) section for details. Configure how many retries you need or retry forever: @@ -405,6 +406,8 @@ const jitteredBackoff = BackoffStrategyFactory.jitteredBackoff(1, 100, true, ran Perform certain actions after the execution and all retries finished: ```typescript +import { RetryPolicy } from '@diplomatiq/resily'; + // the wrapped method is supposed to return a string const policy = new RetryPolicy(); @@ -432,7 +435,7 @@ policy.onFinally(() => { `FallbackPolicy` claims that failures happen, and we can prepare for them. It allows configuring substitute values or automated fallback actions. -Since `FallbackPolicy` is a reactive policy, you can configure the policy to fallback along its fallback chain on specific results or exceptions with `handleResult` and `handleException`. See the [Reactive policies](#reactive-policies) section for details. +Since `FallbackPolicy` is a reactive policy, you need to configure the policy to fallback along its fallback chain on specific results or exceptions with `reactOnResult` and `reactOnException`. See the [Reactive policies](#reactive-policies) section for details. Configure the fallback chain: @@ -497,6 +500,8 @@ policy.onFallback(() => { Perform certain actions after the execution and all fallbacks finished: ```typescript +import { FallbackPolicy } from '@diplomatiq/resily'; + // the wrapped method and its fallbacks are supposed to return a string const policy = new FallbackPolicy(); @@ -520,6 +525,186 @@ policy.onFinally(() => { }); ``` +#### CircuitBreakerPolicy + +`CircuitBreakerPolicy` claims that systems faulting under heavy load can recover easier without even more load — in these cases it's better to fail fast than to keep callers on hold for a long time. + +If there are more consecutive faulty responses than the configured number, it breaks the circuit (blocks the executions) for a specified time period. + +Since `CircuitBreakerPolicy` is a reactive policy, you need to configure the policy to break the circuit on specific results or exceptions with `reactOnResult` and `reactOnException`. See the [Reactive policies](#reactive-policies) section for details. + +The `CircuitBreakerPolicy` has 4 states, and works as follows: + +`Closed` + +- This is the initial state. +- When closed, the circuit allows executions, while measuring reactive results and exceptions. All results (reactive or not) are returned and all exceptions (reactive or not) are rethrown. +- When encountering altogether `numberOfConsecutiveReactionsBeforeCircuitBreak` reactive results or exceptions _consecutively_, the circuit transitions to `Open` state, meaning the circuit is broken. + +`Open` + +- While the circuit is in `Open` state, no action wrapped into the policy gets executed. Every call will fail fast with a `BrokenCircuitException`. +- The circuit remains open for the specified duration. After the duration elapses, the subsequent execution call transitions the circuit to `AttemptingClose` state. + +`AttemptingClose` + +- As the name implies, this state is an attempt to close the circuit. +- This is a temporary state of the circuit, existing only between the subsequent execution call to the circuit after the break duration elapsed in `Open` state, and the actual execution of the wrapped method. +- The next circuit state is determined by the result or exception produced by the executed method. + + - If the result or exception is reactive to the policy, the circuit transitions back to `Open` state for the specified circuit break duration. + - If the result or exception is not reactive to the policy, the circuit transitions to `Closed` state. + +`Isolated` + +- You can manually break the circuit by calling `policy.isolate()`, from any state. This transitions the circuit to `Isolated` state. +- While the circuit is in `Isolated` state, no action wrapped into the policy gets executed. Every call will fail fast with an `IsolatedCircuitException`. +- The circuit remains in `Isolated` state until `policy.reset()` is called. + +Configure how many consecutive reactions should break the circuit: + +```typescript +import { CircuitBreakerPolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new CircuitBreakerPolicy(); + +// break the circuit after encountering 3 reactive results/exceptions consecutively +policy.breakAfter(3); + +// this overwrites the previous value +policy.breakAfter(5); +``` + +Configure how long the circuit should be broken: + +```typescript +import { CircuitBreakerPolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new CircuitBreakerPolicy(); + +// break the circuit for 5000 ms +policy.breakFor(5000); + +// this overwrites the previous value +policy.breakFor(20000); +``` + +Manage the circuit manually: + +```typescript +import { CircuitBreakerPolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new CircuitBreakerPolicy(); + +// break the circuit manually - it will be open indefinitely +await policy.isolate(); + +// get the circuit's current state +const state = policy.getCircuitState(); +// 'Closed' | 'Open' | 'AttemptingClose' | 'Isolated' + +// reset the circuit after isolating - it will close +if (state === 'Isolated') { + await policy.reset(); +} +``` + +Perform actions on state transitions: + +```typescript +import { CircuitBreakerPolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new CircuitBreakerPolicy(); +``` + +```typescript +policy.onClose( + // onCloseFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onCloseFns, they will run sequentially +policy.onClose(async () => { + // this will be awaited first +}); +policy.onClose(async () => { + // then this will be awaited +}); + +// errors thrown by an onCloseFn will be caught and ignored +policy.onClose(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +```typescript +policy.onOpen( + // onOpenFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onOpenFns, they will run sequentially +policy.onOpen(async () => { + // this will be awaited first +}); +policy.onOpen(async () => { + // then this will be awaited +}); + +// errors thrown by an onOpenFn will be caught and ignored +policy.onOpen(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +```typescript +policy.onAttemptingClose( + // onAttemptingCloseFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onAttemptingCloseFns, they will run sequentially +policy.onAttemptingClose(async () => { + // this will be awaited first +}); +policy.onAttemptingClose(async () => { + // then this will be awaited +}); + +// errors thrown by an onAttemptingCloseFn will be caught and ignored +policy.onAttemptingClose(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +```typescript +policy.onIsolate( + // onIsolateFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onIsolateFns, they will run sequentially +policy.onIsolate(async () => { + // this will be awaited first +}); +policy.onIsolate(async () => { + // then this will be awaited +}); + +// errors thrown by an onIsolateFn will be caught and ignored +policy.onIsolate(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + ### Proactive policies Every proactive policy extends the `ProactivePolicy` class. @@ -539,7 +724,8 @@ On timeout, the promise returned by the policy's `execute` method is rejected wi ```typescript import { TimeoutException, TimeoutPolicy } from '@diplomatiq/resily'; -const policy = new TimeoutPolicy(); +// the wrapped method is supposed to return a string +const policy = new TimeoutPolicy(); try { const result = await policy.execute(async () => { @@ -559,7 +745,8 @@ Configure how long the waiting period should be: ```typescript import { TimeoutPolicy } from '@diplomatiq/resily'; -const policy = new TimeoutPolicy(); +// the wrapped method is supposed to return a string +const policy = new TimeoutPolicy(); policy.timeoutAfter(1000); // timeout after 1000 ms ``` @@ -568,7 +755,8 @@ Perform certain actions on timeout: ```typescript import { TimeoutPolicy } from '@diplomatiq/resily'; -const policy = new TimeoutPolicy(); +// the wrapped method is supposed to return a string +const policy = new TimeoutPolicy(); policy.onTimeout( // onTimeoutFns can be sync or async, they will be awaited async timedOutAfterMs => { @@ -596,7 +784,8 @@ Throwing a `TimeoutException` from the executed method is not a timeout, therefo ```typescript import { TimeoutException, TimeoutPolicy } from '@diplomatiq/resily'; -const policy = new TimeoutPolicy(); +// the wrapped method is supposed to return a string +const policy = new TimeoutPolicy(); let onTimeoutRan = false; policy.onTimeout(() => { diff --git a/package-lock.json b/package-lock.json index c8c4737..2120a62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -509,6 +509,51 @@ "rimraf": "^2.5.2" } }, + "@sinonjs/commons": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.1.tgz", + "integrity": "sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.0.tgz", + "integrity": "sha512-atR1J/jRXvQAb47gfzSK8zavXy7BcpnYq21ALon0U99etu99vsir0trzIO3wpeLtW+LLVY6X7EkfVTbjGSH8Ww==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/formatio": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^5.0.2" + } + }, + "@sinonjs/samsam": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", + "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, "@types/chai": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", @@ -551,6 +596,12 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "@types/sinon": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", + "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { "version": "2.23.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.23.0.tgz", @@ -3350,6 +3401,12 @@ "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, + "just-extend": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", + "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "dev": true + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -3406,6 +3463,12 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, "lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -3716,6 +3779,19 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "nise": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", + "integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, "node-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", @@ -4177,6 +4253,23 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, "path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -4522,6 +4615,44 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "sinon": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.1.tgz", + "integrity": "sha512-iTTyiQo5T94jrOx7X7QLBZyucUJ2WvL9J13+96HMfm2CGoJYbIPqRfl6wgNcqmzk0DI28jeGx5bUTXizkrqBmg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/formatio": "^5.0.1", + "@sinonjs/samsam": "^5.0.3", + "diff": "^4.0.2", + "nise": "^4.0.1", + "supports-color": "^7.1.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", diff --git a/package.json b/package.json index a6491f7..fba77f2 100644 --- a/package.json +++ b/package.json @@ -41,18 +41,20 @@ "devDependencies": { "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", + "@diplomatiq/eslint-config-tslib": "^2.5.0", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^13.9.2", + "@types/sinon": "^7.5.2", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.2", - "@diplomatiq/eslint-config-tslib": "^2.5.0", "esm": "^3.2.25", "husky": "^4.2.3", "mocha": "^7.1.1", "nyc": "^15.0.0", "prettier": "^1.19.1", + "sinon": "^9.0.1", "source-map-support": "^0.5.16", "ts-node": "^8.8.1", "typescript": "^3.8.3" diff --git a/src/main.ts b/src/main.ts index 3b9f08f..43f97b8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,26 @@ +export { RandomGenerator } from './interfaces/randomGenerator'; +export { Policy } from './policies/policy'; +export { ProactivePolicy } from './policies/proactive/proactivePolicy'; +export { ExecutionException } from './policies/proactive/timeoutPolicy/executionException'; +export { OnTimeoutFn } from './policies/proactive/timeoutPolicy/onTimeoutFn'; export { TimeoutException } from './policies/proactive/timeoutPolicy/timeoutException'; export { TimeoutPolicy } from './policies/proactive/timeoutPolicy/timeoutPolicy'; +export { BrokenCircuitException } from './policies/reactive/circuitBreakerPolicy/brokenCircuitException'; +export { CircuitBreakerPolicy } from './policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy'; +export { CircuitState } from './policies/reactive/circuitBreakerPolicy/circuitState'; +export { IsolatedCircuitException } from './policies/reactive/circuitBreakerPolicy/isolatedCircuitException'; +export { OnAttemptingCloseFn } from './policies/reactive/circuitBreakerPolicy/onAttemptingCloseFn'; +export { OnCloseFn } from './policies/reactive/circuitBreakerPolicy/onCloseFn'; +export { OnIsolateFn } from './policies/reactive/circuitBreakerPolicy/onIsolateFn'; +export { OnOpenFn } from './policies/reactive/circuitBreakerPolicy/onOpenFn'; export { FallbackChainExhaustedException } from './policies/reactive/fallbackPolicy/fallbackChainExhaustedException'; +export { FallbackChainLink } from './policies/reactive/fallbackPolicy/fallbackChainLink'; export { FallbackPolicy } from './policies/reactive/fallbackPolicy/fallbackPolicy'; +export { OnFallbackFn } from './policies/reactive/fallbackPolicy/onFallbackFn'; +export { ReactivePolicy } from './policies/reactive/reactivePolicy'; +export { BackoffStrategy } from './policies/reactive/retryPolicy/backoffStrategy'; export { BackoffStrategyFactory } from './policies/reactive/retryPolicy/backoffStrategyFactory'; +export { OnRetryFn } from './policies/reactive/retryPolicy/onRetryFn'; export { RetryPolicy } from './policies/reactive/retryPolicy/retryPolicy'; +export { OnFinallyFn } from './types/onFinallyFn'; +export { Predicate } from './types/predicate'; diff --git a/src/policies/proactive/timeoutPolicy/onTimeoutFn.ts b/src/policies/proactive/timeoutPolicy/onTimeoutFn.ts new file mode 100644 index 0000000..6314a64 --- /dev/null +++ b/src/policies/proactive/timeoutPolicy/onTimeoutFn.ts @@ -0,0 +1 @@ +export type OnTimeoutFn = (timedOutAfter: number) => void | Promise; diff --git a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts index 8b9a8d0..f175794 100644 --- a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts +++ b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts @@ -1,15 +1,13 @@ import { ProactivePolicy } from '../proactivePolicy'; import { ExecutionException } from './executionException'; +import { OnTimeoutFn } from './onTimeoutFn'; import { TimeoutException } from './timeoutException'; export class TimeoutPolicy extends ProactivePolicy { private timeoutMs: number | undefined; - private readonly onTimeoutFns: Array<(timedOutAfter: number) => void | Promise> = []; - private executing = 0; + private readonly onTimeoutFns: OnTimeoutFn[] = []; - public constructor() { - super(); - } + private executing = 0; public timeoutAfter(timeoutMs: number): void { if (!Number.isInteger(timeoutMs)) { diff --git a/src/policies/reactive/circuitBreakerPolicy/brokenCircuitException.ts b/src/policies/reactive/circuitBreakerPolicy/brokenCircuitException.ts new file mode 100644 index 0000000..7ab52b5 --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/brokenCircuitException.ts @@ -0,0 +1 @@ +export class BrokenCircuitException extends Error {} diff --git a/src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts b/src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts new file mode 100644 index 0000000..b0aeb57 --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts @@ -0,0 +1,252 @@ +import { ReactivePolicy } from '../reactivePolicy'; +import { BrokenCircuitException } from './brokenCircuitException'; +import { CircuitState } from './circuitState'; +import { IsolatedCircuitException } from './isolatedCircuitException'; +import { OnAttemptingCloseFn } from './onAttemptingCloseFn'; +import { OnCloseFn } from './onCloseFn'; +import { OnIsolateFn } from './onIsolateFn'; +import { OnOpenFn } from './onOpenFn'; + +export class CircuitBreakerPolicy extends ReactivePolicy { + private numberOfConsecutiveReactionsBeforeCircuitBreak = 1; + private durationOfCircuitBreakMs = 1000; + private readonly onOpenFns: OnOpenFn[] = []; + private readonly onCloseFns: OnCloseFn[] = []; + private readonly onAttemptingCloseFns: OnAttemptingCloseFn[] = []; + private readonly onIsolateFns: OnIsolateFn[] = []; + + private state: CircuitState = 'Closed'; + private lastStateTransition: number = Date.now(); + private consecutiveReactionCounter = 0; + private executing = 0; + + public breakAfter(numberOfConsecutiveReactionsBeforeCircuitBreak: number): void { + if (!Number.isInteger(numberOfConsecutiveReactionsBeforeCircuitBreak)) { + throw new Error('numberOfConsecutiveReactionsBeforeCircuitBreak must be integer'); + } + + if (numberOfConsecutiveReactionsBeforeCircuitBreak <= 0) { + throw new Error('numberOfConsecutiveReactionsBeforeCircuitBreak must be greater than 0'); + } + + if (!Number.isSafeInteger(numberOfConsecutiveReactionsBeforeCircuitBreak)) { + throw new Error('numberOfConsecutiveReactionsBeforeCircuitBreak must be less than or equal to 2^53 - 1'); + } + + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.numberOfConsecutiveReactionsBeforeCircuitBreak = numberOfConsecutiveReactionsBeforeCircuitBreak; + } + + public breakFor(durationOfCircuitBreakMs: number): void { + if (!Number.isInteger(durationOfCircuitBreakMs)) { + throw new Error('durationOfCircuitBreakMs must be integer'); + } + + if (durationOfCircuitBreakMs <= 0) { + throw new Error('durationOfCircuitBreakMs must be greater than 0'); + } + + if (!Number.isSafeInteger(durationOfCircuitBreakMs)) { + throw new Error('durationOfCircuitBreakMs must be less than or equal to 2^53 - 1'); + } + + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.durationOfCircuitBreakMs = durationOfCircuitBreakMs; + } + + public async isolate(): Promise { + await this.transitionState('Isolated'); + } + + public async reset(): Promise { + if (this.state !== 'Isolated') { + throw new Error('cannot reset if not in Isolated state'); + } + + await this.transitionState('Closed'); + } + + public getCircuitState(): CircuitState { + return this.state; + } + + public onClose(onCloseFn: OnCloseFn): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onCloseFns.push(onCloseFn); + } + + public onOpen(onOpenFn: OnOpenFn): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onOpenFns.push(onOpenFn); + } + + public onAttemptingClose(onAttemptingCloseFn: OnAttemptingCloseFn): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onAttemptingCloseFns.push(onAttemptingCloseFn); + } + + public onIsolate(onIsolateFn: OnIsolateFn): void { + if (this.executing > 0) { + throw new Error('cannot modify policy during execution'); + } + + this.onIsolateFns.push(onIsolateFn); + } + + public async execute(fn: () => ResultType | Promise): Promise { + try { + this.executing++; + + await this.attemptClosingIfShould(); + + if (this.state === 'Open') { + throw new BrokenCircuitException(); + } + + if (this.state === 'Isolated') { + throw new IsolatedCircuitException(); + } + + try { + const result = await fn(); + + const isReactiveToResult = await this.isReactiveToResult(result); + if (!isReactiveToResult) { + this.consecutiveReactionCounter = 0; + + if (this.state === 'AttemptingClose') { + await this.transitionState('Closed'); + } + + return result; + } + + if (this.state === 'AttemptingClose') { + await this.transitionState('Open'); + } + + if (this.state === 'Closed') { + this.consecutiveReactionCounter++; + if (this.consecutiveReactionCounter >= this.numberOfConsecutiveReactionsBeforeCircuitBreak) { + await this.transitionState('Open'); + } + } + + return result; + } catch (ex) { + const isReactiveToException = await this.isReactiveToException(ex); + if (!isReactiveToException) { + this.consecutiveReactionCounter = 0; + + if (this.state === 'AttemptingClose') { + await this.transitionState('Closed'); + } + + throw ex; + } + + if (this.state === 'AttemptingClose') { + await this.transitionState('Open'); + } + + if (this.state === 'Closed') { + this.consecutiveReactionCounter++; + if (this.consecutiveReactionCounter >= this.numberOfConsecutiveReactionsBeforeCircuitBreak) { + await this.transitionState('Open'); + } + } + + throw ex; + } + } finally { + this.executing--; + } + } + + private async attemptClosingIfShould(): Promise { + if (this.state !== 'Open') { + return; + } + + const shouldAttemptClosing = Date.now() >= this.lastStateTransition + this.durationOfCircuitBreakMs; + if (shouldAttemptClosing) { + await this.transitionState('AttemptingClose'); + } + } + + private async transitionState(newState: CircuitState): Promise { + switch (newState) { + case 'Closed': { + this.validateTransition(new Set(['AttemptingClose', 'Isolated'])); + for (const onCloseFn of this.onCloseFns) { + try { + await onCloseFn(); + } catch (ex) { + // ignored + } + } + break; + } + + case 'Open': { + this.validateTransition(new Set(['Closed', 'AttemptingClose'])); + for (const onOpenFn of this.onOpenFns) { + try { + await onOpenFn(); + } catch (ex) { + // ignored + } + } + break; + } + + case 'AttemptingClose': { + this.validateTransition(new Set(['Open'])); + for (const onAttemptingCloseFn of this.onAttemptingCloseFns) { + try { + await onAttemptingCloseFn(); + } catch (ex) { + // ignored + } + } + break; + } + + case 'Isolated': { + this.validateTransition(new Set(['Closed', 'Open', 'AttemptingClose'])); + for (const onIsolateFn of this.onIsolateFns) { + try { + await onIsolateFn(); + } catch (ex) { + // ignored + } + } + break; + } + } + + this.state = newState; + this.lastStateTransition = Date.now(); + } + + private validateTransition(validFrom: Set): void { + if (!validFrom.has(this.state)) { + throw new Error('invalid transition'); + } + } +} diff --git a/src/policies/reactive/circuitBreakerPolicy/circuitState.ts b/src/policies/reactive/circuitBreakerPolicy/circuitState.ts new file mode 100644 index 0000000..da6ea2b --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/circuitState.ts @@ -0,0 +1 @@ +export type CircuitState = 'Closed' | 'Open' | 'AttemptingClose' | 'Isolated'; diff --git a/src/policies/reactive/circuitBreakerPolicy/isolatedCircuitException.ts b/src/policies/reactive/circuitBreakerPolicy/isolatedCircuitException.ts new file mode 100644 index 0000000..dbe6709 --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/isolatedCircuitException.ts @@ -0,0 +1,3 @@ +import { BrokenCircuitException } from './brokenCircuitException'; + +export class IsolatedCircuitException extends BrokenCircuitException {} diff --git a/src/policies/reactive/circuitBreakerPolicy/onAttemptingCloseFn.ts b/src/policies/reactive/circuitBreakerPolicy/onAttemptingCloseFn.ts new file mode 100644 index 0000000..accf0dc --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/onAttemptingCloseFn.ts @@ -0,0 +1 @@ +export type OnAttemptingCloseFn = () => void | Promise; diff --git a/src/policies/reactive/circuitBreakerPolicy/onCloseFn.ts b/src/policies/reactive/circuitBreakerPolicy/onCloseFn.ts new file mode 100644 index 0000000..3dcd2dc --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/onCloseFn.ts @@ -0,0 +1 @@ +export type OnCloseFn = () => void | Promise; diff --git a/src/policies/reactive/circuitBreakerPolicy/onIsolateFn.ts b/src/policies/reactive/circuitBreakerPolicy/onIsolateFn.ts new file mode 100644 index 0000000..c9be8ec --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/onIsolateFn.ts @@ -0,0 +1 @@ +export type OnIsolateFn = () => void | Promise; diff --git a/src/policies/reactive/circuitBreakerPolicy/onOpenFn.ts b/src/policies/reactive/circuitBreakerPolicy/onOpenFn.ts new file mode 100644 index 0000000..5fe8f97 --- /dev/null +++ b/src/policies/reactive/circuitBreakerPolicy/onOpenFn.ts @@ -0,0 +1 @@ +export type OnOpenFn = () => void | Promise; diff --git a/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts b/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts index 30c2070..3090efe 100644 --- a/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts +++ b/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts @@ -8,6 +8,7 @@ export class FallbackPolicy extends ReactivePolicy { private readonly fallbackChain: Array> = []; private readonly onFallbackFns: Array> = []; private readonly onFinallyFns: OnFinallyFn[] = []; + private executing = 0; public fallback(fallbackChainLink: FallbackChainLink): void { @@ -46,7 +47,7 @@ export class FallbackPolicy extends ReactivePolicy { try { const result = await executor(); - const shouldFallbackOnResult = await this.isResultHandled(result); + const shouldFallbackOnResult = await this.isReactiveToResult(result); if (!shouldFallbackOnResult) { return result; } @@ -72,7 +73,7 @@ export class FallbackPolicy extends ReactivePolicy { throw ex; } - const shouldFallbackOnException = await this.isExceptionHandled(ex); + const shouldFallbackOnException = await this.isReactiveToException(ex); if (!shouldFallbackOnException) { throw ex; } diff --git a/src/policies/reactive/reactivePolicy.ts b/src/policies/reactive/reactivePolicy.ts index 98bd547..48fb478 100644 --- a/src/policies/reactive/reactivePolicy.ts +++ b/src/policies/reactive/reactivePolicy.ts @@ -6,19 +6,19 @@ export abstract class ReactivePolicy extends Policy { protected resultPredicates: Array> = []; protected exceptionPredicates: Array> = []; - public handleResult(resultPredicate: Predicate): void { + public reactOnResult(resultPredicate: Predicate): void { this.resultPredicates.push(resultPredicate); } - public handleException(exceptionPredicate: Predicate): void { + public reactOnException(exceptionPredicate: Predicate): void { this.exceptionPredicates.push(exceptionPredicate); } - protected async isResultHandled(result: ResultType): Promise { + protected async isReactiveToResult(result: ResultType): Promise { return PredicateChecker.some(result, this.resultPredicates); } - protected async isExceptionHandled(exception: unknown): Promise { + protected async isReactiveToException(exception: unknown): Promise { return PredicateChecker.some(exception, this.exceptionPredicates); } } diff --git a/src/policies/reactive/retryPolicy/retryPolicy.ts b/src/policies/reactive/retryPolicy/retryPolicy.ts index f3a1f66..4af1727 100644 --- a/src/policies/reactive/retryPolicy/retryPolicy.ts +++ b/src/policies/reactive/retryPolicy/retryPolicy.ts @@ -8,11 +8,8 @@ export class RetryPolicy extends ReactivePolicy { private readonly onRetryFns: Array> = []; private backoffStrategy: BackoffStrategy = (): number => 0; private readonly onFinallyFns: OnFinallyFn[] = []; - private executing = 0; - public constructor() { - super(); - } + private executing = 0; public retryCount(retryCount: number): void { if (!Number.isInteger(retryCount)) { @@ -77,7 +74,7 @@ export class RetryPolicy extends ReactivePolicy { try { const result = await fn(); - const shouldRetryOnResult = await this.isResultHandled(result); + const shouldRetryOnResult = await this.isReactiveToResult(result); if (!shouldRetryOnResult) { return result; } @@ -88,7 +85,9 @@ export class RetryPolicy extends ReactivePolicy { } const waitFor = await this.backoffStrategy(currentRetryCount); - await this.waitFor(waitFor); + if (waitFor > 0) { + await this.waitFor(waitFor); + } for (const onRetryFn of this.onRetryFns) { try { @@ -100,7 +99,7 @@ export class RetryPolicy extends ReactivePolicy { continue; } catch (ex) { - const shouldRetryOnException = await this.isExceptionHandled(ex); + const shouldRetryOnException = await this.isReactiveToException(ex); if (!shouldRetryOnException) { throw ex; } @@ -111,7 +110,9 @@ export class RetryPolicy extends ReactivePolicy { } const waitFor = await this.backoffStrategy(currentRetryCount); - await this.waitFor(waitFor); + if (waitFor > 0) { + await this.waitFor(waitFor); + } for (const onRetryFn of this.onRetryFns) { try { diff --git a/test/specs/circuitBreakerPolicy.test.ts b/test/specs/circuitBreakerPolicy.test.ts new file mode 100644 index 0000000..35e6f8a --- /dev/null +++ b/test/specs/circuitBreakerPolicy.test.ts @@ -0,0 +1,1252 @@ +import { expect } from 'chai'; +import { SinonFakeTimers, useFakeTimers } from 'sinon'; +import { BrokenCircuitException } from '../../src/policies/reactive/circuitBreakerPolicy/brokenCircuitException'; +import { CircuitBreakerPolicy } from '../../src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy'; +import { IsolatedCircuitException } from '../../src/policies/reactive/circuitBreakerPolicy/isolatedCircuitException'; + +describe('CircuitBreakerPolicy', (): void => { + let clock: SinonFakeTimers; + + beforeEach((): void => { + clock = useFakeTimers({ + toFake: ['Date'], + shouldAdvanceTime: false, + }); + }); + + afterEach((): void => { + clock.restore(); + }); + + it('should run the synchronous execution callback and return its result by default', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the asynchronous execution callback and return its result by default', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + const result = await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the synchronous execution callback and throw its exceptions by default', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should run the asynchronous execution callback and throw its exceptions by default', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + + try { + await policy.execute((): unknown => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should break the circuit on encountering a reactive given result once, then hold the circuit broken for 1 second', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + const breakingResult = await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + expect(breakingResult).to.equal('Diplomatiq is broken.'); + + expect(policy.getCircuitState()).to.equal('Open'); + + const checkIntervalMs = 100; + for (let elapsedMs = 0; elapsedMs < 1000; elapsedMs += checkIntervalMs) { + expect(policy.getCircuitState()).to.equal('Open'); + + try { + await policy.execute((): string => { + return 'Is Diplomatiq broken?'; + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof BrokenCircuitException).to.be.true; + } + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(checkIntervalMs); + + expect(policy.getCircuitState()).to.equal('Open'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + const successResult = await policy.execute((): string => { + expect(policy.getCircuitState() === 'AttemptingClose'); + return 'Diplomatiq is cool.'; + }); + expect(successResult).to.equal('Diplomatiq is cool.'); + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should not break the circuit on encountering a non-reactive result', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + const nonBreakingResult1 = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + expect(nonBreakingResult1).to.equal('Diplomatiq is cool.'); + + expect(policy.getCircuitState()).to.equal('Closed'); + + const nonBreakingResult2 = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + expect(nonBreakingResult2).to.equal('Diplomatiq is cool.'); + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should break the circuit on encountering a reactive result 10 consecutive times, then hold the circuit broken for 30 seconds', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + policy.breakAfter(10); + policy.breakFor(30000); + + for (let i = 1; i <= 10; i++) { + const breakingResult = await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + expect(breakingResult).to.equal('Diplomatiq is broken.'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + const checkIntervalMs = 100; + for (let elapsedMs = 0; elapsedMs < 30000; elapsedMs += checkIntervalMs) { + expect(policy.getCircuitState()).to.equal('Open'); + + try { + await policy.execute((): string => { + return 'Is Diplomatiq broken?'; + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof BrokenCircuitException).to.be.true; + } + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(checkIntervalMs); + + expect(policy.getCircuitState()).to.equal('Open'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + const successResult = await policy.execute((): string => { + expect(policy.getCircuitState() === 'AttemptingClose'); + return 'Diplomatiq is cool.'; + }); + expect(successResult).to.equal('Diplomatiq is cool.'); + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should not break the circuit on encountering a non-reactive result 10 consecutive times', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + policy.breakAfter(10); + + for (let i = 1; i <= 10; i++) { + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + expect(result).to.equal('Diplomatiq is cool.'); + } + + expect(policy.getCircuitState()).to.equal('Closed'); + + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + expect(result).to.equal('Diplomatiq is cool.'); + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should break the circuit on encountering multiple reactive results, altogether 10 consecutive times', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is not cool.'); + policy.breakAfter(10); + + for (let i = 1; i <= 5; i++) { + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + } + + expect(policy.getCircuitState()).to.equal('Closed'); + + for (let i = 1; i <= 5; i++) { + await policy.execute((): string => { + return 'Diplomatiq is not cool.'; + }); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + try { + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof BrokenCircuitException).to.be.true; + } + + expect(policy.getCircuitState()).to.equal('Open'); + }); + + it('should break the circuit on encountering a reactive exception once, then hold the circuit broken for 1 second', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + const checkIntervalMs = 100; + for (let elapsedMs = 0; elapsedMs < 1000; elapsedMs += checkIntervalMs) { + expect(policy.getCircuitState()).to.equal('Open'); + + try { + await policy.execute((): string => { + return 'Is Diplomatiq broken?'; + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof BrokenCircuitException).to.be.true; + } + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(checkIntervalMs); + + expect(policy.getCircuitState()).to.equal('Open'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + const successResult = await policy.execute((): string => { + expect(policy.getCircuitState() === 'AttemptingClose'); + return 'Diplomatiq is cool.'; + }); + + expect(successResult).to.equal('Diplomatiq is cool.'); + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should not break the circuit on encountering a non-reactive exception', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + + try { + await policy.execute((): string => { + throw new Error('NotTestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('NotTestException'); + } + + expect(policy.getCircuitState()).to.equal('Closed'); + + try { + await policy.execute((): string => { + throw new Error('NotTestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('NotTestException'); + } + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should break the circuit on encountering a reactive exception 10 consecutive times, then hold the circuit broken for 30 seconds', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.breakAfter(10); + policy.breakFor(30000); + + for (let i = 1; i <= 10; i++) { + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + } + + expect(policy.getCircuitState()).to.equal('Open'); + + const checkIntervalMs = 100; + for (let elapsedMs = 0; elapsedMs < 30000; elapsedMs += checkIntervalMs) { + expect(policy.getCircuitState()).to.equal('Open'); + + try { + await policy.execute((): string => { + return 'Is Diplomatiq broken?'; + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof BrokenCircuitException).to.be.true; + } + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(checkIntervalMs); + + expect(policy.getCircuitState()).to.equal('Open'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + const successResult = await policy.execute((): string => { + expect(policy.getCircuitState() === 'AttemptingClose'); + return 'Diplomatiq is cool.'; + }); + expect(successResult).to.equal('Diplomatiq is cool.'); + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should not break the circuit on encountering a non-reactive exception 10 consecutive times', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.breakAfter(10); + + for (let i = 1; i <= 10; i++) { + try { + await policy.execute((): string => { + throw new Error('NotTestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('NotTestException'); + } + } + + expect(policy.getCircuitState()).to.equal('Closed'); + + try { + await policy.execute((): string => { + throw new Error('NotTestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('NotTestException'); + } + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should break the circuit on encountering multiple reactive exceptions, altogether 10 consecutive times', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'AnotherTestException'); + policy.breakAfter(10); + + for (let i = 1; i <= 5; i++) { + try { + await policy.execute((): void => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + } + + expect(policy.getCircuitState()).to.equal('Closed'); + + for (let i = 1; i <= 5; i++) { + try { + await policy.execute((): void => { + throw new Error('AnotherTestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('AnotherTestException'); + } + } + + expect(policy.getCircuitState()).to.equal('Open'); + + try { + await policy.execute((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof BrokenCircuitException).to.be.true; + } + + expect(policy.getCircuitState()).to.equal('Open'); + }); + + it('should close the circuit after the circuit break duration elapsed, if encountering a non-reactive result', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(1000); + + expect(policy.getCircuitState()).to.equal('Open'); + + await policy.execute((): string => { + expect(policy.getCircuitState() === 'AttemptingClose'); + return 'Diplomatiq is cool.'; + }); + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should not close the circuit after the circuit break duration elapsed, if encountering a reactive result', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(1000); + + expect(policy.getCircuitState()).to.equal('Open'); + + await policy.execute((): string => { + expect(policy.getCircuitState() === 'AttemptingClose'); + return 'Diplomatiq is broken.'; + }); + + expect(policy.getCircuitState()).to.equal('Open'); + }); + + it('should close the circuit after the circuit break duration elapsed, if encountering a non-reactive exception', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(1000); + + expect(policy.getCircuitState()).to.equal('Open'); + + try { + expect(policy.getCircuitState() === 'AttemptingClose'); + await policy.execute((): string => { + throw new Error('NotHandledTestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('NotHandledTestException'); + } + + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should not close the circuit after the circuit break duration elapsed, if encountering a reactive exception', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + + clock.tick(1000); + + expect(policy.getCircuitState()).to.equal('Open'); + + try { + expect(policy.getCircuitState() === 'AttemptingClose'); + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + + expect(policy.getCircuitState()).to.equal('Open'); + }); + + it('should isolate the circuit on calling isolate when closed', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + expect(policy.getCircuitState()).to.equal('Closed'); + await policy.isolate(); + expect(policy.getCircuitState()).to.equal('Isolated'); + }); + + it('should isolate the circuit on calling isolate when open', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((): boolean => true); + await policy.execute((): void => { + // empty + }); + expect(policy.getCircuitState()).to.equal('Open'); + await policy.isolate(); + expect(policy.getCircuitState()).to.equal('Isolated'); + }); + + it('should throw IsolatedCircuitException when the circuit is isolated', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + await policy.isolate(); + + try { + await policy.execute((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof IsolatedCircuitException).to.be.true; + } + }); + + it('should reset the circuit on calling reset when isolated', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + await policy.isolate(); + expect(policy.getCircuitState()).to.equal('Isolated'); + await policy.reset(); + expect(policy.getCircuitState()).to.equal('Closed'); + }); + + it('should not reset the circuit on calling reset when closed', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + expect(policy.getCircuitState()).to.equal('Closed'); + + try { + await policy.reset(); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot reset if not in Isolated state'); + } + }); + + it('should not reset the circuit on calling reset when open', async (): Promise => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((): boolean => true); + await policy.execute((): void => { + // empty + }); + expect(policy.getCircuitState()).to.equal('Open'); + + try { + await policy.reset(); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot reset if not in Isolated state'); + } + }); + + it('should run synchronous onOpenFns sequentially when the circuit transitions to Open state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + let onOpenRun = 0; + policy.onOpen((): void => { + expect(onOpenRun).to.equal(0); + onOpenRun++; + expect(onOpenRun).to.equal(1); + }); + policy.onOpen((): void => { + expect(onOpenRun).to.equal(1); + onOpenRun++; + expect(onOpenRun).to.equal(2); + }); + policy.onOpen((): void => { + expect(onOpenRun).to.equal(2); + onOpenRun++; + expect(onOpenRun).to.equal(3); + }); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + expect(onOpenRun).to.equal(3); + }); + + it('should run asynchronous onOpenFns sequentially when the circuit transitions to Open state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + let onOpenRun = 0; + policy.onOpen( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onOpenRun).to.equal(0); + onOpenRun++; + expect(onOpenRun).to.equal(1); + }, + ); + policy.onOpen( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onOpenRun).to.equal(1); + onOpenRun++; + expect(onOpenRun).to.equal(2); + }, + ); + policy.onOpen( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onOpenRun).to.equal(2); + onOpenRun++; + expect(onOpenRun).to.equal(3); + }, + ); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + expect(onOpenRun).to.equal(3); + }); + + it('should run synchronous onCloseFns sequentially when the circuit transitions to Closed state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + let onCloseRun = 0; + policy.onClose((): void => { + expect(onCloseRun).to.equal(0); + onCloseRun++; + expect(onCloseRun).to.equal(1); + }); + policy.onClose((): void => { + expect(onCloseRun).to.equal(1); + onCloseRun++; + expect(onCloseRun).to.equal(2); + }); + policy.onClose((): void => { + expect(onCloseRun).to.equal(2); + onCloseRun++; + expect(onCloseRun).to.equal(3); + }); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + clock.tick(1000); + + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(onCloseRun).to.equal(3); + }); + + it('should run asynchronous onCloseFns sequentially when the circuit transitions to Closed state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + let onCloseRun = 0; + policy.onClose( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onCloseRun).to.equal(0); + onCloseRun++; + expect(onCloseRun).to.equal(1); + }, + ); + policy.onClose( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onCloseRun).to.equal(1); + onCloseRun++; + expect(onCloseRun).to.equal(2); + }, + ); + policy.onClose( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onCloseRun).to.equal(2); + onCloseRun++; + expect(onCloseRun).to.equal(3); + }, + ); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + clock.tick(1000); + + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(onCloseRun).to.equal(3); + }); + + it('should run synchronous onAttemptingCloseFns sequentially when the circuit transitions to AttemptingClose state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + let onAttemptingCloseRun = 0; + policy.onAttemptingClose((): void => { + expect(onAttemptingCloseRun).to.equal(0); + onAttemptingCloseRun++; + expect(onAttemptingCloseRun).to.equal(1); + }); + policy.onAttemptingClose((): void => { + expect(onAttemptingCloseRun).to.equal(1); + onAttemptingCloseRun++; + expect(onAttemptingCloseRun).to.equal(2); + }); + policy.onAttemptingClose((): void => { + expect(onAttemptingCloseRun).to.equal(2); + onAttemptingCloseRun++; + expect(onAttemptingCloseRun).to.equal(3); + }); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + clock.tick(1000); + + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(onAttemptingCloseRun).to.equal(3); + }); + + it('should run asynchronous onAttemptingCloseFns sequentially when the circuit transitions to AttemptingClose state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is broken.'); + + let onAttemptingCloseRun = 0; + policy.onAttemptingClose( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onAttemptingCloseRun).to.equal(0); + onAttemptingCloseRun++; + expect(onAttemptingCloseRun).to.equal(1); + }, + ); + policy.onAttemptingClose( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onAttemptingCloseRun).to.equal(1); + onAttemptingCloseRun++; + expect(onAttemptingCloseRun).to.equal(2); + }, + ); + policy.onAttemptingClose( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onAttemptingCloseRun).to.equal(2); + onAttemptingCloseRun++; + expect(onAttemptingCloseRun).to.equal(3); + }, + ); + + await policy.execute((): string => { + return 'Diplomatiq is broken.'; + }); + + clock.tick(1000); + + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(onAttemptingCloseRun).to.equal(3); + }); + + it('should run synchronous onIsolateFns sequentially when the circuit transitions to Isolated state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + + let onIsolateRun = 0; + policy.onIsolate((): void => { + expect(onIsolateRun).to.equal(0); + onIsolateRun++; + expect(onIsolateRun).to.equal(1); + }); + policy.onIsolate((): void => { + expect(onIsolateRun).to.equal(1); + onIsolateRun++; + expect(onIsolateRun).to.equal(2); + }); + policy.onIsolate((): void => { + expect(onIsolateRun).to.equal(2); + onIsolateRun++; + expect(onIsolateRun).to.equal(3); + }); + + await policy.isolate(); + + expect(onIsolateRun).to.equal(3); + }); + + it('should run asynchronous onIsolateFns sequentially when the circuit transitions to Isolated state', async (): Promise< + void + > => { + const policy = new CircuitBreakerPolicy(); + + let onIsolateRun = 0; + policy.onIsolate( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onIsolateRun).to.equal(0); + onIsolateRun++; + expect(onIsolateRun).to.equal(1); + }, + ); + policy.onIsolate( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onIsolateRun).to.equal(1); + onIsolateRun++; + expect(onIsolateRun).to.equal(2); + }, + ); + policy.onIsolate( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + expect(onIsolateRun).to.equal(2); + onIsolateRun++; + expect(onIsolateRun).to.equal(3); + }, + ); + + await policy.isolate(); + + expect(onIsolateRun).to.equal(3); + }); + + it('should not allow to set breakAfter during execution', (): void => { + const policy = new CircuitBreakerPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.breakAfter(1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to set breakFor during execution', (): void => { + const policy = new CircuitBreakerPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.breakFor(1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onOpenFns during execution', (): void => { + const policy = new CircuitBreakerPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.onOpen((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onCloseFns during execution', (): void => { + const policy = new CircuitBreakerPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.onClose((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onAttemptingCloseFns during execution', (): void => { + const policy = new CircuitBreakerPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.onAttemptingClose((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it('should not allow to add onIsolateFns during execution', (): void => { + const policy = new CircuitBreakerPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.onIsolate((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }); + + it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { + const policy = new CircuitBreakerPolicy(); + + const attemptPolicyModification = (expectFailure: boolean): void => { + try { + policy.breakAfter(1); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.breakFor(1000); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onClose((): void => { + // empty + }); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onOpen((): void => { + // empty + }); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onAttemptingClose((): void => { + // empty + }); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onIsolate((): void => { + // empty + }); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }; + + const executionResolverAddedDeferreds: Array<{ + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + }> = new Array(100).fill(undefined).map((): { + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + } => { + let resolverAddedResolver!: () => void; + const resolverAddedPromise = new Promise((resolve): void => { + resolverAddedResolver = resolve; + }); + + return { + resolverAddedPromise, + resolverAddedResolver, + }; + }); + + const executionResolvers: Array<() => void> = []; + + attemptPolicyModification(false); + + for (let i = 0; i < 100; i++) { + policy.execute( + // eslint-disable-next-line no-loop-func + async (): Promise => { + await new Promise((resolve): void => { + executionResolvers.push(resolve); + executionResolverAddedDeferreds[i].resolverAddedResolver(); + }); + }, + ); + + await executionResolverAddedDeferreds[i].resolverAddedPromise; + expect(executionResolvers.length).to.equal(i + 1); + + attemptPolicyModification(true); + } + + for (let i = 0; i < 100; i++) { + executionResolvers[i](); + attemptPolicyModification(true); + } + + attemptPolicyModification(false); + }); + + it('should throw error when setting numberOfConsecutiveReactionsBeforeCircuitBreak to 0', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakAfter(0); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal( + 'numberOfConsecutiveReactionsBeforeCircuitBreak must be greater than 0', + ); + } + }); + + it('should throw error when setting numberOfConsecutiveReactionsBeforeCircuitBreak to <0', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakAfter(-1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal( + 'numberOfConsecutiveReactionsBeforeCircuitBreak must be greater than 0', + ); + } + }); + + it('should throw error when setting numberOfConsecutiveReactionsBeforeCircuitBreak to a non-integer', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakAfter(0.1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('numberOfConsecutiveReactionsBeforeCircuitBreak must be integer'); + } + }); + + it('should throw error when setting numberOfConsecutiveReactionsBeforeCircuitBreak to a non-safe integer', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakAfter(2 ** 53); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal( + 'numberOfConsecutiveReactionsBeforeCircuitBreak must be less than or equal to 2^53 - 1', + ); + } + }); + + it('should throw error when setting durationOfCircuitBreakMs to 0', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakFor(0); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('durationOfCircuitBreakMs must be greater than 0'); + } + }); + + it('should throw error when setting durationOfCircuitBreakMs to <0', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakFor(-1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('durationOfCircuitBreakMs must be greater than 0'); + } + }); + + it('should throw error when setting durationOfCircuitBreakMs to a non-integer', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakFor(0.1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('durationOfCircuitBreakMs must be integer'); + } + }); + + it('should throw error when setting durationOfCircuitBreakMs to a non-safe integer', (): void => { + const policy = new CircuitBreakerPolicy(); + try { + policy.breakFor(2 ** 53); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('durationOfCircuitBreakMs must be less than or equal to 2^53 - 1'); + } + }); + + it('should not allow to transition to invalid states', (): void => { + const policy = new CircuitBreakerPolicy(); + expect(policy.getCircuitState()).to.equal('Closed'); + try { + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + policy.validateTransition(new Set(['AttemptingClose'])); + } catch (ex) { + expect((ex as Error).message === 'invalid transition'); + } + }); +}); diff --git a/test/specs/fallbackPolicy.test.ts b/test/specs/fallbackPolicy.test.ts index 1d91946..4c84f5b 100644 --- a/test/specs/fallbackPolicy.test.ts +++ b/test/specs/fallbackPolicy.test.ts @@ -52,11 +52,11 @@ describe('FallbackPolicy', (): void => { } }); - it('should fallback on a given (i.e. wrong) result, then return the result of the synchronous fallback function', async (): Promise< + it('should fallback on a reactive (i.e. wrong) result, then return the result of the synchronous fallback function', async (): Promise< void > => { const policy = new FallbackPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.fallback((): string => { return 'Diplomatiq is the coolest.'; }); @@ -68,11 +68,11 @@ describe('FallbackPolicy', (): void => { expect(result).to.equal('Diplomatiq is the coolest.'); }); - it('should fallback on a given (i.e. wrong) result, then return the result of the asynchronous fallback function', async (): Promise< + it('should fallback on a reactive (i.e. wrong) result, then return the result of the asynchronous fallback function', async (): Promise< void > => { const policy = new FallbackPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.fallback( // eslint-disable-next-line @typescript-eslint/require-await async (): Promise => { @@ -87,9 +87,9 @@ describe('FallbackPolicy', (): void => { expect(result).to.equal('Diplomatiq is the coolest.'); }); - it('should not fallback on a not given (i.e. right) result, but return the result', async (): Promise => { + it('should not fallback on a non-reactive (i.e. right) result, but return the result', async (): Promise => { const policy = new FallbackPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is not cool.'); const result = await policy.execute((): string => { return 'Diplomatiq is cool.'; @@ -98,14 +98,14 @@ describe('FallbackPolicy', (): void => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should fallback along a synchronous fallback chain sequentially while it produces the given (i.e. wrong) result until the first not given (i.e. good) result is produced', async (): Promise< + it('should fallback along a synchronous fallback chain sequentially while it produces reactive (i.e. wrong) result until the first non-reactive (i.e. right) result is produced', async (): Promise< void > => { const policy = new FallbackPolicy(); let fallbacksExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); @@ -134,14 +134,14 @@ describe('FallbackPolicy', (): void => { expect(fallbacksExecuted).to.equal(3); }); - it('should fallback along an asynchronous fallback chain sequentially while it produces the given (i.e. wrong) result, until the first not given (i.e. good) result is produced', async (): Promise< + it('should fallback along an asynchronous fallback chain sequentially while it produces reactive (i.e. wrong) result, until the first non-reactive (i.e. right) result is produced', async (): Promise< void > => { const policy = new FallbackPolicy(); let fallbacksExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.fallback( // eslint-disable-next-line @typescript-eslint/require-await @@ -179,14 +179,14 @@ describe('FallbackPolicy', (): void => { expect(fallbacksExecuted).to.equal(3); }); - it('should fallback on multiple given (i.e. wrong) results if any of them occurs', async (): Promise => { + it('should fallback on multiple reactive (i.e. wrong) results if any of them occurs', async (): Promise => { const policy = new FallbackPolicy(); let fallbacksExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is the worst.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is not cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is the worst.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); @@ -220,7 +220,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; - policy.handleResult((): boolean => true); + policy.reactOnResult((): boolean => true); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); @@ -253,11 +253,11 @@ describe('FallbackPolicy', (): void => { expect(fallbacksExecuted).to.equal(3); }); - it('should fallback on a given exception, then return the result of the synchronous fallback function', async (): Promise< + it('should fallback on a reactive exception, then return the result of the synchronous fallback function', async (): Promise< void > => { const policy = new FallbackPolicy(); - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.fallback((): string => { return 'Diplomatiq is cool.'; }); @@ -269,11 +269,11 @@ describe('FallbackPolicy', (): void => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should fallback on a given exception, then return the result of the asynchronous fallback function', async (): Promise< + it('should fallback on a reactive exception, then return the result of the asynchronous fallback function', async (): Promise< void > => { const policy = new FallbackPolicy(); - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.fallback( // eslint-disable-next-line @typescript-eslint/require-await async (): Promise => { @@ -288,9 +288,9 @@ describe('FallbackPolicy', (): void => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should not fallback on a not given exception, but throw the exception', async (): Promise => { + it('should not fallback on a non-reactive exception, but throw the exception', async (): Promise => { const policy = new FallbackPolicy(); - policy.handleException((e: unknown): boolean => (e as Error).message === 'AnotherException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'AnotherException'); try { await policy.execute((): void => { @@ -302,14 +302,14 @@ describe('FallbackPolicy', (): void => { } }); - it('should fallback along a synchronous fallback chain sequentially while it throws the given exception result until the first not given exception is thrown', async (): Promise< + it('should fallback along a synchronous fallback chain sequentially while it throws reactive exception result until the first non-reactive exception is thrown', async (): Promise< void > => { const policy = new FallbackPolicy(); let fallbacksExecuted = 0; - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); @@ -338,14 +338,14 @@ describe('FallbackPolicy', (): void => { expect(fallbacksExecuted).to.equal(3); }); - it('should fallback along an asynchronous fallback chain sequentially while it throws the given exception result until the first not given exception is thrown', async (): Promise< + it('should fallback along an asynchronous fallback chain sequentially while it throws reactive exception until the first non-reactive exception is thrown', async (): Promise< void > => { const policy = new FallbackPolicy(); let fallbacksExecuted = 0; - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.fallback( // eslint-disable-next-line @typescript-eslint/require-await @@ -383,14 +383,14 @@ describe('FallbackPolicy', (): void => { expect(fallbacksExecuted).to.equal(3); }); - it('should fallback on multiple given exceptions if any of them occurs', async (): Promise => { + it('should fallback on multiple reactive exceptions if any of them occurs', async (): Promise => { const policy = new FallbackPolicy(); let fallbacksExecuted = 0; - policy.handleException((e: unknown): boolean => (e as Error).message === 'ExceptionOne'); - policy.handleException((e: unknown): boolean => (e as Error).message === 'ExceptionTwo'); - policy.handleException((e: unknown): boolean => (e as Error).message === 'ExceptionThree'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'ExceptionOne'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'ExceptionTwo'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'ExceptionThree'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); @@ -424,7 +424,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; - policy.handleException((): boolean => true); + policy.reactOnException((): boolean => true); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); @@ -457,7 +457,7 @@ describe('FallbackPolicy', (): void => { void > => { const policy = new FallbackPolicy(); - policy.handleResult((): boolean => true); + policy.reactOnResult((): boolean => true); try { await policy.execute((): string => { @@ -473,7 +473,7 @@ describe('FallbackPolicy', (): void => { void > => { const policy = new FallbackPolicy(); - policy.handleException((): boolean => true); + policy.reactOnException((): boolean => true); try { await policy.execute((): string => { @@ -491,7 +491,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; let onFallbackExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -524,7 +524,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; let onFallbackExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -566,7 +566,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; let onFallbackExecuted = 0; - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -599,7 +599,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; let onFallbackExecuted = 0; - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -658,7 +658,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; let onFallbackExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -694,7 +694,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; let onFallbackExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -753,7 +753,7 @@ describe('FallbackPolicy', (): void => { let fallbacksExecuted = 0; let onFallbackExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -822,7 +822,7 @@ describe('FallbackPolicy', (): void => { let onFallbackExecuted = 0; let onFinallyExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); policy.fallback((): string => { expect(fallbacksExecuted).to.equal(0); fallbacksExecuted++; @@ -955,7 +955,7 @@ describe('FallbackPolicy', (): void => { let onFinallyExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is bad.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is bad.'); policy.fallback((): string => { return 'Diplomatiq is bad.'; }); @@ -1040,46 +1040,85 @@ describe('FallbackPolicy', (): void => { it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { const policy = new FallbackPolicy(); - await Promise.all([ - ...new Array(100).fill(undefined).map( - async (): Promise => - policy.execute( - async (): Promise => - new Promise((resolve): void => { - setTimeout(resolve, 20); - }), - ), - ), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.fallback((): void => { - // empty - }); + const attemptPolicyModification = (expectFailure: boolean): void => { + try { + policy.fallback((): void => { + // empty + }); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.onFallback((): void => { - // empty - }); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onFallback((): void => { + // empty + }); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.onFinally((): void => { - // empty - }); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onFinally((): void => { + // empty + }); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ]); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }; + + const executionResolverAddedDeferreds: Array<{ + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + }> = new Array(100).fill(undefined).map((): { + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + } => { + let resolverAddedResolver!: () => void; + const resolverAddedPromise = new Promise((resolve): void => { + resolverAddedResolver = resolve; + }); + + return { + resolverAddedPromise, + resolverAddedResolver, + }; + }); + + const executionResolvers: Array<() => void> = []; + + attemptPolicyModification(false); + + for (let i = 0; i < 100; i++) { + policy.execute( + // eslint-disable-next-line no-loop-func + async (): Promise => { + await new Promise((resolve): void => { + executionResolvers.push(resolve); + executionResolverAddedDeferreds[i].resolverAddedResolver(); + }); + }, + ); + + await executionResolverAddedDeferreds[i].resolverAddedPromise; + expect(executionResolvers.length).to.equal(i + 1); + + attemptPolicyModification(true); + } + + for (let i = 0; i < 100; i++) { + executionResolvers[i](); + attemptPolicyModification(true); + } + + attemptPolicyModification(false); }); }); diff --git a/test/specs/retryPolicy.test.ts b/test/specs/retryPolicy.test.ts index ee49373..2b9609c 100644 --- a/test/specs/retryPolicy.test.ts +++ b/test/specs/retryPolicy.test.ts @@ -1,7 +1,21 @@ import { expect } from 'chai'; +import { SinonFakeTimers, useFakeTimers } from 'sinon'; import { RetryPolicy } from '../../src/policies/reactive/retryPolicy/retryPolicy'; describe('RetryPolicy', (): void => { + let clock: SinonFakeTimers; + + beforeEach((): void => { + clock = useFakeTimers({ + toFake: ['Date', 'setTimeout', 'clearTimeout'], + shouldAdvanceTime: false, + }); + }); + + afterEach((): void => { + clock.restore(); + }); + it('should run the synchronous execution callback and return its result by default', async (): Promise => { const policy = new RetryPolicy(); const result = await policy.execute((): string => { @@ -54,9 +68,9 @@ describe('RetryPolicy', (): void => { } }); - it('should retry on a given result once, then return the result by default', async (): Promise => { + it('should retry on a reactive result once, then return the result by default', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); let executed = 0; @@ -69,9 +83,9 @@ describe('RetryPolicy', (): void => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should not retry on a not given result, but return the result', async (): Promise => { + it('should not retry on a non-reactive result, but return the result', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is not cool.'); let executed = 0; @@ -84,11 +98,11 @@ describe('RetryPolicy', (): void => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should retry on a given result thrice when setting retryCount to 3, then return the result', async (): Promise< + it('should retry on a reactive result thrice when setting retryCount to 3, then return the result', async (): Promise< void > => { const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); let executed = 0; @@ -102,10 +116,10 @@ describe('RetryPolicy', (): void => { expect(result).to.equal('Diplomatiq is cool.'); }); - it('should retry on multiple given results, then return the result', async (): Promise => { + it('should retry on multiple reactive results, then return the result', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is the coolest.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is the coolest.'); let executed = 0; let result: string; @@ -127,9 +141,9 @@ describe('RetryPolicy', (): void => { expect(result).to.equal('Diplomatiq is the coolest.'); }); - it('should retry on a given exception once, then throw by default', async (): Promise => { + it('should retry on a reactive exception once, then throw by default', async (): Promise => { const policy = new RetryPolicy(); - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); let executed = 0; @@ -146,9 +160,9 @@ describe('RetryPolicy', (): void => { expect(executed).to.equal(2); }); - it('should not retry on a not given exception, but throw', async (): Promise => { + it('should not retry on a non-reactive exception, but throw', async (): Promise => { const policy = new RetryPolicy(); - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); let executed = 0; @@ -165,9 +179,11 @@ describe('RetryPolicy', (): void => { expect(executed).to.equal(1); }); - it('should retry on a given exception thrice when setting retryCount to 3, then throw', async (): Promise => { + it('should retry on a reactive exception thrice when setting retryCount to 3, then throw', async (): Promise< + void + > => { const policy = new RetryPolicy(); - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.retryCount(3); let executed = 0; @@ -185,10 +201,10 @@ describe('RetryPolicy', (): void => { expect(executed).to.equal(4); }); - it('should retry on multiple given exceptions, then throw', async (): Promise => { + it('should retry on multiple reactive exceptions, then throw', async (): Promise => { const policy = new RetryPolicy(); - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); - policy.handleException((e: unknown): boolean => (e as Error).message === 'ArgumentException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'ArgumentException'); let executed = 0; @@ -217,12 +233,12 @@ describe('RetryPolicy', (): void => { expect(executed).to.equal(4); }); - it('should retry on a given result and on a given exception as well, then return/throw', async (): Promise< + it('should retry on a reactive result and on a reactive exception as well, then return/throw', async (): Promise< void > => { const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); let executed = 0; @@ -246,7 +262,7 @@ describe('RetryPolicy', (): void => { expect(executed).to.equal(4); }); - it('should not retry without a given result or exception to be handled', async (): Promise => { + it('should not retry without a reactive result or exception to be handled', async (): Promise => { const policy = new RetryPolicy(); let executed = 0; @@ -262,7 +278,7 @@ describe('RetryPolicy', (): void => { it('should retry forever if set', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryForever(); let executed = 0; @@ -286,7 +302,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onRetryExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); expect(error).to.equal(undefined); @@ -313,7 +329,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onRetryExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); @@ -339,7 +355,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onRetryExecuted = 0; - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal(undefined); expect((error as Error).message).to.equal('TestException'); @@ -389,7 +405,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onRetryExecuted = 0; - policy.handleException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); policy.retryCount(3); policy.onRetry((result: unknown | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal(undefined); @@ -420,7 +436,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onRetryExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.onRetry( async ( result: string | undefined, @@ -452,7 +468,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onRetryExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); @@ -497,7 +513,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onRetryExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); policy.onRetry( async ( @@ -564,7 +580,7 @@ describe('RetryPolicy', (): void => { let onRetryExecuted = 0; let onFinallyExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); policy.onRetry((result: string | undefined, error: unknown | undefined, currentRetryCount: number): void => { expect(result).to.equal('Diplomatiq is cool.'); @@ -597,7 +613,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onFinallyExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is not cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is not cool.'); policy.retryCount(3); policy.onFinally((): void => { onFinallyExecuted++; @@ -620,7 +636,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onFinallyExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.onFinally((): void => { expect(onFinallyExecuted).to.equal(0); onFinallyExecuted++; @@ -652,7 +668,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onFinallyExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.onFinally( // eslint-disable-next-line @typescript-eslint/require-await async (): Promise => { @@ -693,7 +709,7 @@ describe('RetryPolicy', (): void => { let executed = 0; let onFinallyExecuted = 0; - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); policy.retryCount(3); policy.onFinally((): void => { onFinallyExecuted++; @@ -708,44 +724,126 @@ describe('RetryPolicy', (): void => { expect(onFinallyExecuted).to.equal(1); }); - it('should wait for the specified interval before retry if set', async (): Promise => { + it('should wait for the specified interval before retry on result if set', async (): Promise => { const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); - policy.waitBeforeRetry((): number => 100); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.waitBeforeRetry((): number => 1000); - const executionTimestamps: number[] = []; + let executed = 0; - await policy.execute((): string => { - executionTimestamps.push(Date.now()); + const executionPromise = policy.execute((): string => { + expect(Date.now()).to.equal(executed * 1000); + executed++; return 'Diplomatiq is cool.'; }); - expect(executionTimestamps[1] - executionTimestamps[0]) - .to.be.at.least(99) - .and.to.be.at.most(110); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(4000); + expect(Date.now()).to.equal(4000); + expect(executed).to.equal(4); + + await executionPromise; + expect(executed).to.equal(4); }); - it('should wait for the specified interval (depending on the current retry count) before retry if set', async (): Promise< + it('should wait for the specified interval (depending on the current retry count) before retry on result if set', async (): Promise< void > => { + const elapsedTimeHelper = (executed: number): number => { + return new Array(executed) + .fill(undefined) + .map((_value, index): number => (index + 1) * 1000) + .reduce((acc, curr): number => acc + curr, 0); + }; + const policy = new RetryPolicy(); - policy.handleResult((r: string): boolean => r === 'Diplomatiq is cool.'); - policy.retryCount(2); - policy.waitBeforeRetry((currentRetryCount: number): number => currentRetryCount * 100); + policy.reactOnResult((r: string): boolean => r === 'Diplomatiq is cool.'); + policy.retryCount(3); + policy.waitBeforeRetry((currentRetryCount: number): number => currentRetryCount * 1000); - const executionTimestamps: number[] = []; + let executed = 0; - await policy.execute((): string => { - executionTimestamps.push(Date.now()); + const executionPromise = policy.execute((): string => { + expect(Date.now()).to.equal(elapsedTimeHelper(executed)); + executed++; return 'Diplomatiq is cool.'; }); - expect(executionTimestamps[1] - executionTimestamps[0]) - .to.be.at.least(99) - .and.to.be.at.most(110); - expect(executionTimestamps[2] - executionTimestamps[1]) - .to.be.at.least(198) - .and.to.be.at.most(210); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(6000); + expect(Date.now()).to.equal(6000); + expect(executed).to.equal(4); + + await executionPromise; + expect(executed).to.equal(4); + }); + + it('should wait for the specified interval before retry on exception if set', async (): Promise => { + const policy = new RetryPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.retryCount(3); + policy.waitBeforeRetry((): number => 1000); + + let executed = 0; + + const executionPromise = policy + .execute((): string => { + expect(Date.now()).to.equal(executed * 1000); + executed++; + throw new Error('TestException'); + }) + .catch((ex: Error): void => { + expect(ex.message).to.equal('TestException'); + }); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(4000); + expect(Date.now()).to.equal(4000); + expect(executed).to.equal(4); + + await executionPromise; + expect(executed).to.equal(4); + }); + + it('should wait for the specified interval (depending on the current retry count) before retry on exception if set', async (): Promise< + void + > => { + const elapsedTimeHelper = (executed: number): number => { + return new Array(executed) + .fill(undefined) + .map((_value, index): number => (index + 1) * 1000) + .reduce((acc, curr): number => acc + curr, 0); + }; + + const policy = new RetryPolicy(); + policy.reactOnException((e: unknown): boolean => (e as Error).message === 'TestException'); + policy.retryCount(3); + policy.waitBeforeRetry((currentRetryCount: number): number => currentRetryCount * 1000); + + let executed = 0; + + const executionPromise = policy + .execute((): string => { + expect(Date.now()).to.equal(elapsedTimeHelper(executed)); + executed++; + throw new Error('TestException'); + }) + .catch((ex: Error): void => { + expect(ex.message).to.equal('TestException'); + }); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(6000); + expect(Date.now()).to.equal(6000); + expect(executed).to.equal(4); + + await executionPromise; + expect(executed).to.equal(4); }); it('should not allow to set retryCount during execution', (): void => { @@ -845,61 +943,102 @@ describe('RetryPolicy', (): void => { it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { const policy = new RetryPolicy(); - await Promise.all([ - ...new Array(100).fill(undefined).map( - async (): Promise => - policy.execute( - async (): Promise => - new Promise((resolve): void => { - setTimeout(resolve, 20); - }), - ), - ), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.retryCount(1); + const attemptPolicyModification = (expectFailure: boolean): void => { + try { + policy.retryCount(1); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.retryForever(); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.retryForever(); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.onRetry((): void => { - // empty - }); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onRetry((): void => { + // empty + }); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.waitBeforeRetry((): number => 100); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.waitBeforeRetry((): number => 0); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.onFinally((): void => { - // empty - }); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onFinally((): void => { + // empty + }); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ]); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }; + + const executionResolverAddedDeferreds: Array<{ + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + }> = new Array(100).fill(undefined).map((): { + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + } => { + let resolverAddedResolver!: () => void; + const resolverAddedPromise = new Promise((resolve): void => { + resolverAddedResolver = resolve; + }); + + return { + resolverAddedPromise, + resolverAddedResolver, + }; + }); + + const executionResolvers: Array<() => void> = []; + + attemptPolicyModification(false); + + for (let i = 0; i < 100; i++) { + policy.execute( + // eslint-disable-next-line no-loop-func + async (): Promise => { + await new Promise((resolve): void => { + executionResolvers.push(resolve); + executionResolverAddedDeferreds[i].resolverAddedResolver(); + }); + }, + ); + + await executionResolverAddedDeferreds[i].resolverAddedPromise; + expect(executionResolvers.length).to.equal(i + 1); + + attemptPolicyModification(true); + } + + for (let i = 0; i < 100; i++) { + executionResolvers[i](); + attemptPolicyModification(true); + } + + attemptPolicyModification(false); }); it('should throw error when setting retry count to 0', (): void => { diff --git a/test/specs/timeoutPolicy.test.ts b/test/specs/timeoutPolicy.test.ts index 0261f37..99b096f 100644 --- a/test/specs/timeoutPolicy.test.ts +++ b/test/specs/timeoutPolicy.test.ts @@ -246,35 +246,73 @@ describe('TimeoutPolicy', (): void => { it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { const policy = new TimeoutPolicy(); - await Promise.all([ - ...new Array(100).fill(undefined).map( - async (): Promise => - policy.execute( - async (): Promise => - new Promise((resolve): void => { - setTimeout(resolve, 20); - }), - ), - ), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.timeoutAfter(1); + const attemptPolicyModification = (expectFailure: boolean): void => { + try { + policy.timeoutAfter(1000); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ...new Array(100).fill(undefined).map((): void => { - try { - policy.onTimeout((): void => { - // empty - }); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + + try { + policy.onTimeout((): void => { + // empty + }); + if (expectFailure) { expect.fail('did not throw'); - } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); } - }), - ]); + } catch (ex) { + expect((ex as Error).message).to.equal('cannot modify policy during execution'); + } + }; + + const executionResolverAddedDeferreds: Array<{ + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + }> = new Array(100).fill(undefined).map((): { + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + } => { + let resolverAddedResolver!: () => void; + const resolverAddedPromise = new Promise((resolve): void => { + resolverAddedResolver = resolve; + }); + + return { + resolverAddedPromise, + resolverAddedResolver, + }; + }); + + const executionResolvers: Array<() => void> = []; + + attemptPolicyModification(false); + + for (let i = 0; i < 100; i++) { + policy.execute( + // eslint-disable-next-line no-loop-func + async (): Promise => { + await new Promise((resolve): void => { + executionResolvers.push(resolve); + executionResolverAddedDeferreds[i].resolverAddedResolver(); + }); + }, + ); + + await executionResolverAddedDeferreds[i].resolverAddedPromise; + expect(executionResolvers.length).to.equal(i + 1); + + attemptPolicyModification(true); + } + + for (let i = 0; i < 100; i++) { + executionResolvers[i](); + attemptPolicyModification(true); + } + + attemptPolicyModification(false); }); it('should throw error when setting timeoutAfter to 0', (): void => { From 316e71714233372754d1cdffeebbc6240d9ee3cc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2020 17:11:23 +0000 Subject: [PATCH 123/136] chore: bump @types/node from 13.9.2 to 13.9.3 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.2 to 13.9.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2120a62..809eecf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -585,9 +585,9 @@ "dev": true }, "@types/node": { - "version": "13.9.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.2.tgz", - "integrity": "sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg==", + "version": "13.9.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.3.tgz", + "integrity": "sha512-01s+ac4qerwd6RHD+mVbOEsraDHSgUaefQlEdBbUolnQFjKwCr7luvAlEwW1RFojh67u0z4OUTjPn9LEl4zIkA==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index fba77f2..169016d 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@diplomatiq/eslint-config-tslib": "^2.5.0", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", - "@types/node": "^13.9.2", + "@types/node": "^13.9.3", "@types/sinon": "^7.5.2", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From 4386906ac65bce04ee71dc6012b085c704f12947 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2020 19:46:08 +0000 Subject: [PATCH 124/136] chore: bump @diplomatiq/eslint-config-tslib from 2.5.0 to 3.0.0 Bumps [@diplomatiq/eslint-config-tslib](https://github.com/Diplomatiq/eslint-config-tslib) from 2.5.0 to 3.0.0. - [Release notes](https://github.com/Diplomatiq/eslint-config-tslib/releases) - [Commits](https://github.com/Diplomatiq/eslint-config-tslib/compare/v2.5.0...v3.0.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 44 +++++++++---------- package.json | 2 +- .../reactive/retryPolicy/retryPolicy.ts | 3 +- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 809eecf..e8269c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -407,9 +407,9 @@ "integrity": "sha512-3B6EhsGLTxUzpK6ShaNwg4t3sqOknlMqI7q07z6CUupwplW2As295YgoJR5LWQ5HpzRwEQ37BseOyxs7VOmjFw==" }, "@diplomatiq/eslint-config-tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@diplomatiq/eslint-config-tslib/-/eslint-config-tslib-2.5.0.tgz", - "integrity": "sha512-UaRcjQYCYeu4lX1W05fwNH1BrGT5vdOqZosf7VMbnCBirFOYJdqheZivrEpPnjVS9KMJPZKdFmEkG92oEr7Sag==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@diplomatiq/eslint-config-tslib/-/eslint-config-tslib-3.0.0.tgz", + "integrity": "sha512-a3wpZU2ruYMktnvu0lP6gNl4+93VKUPpBdLmGxAATI8VJOLyHKj8QcciscwJYstXarR3440C9xnhp2m9wp6mqA==", "dev": true, "requires": { "@typescript-eslint/eslint-plugin": "^2.19.2", @@ -603,12 +603,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.23.0.tgz", - "integrity": "sha512-8iA4FvRsz8qTjR0L/nK9RcRUN3QtIHQiOm69FzV7WS3SE+7P7DyGGwh3k4UNR2JBbk+Ej2Io+jLAaqKibNhmtw==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz", + "integrity": "sha512-wJRBeaMeT7RLQ27UQkDFOu25MqFOBus8PtOa9KaT5ZuxC1kAsd7JEHqWt4YXuY9eancX0GK9C68i5OROnlIzBA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.23.0", + "@typescript-eslint/experimental-utils": "2.24.0", "eslint-utils": "^1.4.3", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -616,32 +616,32 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.23.0.tgz", - "integrity": "sha512-OswxY59RcXH3NNPmq+4Kis2CYZPurRU6mG5xPcn24CjFyfdVli5mySwZz/g/xDbJXgDsYqNGq7enV0IziWGXVQ==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.24.0.tgz", + "integrity": "sha512-DXrwuXTdVh3ycNCMYmWhUzn/gfqu9N0VzNnahjiDJvcyhfBy4gb59ncVZVxdp5XzBC77dCncu0daQgOkbvPwBw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.23.0", + "@typescript-eslint/typescript-estree": "2.24.0", "eslint-scope": "^5.0.0" } }, "@typescript-eslint/parser": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.23.0.tgz", - "integrity": "sha512-k61pn/Nepk43qa1oLMiyqApC6x5eP5ddPz6VUYXCAuXxbmRLqkPYzkFRKl42ltxzB2luvejlVncrEpflgQoSUg==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.24.0.tgz", + "integrity": "sha512-H2Y7uacwSSg8IbVxdYExSI3T7uM1DzmOn2COGtCahCC3g8YtM1xYAPi2MAHyfPs61VKxP/J/UiSctcRgw4G8aw==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.23.0", - "@typescript-eslint/typescript-estree": "2.23.0", + "@typescript-eslint/experimental-utils": "2.24.0", + "@typescript-eslint/typescript-estree": "2.24.0", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.23.0.tgz", - "integrity": "sha512-pmf7IlmvXdlEXvE/JWNNJpEvwBV59wtJqA8MLAxMKLXNKVRC3HZBXR/SlZLPWTCcwOSg9IM7GeRSV3SIerGVqw==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.24.0.tgz", + "integrity": "sha512-RJ0yMe5owMSix55qX7Mi9V6z2FDuuDpN6eR5fzRJrp+8in9UF41IGNQHbg5aMK4/PjVaEQksLvz0IA8n+Mr/FA==", "dev": true, "requires": { "debug": "^4.1.1", @@ -1761,9 +1761,9 @@ } }, "eslint-config-prettier": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz", - "integrity": "sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==", + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", + "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", "dev": true, "requires": { "get-stdin": "^6.0.0" diff --git a/package.json b/package.json index 169016d..19b860b 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@commitlint/cli": "^8.3.5", "@commitlint/travis-cli": "^8.3.5", - "@diplomatiq/eslint-config-tslib": "^2.5.0", + "@diplomatiq/eslint-config-tslib": "^3.0.0", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^13.9.3", diff --git a/src/policies/reactive/retryPolicy/retryPolicy.ts b/src/policies/reactive/retryPolicy/retryPolicy.ts index 4af1727..9bdc45f 100644 --- a/src/policies/reactive/retryPolicy/retryPolicy.ts +++ b/src/policies/reactive/retryPolicy/retryPolicy.ts @@ -6,7 +6,6 @@ import { OnRetryFn } from './onRetryFn'; export class RetryPolicy extends ReactivePolicy { private totalRetryCount = 1; private readonly onRetryFns: Array> = []; - private backoffStrategy: BackoffStrategy = (): number => 0; private readonly onFinallyFns: OnFinallyFn[] = []; private executing = 0; @@ -140,6 +139,8 @@ export class RetryPolicy extends ReactivePolicy { } } + private backoffStrategy: BackoffStrategy = (): number => 0; + private hasRetryLeft(currentRetryCount: number): boolean { return currentRetryCount <= this.totalRetryCount; } From f4003ce736e98f4b318aa7c26ced37d600f3eac0 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Wed, 25 Mar 2020 23:50:54 +0100 Subject: [PATCH 125/136] ci: Configure GitHub Actions Closes #202. --- .github/workflows/ci.yml | 74 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 20 ----------- README.md | 6 ++-- package.json | 11 +++--- sonar-project.properties | 1 + 5 files changed, 82 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3219abe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +name: CI + +on: [push, pull_request] + +jobs: + lint-build-test-scan: + name: Lint, build, test, scan + runs-on: ubuntu-latest + + strategy: + matrix: + node: [13, 12, 11, 10] + fail-fast: false + + steps: + - name: Checkout push or pull request HEAD + uses: actions/checkout@v2 + - name: Convert the shallow clone to an unshallow one + run: git fetch --unshallow + - name: Request the number of commits on the pull request + id: number_of_commits_on_pr_request + if: github.event_name == 'pull_request' + uses: octokit/graphql-action@v2.x + with: + query: | + query NumberOfCommitsOnPR($repositoryowner: String!, $repositoryname: String!, $prnumber: Int!) { + repository(owner: $repositoryowner, name: $repositoryname) { + pullRequest(number: $prnumber) { + commits { + totalCount + } + } + } + } + repositoryowner: ${{ github.event.repository.owner.login }} + repositoryname: ${{ github.event.repository.name }} + prnumber: ${{ github.event.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get the number of commits on the pull request from the response + id: number_of_commits_on_pr_result + if: github.event_name == 'pull_request' + uses: gr2m/get-json-paths-action@v1.x + with: + json: ${{ steps.number_of_commits_on_pr_request.outputs.data }} + commits_count: 'repository.pullRequest.commits.totalCount' + - name: Check if the number of commits on the pull request is equal to one + if: github.event_name == 'pull_request' + run: | + if [ "${{ steps.number_of_commits_on_pr_result.outputs.commits_count }}" -ne 1 ]; then + echo "The pull request must consist of exactly one commit. Please squash your commits into one." + exit 1 + fi + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - name: Install dependencies + run: npm ci + - name: Lint the commit message of the pull request + if: github.event_name == 'pull_request' + run: npx commitlint --from HEAD^ --to HEAD --config .commitlintrc.json + - name: Lint the code + run: npm run lint + - name: Build the code + run: npm run build + - name: Test the code + run: npm run test + - name: Scan the code with SonarCloud + if: github.event_name == 'push' && matrix.node == 13 + uses: sonarsource/sonarcloud-github-action@v1.1 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ab3e4b5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -dist: trusty - -language: node_js - -node_js: - - node - - lts/* - -addons: - sonarcloud: - organization: diplomatiq - token: - secure: OuO5PTGVrqinpQk1pj/WoivbcFglhS56Hxddzh6r2zZJ4DfTESWJhFS9b4SD7bwPoNLEDDrjMM5cdNy+S3j0pR1g46iNWDLbhBsYf4+l006QEIajjf3vt5CkkREhLtA4EMiHIgW68sHUKKoq4vdUlOQ+L0hvpScahtNUkP48uUvKJpKnGvaL/hcMzYz2TAv3/jvd8oYNAY0k0G5w3kCxwLZfJkhhSDtZEX5tEQ5ARBu9A24X9Xsza3JegrHESzLIto2XMLfJcy9m34I5OfXnVYEyiydO5bOxW00bCn7o41HNLhlx7vPD+JatYvwEHbVdDb9QOdHTHyXqAO00JbNsHyslVhTLcVFWNGvltDueY/pmjluxR40YCBJbEOz3WE4V+LsSjM71vFWj/xZRVBWGSbPVNDYL+3+4YfSSvdxFtowDFP3PEjXb9GBWWCoiSmyqZjMbkneCS7P8W1oLVJCuqDgVmWSsRSiVpS0zAhcbe+LOV4WLIUuAMrIMUpx091BBLNEA9V4O0ML080enuyrwhNH7/D626GjfTbTEntPF5h6P2gtV3/1yp8bOJXpJQkHjVP8kedFSZJBDdcwvCsc5E9WsTRrYjMs2bpk8MqwV5D54yzVwnkXtrzOjB4jPvF2oQwUIGC1kgIOIKn52IUGUnagDgO4meUPS+Y8bAcpSZiM= - -install: npm ci - -script: - - commitlint-travis - - npm run build-and-test-everything - - sonar-scanner diff --git a/README.md b/README.md index b325d1e..33432e8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # resily -Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by [App-vNext/Polly](https://github.com/App-vNext/Polly). +Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Fallback, Circuit Breaker, Timeout, Bulkhead Isolation, and Cache. Inspired by [App-vNext/Polly](https://github.com/App-vNext/Polly).

- - build status + + build status diff --git a/package.json b/package.json index 19b860b..48e7082 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,19 @@ { "name": "@diplomatiq/resily", "version": "0.0.0", - "description": "Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by App-vNext/Polly.", + "description": "Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Fallback, Circuit Breaker, Timeout, Bulkhead Isolation, and Cache. Inspired by App-vNext/Polly.", "main": "dist/main.js", "module": "dist/main.js", "types": "dist/main.d.ts", "engines": { - "node": ">=9.0.0" + "node": ">=10.0.0" }, "scripts": { "build": "tsc", - "build-and-test-everything": "npm run lint && npm run build && npm run test", "check-release-tag": "node --experimental-modules scripts/check-release-tag.mjs", "clean": "rm -r ./dist/", "lint": "eslint ./src/ ./test/ --ext .ts", - "prepare": "npm run build-and-test-everything", - "prepublishOnly": "npm run check-release-tag", + "prepublishOnly": "npm run check-release-tag && npm run lint && npm run build && npm run test", "test": "cross-env-shell TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text mocha --require ts-node/register --require source-map-support/register --require esm --recursive test/specs/**/*.test.ts", "version": "node --experimental-modules scripts/sync-sonar-version.mjs && conventional-changelog -p angular -i CHANGELOG.md -s && git add sonar-project.properties CHANGELOG.md" }, @@ -40,7 +38,6 @@ "homepage": "https://github.com/Diplomatiq/resily#readme", "devDependencies": { "@commitlint/cli": "^8.3.5", - "@commitlint/travis-cli": "^8.3.5", "@diplomatiq/eslint-config-tslib": "^3.0.0", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", @@ -65,7 +62,7 @@ "husky": { "hooks": { "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-push": "npm run build-and-test-everything" + "pre-push": "npm run lint && npm run build && npm run test" } }, "dependencies": { diff --git a/sonar-project.properties b/sonar-project.properties index 0cc9f53..27220b7 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,5 @@ # Standard properties +sonar.organization=diplomatiq sonar.projectKey=Diplomatiq_resily sonar.projectName=resily sonar.projectVersion=0.0.0 From 0a6fd61f9fd7c1b523640ce290de31da6c0c77fe Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Mon, 23 Mar 2020 21:30:10 +0100 Subject: [PATCH 126/136] feat: Implement BulkheadIsolationPolicy Closes #199. --- README.md | 92 +++- src/main.ts | 5 + src/policies/policy.ts | 26 +- .../bulkheadCompartmentRejectedException.ts | 1 + .../bulkheadIsolationPolicy.ts | 75 ++++ .../proactive/timeoutPolicy/timeoutPolicy.ts | 15 +- .../circuitBreakerPolicy.ts | 117 ++--- .../reactive/fallbackPolicy/fallbackPolicy.ts | 32 +- .../reactive/retryPolicy/retryPolicy.ts | 40 +- src/types/executedFn.ts | 1 + .../policyModificationNotAllowedException.ts | 1 + src/utils/successDeferred.ts | 10 + test/specs/bulkheadIsolationPolicy.test.ts | 419 ++++++++++++++++++ test/specs/circuitBreakerPolicy.test.ts | 34 +- test/specs/fallbackPolicy.test.ts | 22 +- test/specs/retryPolicy.test.ts | 89 +++- test/specs/timeoutPolicy.test.ts | 9 +- 17 files changed, 807 insertions(+), 181 deletions(-) create mode 100644 src/policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException.ts create mode 100644 src/policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy.ts create mode 100644 src/types/executedFn.ts create mode 100644 src/types/policyModificationNotAllowedException.ts create mode 100644 src/utils/successDeferred.ts create mode 100644 test/specs/bulkheadIsolationPolicy.test.ts diff --git a/README.md b/README.md index 33432e8..76e3e9a 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ _Note: This package is built as an ES6 package. You will not be able to use `req After installation, you can import policies and other helper classes into your project, then wrap your code into one or more policies. -Every policy extends the abstract `Policy` class, which has an `execute` method. Your code wrapped into the policy gets executed when you invoke `execute`. The `execute` method is asynchronous, so it returns a `Promise` resolving with the return value of the executed method. +Every policy extends the abstract `Policy` class, which has an `execute` method. Your code wrapped into a policy gets executed when you invoke `execute`. The `execute` method is asynchronous, so it returns a `Promise` resolving with the return value of the executed method (or rejecting with an exception thrown by the method). The wrapped method can be synchronous or asynchronous, it will be awaited in either case: @@ -123,9 +123,10 @@ Resily offers **reactive** and **proactive** policies: #### Proactive policies summary -| Policy | What does it claim? | How does it work? | -| ----------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------- | -| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | +| Policy | What does it claim? | How does it work? | +| ------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------- | +| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | +| [**BulkheadIsolationPolicy**](#bulkheadisolationpolicy) | Too many concurrent calls can overload a resource. | Limits the number of concurrently executed actions as specified. | ### Reactive policies @@ -804,6 +805,89 @@ try { // onTimeoutRan is false ``` +#### BulkheadIsolationPolicy + +`BulkheadIsolationPolicy` claims that too many concurrent calls can overload a resource. It limits the number of concurrently executed actions as specified. + +Method calls executed via the policy are placed into a size-limited bulkhead compartment, limiting the maximum number of concurrent executions. + +If the bulkhead compartment is full — meaning the maximum number of concurrent executions is reached —, additional calls can be queued up, ready to be executed whenever a place falls vacant in the bulkhead compartment (i.e. an execution finishes). Queuing up these calls ensures that the resource protected by the policy is always at maximum utilization, while limiting the number of concurrent actions ensures that the resource is not overloaded. The queue is a simple FIFO buffer. + +When the policy's `execute` method is invoked with a method to be executed, the policy's operation can be described as follows: + +- `(1)` If there is an execution slot available in the bulkhead compartment, execute the method immediately. + +- `(2)` Else if there is still space in the queue, enqueue the execution intent of the method — without actually executing the method —, then wait asynchronously until the method can be executed. + + An execution intent gets dequeued — and its corresponding method gets executed — each time an execution slot becomes available in the bulkhead compartment. + +- `(3)` Else throw a `BulkheadCompartmentRejectedException`. + +From the caller's point of view, this is all transparent: the promise returned by the `execute` method is + +- either eventually resolved with the return value of the wrapped method (cases `(1)` and `(2)`), +- or eventually rejected with an exception thrown by the wrapped method (cases `(1)` and `(2)`), +- or rejected with a `BulkheadCompartmentRejectedException` (case `(3)`). + +Configure the size of the bulkhead compartment: + +```typescript +import { BulkheadIsolationPolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new BulkheadIsolationPolicy(); + +// allow maximum 3 concurrent executions +policy.maxConcurrency(3); + +// this overwrites the previous value +policy.maxConcurrency(5); +``` + +Configure the size of the queue: + +```typescript +import { BulkheadIsolationPolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new BulkheadIsolationPolicy(); + +// allow maximum 3 queued actions +policy.maxQueuedActions(3); + +// this overwrites the previous value +policy.maxQueuedActions(5); +``` + +Get usage information about the bulkhead compartment: + +```typescript +import { BulkheadIsolationPolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new BulkheadIsolationPolicy(); + +// the number of available (free) execution slots in the bulkhead compartment +policy.getAvailableSlotsCount(); + +// the number of available (free) spaces in the queue +policy.getAvailableQueuedActionsCount(); +``` + +### Modifying a policy's configuration + +All policies' configuration parameters are set via setter methods. This could imply that all policies can be safely reconfigured whenever needed, but providing setter methods instead of constructor parameters is merely because this way the policies are more convenient to use. If you need to reconfigure a policy, you can do that, but not while it is still executing one or more methods: reconfiguring while executing could lead to unexpected side-effects. Therefore, if you tries to reconfigure a policy while executing, a `PolicyModificationNotAllowedException` is thrown. + +To safely reconfigure a policy, check whether it is executing or not: + +```typescript +const policy = … // any policy + +if (!policy.isExecuting()) { + // you can reconfigure the policy +} +``` + ## Development See [CONTRIBUTING.md](https://github.com/Diplomatiq/resily/blob/develop/CONTRIBUTING.md) for details. diff --git a/src/main.ts b/src/main.ts index 43f97b8..8f5a6b4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,7 @@ export { RandomGenerator } from './interfaces/randomGenerator'; export { Policy } from './policies/policy'; +export { BulkheadCompartmentRejectedException } from './policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException'; +export { BulkheadIsolationPolicy } from './policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy'; export { ProactivePolicy } from './policies/proactive/proactivePolicy'; export { ExecutionException } from './policies/proactive/timeoutPolicy/executionException'; export { OnTimeoutFn } from './policies/proactive/timeoutPolicy/onTimeoutFn'; @@ -22,5 +24,8 @@ export { BackoffStrategy } from './policies/reactive/retryPolicy/backoffStrategy export { BackoffStrategyFactory } from './policies/reactive/retryPolicy/backoffStrategyFactory'; export { OnRetryFn } from './policies/reactive/retryPolicy/onRetryFn'; export { RetryPolicy } from './policies/reactive/retryPolicy/retryPolicy'; +export { ExecutedFn } from './types/executedFn'; export { OnFinallyFn } from './types/onFinallyFn'; +export { PolicyModificationNotAllowedException } from './types/policyModificationNotAllowedException'; export { Predicate } from './types/predicate'; +export { SuccessDeferred } from './utils/successDeferred'; diff --git a/src/policies/policy.ts b/src/policies/policy.ts index 74c70d2..9611825 100644 --- a/src/policies/policy.ts +++ b/src/policies/policy.ts @@ -1,3 +1,27 @@ +import { ExecutedFn } from '../types/executedFn'; +import { PolicyModificationNotAllowedException } from '../types/policyModificationNotAllowedException'; + export abstract class Policy { - public abstract async execute(fn: () => ResultType | Promise): Promise; + private executing = 0; + + public async execute(fn: ExecutedFn): Promise { + try { + this.executing++; + return await this.policyExecutorImpl(fn); + } finally { + this.executing--; + } + } + + public isExecuting(): boolean { + return this.executing > 0; + } + + protected throwForPolicyModificationIfExecuting(): void { + if (this.isExecuting()) { + throw new PolicyModificationNotAllowedException(); + } + } + + protected abstract async policyExecutorImpl(fn: ExecutedFn): Promise; } diff --git a/src/policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException.ts b/src/policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException.ts new file mode 100644 index 0000000..9c6a4f3 --- /dev/null +++ b/src/policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException.ts @@ -0,0 +1 @@ +export class BulkheadCompartmentRejectedException extends Error {} diff --git a/src/policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy.ts b/src/policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy.ts new file mode 100644 index 0000000..5962faf --- /dev/null +++ b/src/policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy.ts @@ -0,0 +1,75 @@ +import { SuccessDeferred } from '../../../utils/successDeferred'; +import { ProactivePolicy } from '../proactivePolicy'; +import { BulkheadCompartmentRejectedException } from './bulkheadCompartmentRejectedException'; + +export class BulkheadIsolationPolicy extends ProactivePolicy { + private bulkheadCompartmentSize = Number.POSITIVE_INFINITY; + private queueSize = 0; + + private bulkheadCompartmentUsage = 0; + private readonly queue: Array> = []; + + public maxConcurrency(bulkheadCompartmentSize: number): void { + if (!Number.isInteger(bulkheadCompartmentSize)) { + throw new Error('bulkheadCompartmentSize must be integer'); + } + + if (bulkheadCompartmentSize <= 0) { + throw new Error('bulkheadCompartmentSize must be greater than 0'); + } + + if (!Number.isSafeInteger(bulkheadCompartmentSize)) { + throw new Error('bulkheadCompartmentSize must be less than or equal to 2^53 - 1'); + } + + this.throwForPolicyModificationIfExecuting(); + + this.bulkheadCompartmentSize = bulkheadCompartmentSize; + } + + public maxQueuedActions(queueSize: number): void { + if (!Number.isInteger(queueSize)) { + throw new Error('queueSize must be integer'); + } + + if (queueSize < 0) { + throw new Error('queueSize must be greater than or equal to 0'); + } + + if (!Number.isSafeInteger(queueSize)) { + throw new Error('queueSize must be less than or equal to 2^53 - 1'); + } + + this.throwForPolicyModificationIfExecuting(); + + this.queueSize = queueSize; + } + + public getAvailableSlotsCount(): number { + return this.bulkheadCompartmentSize - this.bulkheadCompartmentUsage; + } + + public getAvailableQueuedActionsCount(): number { + return this.queueSize - this.queue.length; + } + + protected async policyExecutorImpl(fn: () => ResultType | Promise): Promise { + if (this.bulkheadCompartmentUsage >= this.bulkheadCompartmentSize) { + if (this.queue.length >= this.queueSize) { + throw new BulkheadCompartmentRejectedException(); + } + + const queuingDeferred = new SuccessDeferred(); + this.queue.push(queuingDeferred); + await queuingDeferred.promise; + } + + try { + this.bulkheadCompartmentUsage++; + return await fn(); + } finally { + this.bulkheadCompartmentUsage--; + this.queue.shift()?.resolve(); + } + } +} diff --git a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts index f175794..90b5fd9 100644 --- a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts +++ b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts @@ -7,8 +7,6 @@ export class TimeoutPolicy extends ProactivePolicy { private timeoutMs: number | undefined; private readonly onTimeoutFns: OnTimeoutFn[] = []; - private executing = 0; - public timeoutAfter(timeoutMs: number): void { if (!Number.isInteger(timeoutMs)) { throw new Error('timeoutMs must be integer'); @@ -22,24 +20,18 @@ export class TimeoutPolicy extends ProactivePolicy { throw new Error('timeoutMs must be less than or equal to 2^53 - 1'); } - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.timeoutMs = timeoutMs; } public onTimeout(fn: (timedOutAfterMs: number) => void | Promise): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onTimeoutFns.push(fn); } - public async execute(fn: () => Promise): Promise { - this.executing++; - + protected async policyExecutorImpl(fn: () => Promise): Promise { const executionPromise = (async (): Promise => { try { return await fn(); @@ -77,7 +69,6 @@ export class TimeoutPolicy extends ProactivePolicy { throw typedEx.innerException; } finally { clearTimeout(timeoutId); - this.executing--; } } } diff --git a/src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts b/src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts index b0aeb57..0f3fbed 100644 --- a/src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts +++ b/src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy.ts @@ -18,7 +18,6 @@ export class CircuitBreakerPolicy extends ReactivePolicy private state: CircuitState = 'Closed'; private lastStateTransition: number = Date.now(); private consecutiveReactionCounter = 0; - private executing = 0; public breakAfter(numberOfConsecutiveReactionsBeforeCircuitBreak: number): void { if (!Number.isInteger(numberOfConsecutiveReactionsBeforeCircuitBreak)) { @@ -33,9 +32,7 @@ export class CircuitBreakerPolicy extends ReactivePolicy throw new Error('numberOfConsecutiveReactionsBeforeCircuitBreak must be less than or equal to 2^53 - 1'); } - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.numberOfConsecutiveReactionsBeforeCircuitBreak = numberOfConsecutiveReactionsBeforeCircuitBreak; } @@ -53,9 +50,7 @@ export class CircuitBreakerPolicy extends ReactivePolicy throw new Error('durationOfCircuitBreakMs must be less than or equal to 2^53 - 1'); } - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.durationOfCircuitBreakMs = durationOfCircuitBreakMs; } @@ -77,104 +72,90 @@ export class CircuitBreakerPolicy extends ReactivePolicy } public onClose(onCloseFn: OnCloseFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onCloseFns.push(onCloseFn); } public onOpen(onOpenFn: OnOpenFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onOpenFns.push(onOpenFn); } public onAttemptingClose(onAttemptingCloseFn: OnAttemptingCloseFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onAttemptingCloseFns.push(onAttemptingCloseFn); } public onIsolate(onIsolateFn: OnIsolateFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onIsolateFns.push(onIsolateFn); } - public async execute(fn: () => ResultType | Promise): Promise { - try { - this.executing++; - - await this.attemptClosingIfShould(); - - if (this.state === 'Open') { - throw new BrokenCircuitException(); - } + protected async policyExecutorImpl(fn: () => ResultType | Promise): Promise { + await this.attemptClosingIfShould(); - if (this.state === 'Isolated') { - throw new IsolatedCircuitException(); - } - - try { - const result = await fn(); + if (this.state === 'Open') { + throw new BrokenCircuitException(); + } - const isReactiveToResult = await this.isReactiveToResult(result); - if (!isReactiveToResult) { - this.consecutiveReactionCounter = 0; + if (this.state === 'Isolated') { + throw new IsolatedCircuitException(); + } - if (this.state === 'AttemptingClose') { - await this.transitionState('Closed'); - } + try { + const result = await fn(); - return result; - } + const isReactiveToResult = await this.isReactiveToResult(result); + if (!isReactiveToResult) { + this.consecutiveReactionCounter = 0; if (this.state === 'AttemptingClose') { - await this.transitionState('Open'); - } - - if (this.state === 'Closed') { - this.consecutiveReactionCounter++; - if (this.consecutiveReactionCounter >= this.numberOfConsecutiveReactionsBeforeCircuitBreak) { - await this.transitionState('Open'); - } + await this.transitionState('Closed'); } return result; - } catch (ex) { - const isReactiveToException = await this.isReactiveToException(ex); - if (!isReactiveToException) { - this.consecutiveReactionCounter = 0; - - if (this.state === 'AttemptingClose') { - await this.transitionState('Closed'); - } + } - throw ex; - } + if (this.state === 'AttemptingClose') { + await this.transitionState('Open'); + } - if (this.state === 'AttemptingClose') { + if (this.state === 'Closed') { + this.consecutiveReactionCounter++; + if (this.consecutiveReactionCounter >= this.numberOfConsecutiveReactionsBeforeCircuitBreak) { await this.transitionState('Open'); } + } - if (this.state === 'Closed') { - this.consecutiveReactionCounter++; - if (this.consecutiveReactionCounter >= this.numberOfConsecutiveReactionsBeforeCircuitBreak) { - await this.transitionState('Open'); - } + return result; + } catch (ex) { + const isReactiveToException = await this.isReactiveToException(ex); + if (!isReactiveToException) { + this.consecutiveReactionCounter = 0; + + if (this.state === 'AttemptingClose') { + await this.transitionState('Closed'); } throw ex; } - } finally { - this.executing--; + + if (this.state === 'AttemptingClose') { + await this.transitionState('Open'); + } + + if (this.state === 'Closed') { + this.consecutiveReactionCounter++; + if (this.consecutiveReactionCounter >= this.numberOfConsecutiveReactionsBeforeCircuitBreak) { + await this.transitionState('Open'); + } + } + + throw ex; } } diff --git a/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts b/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts index 3090efe..0177db9 100644 --- a/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts +++ b/src/policies/reactive/fallbackPolicy/fallbackPolicy.ts @@ -9,36 +9,26 @@ export class FallbackPolicy extends ReactivePolicy { private readonly onFallbackFns: Array> = []; private readonly onFinallyFns: OnFinallyFn[] = []; - private executing = 0; - public fallback(fallbackChainLink: FallbackChainLink): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.fallbackChain.push(fallbackChainLink); } public onFallback(onFallbackFn: OnFallbackFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onFallbackFns.push(onFallbackFn); } public onFinally(fn: OnFinallyFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onFinallyFns.push(fn); } - public async execute(fn: () => ResultType | Promise): Promise { + protected async policyExecutorImpl(fn: () => ResultType | Promise): Promise { try { - this.executing++; - const remainingFallbackChain = [...this.fallbackChain]; let executor = fn; @@ -97,16 +87,12 @@ export class FallbackPolicy extends ReactivePolicy { } } } finally { - try { - for (const onFinallyFn of this.onFinallyFns) { - try { - await onFinallyFn(); - } catch (onFinallyError) { - // ignored - } + for (const onFinallyFn of this.onFinallyFns) { + try { + await onFinallyFn(); + } catch (onFinallyError) { + // ignored } - } finally { - this.executing--; } } } diff --git a/src/policies/reactive/retryPolicy/retryPolicy.ts b/src/policies/reactive/retryPolicy/retryPolicy.ts index 9bdc45f..879d94b 100644 --- a/src/policies/reactive/retryPolicy/retryPolicy.ts +++ b/src/policies/reactive/retryPolicy/retryPolicy.ts @@ -8,8 +8,6 @@ export class RetryPolicy extends ReactivePolicy { private readonly onRetryFns: Array> = []; private readonly onFinallyFns: OnFinallyFn[] = []; - private executing = 0; - public retryCount(retryCount: number): void { if (!Number.isInteger(retryCount)) { throw new Error('retryCount must be integer'); @@ -23,49 +21,37 @@ export class RetryPolicy extends ReactivePolicy { throw new Error('retryCount must be less than or equal to 2^53 - 1'); } - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.totalRetryCount = retryCount; } public retryForever(): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.totalRetryCount = Number.POSITIVE_INFINITY; } public onRetry(fn: OnRetryFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onRetryFns.push(fn); } public waitBeforeRetry(strategy: BackoffStrategy): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.backoffStrategy = strategy; } public onFinally(fn: OnFinallyFn): void { - if (this.executing > 0) { - throw new Error('cannot modify policy during execution'); - } + this.throwForPolicyModificationIfExecuting(); this.onFinallyFns.push(fn); } - public async execute(fn: () => ResultType | Promise): Promise { + protected async policyExecutorImpl(fn: () => ResultType | Promise): Promise { try { - this.executing++; - let currentRetryCount = 0; // eslint-disable-next-line no-constant-condition @@ -125,16 +111,12 @@ export class RetryPolicy extends ReactivePolicy { } } } finally { - try { - for (const onFinallyFn of this.onFinallyFns) { - try { - await onFinallyFn(); - } catch (onFinallyError) { - // ignored - } + for (const onFinallyFn of this.onFinallyFns) { + try { + await onFinallyFn(); + } catch (onFinallyError) { + // ignored } - } finally { - this.executing--; } } } diff --git a/src/types/executedFn.ts b/src/types/executedFn.ts new file mode 100644 index 0000000..3dd664d --- /dev/null +++ b/src/types/executedFn.ts @@ -0,0 +1 @@ +export type ExecutedFn = () => ResultType | Promise; diff --git a/src/types/policyModificationNotAllowedException.ts b/src/types/policyModificationNotAllowedException.ts new file mode 100644 index 0000000..03c89eb --- /dev/null +++ b/src/types/policyModificationNotAllowedException.ts @@ -0,0 +1 @@ +export class PolicyModificationNotAllowedException extends Error {} diff --git a/src/utils/successDeferred.ts b/src/utils/successDeferred.ts new file mode 100644 index 0000000..7d528bc --- /dev/null +++ b/src/utils/successDeferred.ts @@ -0,0 +1,10 @@ +export class SuccessDeferred { + public resolve!: (value?: T | Promise) => void; + public promise: Promise; + + public constructor() { + this.promise = new Promise((resolve): void => { + this.resolve = resolve; + }); + } +} diff --git a/test/specs/bulkheadIsolationPolicy.test.ts b/test/specs/bulkheadIsolationPolicy.test.ts new file mode 100644 index 0000000..c380d16 --- /dev/null +++ b/test/specs/bulkheadIsolationPolicy.test.ts @@ -0,0 +1,419 @@ +import { expect } from 'chai'; +import { BulkheadCompartmentRejectedException } from '../../src/policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException'; +import { BulkheadIsolationPolicy } from '../../src/policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy'; +import { PolicyModificationNotAllowedException } from '../../src/types/policyModificationNotAllowedException'; +import { SuccessDeferred } from '../../src/utils/successDeferred'; + +describe('BulkheadIsolationPolicy', (): void => { + it('should run the synchronous execution callback and return its result', async (): Promise => { + const policy = new BulkheadIsolationPolicy(); + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the asynchronous execution callback and return its result', async (): Promise => { + const policy = new BulkheadIsolationPolicy(); + const result = await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the synchronous execution callback and throw its exceptions', async (): Promise => { + const policy = new BulkheadIsolationPolicy(); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should run the asynchronous execution callback and throw its exceptions', async (): Promise => { + const policy = new BulkheadIsolationPolicy(); + + try { + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new Error('TestException'); + }, + ); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should limit the concurrently running actions to bulkheadCompartmentSize', async (): Promise => { + const policy = new BulkheadIsolationPolicy(); + policy.maxConcurrency(1); + + expect(policy.getAvailableSlotsCount()).to.equal(1); + expect(policy.getAvailableQueuedActionsCount()).to.equal(0); + + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(0); + + try { + await policy.execute((): void => { + // empty + }); + } catch (ex) { + expect(ex instanceof BulkheadCompartmentRejectedException).to.be.true; + } + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(0); + }); + + it('should queue up maximum queueSize actions on hold if already executing bulkheadCompartmentSize actions', (): void => { + const policy = new BulkheadIsolationPolicy(); + policy.maxConcurrency(1); + policy.maxQueuedActions(1); + + expect(policy.getAvailableSlotsCount()).to.equal(1); + expect(policy.getAvailableQueuedActionsCount()).to.equal(1); + + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(1); + + let executed = false; + policy.execute((): void => { + executed = true; + }); + + expect(executed).to.be.false; + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(0); + }); + + it('should execute the first queued action if an executed action finishes', async (): Promise => { + const policy = new BulkheadIsolationPolicy(); + policy.maxConcurrency(1); + policy.maxQueuedActions(2); + + const deferred1 = new SuccessDeferred(); + let execute1Started = false; + let execute1Finished = false; + + const deferred2 = new SuccessDeferred(); + let execute2Started = false; + let execute2Finished = false; + + const deferred3 = new SuccessDeferred(); + let execute3Started = false; + let execute3Finished = false; + + expect(policy.getAvailableSlotsCount()).to.equal(1); + expect(policy.getAvailableQueuedActionsCount()).to.equal(2); + expect(execute1Started).to.be.false; + expect(execute1Finished).to.be.false; + expect(execute2Started).to.be.false; + expect(execute2Finished).to.be.false; + expect(execute3Started).to.be.false; + expect(execute3Finished).to.be.false; + + const executionPromise1 = policy.execute( + async (): Promise => { + execute1Started = true; + await deferred1.promise; + execute1Finished = true; + }, + ); + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(2); + expect(execute1Started).to.be.true; + expect(execute1Finished).to.be.false; + expect(execute2Started).to.be.false; + expect(execute2Finished).to.be.false; + expect(execute3Started).to.be.false; + expect(execute3Finished).to.be.false; + + const executionPromise2 = policy.execute( + async (): Promise => { + execute2Started = true; + await deferred2.promise; + execute2Finished = true; + }, + ); + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(1); + expect(execute1Started).to.be.true; + expect(execute1Finished).to.be.false; + expect(execute2Started).to.be.false; + expect(execute2Finished).to.be.false; + expect(execute3Started).to.be.false; + expect(execute3Finished).to.be.false; + + const executionPromise3 = policy.execute( + async (): Promise => { + execute3Started = true; + await deferred3.promise; + execute3Finished = true; + }, + ); + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(0); + expect(execute1Started).to.be.true; + expect(execute1Finished).to.be.false; + expect(execute2Started).to.be.false; + expect(execute2Finished).to.be.false; + expect(execute3Started).to.be.false; + expect(execute3Finished).to.be.false; + + deferred1.resolve(); + await executionPromise1; + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(1); + expect(execute1Started).to.be.true; + expect(execute1Finished).to.be.true; + expect(execute2Started).to.be.true; + expect(execute2Finished).to.be.false; + expect(execute3Started).to.be.false; + expect(execute3Finished).to.be.false; + + deferred2.resolve(); + await executionPromise2; + + expect(policy.getAvailableSlotsCount()).to.equal(0); + expect(policy.getAvailableQueuedActionsCount()).to.equal(2); + expect(execute1Started).to.be.true; + expect(execute1Finished).to.be.true; + expect(execute2Started).to.be.true; + expect(execute2Finished).to.be.true; + expect(execute3Started).to.be.true; + expect(execute3Finished).to.be.false; + + deferred3.resolve(); + await executionPromise3; + + expect(policy.getAvailableSlotsCount()).to.equal(1); + expect(policy.getAvailableQueuedActionsCount()).to.equal(2); + expect(execute1Started).to.be.true; + expect(execute1Finished).to.be.true; + expect(execute2Started).to.be.true; + expect(execute2Finished).to.be.true; + expect(execute3Started).to.be.true; + expect(execute3Finished).to.be.true; + }); + + it('should not allow to set maxConcurrency during execution', (): void => { + const policy = new BulkheadIsolationPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.maxConcurrency(1); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }); + + it('should not allow to set maxQueuedActions during execution', (): void => { + const policy = new BulkheadIsolationPolicy(); + policy.execute( + async (): Promise => { + await new Promise((): void => { + // will not resolve + }); + }, + ); + + try { + policy.maxQueuedActions(1); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }); + + it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { + const policy = new BulkheadIsolationPolicy(); + + const attemptPolicyModification = (expectFailure: boolean): void => { + try { + policy.maxConcurrency(100); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + + try { + policy.maxQueuedActions(0); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }; + + const executionResolverAddedDeferreds: Array<{ + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + }> = new Array(100).fill(undefined).map((): { + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + } => { + let resolverAddedResolver!: () => void; + const resolverAddedPromise = new Promise((resolve): void => { + resolverAddedResolver = resolve; + }); + + return { + resolverAddedPromise, + resolverAddedResolver, + }; + }); + + const executionResolvers: Array<() => void> = []; + + attemptPolicyModification(false); + + for (let i = 0; i < 100; i++) { + policy.execute( + // eslint-disable-next-line no-loop-func + async (): Promise => { + await new Promise((resolve): void => { + executionResolvers.push(resolve); + executionResolverAddedDeferreds[i].resolverAddedResolver(); + }); + }, + ); + + await executionResolverAddedDeferreds[i].resolverAddedPromise; + expect(executionResolvers.length).to.equal(i + 1); + + attemptPolicyModification(true); + } + + for (let i = 0; i < 100; i++) { + executionResolvers[i](); + attemptPolicyModification(true); + } + + attemptPolicyModification(false); + }); + + it('should throw error when setting maxConcurrency to 0', (): void => { + const policy = new BulkheadIsolationPolicy(); + + try { + policy.maxConcurrency(0); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('bulkheadCompartmentSize must be greater than 0'); + } + }); + + it('should throw error when setting maxConcurrency to <0', (): void => { + const policy = new BulkheadIsolationPolicy(); + + try { + policy.maxConcurrency(-1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('bulkheadCompartmentSize must be greater than 0'); + } + }); + + it('should throw error when setting maxConcurrency to a non-integer', (): void => { + const policy = new BulkheadIsolationPolicy(); + + try { + policy.maxConcurrency(0.1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('bulkheadCompartmentSize must be integer'); + } + }); + + it('should throw error when setting maxConcurrency to a non-safe integer', (): void => { + const policy = new BulkheadIsolationPolicy(); + + try { + policy.maxConcurrency(2 ** 53); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('bulkheadCompartmentSize must be less than or equal to 2^53 - 1'); + } + }); + + it('should not throw error when setting maxQueuedActions to 0', (): void => { + const policy = new BulkheadIsolationPolicy(); + policy.maxQueuedActions(0); + }); + + it('should throw error when setting maxQueuedActions to <0', (): void => { + const policy = new BulkheadIsolationPolicy(); + + try { + policy.maxQueuedActions(-1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('queueSize must be greater than or equal to 0'); + } + }); + + it('should throw error when setting maxQueuedActions to a non-integer', (): void => { + const policy = new BulkheadIsolationPolicy(); + + try { + policy.maxQueuedActions(0.1); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('queueSize must be integer'); + } + }); + + it('should throw error when setting maxQueuedActions to a non-safe integer', (): void => { + const policy = new BulkheadIsolationPolicy(); + + try { + policy.maxQueuedActions(2 ** 53); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('queueSize must be less than or equal to 2^53 - 1'); + } + }); +}); diff --git a/test/specs/circuitBreakerPolicy.test.ts b/test/specs/circuitBreakerPolicy.test.ts index 35e6f8a..b0a6b66 100644 --- a/test/specs/circuitBreakerPolicy.test.ts +++ b/test/specs/circuitBreakerPolicy.test.ts @@ -3,6 +3,7 @@ import { SinonFakeTimers, useFakeTimers } from 'sinon'; import { BrokenCircuitException } from '../../src/policies/reactive/circuitBreakerPolicy/brokenCircuitException'; import { CircuitBreakerPolicy } from '../../src/policies/reactive/circuitBreakerPolicy/circuitBreakerPolicy'; import { IsolatedCircuitException } from '../../src/policies/reactive/circuitBreakerPolicy/isolatedCircuitException'; +import { PolicyModificationNotAllowedException } from '../../src/types/policyModificationNotAllowedException'; describe('CircuitBreakerPolicy', (): void => { let clock: SinonFakeTimers; @@ -58,9 +59,12 @@ describe('CircuitBreakerPolicy', (): void => { const policy = new CircuitBreakerPolicy(); try { - await policy.execute((): unknown => { - throw new Error('TestException'); - }); + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new Error('TestException'); + }, + ); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('TestException'); @@ -936,7 +940,7 @@ describe('CircuitBreakerPolicy', (): void => { policy.breakAfter(1); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -954,7 +958,7 @@ describe('CircuitBreakerPolicy', (): void => { policy.breakFor(1); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -974,7 +978,7 @@ describe('CircuitBreakerPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -994,7 +998,7 @@ describe('CircuitBreakerPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -1014,7 +1018,7 @@ describe('CircuitBreakerPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -1034,7 +1038,7 @@ describe('CircuitBreakerPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -1048,7 +1052,7 @@ describe('CircuitBreakerPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -1057,7 +1061,7 @@ describe('CircuitBreakerPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -1068,7 +1072,7 @@ describe('CircuitBreakerPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -1079,7 +1083,7 @@ describe('CircuitBreakerPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -1090,7 +1094,7 @@ describe('CircuitBreakerPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -1101,7 +1105,7 @@ describe('CircuitBreakerPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }; diff --git a/test/specs/fallbackPolicy.test.ts b/test/specs/fallbackPolicy.test.ts index 4c84f5b..2488529 100644 --- a/test/specs/fallbackPolicy.test.ts +++ b/test/specs/fallbackPolicy.test.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { FallbackChainExhaustedException } from '../../src/policies/reactive/fallbackPolicy/fallbackChainExhaustedException'; import { FallbackPolicy } from '../../src/policies/reactive/fallbackPolicy/fallbackPolicy'; +import { PolicyModificationNotAllowedException } from '../../src/types/policyModificationNotAllowedException'; describe('FallbackPolicy', (): void => { it('should run the synchronous execution callback and return its result by default', async (): Promise => { @@ -43,9 +44,12 @@ describe('FallbackPolicy', (): void => { const policy = new FallbackPolicy(); try { - await policy.execute((): unknown => { - throw new Error('TestException'); - }); + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new Error('TestException'); + }, + ); expect.fail('did not throw'); } catch (ex) { expect((ex as Error).message).to.equal('TestException'); @@ -993,7 +997,7 @@ describe('FallbackPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -1013,7 +1017,7 @@ describe('FallbackPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -1033,7 +1037,7 @@ describe('FallbackPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -1049,7 +1053,7 @@ describe('FallbackPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -1060,7 +1064,7 @@ describe('FallbackPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -1071,7 +1075,7 @@ describe('FallbackPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }; diff --git a/test/specs/retryPolicy.test.ts b/test/specs/retryPolicy.test.ts index 2b9609c..c4eacf6 100644 --- a/test/specs/retryPolicy.test.ts +++ b/test/specs/retryPolicy.test.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { SinonFakeTimers, useFakeTimers } from 'sinon'; import { RetryPolicy } from '../../src/policies/reactive/retryPolicy/retryPolicy'; +import { PolicyModificationNotAllowedException } from '../../src/types/policyModificationNotAllowedException'; describe('RetryPolicy', (): void => { let clock: SinonFakeTimers; @@ -738,10 +739,24 @@ describe('RetryPolicy', (): void => { return 'Diplomatiq is cool.'; }); + expect(executed).to.equal(1); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(1000); + expect(Date.now()).to.equal(1000); + expect(executed).to.equal(2); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(1000); + expect(Date.now()).to.equal(2000); + expect(executed).to.equal(3); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore - await clock.tickAsync(4000); - expect(Date.now()).to.equal(4000); + await clock.tickAsync(1000); + expect(Date.now()).to.equal(3000); expect(executed).to.equal(4); await executionPromise; @@ -771,9 +786,23 @@ describe('RetryPolicy', (): void => { return 'Diplomatiq is cool.'; }); + expect(executed).to.equal(1); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(1000); + expect(Date.now()).to.equal(1000); + expect(executed).to.equal(2); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(2000); + expect(Date.now()).to.equal(3000); + expect(executed).to.equal(3); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore - await clock.tickAsync(6000); + await clock.tickAsync(3000); expect(Date.now()).to.equal(6000); expect(executed).to.equal(4); @@ -799,10 +828,24 @@ describe('RetryPolicy', (): void => { expect(ex.message).to.equal('TestException'); }); + expect(executed).to.equal(1); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(1000); + expect(Date.now()).to.equal(1000); + expect(executed).to.equal(2); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(1000); + expect(Date.now()).to.equal(2000); + expect(executed).to.equal(3); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore - await clock.tickAsync(4000); - expect(Date.now()).to.equal(4000); + await clock.tickAsync(1000); + expect(Date.now()).to.equal(3000); expect(executed).to.equal(4); await executionPromise; @@ -836,9 +879,23 @@ describe('RetryPolicy', (): void => { expect(ex.message).to.equal('TestException'); }); + expect(executed).to.equal(1); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(1000); + expect(Date.now()).to.equal(1000); + expect(executed).to.equal(2); + + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore + await clock.tickAsync(2000); + expect(Date.now()).to.equal(3000); + expect(executed).to.equal(3); + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore // @ts-ignore - await clock.tickAsync(6000); + await clock.tickAsync(3000); expect(Date.now()).to.equal(6000); expect(executed).to.equal(4); @@ -860,7 +917,7 @@ describe('RetryPolicy', (): void => { policy.retryCount(2); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -878,7 +935,7 @@ describe('RetryPolicy', (): void => { policy.retryForever(); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -898,7 +955,7 @@ describe('RetryPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -916,7 +973,7 @@ describe('RetryPolicy', (): void => { policy.waitBeforeRetry((): number => 100); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -936,7 +993,7 @@ describe('RetryPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -950,7 +1007,7 @@ describe('RetryPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -959,7 +1016,7 @@ describe('RetryPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -970,7 +1027,7 @@ describe('RetryPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -979,7 +1036,7 @@ describe('RetryPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -990,7 +1047,7 @@ describe('RetryPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }; diff --git a/test/specs/timeoutPolicy.test.ts b/test/specs/timeoutPolicy.test.ts index 99b096f..58d51a3 100644 --- a/test/specs/timeoutPolicy.test.ts +++ b/test/specs/timeoutPolicy.test.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { TimeoutException } from '../../src/policies/proactive/timeoutPolicy/timeoutException'; import { TimeoutPolicy } from '../../src/policies/proactive/timeoutPolicy/timeoutPolicy'; +import { PolicyModificationNotAllowedException } from '../../src/types/policyModificationNotAllowedException'; describe('TimeoutPolicy', (): void => { it('should run the execution callback and return its result if no timeout is set', async (): Promise => { @@ -219,7 +220,7 @@ describe('TimeoutPolicy', (): void => { policy.timeoutAfter(10); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -239,7 +240,7 @@ describe('TimeoutPolicy', (): void => { }); expect.fail('did not throw'); } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }); @@ -253,7 +254,7 @@ describe('TimeoutPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } try { @@ -264,7 +265,7 @@ describe('TimeoutPolicy', (): void => { expect.fail('did not throw'); } } catch (ex) { - expect((ex as Error).message).to.equal('cannot modify policy during execution'); + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; } }; From 6107512bc601ddcf47a3856f70a010804801abea Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Mon, 30 Mar 2020 00:14:10 +0200 Subject: [PATCH 127/136] ci: Fix SonarCloud link to CI platform Closes #205. --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 27220b7..548ca2b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -10,7 +10,7 @@ sonar.sourceEncoding=UTF-8 # Meta-data for the project sonar.links.homepage=https://github.com/Diplomatiq/resily -sonar.links.ci=https://travis-ci.org/Diplomatiq/resily +sonar.links.ci=https://github.com/Diplomatiq/resily/actions sonar.links.scm=https://github.com/Diplomatiq/resily sonar.links.issue=https://github.com/Diplomatiq/resily/issues From 10c3b9ceab1aa24f1b9f097a7cb97bd3790c6d1e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2020 22:55:18 +0000 Subject: [PATCH 128/136] chore: bump @types/node from 13.9.3 to 13.9.5 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.3 to 13.9.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 87 ++--------------------------------------------- package.json | 2 +- 2 files changed, 4 insertions(+), 85 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8269c6..7593294 100644 --- a/package-lock.json +++ b/package-lock.json @@ -390,17 +390,6 @@ } } }, - "@commitlint/travis-cli": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/@commitlint/travis-cli/-/travis-cli-8.3.5.tgz", - "integrity": "sha512-E456A36Ya9Zrr0+ONfkPoHNdWnX4zfR6seHjuzTy0393iSHNc9cZ250mGw0SKQiYQu8x1QHrQyWwyRXLb2iASw==", - "dev": true, - "requires": { - "@commitlint/cli": "^8.3.5", - "babel-runtime": "6.26.0", - "execa": "0.11.0" - } - }, "@diplomatiq/crypto-random": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@diplomatiq/crypto-random/-/crypto-random-2.2.0.tgz", @@ -585,9 +574,9 @@ "dev": true }, "@types/node": { - "version": "13.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.3.tgz", - "integrity": "sha512-01s+ac4qerwd6RHD+mVbOEsraDHSgUaefQlEdBbUolnQFjKwCr7luvAlEwW1RFojh67u0z4OUTjPn9LEl4zIkA==", + "version": "13.9.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.5.tgz", + "integrity": "sha512-hkzMMD3xu6BrJpGVLeQ3htQQNAcOrJjX7WFmtK8zWQpz2UJf13LCFF2ALA7c9OVdvc2vQJeDdjfR35M0sBCxvw==", "dev": true }, "@types/parse-json": { @@ -1647,15 +1636,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2028,21 +2008,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "execa": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.11.0.tgz", - "integrity": "sha512-k5AR22vCt1DcfeiRixW46U5tMLtBg44ssdJM9PiXw3D8Bn5qyxFCSnKY/eR22y+ctFDGPqafpaXg2G4Emyua4A==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -2538,15 +2503,6 @@ "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", "dev": true }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, "git-raw-commits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.3.tgz", @@ -3126,12 +3082,6 @@ "has": "^1.0.3" } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, "is-string": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", @@ -3845,15 +3795,6 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -4153,12 +4094,6 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -4372,16 +4307,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -4870,12 +4795,6 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, "strip-indent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", diff --git a/package.json b/package.json index 48e7082..f173ee8 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@diplomatiq/eslint-config-tslib": "^3.0.0", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", - "@types/node": "^13.9.3", + "@types/node": "^13.9.5", "@types/sinon": "^7.5.2", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From 4b257ef611bce623d5d8a48b9cc854c436d6e29f Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Mon, 30 Mar 2020 18:11:55 +0200 Subject: [PATCH 129/136] feat: Implement NopPolicy Closes #208. --- README.md | 13 +++-- src/main.ts | 1 + src/policies/proactive/nopPolicy/nopPolicy.ts | 8 +++ test/specs/nopPolicy.test.ts | 54 +++++++++++++++++++ 4 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 src/policies/proactive/nopPolicy/nopPolicy.ts create mode 100644 test/specs/nopPolicy.test.ts diff --git a/README.md b/README.md index 76e3e9a..abb0b4c 100644 --- a/README.md +++ b/README.md @@ -123,10 +123,11 @@ Resily offers **reactive** and **proactive** policies: #### Proactive policies summary -| Policy | What does it claim? | How does it work? | -| ------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------- | -| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | -| [**BulkheadIsolationPolicy**](#bulkheadisolationpolicy) | Too many concurrent calls can overload a resource. | Limits the number of concurrently executed actions as specified. | +| Policy | What does it claim? | How does it work? | +| ------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | +| [**BulkheadIsolationPolicy**](#bulkheadisolationpolicy) | Too many concurrent calls can overload a resource. | Limits the number of concurrently executed actions as specified. | +| [**NopPolicy**](#noppolicy) | Does not claim anything. | Executes the wrapped method, and returns its result or throws its exceptions, without any intervention. | ### Reactive policies @@ -874,6 +875,10 @@ policy.getAvailableSlotsCount(); policy.getAvailableQueuedActionsCount(); ``` +#### NopPolicy + +`NopPolicy` does not claim anything. It executes the wrapped method, and returns its result or throws its exceptions, without any intervention. + ### Modifying a policy's configuration All policies' configuration parameters are set via setter methods. This could imply that all policies can be safely reconfigured whenever needed, but providing setter methods instead of constructor parameters is merely because this way the policies are more convenient to use. If you need to reconfigure a policy, you can do that, but not while it is still executing one or more methods: reconfiguring while executing could lead to unexpected side-effects. Therefore, if you tries to reconfigure a policy while executing, a `PolicyModificationNotAllowedException` is thrown. diff --git a/src/main.ts b/src/main.ts index 8f5a6b4..26db545 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,7 @@ export { RandomGenerator } from './interfaces/randomGenerator'; export { Policy } from './policies/policy'; export { BulkheadCompartmentRejectedException } from './policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException'; export { BulkheadIsolationPolicy } from './policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy'; +export { NopPolicy } from './policies/proactive/nopPolicy/nopPolicy'; export { ProactivePolicy } from './policies/proactive/proactivePolicy'; export { ExecutionException } from './policies/proactive/timeoutPolicy/executionException'; export { OnTimeoutFn } from './policies/proactive/timeoutPolicy/onTimeoutFn'; diff --git a/src/policies/proactive/nopPolicy/nopPolicy.ts b/src/policies/proactive/nopPolicy/nopPolicy.ts new file mode 100644 index 0000000..008e24c --- /dev/null +++ b/src/policies/proactive/nopPolicy/nopPolicy.ts @@ -0,0 +1,8 @@ +import { ExecutedFn } from '../../../types/executedFn'; +import { ProactivePolicy } from '../proactivePolicy'; + +export class NopPolicy extends ProactivePolicy { + protected async policyExecutorImpl(fn: ExecutedFn): Promise { + return fn(); + } +} diff --git a/test/specs/nopPolicy.test.ts b/test/specs/nopPolicy.test.ts new file mode 100644 index 0000000..ca47d84 --- /dev/null +++ b/test/specs/nopPolicy.test.ts @@ -0,0 +1,54 @@ +import { expect } from 'chai'; +import { NopPolicy } from '../../src/policies/proactive/nopPolicy/nopPolicy'; + +describe('NopPolicy', (): void => { + it('should run the synchronous execution callback and return its result', async (): Promise => { + const policy = new NopPolicy(); + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the asynchronous execution callback and return its result', async (): Promise => { + const policy = new NopPolicy(); + const result = await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the synchronous execution callback and throw its exceptions', async (): Promise => { + const policy = new NopPolicy(); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should run the asynchronous execution callback and throw its exceptions', async (): Promise => { + const policy = new NopPolicy(); + + try { + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new Error('TestException'); + }, + ); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); +}); From c60147d42bc0f1bee007d9bcf58b8e8729eddd8a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2020 00:04:07 +0000 Subject: [PATCH 130/136] chore: bump @types/node from 13.9.5 to 13.9.8 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.5 to 13.9.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7593294..d70be73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -574,9 +574,9 @@ "dev": true }, "@types/node": { - "version": "13.9.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.5.tgz", - "integrity": "sha512-hkzMMD3xu6BrJpGVLeQ3htQQNAcOrJjX7WFmtK8zWQpz2UJf13LCFF2ALA7c9OVdvc2vQJeDdjfR35M0sBCxvw==", + "version": "13.9.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz", + "integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index f173ee8..e28e22f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@diplomatiq/eslint-config-tslib": "^3.0.0", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", - "@types/node": "^13.9.5", + "@types/node": "^13.9.8", "@types/sinon": "^7.5.2", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From 618a9272bd32114f92ed7d49bf1af3b7e6915d2a Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Wed, 1 Apr 2020 00:33:43 +0200 Subject: [PATCH 131/136] ci: Run SonarCloud analysis on PR events too Closes #215. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3219abe..a20d51a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,8 +67,8 @@ jobs: - name: Test the code run: npm run test - name: Scan the code with SonarCloud - if: github.event_name == 'push' && matrix.node == 13 - uses: sonarsource/sonarcloud-github-action@v1.1 + if: matrix.node == 13 + uses: sonarsource/sonarcloud-github-action@34eca22d1c5760f6ec08cb4b5c2f026796eb8e30 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4f5c93e230be24b8f42e7ede41c6fd75659bb91f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2020 23:50:57 +0000 Subject: [PATCH 132/136] chore: bump @types/sinon from 7.5.2 to 9.0.0 Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 7.5.2 to 9.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 15 ++++++++++++--- package.json | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d70be73..803a9f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -586,9 +586,18 @@ "dev": true }, "@types/sinon": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", - "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.0.tgz", + "integrity": "sha512-v2TkYHkts4VXshMkcmot/H+ERZ2SevKa10saGaJPGCJ8vh3lKrC4u663zYEeRZxep+VbG6YRDtQ6gVqw9dYzPA==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz", + "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", "dev": true }, "@typescript-eslint/eslint-plugin": { diff --git a/package.json b/package.json index e28e22f..9801931 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^13.9.8", - "@types/sinon": "^7.5.2", + "@types/sinon": "^9.0.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", "cross-env": "^7.0.2", From 0e39ded8f2a1fe7e8703f5d3ef0a3eaf2d05beb9 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Wed, 1 Apr 2020 00:23:54 +0200 Subject: [PATCH 133/136] feat: Implement CachePolicy Closes #207. --- README.md | 127 +++- src/main.ts | 5 + .../proactive/cachePolicy/cachePolicy.ts | 124 ++++ .../proactive/cachePolicy/onCacheGetFn.ts | 1 + .../proactive/cachePolicy/onCacheMissFn.ts | 1 + .../proactive/cachePolicy/onCachePutFn.ts | 1 + .../cachePolicy/timeToLiveStrategy.ts | 1 + .../proactive/timeoutPolicy/timeoutPolicy.ts | 2 +- test/specs/cachePolicy.test.ts | 591 ++++++++++++++++++ 9 files changed, 847 insertions(+), 6 deletions(-) create mode 100644 src/policies/proactive/cachePolicy/cachePolicy.ts create mode 100644 src/policies/proactive/cachePolicy/onCacheGetFn.ts create mode 100644 src/policies/proactive/cachePolicy/onCacheMissFn.ts create mode 100644 src/policies/proactive/cachePolicy/onCachePutFn.ts create mode 100644 src/policies/proactive/cachePolicy/timeToLiveStrategy.ts create mode 100644 test/specs/cachePolicy.test.ts diff --git a/README.md b/README.md index abb0b4c..b3b68e6 100644 --- a/README.md +++ b/README.md @@ -123,11 +123,12 @@ Resily offers **reactive** and **proactive** policies: #### Proactive policies summary -| Policy | What does it claim? | How does it work? | -| ------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | -| [**BulkheadIsolationPolicy**](#bulkheadisolationpolicy) | Too many concurrent calls can overload a resource. | Limits the number of concurrently executed actions as specified. | -| [**NopPolicy**](#noppolicy) | Does not claim anything. | Executes the wrapped method, and returns its result or throws its exceptions, without any intervention. | +| Policy | What does it claim? | How does it work? | +| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | +| [**BulkheadIsolationPolicy**](#bulkheadisolationpolicy) | Too many concurrent calls can overload a resource. | Limits the number of concurrently executed actions as specified. | +| [**CachePolicy**](#cachepolicy) | Within a given time frame, a system may respond with the same answer, thus there is no need to actually perform the query. | Retrieves the response from a local cache within the time frame, after storing it on the first query. | +| [**NopPolicy**](#noppolicy) | Does not claim anything. | Executes the wrapped method, and returns its result or throws its exceptions, without any intervention. | ### Reactive policies @@ -875,6 +876,122 @@ policy.getAvailableSlotsCount(); policy.getAvailableQueuedActionsCount(); ``` +#### CachePolicy + +`CachePolicy` claims that within a given time frame, a system may respond with the same answer, thus there is no need to actually perform the query. It retrieves the response from a local cache within the time frame, after storing it on the first query. + +The `CachePolicy` is implemented as a simple in-memory cache. It works as follows: + +- For the first time (and every further time the cache is invalid), the `CachePolicy` executes the wrapped method, and caches its result. +- For subsequent execution calls, the cached result is returned and the wrapped method is not executed — as long as the cache remains valid. +- The cache is valid as long as it is not expired (see time to live settings below) or manually invalidated. + +Configure how long the cache should be valid: + +```typescript +import { CachePolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new CachePolicy; + +// the cache is valid for 10000ms from the moment the value is stored in the cache +policy.timeToLive('relative', 10000); + +// the cache is valid as long as Date.now() < 772149600000 +// this overwrites the previous setting +policy.timeToLive('absolute', 772149600000); + +// the cache is valid for 10000ms from the moment the value is stored in or retrieved from the cache +// this overwrites the previous setting +policy.timeToLive('sliding', 10000); +``` + +Invalidate the cache manually, causing the next `execute` call to run the wrapped method: + +```typescript +import { CachePolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new CachePolicy; + +policy.invalidate(); +``` + +Perform actions on caching events: + +```typescript +import { CachePolicy } from '@diplomatiq/resily'; + +// the wrapped method is supposed to return a string +const policy = new CachePolicy; +``` + +```typescript +// perform an action before the value is retrieved from the cache +policy.onCacheGet( + // onCacheGetFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onCacheGetFns, they will run sequentially +policy.onCacheGet(async () => { + // this will be awaited first +}); +policy.onCacheGet(async () => { + // then this will be awaited +}); + +// errors thrown by an onCacheGetFn will be caught and ignored +policy.onCacheGet(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +```typescript +// perform an action before the wrapped method is executed and its result is cached +policy.onCacheMiss( + // onCacheMissFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onCacheMissFns, they will run sequentially +policy.onCacheMiss(async () => { + // this will be awaited first +}); +policy.onCacheMiss(async () => { + // then this will be awaited +}); + +// errors thrown by an onCacheMissFn will be caught and ignored +policy.onCacheMiss(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + +```typescript +// perform an action after the wrapped method is executed and its result is cached +policy.onCachePut( + // onCachePutFns can be sync or async, they will be awaited + async () => {}, +); + +// you can set multiple onCachePutFns, they will run sequentially +policy.onCachePut(async () => { + // this will be awaited first +}); +policy.onCachePut(async () => { + // then this will be awaited +}); + +// errors thrown by an onCachePutFn will be caught and ignored +policy.onCachePut(() => { + // throwing an error has no effect outside the method + throw new Error(); +}); +``` + #### NopPolicy `NopPolicy` does not claim anything. It executes the wrapped method, and returns its result or throws its exceptions, without any intervention. diff --git a/src/main.ts b/src/main.ts index 26db545..2582e40 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,11 @@ export { RandomGenerator } from './interfaces/randomGenerator'; export { Policy } from './policies/policy'; export { BulkheadCompartmentRejectedException } from './policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException'; export { BulkheadIsolationPolicy } from './policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy'; +export { CachePolicy } from './policies/proactive/cachePolicy/cachePolicy'; +export { OnCacheGetFn } from './policies/proactive/cachePolicy/onCacheGetFn'; +export { OnCacheMissFn } from './policies/proactive/cachePolicy/onCacheMissFn'; +export { OnCachePutFn } from './policies/proactive/cachePolicy/onCachePutFn'; +export { TimeToLiveStrategy } from './policies/proactive/cachePolicy/timeToLiveStrategy'; export { NopPolicy } from './policies/proactive/nopPolicy/nopPolicy'; export { ProactivePolicy } from './policies/proactive/proactivePolicy'; export { ExecutionException } from './policies/proactive/timeoutPolicy/executionException'; diff --git a/src/policies/proactive/cachePolicy/cachePolicy.ts b/src/policies/proactive/cachePolicy/cachePolicy.ts new file mode 100644 index 0000000..300420a --- /dev/null +++ b/src/policies/proactive/cachePolicy/cachePolicy.ts @@ -0,0 +1,124 @@ +import { ExecutedFn } from '../../../types/executedFn'; +import { ProactivePolicy } from '../proactivePolicy'; +import { OnCacheGetFn } from './onCacheGetFn'; +import { OnCacheMissFn } from './onCacheMissFn'; +import { OnCachePutFn } from './onCachePutFn'; +import { TimeToLiveStrategy } from './timeToLiveStrategy'; + +export class CachePolicy extends ProactivePolicy { + private timeToLiveStrategy: TimeToLiveStrategy = 'relative'; + private timeToLiveValue = 1000; + private readonly onCacheGetFns: OnCacheGetFn[] = []; + private readonly onCachePutFns: OnCachePutFn[] = []; + private readonly onCacheMissFns: OnCacheMissFn[] = []; + + private cache!: ResultType; + private validUntil = -1; + + public timeToLive(strategy: TimeToLiveStrategy, value: number): void { + if (!Number.isInteger(value)) { + throw new Error('value must be integer'); + } + + if (value <= 0) { + throw new Error('value must be greater than 0'); + } + + if (!Number.isSafeInteger(value)) { + throw new Error('value must be less than or equal to 2^53 - 1'); + } + + this.throwForPolicyModificationIfExecuting(); + + this.timeToLiveStrategy = strategy; + this.timeToLiveValue = value; + } + + public onCacheGet(fn: OnCacheGetFn): void { + this.throwForPolicyModificationIfExecuting(); + + this.onCacheGetFns.push(fn); + } + + public onCachePut(fn: OnCachePutFn): void { + this.throwForPolicyModificationIfExecuting(); + + this.onCachePutFns.push(fn); + } + + public onCacheMiss(fn: OnCacheMissFn): void { + this.throwForPolicyModificationIfExecuting(); + + this.onCacheMissFns.push(fn); + } + + public invalidate(): void { + this.resetValidity(true); + } + + protected async policyExecutorImpl(fn: ExecutedFn): Promise { + if (this.isInvalid()) { + for (const onCacheMissFn of this.onCacheMissFns) { + try { + await onCacheMissFn(); + } catch (onCacheMissError) { + // ignore + } + } + + await this.updateCache(fn); + + for (const onCachePutFn of this.onCachePutFns) { + try { + await onCachePutFn(); + } catch (onCachePutError) { + // ignore + } + } + } else { + for (const onCacheGetFn of this.onCacheGetFns) { + try { + await onCacheGetFn(); + } catch (onCacheGetError) { + // ignore + } + } + } + + return this.cache; + } + + private async updateCache(fn: ExecutedFn): Promise { + this.cache = await fn(); + this.resetValidity(false); + } + + private isInvalid(): boolean { + if (this.cache === undefined || Date.now() >= this.validUntil) { + return true; + } + + if (this.timeToLiveStrategy === 'sliding') { + this.resetValidity(false); + } + + return false; + } + + private resetValidity(invalidate: boolean): void { + if (invalidate) { + this.validUntil = -1; + } else { + switch (this.timeToLiveStrategy) { + case 'relative': + case 'sliding': + this.validUntil = Date.now() + this.timeToLiveValue; + break; + + case 'absolute': + this.validUntil = this.timeToLiveValue; + break; + } + } + } +} diff --git a/src/policies/proactive/cachePolicy/onCacheGetFn.ts b/src/policies/proactive/cachePolicy/onCacheGetFn.ts new file mode 100644 index 0000000..4e3f6c1 --- /dev/null +++ b/src/policies/proactive/cachePolicy/onCacheGetFn.ts @@ -0,0 +1 @@ +export type OnCacheGetFn = () => void | Promise; diff --git a/src/policies/proactive/cachePolicy/onCacheMissFn.ts b/src/policies/proactive/cachePolicy/onCacheMissFn.ts new file mode 100644 index 0000000..d36aaaa --- /dev/null +++ b/src/policies/proactive/cachePolicy/onCacheMissFn.ts @@ -0,0 +1 @@ +export type OnCacheMissFn = () => void | Promise; diff --git a/src/policies/proactive/cachePolicy/onCachePutFn.ts b/src/policies/proactive/cachePolicy/onCachePutFn.ts new file mode 100644 index 0000000..f164601 --- /dev/null +++ b/src/policies/proactive/cachePolicy/onCachePutFn.ts @@ -0,0 +1 @@ +export type OnCachePutFn = () => void | Promise; diff --git a/src/policies/proactive/cachePolicy/timeToLiveStrategy.ts b/src/policies/proactive/cachePolicy/timeToLiveStrategy.ts new file mode 100644 index 0000000..f375113 --- /dev/null +++ b/src/policies/proactive/cachePolicy/timeToLiveStrategy.ts @@ -0,0 +1 @@ +export type TimeToLiveStrategy = 'relative' | 'absolute' | 'sliding'; diff --git a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts index 90b5fd9..832fe3f 100644 --- a/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts +++ b/src/policies/proactive/timeoutPolicy/timeoutPolicy.ts @@ -25,7 +25,7 @@ export class TimeoutPolicy extends ProactivePolicy { this.timeoutMs = timeoutMs; } - public onTimeout(fn: (timedOutAfterMs: number) => void | Promise): void { + public onTimeout(fn: OnTimeoutFn): void { this.throwForPolicyModificationIfExecuting(); this.onTimeoutFns.push(fn); diff --git a/test/specs/cachePolicy.test.ts b/test/specs/cachePolicy.test.ts new file mode 100644 index 0000000..7c7011b --- /dev/null +++ b/test/specs/cachePolicy.test.ts @@ -0,0 +1,591 @@ +import { expect } from 'chai'; +import { SinonFakeTimers, useFakeTimers } from 'sinon'; +import { CachePolicy } from '../../src/policies/proactive/cachePolicy/cachePolicy'; +import { PolicyModificationNotAllowedException } from '../../src/types/policyModificationNotAllowedException'; + +describe('CachePolicy', (): void => { + let clock: SinonFakeTimers; + + beforeEach((): void => { + clock = useFakeTimers({ + now: Date.now(), + toFake: ['Date'], + shouldAdvanceTime: false, + }); + }); + + afterEach((): void => { + clock.restore(); + }); + + it('should run the synchronous execution callback and return its result', async (): Promise => { + const policy = new CachePolicy(); + const result = await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the asynchronous execution callback and return its result', async (): Promise => { + const policy = new CachePolicy(); + const result = await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + return 'Diplomatiq is cool.'; + }, + ); + + expect(result).to.equal('Diplomatiq is cool.'); + }); + + it('should run the synchronous execution callback and throw its exceptions', async (): Promise => { + const policy = new CachePolicy(); + + try { + await policy.execute((): string => { + throw new Error('TestException'); + }); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it('should run the asynchronous execution callback and throw its exceptions', async (): Promise => { + const policy = new CachePolicy(); + + try { + await policy.execute( + // eslint-disable-next-line @typescript-eslint/require-await + async (): Promise => { + throw new Error('TestException'); + }, + ); + expect.fail('did not throw'); + } catch (ex) { + expect((ex as Error).message).to.equal('TestException'); + } + }); + + it("should hold the cache valid for Date.now() + 10000ms from each update if setting timeToLive('relative', 10000)", async (): Promise< + void + > => { + const policy = new CachePolicy(); + policy.timeToLive('relative', 10000); + + let result: string; + let executed = 0; + + const checkIntervalMs = 100; + + const executor = (returnValue: string): string => { + executed++; + return returnValue; + }; + + result = await policy.execute((): string => executor('Diplomatiq is cool.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + + for (let elapsedMs = 0; elapsedMs < 10000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('Diplomatiq is bad.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + clock.tick(checkIntervalMs); + } + + result = await policy.execute((): string => executor('No, Diplomatiq is cool.')); + expect(result).to.equal('No, Diplomatiq is cool.'); + expect(executed).to.equal(2); + + for (let elapsedMs = 0; elapsedMs < 10000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('No, Diplomatiq is bad.')); + expect(result).to.equal('No, Diplomatiq is cool.'); + expect(executed).to.equal(2); + clock.tick(checkIntervalMs); + } + + result = await policy.execute((): string => executor('Diplomatiq is actually cool.')); + expect(result).to.equal('Diplomatiq is actually cool.'); + expect(executed).to.equal(3); + }); + + it("should hold the cache valid for Date.now() + 10000ms if setting timeToLive('absolute', Date.now() + 10000ms)", async (): Promise< + void + > => { + const policy = new CachePolicy(); + policy.timeToLive('absolute', Date.now() + 10000); + + let result: string; + let executed = 0; + + const executor = (returnValue: string): string => { + executed++; + return returnValue; + }; + + const checkIntervalMs = 100; + + result = await policy.execute((): string => executor('Diplomatiq is cool.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + + for (let elapsedMs = 0; elapsedMs < 10000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('Diplomatiq is bad.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + clock.tick(checkIntervalMs); + } + + result = await policy.execute((): string => executor('Diplomatiq is cool.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(2); + + result = await policy.execute((): string => executor('Diplomatiq is cooler.')); + expect(result).to.equal('Diplomatiq is cooler.'); + expect(executed).to.equal(3); + + result = await policy.execute((): string => executor('Diplomatiq is way cooler.')); + expect(result).to.equal('Diplomatiq is way cooler.'); + expect(executed).to.equal(4); + + result = await policy.execute((): string => executor('Diplomatiq is the best.')); + expect(result).to.equal('Diplomatiq is the best.'); + expect(executed).to.equal(5); + }); + + it("should hold the cache valid for Date.now() + 10000ms from each interaction if setting timeToLive('sliding', 10000)", async (): Promise< + void + > => { + const policy = new CachePolicy(); + policy.timeToLive('sliding', 10000); + + let result: string; + let executed = 0; + + const executor = (returnValue: string): string => { + executed++; + return returnValue; + }; + + const checkIntervalMs = 100; + + result = await policy.execute((): string => executor('Diplomatiq is cool.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + + for (let elapsedMs = 0; elapsedMs < 20000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('Diplomatiq is bad.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + clock.tick(checkIntervalMs); + } + + clock.tick(10000); + + result = await policy.execute((): string => executor('No, Diplomatiq is cool.')); + expect(result).to.equal('No, Diplomatiq is cool.'); + expect(executed).to.equal(2); + + for (let elapsedMs = 0; elapsedMs < 20000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('No, Diplomatiq is bad.')); + expect(result).to.equal('No, Diplomatiq is cool.'); + expect(executed).to.equal(2); + clock.tick(checkIntervalMs); + } + + clock.tick(10000); + + result = await policy.execute((): string => executor('Diplomatiq is actually cool.')); + expect(result).to.equal('Diplomatiq is actually cool.'); + expect(executed).to.equal(3); + + for (let elapsedMs = 0; elapsedMs < 20000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('Diplomatiq is actually bad.')); + expect(result).to.equal('Diplomatiq is actually cool.'); + expect(executed).to.equal(3); + clock.tick(checkIntervalMs); + } + }); + + it('should invalidate the cache on invalidate', async (): Promise => { + const policy = new CachePolicy(); + policy.timeToLive('relative', 10000); + + let result: string; + let executed = 0; + + const executor = (returnValue: string): string => { + executed++; + return returnValue; + }; + + const checkIntervalMs = 100; + + result = await policy.execute((): string => executor('Diplomatiq is cool.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + + for (let elapsedMs = 0; elapsedMs < 5000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('Diplomatiq is bad.')); + expect(result).to.equal('Diplomatiq is cool.'); + expect(executed).to.equal(1); + clock.tick(checkIntervalMs); + } + + policy.invalidate(); + + result = await policy.execute((): string => executor('Diplomatiq is very cool.')); + expect(result).to.equal('Diplomatiq is very cool.'); + expect(executed).to.equal(2); + + for (let elapsedMs = 0; elapsedMs < 10000; elapsedMs += checkIntervalMs) { + result = await policy.execute((): string => executor('Diplomatiq is very bad.')); + expect(result).to.equal('Diplomatiq is very cool.'); + expect(executed).to.equal(2); + clock.tick(checkIntervalMs); + } + + result = await policy.execute((): string => executor('Diplomatiq is very cool.')); + expect(result).to.equal('Diplomatiq is very cool.'); + expect(executed).to.equal(3); + }); + + it('should run onCacheGetFns (but should not run onCacheMissFns and onCachePutFns) each time when the value is retrieved from the cache', async (): Promise< + void + > => { + const policy = new CachePolicy(); + policy.timeToLive('relative', 10000); + + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + let onCacheGetExecuted = 0; + let onCacheMissExecuted = 0; + let onCachePutExecuted = 0; + + policy.onCacheGet((): void => { + onCacheGetExecuted++; + }); + + policy.onCacheMiss((): void => { + onCacheMissExecuted++; + }); + + policy.onCachePut((): void => { + onCachePutExecuted++; + }); + + expect(onCacheGetExecuted).to.equal(0); + expect(onCacheMissExecuted).to.equal(0); + expect(onCachePutExecuted).to.equal(0); + + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(onCacheGetExecuted).to.equal(1); + expect(onCacheMissExecuted).to.equal(0); + expect(onCachePutExecuted).to.equal(0); + + await policy.execute((): string => { + return 'Diplomatiq is cool.'; + }); + + expect(onCacheGetExecuted).to.equal(2); + expect(onCacheMissExecuted).to.equal(0); + expect(onCachePutExecuted).to.equal(0); + }); + + it('should run onCacheMissFns before, and onCachePutFns after the value is retreived by executing the wrapped method (but should not run onCacheGetFns)', async (): Promise< + void + > => { + const policy = new CachePolicy(); + policy.timeToLive('relative', 10000); + + let onCacheGetExecuted = 0; + let onCacheMissExecuted = 0; + let onCachePutExecuted = 0; + + policy.onCacheGet((): void => { + onCacheGetExecuted++; + }); + + policy.onCacheMiss((): void => { + onCacheMissExecuted++; + }); + + policy.onCachePut((): void => { + onCachePutExecuted++; + }); + + expect(onCacheGetExecuted).to.equal(0); + expect(onCacheMissExecuted).to.equal(0); + expect(onCachePutExecuted).to.equal(0); + + await policy.execute((): string => { + expect(onCacheGetExecuted).to.equal(0); + expect(onCacheMissExecuted).to.equal(1); + expect(onCachePutExecuted).to.equal(0); + return 'Diplomatiq is cool.'; + }); + + expect(onCacheGetExecuted).to.equal(0); + expect(onCacheMissExecuted).to.equal(1); + expect(onCachePutExecuted).to.equal(1); + }); + + it('should not allow to set timeToLive during exception', (): void => { + const policy = new CachePolicy(); + policy.execute( + async (): Promise => { + // will not resolve + }, + ); + + try { + policy.timeToLive('relative', 1000); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }); + + it('should not allow to add onCacheGetFns during exception', (): void => { + const policy = new CachePolicy(); + policy.execute( + async (): Promise => { + // will not resolve + }, + ); + + try { + policy.onCacheGet((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }); + + it('should not allow to add onCachePutFns during exception', (): void => { + const policy = new CachePolicy(); + policy.execute( + async (): Promise => { + // will not resolve + }, + ); + + try { + policy.onCachePut((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }); + + it('should not allow to add onCacheMissFns during exception', (): void => { + const policy = new CachePolicy(); + policy.execute( + async (): Promise => { + // will not resolve + }, + ); + + try { + policy.onCacheMiss((): void => { + // empty + }); + expect.fail('did not throw'); + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }); + + it("should be properly mutex'd for running an instance multiple times simultaneously", async (): Promise => { + const policy = new CachePolicy(); + + const attemptPolicyModification = (expectFailure: boolean): void => { + try { + policy.timeToLive('relative', 1000); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + + try { + policy.onCacheGet((): void => { + // empty + }); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + + try { + policy.onCachePut((): void => { + // empty + }); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + + try { + policy.onCacheMiss((): void => { + // empty + }); + if (expectFailure) { + expect.fail('did not throw'); + } + } catch (ex) { + expect(ex instanceof PolicyModificationNotAllowedException).to.be.true; + } + }; + + const executionResolverAddedDeferreds: Array<{ + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + }> = new Array(100).fill(undefined).map((): { + resolverAddedPromise: Promise; + resolverAddedResolver: () => void; + } => { + let resolverAddedResolver!: () => void; + const resolverAddedPromise = new Promise((resolve): void => { + resolverAddedResolver = resolve; + }); + + return { + resolverAddedPromise, + resolverAddedResolver, + }; + }); + + const executionResolvers: Array<() => void> = []; + + attemptPolicyModification(false); + + for (let i = 0; i < 100; i++) { + policy.execute( + // eslint-disable-next-line no-loop-func + async (): Promise => { + await new Promise((resolve): void => { + executionResolvers.push(resolve); + executionResolverAddedDeferreds[i].resolverAddedResolver(); + }); + }, + ); + + await executionResolverAddedDeferreds[i].resolverAddedPromise; + expect(executionResolvers.length).to.equal(i + 1); + + attemptPolicyModification(true); + } + + for (let i = 0; i < 100; i++) { + executionResolvers[i](); + attemptPolicyModification(true); + } + + attemptPolicyModification(false); + }); + + it('should throw error when setting timeToLive to 0', (): void => { + const policy = new CachePolicy(); + + try { + policy.timeToLive('relative', 0); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be greater than 0'); + } + + try { + policy.timeToLive('absolute', 0); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be greater than 0'); + } + + try { + policy.timeToLive('sliding', 0); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be greater than 0'); + } + }); + + it('should throw error when setting timeToLive to <0', (): void => { + const policy = new CachePolicy(); + + try { + policy.timeToLive('relative', -1); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be greater than 0'); + } + + try { + policy.timeToLive('absolute', -1); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be greater than 0'); + } + + try { + policy.timeToLive('sliding', -1); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be greater than 0'); + } + }); + + it('should throw error when setting timeToLive to a non-integer', (): void => { + const policy = new CachePolicy(); + + try { + policy.timeToLive('relative', 0.1); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be integer'); + } + + try { + policy.timeToLive('absolute', 0.1); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be integer'); + } + + try { + policy.timeToLive('sliding', 0.1); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be integer'); + } + }); + + it('should throw error when setting timeToLive to a non-safe integer', (): void => { + const policy = new CachePolicy(); + + try { + policy.timeToLive('relative', 2 ** 53); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be less than or equal to 2^53 - 1'); + } + + try { + policy.timeToLive('absolute', 2 ** 53); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be less than or equal to 2^53 - 1'); + } + + try { + policy.timeToLive('sliding', 2 ** 53); + } catch (ex) { + expect((ex as Error).message).to.equal('value must be less than or equal to 2^53 - 1'); + } + }); +}); From a158507b884db44c29de34ec98d44573a812f6c9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2020 16:54:55 +0000 Subject: [PATCH 134/136] chore: bump @types/node from 13.9.8 to 13.11.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.8 to 13.11.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 803a9f2..7824c32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -574,9 +574,9 @@ "dev": true }, "@types/node": { - "version": "13.9.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.8.tgz", - "integrity": "sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.0.tgz", + "integrity": "sha512-uM4mnmsIIPK/yeO+42F2RQhGUIs39K2RFmugcJANppXe6J1nvH87PvzPZYpza7Xhhs8Yn9yIAVdLZ84z61+0xQ==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index 9801931..3e298ae 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@diplomatiq/eslint-config-tslib": "^3.0.0", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", - "@types/node": "^13.9.8", + "@types/node": "^13.11.0", "@types/sinon": "^9.0.0", "chai": "^4.2.0", "conventional-changelog-cli": "^2.0.31", From e92d53774a12753ddccd8281e0fde804d9545ac2 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Thu, 2 Apr 2020 22:02:15 +0200 Subject: [PATCH 135/136] feat: Implement PolicyCombination Closes #209. --- README.md | 59 ++++++++- src/main.ts | 3 +- src/policies/nopPolicy.ts | 8 ++ src/policies/policy.ts | 18 ++- src/policies/policyCombination.ts | 14 ++ src/policies/proactive/nopPolicy/nopPolicy.ts | 8 -- test/specs/nopPolicy.test.ts | 2 +- test/specs/policyCombination.test.ts | 122 ++++++++++++++++++ 8 files changed, 217 insertions(+), 17 deletions(-) create mode 100644 src/policies/nopPolicy.ts create mode 100644 src/policies/policyCombination.ts delete mode 100644 src/policies/proactive/nopPolicy/nopPolicy.ts create mode 100644 test/specs/policyCombination.test.ts diff --git a/README.md b/README.md index b3b68e6..195c29e 100644 --- a/README.md +++ b/README.md @@ -123,12 +123,18 @@ Resily offers **reactive** and **proactive** policies: #### Proactive policies summary -| Policy | What does it claim? | How does it work? | -| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | -| [**BulkheadIsolationPolicy**](#bulkheadisolationpolicy) | Too many concurrent calls can overload a resource. | Limits the number of concurrently executed actions as specified. | -| [**CachePolicy**](#cachepolicy) | Within a given time frame, a system may respond with the same answer, thus there is no need to actually perform the query. | Retrieves the response from a local cache within the time frame, after storing it on the first query. | -| [**NopPolicy**](#noppolicy) | Does not claim anything. | Executes the wrapped method, and returns its result or throws its exceptions, without any intervention. | +| Policy | What does it claim? | How does it work? | +| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| [**TimeoutPolicy**](#timeoutpolicy) | After some time, it is unlikely that the call will be successful. | Ensures the caller does not have to wait more than the specified timeout. | +| [**BulkheadIsolationPolicy**](#bulkheadisolationpolicy) | Too many concurrent calls can overload a resource. | Limits the number of concurrently executed actions as specified. | +| [**CachePolicy**](#cachepolicy) | Within a given time frame, a system may respond with the same answer, thus there is no need to actually perform the query. | Retrieves the response from a local cache within the time frame, after storing it on the first query. | + +#### Helpers and utilities summary + +| Policy | What does it claim? | How does it work? | +| ------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| [**NopPolicy**](#noppolicy) | Does not claim anything. | Executes the wrapped method, and returns its result or throws its exceptions, without any intervention. | +| [**PolicyCombination**](#policycombination) | Combining policies leads to better resilience. | Allows any policies to be combined together. | ### Reactive policies @@ -992,10 +998,51 @@ policy.onCachePut(() => { }); ``` +### Helpers and utilities + #### NopPolicy `NopPolicy` does not claim anything. It executes the wrapped method, and returns its result or throws its exceptions, without any intervention. +#### PolicyCombination + +Policies can be combined in multiple ways. Given the following: + +```typescript +import { FallbackPolicy, RetryPolicy, TimeoutPolicy } from '@diplomatiq/resily'; + +const timeoutPolicy = new TimeoutPolicy(); +const retryPolicy = new RetryPolicy(); +const fallbackPolicy = new FallbackPolicy(); + +const fn = () => { + // the executed code +}; +``` + +The naïve way to combine the above policies would be: + +```typescript +fallbackPolicy.execute(() => retryPolicy.execute(() => timeoutPolicy.execute(fn))); +``` + +The previous example is equivalent to the following: + +```typescript +fallbackPolicy.wrap(retryPolicy); +retryPolicy.wrap(timeoutPolicy); + +fallbackPolicy.execute(fn); +``` + +And also equivalent to the following: + +```typescript +PolicyCombination.wrap([fallbackPolicy, retryPolicy, timeoutPolicy]).execute(fn); +``` + +PolicyCombination expects at least two policies to be combined. + ### Modifying a policy's configuration All policies' configuration parameters are set via setter methods. This could imply that all policies can be safely reconfigured whenever needed, but providing setter methods instead of constructor parameters is merely because this way the policies are more convenient to use. If you need to reconfigure a policy, you can do that, but not while it is still executing one or more methods: reconfiguring while executing could lead to unexpected side-effects. Therefore, if you tries to reconfigure a policy while executing, a `PolicyModificationNotAllowedException` is thrown. diff --git a/src/main.ts b/src/main.ts index 2582e40..edb9507 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,7 @@ export { RandomGenerator } from './interfaces/randomGenerator'; +export { NopPolicy } from './policies/nopPolicy'; export { Policy } from './policies/policy'; +export { PolicyCombination } from './policies/policyCombination'; export { BulkheadCompartmentRejectedException } from './policies/proactive/bulkheadIsolationPolicy/bulkheadCompartmentRejectedException'; export { BulkheadIsolationPolicy } from './policies/proactive/bulkheadIsolationPolicy/bulkheadIsolationPolicy'; export { CachePolicy } from './policies/proactive/cachePolicy/cachePolicy'; @@ -7,7 +9,6 @@ export { OnCacheGetFn } from './policies/proactive/cachePolicy/onCacheGetFn'; export { OnCacheMissFn } from './policies/proactive/cachePolicy/onCacheMissFn'; export { OnCachePutFn } from './policies/proactive/cachePolicy/onCachePutFn'; export { TimeToLiveStrategy } from './policies/proactive/cachePolicy/timeToLiveStrategy'; -export { NopPolicy } from './policies/proactive/nopPolicy/nopPolicy'; export { ProactivePolicy } from './policies/proactive/proactivePolicy'; export { ExecutionException } from './policies/proactive/timeoutPolicy/executionException'; export { OnTimeoutFn } from './policies/proactive/timeoutPolicy/onTimeoutFn'; diff --git a/src/policies/nopPolicy.ts b/src/policies/nopPolicy.ts new file mode 100644 index 0000000..115078a --- /dev/null +++ b/src/policies/nopPolicy.ts @@ -0,0 +1,8 @@ +import { ExecutedFn } from '../types/executedFn'; +import { Policy } from './policy'; + +export class NopPolicy extends Policy { + protected async policyExecutorImpl(fn: ExecutedFn): Promise { + return fn(); + } +} diff --git a/src/policies/policy.ts b/src/policies/policy.ts index 9611825..14f0d9d 100644 --- a/src/policies/policy.ts +++ b/src/policies/policy.ts @@ -3,11 +3,21 @@ import { PolicyModificationNotAllowedException } from '../types/policyModificati export abstract class Policy { private executing = 0; + private wrappedPolicy?: Policy; public async execute(fn: ExecutedFn): Promise { try { this.executing++; - return await this.policyExecutorImpl(fn); + + return await this.policyExecutorImpl( + async (): Promise => { + if (this.wrappedPolicy !== undefined) { + return this.wrappedPolicy.execute(fn); + } + + return fn(); + }, + ); } finally { this.executing--; } @@ -17,6 +27,12 @@ export abstract class Policy { return this.executing > 0; } + public wrap(policy: Policy): void { + this.throwForPolicyModificationIfExecuting(); + + this.wrappedPolicy = policy; + } + protected throwForPolicyModificationIfExecuting(): void { if (this.isExecuting()) { throw new PolicyModificationNotAllowedException(); diff --git a/src/policies/policyCombination.ts b/src/policies/policyCombination.ts new file mode 100644 index 0000000..909b1a0 --- /dev/null +++ b/src/policies/policyCombination.ts @@ -0,0 +1,14 @@ +import { Policy } from './policy'; + +export class PolicyCombination { + public static combine( + policies: [Policy, Policy, ...Array>], + ): Policy { + return policies.reduceRight( + (prev, next): Policy => { + next.wrap(prev); + return next; + }, + ); + } +} diff --git a/src/policies/proactive/nopPolicy/nopPolicy.ts b/src/policies/proactive/nopPolicy/nopPolicy.ts deleted file mode 100644 index 008e24c..0000000 --- a/src/policies/proactive/nopPolicy/nopPolicy.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ExecutedFn } from '../../../types/executedFn'; -import { ProactivePolicy } from '../proactivePolicy'; - -export class NopPolicy extends ProactivePolicy { - protected async policyExecutorImpl(fn: ExecutedFn): Promise { - return fn(); - } -} diff --git a/test/specs/nopPolicy.test.ts b/test/specs/nopPolicy.test.ts index ca47d84..c1e9610 100644 --- a/test/specs/nopPolicy.test.ts +++ b/test/specs/nopPolicy.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { NopPolicy } from '../../src/policies/proactive/nopPolicy/nopPolicy'; +import { NopPolicy } from '../../src/policies/nopPolicy'; describe('NopPolicy', (): void => { it('should run the synchronous execution callback and return its result', async (): Promise => { diff --git a/test/specs/policyCombination.test.ts b/test/specs/policyCombination.test.ts new file mode 100644 index 0000000..0b33b49 --- /dev/null +++ b/test/specs/policyCombination.test.ts @@ -0,0 +1,122 @@ +import { expect } from 'chai'; +import { PolicyCombination } from '../../src/policies/policyCombination'; +import { TimeoutException } from '../../src/policies/proactive/timeoutPolicy/timeoutException'; +import { TimeoutPolicy } from '../../src/policies/proactive/timeoutPolicy/timeoutPolicy'; +import { FallbackPolicy } from '../../src/policies/reactive/fallbackPolicy/fallbackPolicy'; +import { RetryPolicy } from '../../src/policies/reactive/retryPolicy/retryPolicy'; + +describe('PolicyCombination', (): void => { + it('should run the wrapped policy inside the wrapper policy (wrapped with singular wrapping)', async (): Promise< + void + > => { + let onRetryExecuted = 0; + let onFallbackExecuted = 0; + + const fallbackPolicy = new FallbackPolicy(); + fallbackPolicy.reactOnResult((r): boolean => r); + fallbackPolicy.fallback((): boolean => { + return false; + }); + fallbackPolicy.onFallback((): void => { + expect(onRetryExecuted).to.equal(1); + onFallbackExecuted++; + }); + + const retryPolicy = new RetryPolicy(); + retryPolicy.reactOnResult((r): boolean => r); + retryPolicy.onRetry((): void => { + expect(onFallbackExecuted).to.equal(0); + onRetryExecuted++; + }); + + fallbackPolicy.wrap(retryPolicy); + + await fallbackPolicy.execute((): boolean => { + return true; + }); + + expect(onRetryExecuted).to.equal(1); + expect(onFallbackExecuted).to.equal(1); + }); + + it('should run the wrapped policy inside the wrapper policy (combined with PolicyCombination)', async (): Promise< + void + > => { + let onRetryExecuted = 0; + let onFallbackExecuted = 0; + + const fallbackPolicy = new FallbackPolicy(); + fallbackPolicy.reactOnResult((r): boolean => r); + fallbackPolicy.fallback((): boolean => { + return false; + }); + fallbackPolicy.onFallback((): void => { + expect(onRetryExecuted).to.equal(1); + onFallbackExecuted++; + }); + + const retryPolicy = new RetryPolicy(); + retryPolicy.reactOnResult((r): boolean => r); + retryPolicy.onRetry((): void => { + expect(onFallbackExecuted).to.equal(0); + onRetryExecuted++; + }); + + const wrappedPolicy = PolicyCombination.combine([fallbackPolicy, retryPolicy]); + await wrappedPolicy.execute((): boolean => { + return true; + }); + + expect(onRetryExecuted).to.equal(1); + expect(onFallbackExecuted).to.equal(1); + }); + + it('should construct a policy which combines the other policies sequentially', async (): Promise => { + let onTimeoutExecuted = 0; + let onRetryExecuted = 0; + let onFallbackExecuted = 0; + + const fallbackPolicy = new FallbackPolicy(); + fallbackPolicy.reactOnException((e): boolean => e instanceof TimeoutException); + fallbackPolicy.fallback((): void => { + // empty + }); + fallbackPolicy.onFallback((): void => { + expect(onTimeoutExecuted).to.equal(1); + expect(onRetryExecuted).to.equal(1); + expect(onFallbackExecuted).to.equal(0); + onFallbackExecuted++; + }); + + const retryPolicy = new RetryPolicy(); + retryPolicy.reactOnException((e): boolean => e instanceof TimeoutException); + retryPolicy.onRetry((): void => { + expect(onTimeoutExecuted).to.equal(1); + expect(onRetryExecuted).to.equal(0); + expect(onFallbackExecuted).to.equal(0); + onRetryExecuted++; + }); + + const timeoutPolicy = new TimeoutPolicy(); + timeoutPolicy.timeoutAfter(1); + timeoutPolicy.onTimeout((): void => { + expect(onTimeoutExecuted).to.equal(0); + expect(onRetryExecuted).to.equal(0); + expect(onFallbackExecuted).to.equal(0); + onTimeoutExecuted++; + }); + + const wrappedPolicies = PolicyCombination.combine([fallbackPolicy, retryPolicy, timeoutPolicy]); + await wrappedPolicies.execute( + async (): Promise => { + return new Promise((resolve): void => { + setTimeout(resolve, 5); + }); + }, + ); + + expect(onTimeoutExecuted).to.equal(1); + expect(onRetryExecuted).to.equal(1); + expect(onFallbackExecuted).to.equal(1); + }); +}); From cba710566a86fb57a820ada35ffe487855c949d5 Mon Sep 17 00:00:00 2001 From: Soma Lucz Date: Thu, 2 Apr 2020 22:13:10 +0200 Subject: [PATCH 136/136] 1.0.0 --- CHANGELOG.md | 17 +++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- sonar-project.properties | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d74991a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,17 @@ + +# 1.0.0 (2020-04-02) + + +### Features + +* Implement BulkheadIsolationPolicy ([0a6fd61](https://github.com/Diplomatiq/resily/commit/0a6fd61)), closes [#199](https://github.com/Diplomatiq/resily/issues/199) +* Implement CachePolicy ([0e39ded](https://github.com/Diplomatiq/resily/commit/0e39ded)), closes [#207](https://github.com/Diplomatiq/resily/issues/207) +* Implement CircuitBreakerPolicy ([1351ea1](https://github.com/Diplomatiq/resily/commit/1351ea1)), closes [#193](https://github.com/Diplomatiq/resily/issues/193) +* Implement FallbackPolicy ([5225f73](https://github.com/Diplomatiq/resily/commit/5225f73)), closes [#185](https://github.com/Diplomatiq/resily/issues/185) +* Implement NopPolicy ([4b257ef](https://github.com/Diplomatiq/resily/commit/4b257ef)), closes [#208](https://github.com/Diplomatiq/resily/issues/208) +* Implement PolicyCombination ([e92d537](https://github.com/Diplomatiq/resily/commit/e92d537)), closes [#209](https://github.com/Diplomatiq/resily/issues/209) +* Implement RetryPolicy ([1b0ce44](https://github.com/Diplomatiq/resily/commit/1b0ce44)), closes [#46](https://github.com/Diplomatiq/resily/issues/46) +* Implement TimeoutPolicy ([75bd2ee](https://github.com/Diplomatiq/resily/commit/75bd2ee)), closes [#164](https://github.com/Diplomatiq/resily/issues/164) + + + diff --git a/package-lock.json b/package-lock.json index 7824c32..5e95153 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@diplomatiq/resily", - "version": "0.0.0", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3e298ae..ab4bb01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@diplomatiq/resily", - "version": "0.0.0", + "version": "1.0.0", "description": "Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Fallback, Circuit Breaker, Timeout, Bulkhead Isolation, and Cache. Inspired by App-vNext/Polly.", "main": "dist/main.js", "module": "dist/main.js", diff --git a/sonar-project.properties b/sonar-project.properties index 548ca2b..dbf6bfa 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.organization=diplomatiq sonar.projectKey=Diplomatiq_resily sonar.projectName=resily -sonar.projectVersion=0.0.0 +sonar.projectVersion=1.0.0 sonar.sources=src sonar.tests=test