diff --git a/.eslintignore b/.eslintignore index 1d2a37f5..eedd8e5c 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ node_modules build coverage +docs diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 56e89212..00000000 --- a/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parser": "babel-eslint", - "parserOptions": { - "sourceType": "module", - "allowImportExportEverywhere": false, - "codeFrame": true - } -} \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..c188e09b --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,45 @@ +module.exports = { + root: true, + env: { + es6: true, + browser: true, + node: true, + jest: true + }, + extends: [ + 'eslint:recommended', + 'plugin:prettier/recommended', + 'plugin:import/errors', + 'plugin:import/warnings', + 'plugin:jest/recommended', + 'plugin:jest/style' + ], + parser: 'babel-eslint', + parserOptions: { + ecmaVersion: 12, + sourceType: 'module', + allowImportExportEverywhere: false, + codeFrame: true + }, + plugins: ['prettier', 'import', 'simple-import-sort', 'jest'], + ignorePatterns: ['build'], + rules: { + 'prettier/prettier': 'error', + 'simple-import-sort/imports': 'warn', + 'simple-import-sort/exports': 'warn', + + /* Import */ + 'import/no-named-as-default': 'off', + + /* Others */ + 'no-console': 'error' + }, + overrides: [ + { + files: ['tests/*.js'], + rules: { + 'no-console': 'off' + } + } + ] +} diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index e31e7835..87907da5 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -5,15 +5,49 @@ name: Test and Release on: push: - branches: [ master, dev ] + branches: [ + master, + dev, + alpha, + beta, + next, + next-major + ] pull_request: - branches: [ master, dev ] + branches: [ + master, + dev, + alpha, + beta, + next, + next-major + ] jobs: + pre_job: + name: Pre Job + + runs-on: ubuntu-latest + + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + github_token: ${{ github.token }} + paths_ignore: '["**/*.md", ".releaserc", ".editorconfig", ".gitignore", ".eslintignore", ".prettierignore", "docs/**", ".github/**"]' + do_not_skip: '["workflow_dispatch", "schedule"]' + test: name: Test + needs: pre_job + + if: needs.pre_job.outputs.should_skip != 'true' || (github.ref != 'refs/heads/dev' && github.head_ref != 'dev' && github.base_ref != 'dev') + runs-on: ${{ matrix.os }} strategy: @@ -55,7 +89,7 @@ jobs: runs-on: ${{ matrix.os }} - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + if: github.event_name == 'push' strategy: matrix: @@ -80,8 +114,8 @@ jobs: - name: Build run: yarn build - - name: Test - run: yarn test + - name: Test and Generate Coverage + run: yarn coverage - name: Upload Coverage to Codecov uses: codecov/codecov-action@v1 diff --git a/.gitignore b/.gitignore index 295e6b69..f0a46438 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -/node_modules/ -/build/ -/coverage/ +.idea +node_modules +build +coverage yarn-error.log docker-compose.yml diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..eedd8e5c --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +node_modules +build +coverage +docs diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..49955e2e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "semi": false, + "singleQuote": true, + "trailingComma": "none" +} diff --git a/.releaserc b/.releaserc index e69de29b..e8c259cb 100644 --- a/.releaserc +++ b/.releaserc @@ -0,0 +1,16 @@ +{ + "plugins": [ + ["@semantic-release/commit-analyzer", { + "releaseRules": [ + {"type": "chore", "scope":"deps", "release": "patch"} + ] + }], + ["@semantic-release/release-notes-generator", { + "writerOpts": { + "headerPartial": "" + } + }], + "@semantic-release/npm", + "@semantic-release/github" + ] +} diff --git a/docs/yarn.lock b/docs/yarn.lock index 7c179bfd..e50b2104 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2496,10 +2496,10 @@ bluebird@^3.1.1, bluebird@^3.5.1, bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.1.1: version "5.1.3" @@ -2572,7 +2572,7 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -3893,17 +3893,17 @@ electron-to-chromium@^1.3.571: integrity sha512-0nCJ7cSqnkMC+kUuPs0YgklFHraWGl/xHqtZWWtOeVtyi+YqkoAOMGuZQad43DscXCQI/yizcTa3u6B5r+BLww== elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" "emoji-regex@>=6.0.0 <=6.1.1": version "6.1.1" @@ -4847,7 +4847,7 @@ hex-color-regex@^1.1.0: resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -5713,9 +5713,9 @@ lodash.uniq@^4.5.0: integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= lodash@^4.15.0, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.3, lodash@^4.17.5: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== loglevel@^1.6.2: version "1.7.0" @@ -6046,7 +6046,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= @@ -7548,9 +7548,9 @@ prism-themes@^1.4.1: integrity sha512-Sxk5+Wr63WxMq/sU/JYxnq5WbB0CTjv9dscGGMF91iBo3rHEJFfhZVxEsepEOMRbOQ9Exc+xySuAEaX4ATxtIQ== prismjs@^1.22.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa" - integrity sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w== + version "1.23.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33" + integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA== optionalDependencies: clipboard "^2.0.0" @@ -8428,9 +8428,9 @@ sprintf-js@~1.0.2: integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== dependencies: figgy-pudding "^3.5.1" @@ -8956,9 +8956,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= ua-parser-js@^0.7.22: - version "0.7.22" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.22.tgz#960df60a5f911ea8f1c818f3747b99c6e177eae3" - integrity sha512-YUxzMjJ5T71w6a8WWVcMGM6YWOTX27rCoIQgLXiWaxqXSx9D7DNjiGWn1aJIRSQ5qr0xuhra77bSIh6voR/46Q== + version "0.7.28" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31" + integrity sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g== uglify-js@^3.5.1: version "3.11.2" @@ -9650,9 +9650,9 @@ xxhashjs@^0.2.1: cuint "^0.2.2" y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + version "4.0.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== yallist@^2.1.2: version "2.1.2" diff --git a/jest.config.js b/jest.config.js index b80445ba..f6832fcd 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,4 @@ module.exports = { - collectCoverageFrom: [ - "src/*.js", - "!src/index.js", - ] -}; \ No newline at end of file + coverageDirectory: './coverage/', + collectCoverageFrom: ['src/*.js', '!src/index.js'] +} diff --git a/package.json b/package.json index fdb6b5d1..ee021df1 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,9 @@ "scripts": { "build": "babel src -d build", "lint": "eslint --ext .js .", - "test": "jest --coverage", - "test-watch": "jest --watch --coverage" - }, - "jest": { - "coverageDirectory": "./coverage/", - "collectCoverage": true + "test": "jest", + "test:watch": "jest --watch", + "coverage": "jest --coverage" }, "repository": { "type": "git", @@ -61,13 +58,20 @@ "axios-mock-adapter": "^1.18.1", "babel-eslint": "^10.1.0", "codecov": "^3.6.5", - "eslint": "^6.8.0", + "eslint": "^7.18.0", + "eslint-config-prettier": "^7.2.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jest": "^24.1.3", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-simple-import-sort": "^7.0.0", "jest": "^24.1.0", + "prettier": "^2.2.1", "semantic-release": "^17.2.2" }, "dependencies": { "dotprop": "^1.2.0", "dset": "^2.0.1", + "merge": "^2.1.1", "object-to-formdata": "^4.1.0", "qs": "^6.9.4" } diff --git a/src/Builder.js b/src/Builder.js index 8da09e88..ac3f22d0 100644 --- a/src/Builder.js +++ b/src/Builder.js @@ -2,11 +2,11 @@ * Prepare attributes to be parsed */ -import Parser from './Parser'; import setProp from 'dset' -export default class Builder { +import Parser from './Parser' +export default class Builder { constructor(model) { this.model = model this.includes = [] @@ -45,7 +45,7 @@ export default class Builder { * object, and a value, which is the nested filter. * */ - _nestedFilter (keys, value) { + _nestedFilter(keys, value) { // Get first key from `keys` array, then remove it from array const _key = keys.shift() // Initialize an empty object @@ -64,7 +64,9 @@ export default class Builder { */ include(...relationships) { - relationships = Array.isArray(relationships[0]) ? relationships[0] : relationships + relationships = Array.isArray(relationships[0]) + ? relationships[0] + : relationships this.includes = relationships return this @@ -119,7 +121,9 @@ export default class Builder { whereIn(key, array) { if (!Array.isArray(array)) { - throw new Error('The second argument on whereIn() method must be an array.') + throw new Error( + 'The second argument on whereIn() method must be an array.' + ) } if (Array.isArray(key)) { diff --git a/src/Model.js b/src/Model.js index f8647315..b3090000 100644 --- a/src/Model.js +++ b/src/Model.js @@ -1,11 +1,12 @@ -import { serialize } from 'object-to-formdata' import getProp from 'dotprop' import setProp from 'dset' +import merge from 'merge' +import { serialize } from 'object-to-formdata' + import Builder from './Builder' import StaticModel from './StaticModel' export default class Model extends StaticModel { - constructor(...attributes) { super() @@ -38,7 +39,8 @@ export default class Model extends StaticModel { } config(config) { - this._config = config + Object.defineProperty(this, '_config', { get: () => config }) + return this } @@ -59,7 +61,6 @@ export default class Model extends StaticModel { } custom(...args) { - if (args.length === 0) { throw new Error('The custom() method takes a minimum of one argument.') } @@ -68,29 +69,31 @@ export default class Model extends StaticModel { // multiple arguments. We don't need it for the first argument if it's // a string, but subsequent string arguments need the '/' at the beginning. // We handle this implementation detail here to simplify the readme. - let slash = ''; - let resource = ''; + let slash = '' + let resource = '' - args.forEach(value => { + args.forEach((value) => { switch (true) { - case (typeof value === 'string'): - resource += slash + value.replace(/^\/+/, ''); - break; - case (value instanceof Model): - resource += slash + value.resource(); + case typeof value === 'string': + resource += slash + value.replace(/^\/+/, '') + break + case value instanceof Model: + resource += slash + value.resource() if (value.isValidId(value.getPrimaryKey())) { - resource += '/' + value.getPrimaryKey(); + resource += '/' + value.getPrimaryKey() } - break; + break default: - throw new Error('Arguments to custom() must be strings or instances of Model.') + throw new Error( + 'Arguments to custom() must be strings or instances of Model.' + ) } if (!slash.length) { - slash = '/'; + slash = '/' } - }); + }) this._customResource = resource @@ -98,7 +101,7 @@ export default class Model extends StaticModel { } hasMany(model) { - let instance = new model + let instance = new model() let url = `${this.baseURL()}/${this.resource()}/${this.getPrimaryKey()}/${instance.resource()}` instance._from(url) @@ -115,15 +118,19 @@ export default class Model extends StaticModel { throw new Error('The for() method takes a minimum of one argument.') } - let url = `${this.baseURL()}`; + let url = `${this.baseURL()}` - args.forEach(object => { + args.forEach((object) => { if (!(object instanceof Model)) { - throw new Error('The object referenced on for() method is not a valid Model.') + throw new Error( + 'The object referenced on for() method is not a valid Model.' + ) } if (!this.isValidId(object.getPrimaryKey())) { - throw new Error('The object referenced on for() method has an invalid id.') + throw new Error( + 'The object referenced on for() method has an invalid id.' + ) } url += `/${object.resource()}/${object.getPrimaryKey()}` @@ -136,7 +143,7 @@ export default class Model extends StaticModel { return this } - relations () { + relations() { return {} } @@ -250,7 +257,7 @@ export default class Model extends StaticModel { _applyInstance(data, model = this.constructor) { const item = new model(data) - if(this._fromResource) { + if (this._fromResource) { item._from(this._fromResource) } @@ -261,7 +268,7 @@ export default class Model extends StaticModel { let collection = data.data || data collection = Array.isArray(collection) ? collection : [collection] - collection = collection.map(c => { + collection = collection.map((c) => { return this._applyInstance(c, model) }) return collection @@ -270,15 +277,18 @@ export default class Model extends StaticModel { _applyRelations(model) { const relations = model.relations() - for(const relation of Object.keys(relations)) { + for (const relation of Object.keys(relations)) { const _relation = getProp(model, relation) if (!_relation) { - continue; + continue } if (Array.isArray(_relation.data) || Array.isArray(_relation)) { - const collection = this._applyInstanceCollection(_relation, relations[relation]) + const collection = this._applyInstanceCollection( + _relation, + relations[relation] + ) if (_relation.data !== undefined) { _relation.data = collection @@ -286,13 +296,18 @@ export default class Model extends StaticModel { setProp(model, relation, collection) } } else { - setProp(model, relation, this._applyInstance(_relation, relations[relation])) + setProp( + model, + relation, + this._applyInstance(_relation, relations[relation]) + ) } } } _reqConfig(config, options = { forceMethod: false }) { - const _config = { ...config, ...this._config } + // Merge cloned config to prevent changing the original config objects + const _config = merge.recursive({ ...config }, { ...this._config }) // Prevent default request method from being overridden if (options.forceMethod) { @@ -301,15 +316,9 @@ export default class Model extends StaticModel { // Check if config has data if ('data' in _config) { - // Ditch private data - _config.data = Object.fromEntries( - Object.entries(_config.data) - .filter(([key]) => !key.startsWith('_')) - ) - - const _hasFiles = Object.keys(_config.data).some(property => { + const _hasFiles = Object.keys(_config.data).some((property) => { if (Array.isArray(_config.data[property])) { - return _config.data[property].some(value => value instanceof File) + return _config.data[property].some((value) => value instanceof File) } return _config.data[property] instanceof File @@ -335,7 +344,7 @@ export default class Model extends StaticModel { } first() { - return this.get().then(response => { + return this.get().then((response) => { let item if (response.data) { @@ -349,9 +358,7 @@ export default class Model extends StaticModel { } $first() { - return this - .first() - .then(response => response.data || response) + return this.first().then((response) => response.data || response) } find(identifier) { @@ -366,7 +373,7 @@ export default class Model extends StaticModel { url, method: 'GET' }) - ).then(response => { + ).then((response) => { return this._applyInstance(response.data) }) } @@ -376,14 +383,16 @@ export default class Model extends StaticModel { throw new Error('You must specify the param on $find() method.') } - return this - .find(identifier) - .then(response => this._applyInstance(response.data || response)) + return this.find(identifier).then((response) => + this._applyInstance(response.data || response) + ) } get() { let base = this._fromResource || `${this.baseURL()}/${this.resource()}` - base = this._customResource ? `${this.baseURL()}/${this._customResource}` : base + base = this._customResource + ? `${this.baseURL()}/${this._customResource}` + : base let url = `${base}${this._builder.query()}` return this.request( @@ -391,7 +400,7 @@ export default class Model extends StaticModel { url, method: 'GET' }) - ).then(response => { + ).then((response) => { let collection = this._applyInstanceCollection(response.data) if (response.data.data !== undefined) { @@ -405,9 +414,7 @@ export default class Model extends StaticModel { } $get() { - return this - .get() - .then(response => response.data || response) + return this.get().then((response) => response.data || response) } all() { @@ -423,6 +430,12 @@ export default class Model extends StaticModel { */ delete() { + if (this._customResource) { + throw Error( + 'The delete() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) + } + if (!this.hasId()) { throw new Error('This model has a empty ID.') } @@ -432,21 +445,30 @@ export default class Model extends StaticModel { method: 'DELETE', url: this.endpoint() }) - ).then(response => response) + ).then((response) => response) } save() { + if (this._customResource) { + throw Error( + 'The save() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) + } + return this.hasId() ? this._update() : this._create() } _create() { return this.request( - this._reqConfig({ - method: 'POST', - url: this.endpoint(), - data: this - }, { forceMethod: true }) - ).then(response => { + this._reqConfig( + { + method: 'POST', + url: this.endpoint(), + data: this + }, + { forceMethod: true } + ) + ).then((response) => { return this._applyInstance(response.data.data || response.data) }) } @@ -458,7 +480,7 @@ export default class Model extends StaticModel { url: this.endpoint(), data: this }) - ).then(response => { + ).then((response) => { return this._applyInstance(response.data.data || response.data) }) } @@ -472,22 +494,34 @@ export default class Model extends StaticModel { */ attach(params) { + if (this._customResource) { + throw Error( + 'The attach() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) + } + return this.request( this._reqConfig({ method: 'POST', url: this.endpoint(), data: params }) - ).then(response => response) + ).then((response) => response) } sync(params) { + if (this._customResource) { + throw Error( + 'The sync() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) + } + return this.request( this._reqConfig({ method: 'PUT', url: this.endpoint(), data: params }) - ).then(response => response) + ).then((response) => response) } } diff --git a/src/Parser.js b/src/Parser.js index 4bd84554..d3c61e27 100644 --- a/src/Parser.js +++ b/src/Parser.js @@ -5,7 +5,6 @@ import qs from 'qs' export default class Parser { - constructor(builder) { this.builder = builder this.uri = '' @@ -67,7 +66,7 @@ export default class Parser { } prepend() { - return (this.uri === '') ? '?' : '&' + return this.uri === '' ? '?' : '&' } parameterNames() { @@ -83,7 +82,11 @@ export default class Parser { return } - this.uri += this.prepend() + this.parameterNames().include + '=' + this.builder.includes + this.uri += + this.prepend() + + this.parameterNames().include + + '=' + + this.builder.includes } appends() { @@ -91,7 +94,8 @@ export default class Parser { return } - this.uri += this.prepend() + this.parameterNames().append + '=' + this.builder.appends + this.uri += + this.prepend() + this.parameterNames().append + '=' + this.builder.appends } fields() { @@ -117,7 +121,8 @@ export default class Parser { return } - this.uri += this.prepend() + this.parameterNames().sort + '=' + this.builder.sorts + this.uri += + this.prepend() + this.parameterNames().sort + '=' + this.builder.sorts } page() { @@ -125,7 +130,8 @@ export default class Parser { return } - this.uri += this.prepend() + this.parameterNames().page + '=' + this.builder.pageValue + this.uri += + this.prepend() + this.parameterNames().page + '=' + this.builder.pageValue } limit() { @@ -133,7 +139,11 @@ export default class Parser { return } - this.uri += this.prepend() + this.parameterNames().limit + '=' + this.builder.limitValue + this.uri += + this.prepend() + + this.parameterNames().limit + + '=' + + this.builder.limitValue } payload() { @@ -141,6 +151,7 @@ export default class Parser { return } - this.uri += this.prepend() + qs.stringify(this.builder.payload, { encode: false }) + this.uri += + this.prepend() + qs.stringify(this.builder.payload, { encode: false }) } } diff --git a/src/StaticModel.js b/src/StaticModel.js index 5a98fdb3..ffd40288 100644 --- a/src/StaticModel.js +++ b/src/StaticModel.js @@ -8,7 +8,7 @@ export default class StaticModel { static instance() { - return new this + return new this() } static config(config) { diff --git a/src/index.js b/src/index.js index 1174823c..edc0b040 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,3 @@ -import Model from './Model'; +import Model from './Model' -export { - Model -}; \ No newline at end of file +export { Model } diff --git a/tests/builder.test.js b/tests/builder.test.js index 6355910b..d61fbc51 100644 --- a/tests/builder.test.js +++ b/tests/builder.test.js @@ -1,11 +1,11 @@ -import Post from './dummy/models/Post' -import ModelWithParamNames from './dummy/models/ModelWithParamNames'; -import { Model } from '../src' import axios from 'axios' -import MockAdapter from 'axios-mock-adapter'; +import MockAdapter from 'axios-mock-adapter' -describe('Query builder', () => { +import { Model } from '../src' +import ModelWithParamNames from './dummy/models/ModelWithParamNames' +import Post from './dummy/models/Post' +describe('Query builder', () => { let errorModel = {} Model.$http = axios let axiosMock = new MockAdapter(axios) @@ -15,8 +15,7 @@ describe('Query builder', () => { }) test('it builds a complex query', () => { - const post = Post - .include('user') + const post = Post.include('user') .append('likes') .select({ posts: ['title', 'content'], @@ -28,18 +27,18 @@ describe('Query builder', () => { .limit(10) .orderBy('created_at') .params({ - 'doSomething': 'yes', - 'process': 'no' + doSomething: 'yes', + process: 'no' }) - const query = '?include=user&append=likes&fields[posts]=title,content&fields[user]=age,firstname&filter[title]=Cool&filter[status]=ACTIVE&sort=created_at&page=3&limit=10&doSomething=yes&process=no' + const query = + '?include=user&append=likes&fields[posts]=title,content&fields[user]=age,firstname&filter[title]=Cool&filter[status]=ACTIVE&sort=created_at&page=3&limit=10&doSomething=yes&process=no' expect(post._builder.query()).toEqual(query) }) test('it builds a complex query with custom param names', () => { - const post = ModelWithParamNames - .include('user') + const post = ModelWithParamNames.include('user') .append('likes') .select({ posts: ['title', 'content'], @@ -51,7 +50,8 @@ describe('Query builder', () => { .limit(10) .orderBy('created_at') - const query = '?include_custom=user&append_custom=likes&fields_custom[posts]=title,content&fields_custom[user]=age,firstname&filter_custom[title]=Cool&filter_custom[status]=ACTIVE&sort_custom=created_at&page_custom=3&limit_custom=10' + const query = + '?include_custom=user&append_custom=likes&fields_custom[posts]=title,content&fields_custom[user]=age,firstname&filter_custom[title]=Cool&filter_custom[status]=ACTIVE&sort_custom=created_at&page_custom=3&limit_custom=10' expect(post._builder.query()).toEqual(query) }) @@ -122,31 +122,40 @@ describe('Query builder', () => { expect(post._builder.filters).toEqual({ user: { status: 'active' } }) expect(post._builder.query()).toEqual('?filter[user][status]=active') - post = Post - .where(['schedule', 'start'], '2020-11-27') - .where(['schedule', 'end'], '2020-11-28') + post = Post.where(['schedule', 'start'], '2020-11-27').where( + ['schedule', 'end'], + '2020-11-28' + ) - expect(post._builder.filters).toEqual({ schedule: { start: '2020-11-27', end: '2020-11-28' } }) - expect(post._builder.query()).toEqual('?filter[schedule][start]=2020-11-27&filter[schedule][end]=2020-11-28') + expect(post._builder.filters).toEqual({ + schedule: { start: '2020-11-27', end: '2020-11-28' } + }) + expect(post._builder.query()).toEqual( + '?filter[schedule][start]=2020-11-27&filter[schedule][end]=2020-11-28' + ) }) test('where() throws a exception when doest not have params or only first param', () => { - let errorModel = () => { - const post = Post.where() + errorModel = () => { + Post.where() } - expect(errorModel).toThrow('The KEY and VALUE are required on where() method.') + expect(errorModel).toThrow( + 'The KEY and VALUE are required on where() method.' + ) errorModel = () => { - const post = Post.where('id') + Post.where('id') } - expect(errorModel).toThrow('The KEY and VALUE are required on where() method.') + expect(errorModel).toThrow( + 'The KEY and VALUE are required on where() method.' + ) }) test('where() throws a exception when second parameter is not primitive', () => { - let errorModel = () => { - const post = Post.where('id', ['foo']) + errorModel = () => { + Post.where('id', ['foo']) } expect(errorModel).toThrow('The VALUE must be primitive on where() method.') @@ -159,23 +168,34 @@ describe('Query builder', () => { post = Post.whereIn(['user', 'status'], ['active', 'inactive']) - expect(post._builder.filters).toEqual({ user: { status: 'active,inactive' } }) - expect(post._builder.query()).toEqual('?filter[user][status]=active,inactive') + expect(post._builder.filters).toEqual({ + user: { status: 'active,inactive' } + }) + expect(post._builder.query()).toEqual( + '?filter[user][status]=active,inactive' + ) - post = Post - .whereIn(['schedule', 'start'], ['2020-11-27', '2020-11-28']) - .whereIn(['schedule', 'end'], ['2020-11-28', '2020-11-29']) + post = Post.whereIn( + ['schedule', 'start'], + ['2020-11-27', '2020-11-28'] + ).whereIn(['schedule', 'end'], ['2020-11-28', '2020-11-29']) - expect(post._builder.filters).toEqual({ schedule: { start: '2020-11-27,2020-11-28', end: '2020-11-28,2020-11-29' } }) - expect(post._builder.query()).toEqual('?filter[schedule][start]=2020-11-27,2020-11-28&filter[schedule][end]=2020-11-28,2020-11-29') + expect(post._builder.filters).toEqual({ + schedule: { start: '2020-11-27,2020-11-28', end: '2020-11-28,2020-11-29' } + }) + expect(post._builder.query()).toEqual( + '?filter[schedule][start]=2020-11-27,2020-11-28&filter[schedule][end]=2020-11-28,2020-11-29' + ) }) test('whereIn() throws a exception when second parameter is not a array', () => { - let errorModel = () => { - const post = Post.whereIn('id', 'foo') + errorModel = () => { + Post.whereIn('id', 'foo') } - expect(errorModel).toThrow('The second argument on whereIn() method must be an array.') + expect(errorModel).toThrow( + 'The second argument on whereIn() method must be an array.' + ) }) test('page() sets properly the builder', () => { @@ -185,8 +205,8 @@ describe('Query builder', () => { }) test('page() throws a exception when value is not a number', () => { - let errorModel = () => { - const post = Post.page('foo') + errorModel = () => { + Post.page('foo') } expect(errorModel).toThrow('The VALUE must be an integer on page() method.') @@ -199,19 +219,23 @@ describe('Query builder', () => { }) test('limit() throws a exception when value is not a number', () => { - let errorModel = () => { - const post = Post.limit('foo') + errorModel = () => { + Post.limit('foo') } - expect(errorModel).toThrow('The VALUE must be an integer on limit() method.') + expect(errorModel).toThrow( + 'The VALUE must be an integer on limit() method.' + ) }) test('select() with no parameters', () => { - let errorModel = () => { - const post = Post.select() + errorModel = () => { + Post.select() } - expect(errorModel).toThrow('You must specify the fields on select() method.') + expect(errorModel).toThrow( + 'You must specify the fields on select() method.' + ) }) test('select() for single entity', () => { @@ -231,23 +255,21 @@ describe('Query builder', () => { }) test('params() sets properly the builder', () => { - let post = Post.params({ 'doSomething': 'yes' }) + let post = Post.params({ doSomething: 'yes' }) - expect(post._builder.payload).toEqual({ 'doSomething': 'yes' }) + expect(post._builder.payload).toEqual({ doSomething: 'yes' }) }) test('params() throws a exception when the payload is not an object', () => { - let errorModel = () => { - const post = Post.params() + errorModel = () => { + Post.params() } expect(errorModel).toThrow('You must pass a payload/object as param.') }) test('it resets the uri upon query generation when the query is regenerated a second time', () => { - const post = Post - .where('title', 'Cool') - .page(4) + const post = Post.where('title', 'Cool').page(4) const query = '?filter[title]=Cool&page=4' diff --git a/tests/dummy/data/comments.js b/tests/dummy/data/comments.js index 713b8099..fcf1ad2c 100644 --- a/tests/dummy/data/comments.js +++ b/tests/dummy/data/comments.js @@ -9,7 +9,7 @@ export const Comments = [ id: 3, comment_id: 1, someId: 'ma020-9ha15', - text: 'Hello', + text: 'Hello' } ] }, @@ -23,13 +23,13 @@ export const Comments = [ id: 4, comment_id: 2, someId: 'mw023-9ha18', - text: 'Hello', + text: 'Hello' }, { id: 5, comment_id: 2, someId: 'mw035-0ha22', - text: 'Hello', + text: 'Hello' } ] } diff --git a/tests/dummy/data/commentsEmbed.js b/tests/dummy/data/commentsEmbed.js index 015f9d76..2b9ac216 100644 --- a/tests/dummy/data/commentsEmbed.js +++ b/tests/dummy/data/commentsEmbed.js @@ -11,7 +11,7 @@ export const Comments = { id: 3, comment_id: 1, someId: 'ma020-9ha15', - text: 'Hello', + text: 'Hello' } ] } @@ -27,13 +27,13 @@ export const Comments = { id: 4, comment_id: 2, someId: 'mw023-9ha18', - text: 'Hello', + text: 'Hello' }, { id: 5, comment_id: 2, someId: 'mw035-0ha22', - text: 'Hello', + text: 'Hello' } ] } diff --git a/tests/dummy/data/post.js b/tests/dummy/data/post.js index db180c4a..d333b259 100644 --- a/tests/dummy/data/post.js +++ b/tests/dummy/data/post.js @@ -1,21 +1,20 @@ -export const Post = - { - id: 1, - someId: 'af621-4aa41', - text: 'Lorem Ipsum Dolor', - user: { - firstname: 'John', - lastname: 'Doe', - age: 25 - }, - relationships: { - tags: [ - { - name: 'super' - }, - { - name: 'awesome' - } - ] - } +export const Post = { + id: 1, + someId: 'af621-4aa41', + text: 'Lorem Ipsum Dolor', + user: { + firstname: 'John', + lastname: 'Doe', + age: 25 + }, + relationships: { + tags: [ + { + name: 'super' + }, + { + name: 'awesome' + } + ] } +} diff --git a/tests/dummy/models/BaseModel.js b/tests/dummy/models/BaseModel.js index a40f93dd..06c69957 100644 --- a/tests/dummy/models/BaseModel.js +++ b/tests/dummy/models/BaseModel.js @@ -1,11 +1,11 @@ import { Model } from '../../../src' export default class BaseModel extends Model { - baseURL () { + baseURL() { return 'http://localhost' } - request (config) { + request(config) { // this.testApiRequest = config return this.$http.request(config) diff --git a/tests/dummy/models/Comment.js b/tests/dummy/models/Comment.js index ae532244..f917ecfc 100644 --- a/tests/dummy/models/Comment.js +++ b/tests/dummy/models/Comment.js @@ -1,7 +1,7 @@ import BaseModel from './BaseModel' export default class Comment extends BaseModel { - relations () { + relations() { return { replies: Comment } diff --git a/tests/dummy/models/EmptyBaseModel.js b/tests/dummy/models/EmptyBaseModel.js index 879da1b3..67c494ca 100644 --- a/tests/dummy/models/EmptyBaseModel.js +++ b/tests/dummy/models/EmptyBaseModel.js @@ -1,8 +1,7 @@ import { Model } from '../../../src' export default class EmptyBaseModel extends Model { - - static withBaseURL () { + static withBaseURL() { EmptyBaseModel.prototype['baseURL'] = () => { return 'foo' } @@ -10,7 +9,7 @@ export default class EmptyBaseModel extends Model { return this } - static withRequest () { + static withRequest() { EmptyBaseModel.prototype['request'] = () => { return 'foo' } @@ -18,13 +17,13 @@ export default class EmptyBaseModel extends Model { return this } - static withHttp () { + static withHttp() { Model.$http = 'foo' return this } - static reset () { + static reset() { delete EmptyBaseModel.prototype['baseURL'] delete EmptyBaseModel.prototype['request'] Model.$http = undefined diff --git a/tests/dummy/models/ModelWithParamNames.js b/tests/dummy/models/ModelWithParamNames.js index f4fe7d0d..c63ddefe 100644 --- a/tests/dummy/models/ModelWithParamNames.js +++ b/tests/dummy/models/ModelWithParamNames.js @@ -1,8 +1,7 @@ import BaseModel from './BaseModel' export default class ModelWithParamNames extends BaseModel { - - parameterNames () { + parameterNames() { return { include: 'include_custom', filter: 'filter_custom', @@ -13,5 +12,4 @@ export default class ModelWithParamNames extends BaseModel { limit: 'limit_custom' } } - -} \ No newline at end of file +} diff --git a/tests/dummy/models/Post.js b/tests/dummy/models/Post.js index 228aec25..ec128152 100644 --- a/tests/dummy/models/Post.js +++ b/tests/dummy/models/Post.js @@ -1,14 +1,14 @@ import BaseModel from './BaseModel' import Comment from './Comment' -import User from './User' import Tag from './Tag' +import User from './User' export default class Post extends BaseModel { - comments () { + comments() { return this.hasMany(Comment) } - relations () { + relations() { return { user: User, 'relationships.tags': Tag diff --git a/tests/dummy/models/User.js b/tests/dummy/models/User.js index 2e53ffd6..fdf85b23 100644 --- a/tests/dummy/models/User.js +++ b/tests/dummy/models/User.js @@ -2,12 +2,11 @@ import BaseModel from './BaseModel' import Post from './Post' export default class User extends BaseModel { - - get fullname () { + get fullname() { return `${this.firstname} ${this.lastname}` } - posts () { + posts() { return this.hasMany(Post) } } diff --git a/tests/model.test.js b/tests/model.test.js index 385970f3..85381817 100644 --- a/tests/model.test.js +++ b/tests/model.test.js @@ -1,19 +1,19 @@ -import Post from './dummy/models/Post' -import User from './dummy/models/User' -import Comment from './dummy/models/Comment' -import { Model } from '../src' import axios from 'axios' import MockAdapter from 'axios-mock-adapter' -import { Posts as postsResponse } from './dummy/data/posts' -import { Posts as postsEmbedResponse } from './dummy/data/postsEmbed' -import { Post as postResponse } from './dummy/data/post' -import { Post as postEmbedResponse } from './dummy/data/postEmbed' + +import { Model } from '../src' import { Comments as commentsResponse } from './dummy/data/comments' import { Comments as commentsEmbedResponse } from './dummy/data/commentsEmbed' +import { Post as postResponse } from './dummy/data/post' +import { Post as postEmbedResponse } from './dummy/data/postEmbed' +import { Posts as postsResponse } from './dummy/data/posts' +import { Posts as postsEmbedResponse } from './dummy/data/postsEmbed' +import Comment from './dummy/models/Comment' +import Post from './dummy/models/Post' import Tag from './dummy/models/Tag' +import User from './dummy/models/User' describe('Model methods', () => { - let errorModel = {} Model.$http = axios let axiosMock = new MockAdapter(axios) @@ -27,7 +27,7 @@ describe('Model methods', () => { test('it throws a error when find() has no parameters', () => { errorModel = () => { - const post = Post.find() + Post.find() } expect(errorModel).toThrow('You must specify the param on find() method.') @@ -35,14 +35,13 @@ describe('Model methods', () => { test('it throws a error when $find() has no parameters', () => { errorModel = () => { - const post = Post.$find() + Post.$find() } expect(errorModel).toThrow('You must specify the param on $find() method.') }) test('first() returns first object in array as instance of such Model', async () => { - axiosMock.onGet('http://localhost/posts').reply(200, { data: postsResponse }) @@ -51,13 +50,12 @@ describe('Model methods', () => { expect(post).toEqual(postsResponse[0]) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) test('$first() returns first object in array as instance of such Model', async () => { - axiosMock.onGet('http://localhost/posts').reply(200, postsEmbedResponse) const post = await Post.$first() @@ -65,7 +63,7 @@ describe('Model methods', () => { expect(post).toEqual(postsEmbedResponse.data[0]) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) @@ -84,7 +82,7 @@ describe('Model methods', () => { expect(post).toEqual(postResponse) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) @@ -97,7 +95,7 @@ describe('Model methods', () => { expect(post).toEqual(postEmbedResponse.data) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.data.forEach(tag => { + post.relationships.tags.data.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) @@ -110,52 +108,52 @@ describe('Model methods', () => { expect(post).toEqual(postResponse) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) - test("find() method returns a object as instance of such Model with empty relationships", async () => { - const _postResponse = postResponse; - _postResponse.user = null; - _postResponse.relationships.tags = []; + test('find() method returns a object as instance of such Model with empty relationships', async () => { + const _postResponse = postResponse + _postResponse.user = null + _postResponse.relationships.tags = [] - axiosMock.onGet("http://localhost/posts/1").reply(200, _postResponse); + axiosMock.onGet('http://localhost/posts/1').reply(200, _postResponse) - const post = await Post.find(1); + const post = await Post.find(1) - expect(post).toEqual(postResponse); - expect(post).toBeInstanceOf(Post); - expect(post.user).toStrictEqual(null); - expect(post.relationships.tags).toStrictEqual([]); - }); + expect(post).toEqual(postResponse) + expect(post).toBeInstanceOf(Post) + expect(post.user).toBeNull() + expect(post.relationships.tags).toStrictEqual([]) + }) - test("find() method returns a object as instance of such Model with some empty relationships", async () => { - const _postResponse = postResponse; - _postResponse.user = null; + test('find() method returns a object as instance of such Model with some empty relationships', async () => { + const _postResponse = postResponse + _postResponse.user = null - axiosMock.onGet("http://localhost/posts/1").reply(200, _postResponse); + axiosMock.onGet('http://localhost/posts/1').reply(200, _postResponse) - const post = await Post.find(1); + const post = await Post.find(1) - expect(post).toEqual(postResponse); - expect(post).toBeInstanceOf(Post); - expect(post.user).toStrictEqual(null); + expect(post).toEqual(postResponse) + expect(post).toBeInstanceOf(Post) + expect(post.user).toBeNull() post.relationships.tags.forEach((tag) => { - expect(tag).toBeInstanceOf(Tag); - }); - }); + expect(tag).toBeInstanceOf(Tag) + }) + }) test('get() method returns a array of objects as instance of suchModel', async () => { axiosMock.onGet('http://localhost/posts').reply(200, postsResponse) const posts = await Post.get() - posts.forEach(post => { + posts.forEach((post) => { expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) @@ -172,9 +170,9 @@ describe('Model methods', () => { const post = new Post({ id: 1 }) const comments = await post.comments().get() - comments.forEach(comment => { + comments.forEach((comment) => { expect(comment).toBeInstanceOf(Comment) - comment.replies.forEach(reply => { + comment.replies.forEach((reply) => { expect(reply).toBeInstanceOf(Comment) }) }) @@ -189,16 +187,18 @@ describe('Model methods', () => { axiosMock.onGet().reply((config) => { expect(config.method).toEqual('get') - expect(config.url).toEqual(`http://localhost/posts/${post.someId}/comments`) + expect(config.url).toEqual( + `http://localhost/posts/${post.someId}/comments` + ) return [200, commentsResponse] }) const comments = await post.comments().get() - comments.forEach(comment => { + comments.forEach((comment) => { expect(comment).toBeInstanceOf(Comment) - comment.replies.forEach(reply => { + comment.replies.forEach((reply) => { expect(reply).toBeInstanceOf(Comment) }) }) @@ -210,16 +210,16 @@ describe('Model methods', () => { const posts = await Post.$get() expect(posts).toEqual(postsEmbedResponse.data) - }) test('$get() fetch style request without "data" wrapper', async () => { - axiosMock.onGet('http://localhost/posts').reply(200, postsEmbedResponse.data) + axiosMock + .onGet('http://localhost/posts') + .reply(200, postsEmbedResponse.data) const posts = await Post.$get() expect(posts).toEqual(postsEmbedResponse.data) - }) test('$get() hits right resource with "data" wrapper (nested object)', async () => { @@ -233,9 +233,9 @@ describe('Model methods', () => { const post = new Post({ id: 1 }) const comments = await post.comments().$get() - comments.forEach(comment => { + comments.forEach((comment) => { expect(comment).toBeInstanceOf(Comment) - comment.replies.data.forEach(reply => { + comment.replies.data.forEach((reply) => { expect(reply).toBeInstanceOf(Comment) }) }) @@ -250,16 +250,18 @@ describe('Model methods', () => { axiosMock.onGet().reply((config) => { expect(config.method).toEqual('get') - expect(config.url).toEqual(`http://localhost/posts/${post.someId}/comments`) + expect(config.url).toEqual( + `http://localhost/posts/${post.someId}/comments` + ) return [200, commentsResponse] }) const comments = await post.comments().$get() - comments.forEach(comment => { + comments.forEach((comment) => { expect(comment).toBeInstanceOf(Comment) - comment.replies.forEach(reply => { + comment.replies.forEach((reply) => { expect(reply).toBeInstanceOf(Comment) }) }) @@ -320,7 +322,7 @@ describe('Model methods', () => { expect(post).toEqual(_postResponse) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) @@ -361,7 +363,9 @@ describe('Model methods', () => { test('save() method makes a PUT request when ID of object exists (nested object)', async () => { let comment - axiosMock.onGet('http://localhost/posts/1/comments').reply(200, commentsResponse) + axiosMock + .onGet('http://localhost/posts/1/comments') + .reply(200, commentsResponse) axiosMock.onPut().reply((config) => { expect(config.method).toEqual('put') @@ -386,12 +390,16 @@ describe('Model methods', () => { post = new Post({ id: 1, someId: 'xs911-8cf12', title: 'Cool!' }) - axiosMock.onGet(`http://localhost/posts/${post.someId}/comments`).reply(200, commentsResponse) + axiosMock + .onGet(`http://localhost/posts/${post.someId}/comments`) + .reply(200, commentsResponse) axiosMock.onPut().reply((config) => { expect(config.method).toEqual('put') expect(config.data).toEqual(JSON.stringify(comment)) - expect(config.url).toEqual(`http://localhost/posts/${post.someId}/comments/1`) + expect(config.url).toEqual( + `http://localhost/posts/${post.someId}/comments/1` + ) return [200, {}] }) @@ -406,7 +414,6 @@ describe('Model methods', () => { axiosMock.onAny().reply((config) => { const _post = post - delete _post._config expect(config.method).toEqual('patch') expect(config.data).toEqual(JSON.stringify(_post)) @@ -444,7 +451,6 @@ describe('Model methods', () => { axiosMock.onAny().reply((config) => { const _post = post - delete _post._config expect(config.method).toEqual('post') expect(config.data).toEqual(JSON.stringify(_post)) @@ -459,15 +465,15 @@ describe('Model methods', () => { expect(post).toEqual(_postResponse) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) test('save() method makes a POST request when ID of object does not exists, with header "Content-Type: multipart/form-data" if the data has files', async () => { let post - const file = new File(["foo"], "foo.txt", { - type: "text/plain", + const file = new File(['foo'], 'foo.txt', { + type: 'text/plain' }) const _postResponse = { id: 1, @@ -509,8 +515,8 @@ describe('Model methods', () => { test('save() method makes a PUT request when ID of when ID of object exists, with header "Content-Type: multipart/form-data" if the data has files', async () => { let post - const file = new File(["foo"], "foo.txt", { - type: "text/plain", + const file = new File(['foo'], 'foo.txt', { + type: 'text/plain' }) const _postResponse = { id: 1, @@ -553,8 +559,8 @@ describe('Model methods', () => { test('patch() method makes a PATCH request when ID of when ID of object exists, with header "Content-Type: multipart/form-data" if the data has files', async () => { let post - const file = new File(["foo"], "foo.txt", { - type: "text/plain", + const file = new File(['foo'], 'foo.txt', { + type: 'text/plain' }) const _postResponse = { id: 1, @@ -564,7 +570,6 @@ describe('Model methods', () => { axiosMock.onAny().reply((config) => { let _data const _post = post - delete _post._config if (config.headers['Content-Type'] === 'multipart/form-data') { _data = Object.fromEntries(config.data) @@ -599,8 +604,8 @@ describe('Model methods', () => { test('save() method can add header "Content-Type: multipart/form-data" when "headers" object is already defined', async () => { let post - const file = new File(["foo"], "foo.txt", { - type: "text/plain", + const file = new File(['foo'], 'foo.txt', { + type: 'text/plain' }) const _postResponse = { id: 1, @@ -626,7 +631,6 @@ describe('Model methods', () => { axiosMock.onAny().reply((config) => { let _data const _post = post - delete _post._config if (config.headers['Content-Type'] === 'multipart/form-data') { _data = JSON.stringify(Object.fromEntries(config.data)) @@ -635,7 +639,9 @@ describe('Model methods', () => { } expect(config.method).toEqual('post') - expect(config.headers['Content-Type']).toStrictEqual('multipart/form-data') + expect(config.headers['Content-Type']).toStrictEqual( + 'multipart/form-data' + ) expect(_data).toEqual(JSON.stringify(_post)) expect(config.url).toEqual('http://localhost/posts') @@ -648,7 +654,7 @@ describe('Model methods', () => { expect(post).toEqual(_postResponse) expect(post).toBeInstanceOf(Post) expect(post.user).toBeInstanceOf(User) - post.relationships.tags.forEach(tag => { + post.relationships.tags.forEach((tag) => { expect(tag).toBeInstanceOf(Tag) }) }) @@ -666,11 +672,9 @@ describe('Model methods', () => { post = new Post({ id: null, title: 'Cool!' }) await post.save() - }) test('a request from delete() method hits the right resource', async () => { - axiosMock.onAny().reply((config) => { expect(config.method).toEqual('delete') expect(config.url).toBe('http://localhost/posts/1') @@ -701,7 +705,6 @@ describe('Model methods', () => { }) test('a request from delete() method when model has not ID throws a exception', async () => { - errorModel = () => { let post = new Post() post.delete() @@ -711,7 +714,9 @@ describe('Model methods', () => { }) test('a request from delete() method hits the right resource (nested object)', async () => { - axiosMock.onGet('http://localhost/posts/1/comments').reply(200, commentsResponse) + axiosMock + .onGet('http://localhost/posts/1/comments') + .reply(200, commentsResponse) axiosMock.onDelete().reply((config) => { expect(config.method).toEqual('delete') @@ -734,11 +739,15 @@ describe('Model methods', () => { post = new Post({ id: 1, someId: 'xs911-8cf12', title: 'Cool!' }) - axiosMock.onGet(`http://localhost/posts/${post.someId}/comments`).reply(200, commentsResponse) + axiosMock + .onGet(`http://localhost/posts/${post.someId}/comments`) + .reply(200, commentsResponse) axiosMock.onDelete().reply((config) => { expect(config.method).toEqual('delete') - expect(config.url).toEqual(`http://localhost/posts/${post.someId}/comments/1`) + expect(config.url).toEqual( + `http://localhost/posts/${post.someId}/comments/1` + ) return [200, {}] }) @@ -748,25 +757,23 @@ describe('Model methods', () => { }) test('a request with custom() method hits the right resource', async () => { - axiosMock.onAny().reply((config) => { expect(config.url).toEqual(`http://localhost/postz`) return [200, {}] }) - const post = await Post.custom('postz').first() + await Post.custom('postz').first() }) test('custom() gracefully handles accidental / for string arguments', async () => { - axiosMock.onAny().reply((config) => { expect(config.url).toBe('http://localhost/postz/recent') return [200, {}] }) - const post = await Post.custom('/postz', 'recent').first() + await Post.custom('/postz', 'recent').first() }) test('custom() called with multiple objects/strings gets the correct resource', async () => { @@ -782,12 +789,11 @@ describe('Model methods', () => { user = new User({ id: 1 }) comment = new Comment() - const result = await Comment.custom(user, 'postz', comment).get() + await Comment.custom(user, 'postz', comment).get() }) test('a request from hasMany() method hits right resource', async () => { let user - let posts axiosMock.onAny().reply((config) => { expect(config.method).toEqual('get') @@ -797,12 +803,11 @@ describe('Model methods', () => { }) user = new User({ id: 1 }) - posts = await user.posts().get() + await user.posts().get() }) test('a request from hasMany() with a find() hits right resource', async () => { let user - let post axiosMock.onAny().reply((config) => { expect(config.method).toEqual('get') @@ -811,17 +816,16 @@ describe('Model methods', () => { }) user = new User({ id: 1 }) - post = await user.posts().find(1) + await user.posts().find(1) }) test('a request hasMany() method returns a array of Models', async () => { - axiosMock.onGet('http://localhost/users/1/posts').reply(200, postsResponse) const user = new User({ id: 1 }) const posts = await user.posts().get() - posts.forEach(post => { + posts.forEach((post) => { expect(post).toBeInstanceOf(Post) }) }) @@ -839,7 +843,7 @@ describe('Model methods', () => { const post = new Post({ id: 1 }) comment = { text: 'hi!' } - let response = post.comments().attach(comment) + post.comments().attach(comment) }) test('attach() method hits right endpoint with a POST request (custom PK)', async () => { @@ -851,14 +855,16 @@ describe('Model methods', () => { post = new Post({ id: 1, someId: 'gt123-9gh23' }) - axiosMock.onAny().reply(config => { + axiosMock.onAny().reply((config) => { console.log(config) }) axiosMock.onPost().reply((config) => { expect(config.method).toEqual('post') expect(config.data).toEqual(JSON.stringify(comment)) - expect(config.url).toEqual(`http://localhost/posts/${post.someId}/comments`) + expect(config.url).toEqual( + `http://localhost/posts/${post.someId}/comments` + ) return [200, {}] }) @@ -880,11 +886,10 @@ describe('Model methods', () => { const post = new Post({ id: 1 }) comment = { text: 'hi!' } - let response = post.comments().sync(comment) + post.comments().sync(comment) }) test('for() method setup the right resource', async () => { - axiosMock.onPost().reply((config) => { expect(config.method).toEqual('post') expect(config.url).toEqual('http://localhost/users/1/posts') @@ -906,63 +911,122 @@ describe('Model methods', () => { text: 'for() takes more than one argument now!' }).for(user, post) - expect(comment.endpoint()).toEqual(`http://localhost/users/${user.id}/posts/${post.id}/comments`) + expect(comment.endpoint()).toEqual( + `http://localhost/users/${user.id}/posts/${post.id}/comments` + ) }) test('it throws a error when for() method does not recieve a instance of Model', () => { errorModel = () => { - const post = new Post({ text: 'Hello' }).for() + new Post({ text: 'Hello' }).for() } - expect(errorModel).toThrow('The for() method takes a minimum of one argument.') + expect(errorModel).toThrow( + 'The for() method takes a minimum of one argument.' + ) errorModel = () => { - const post = new Post({ text: 'Hello' }).for({}) + new Post({ text: 'Hello' }).for({}) } - expect(errorModel).toThrow('The object referenced on for() method is not a valid Model.') + expect(errorModel).toThrow( + 'The object referenced on for() method is not a valid Model.' + ) errorModel = () => { - const post = new Post({ text: 'Hello' }).for('') + new Post({ text: 'Hello' }).for('') } - expect(errorModel).toThrow('The object referenced on for() method is not a valid Model.') + expect(errorModel).toThrow( + 'The object referenced on for() method is not a valid Model.' + ) errorModel = () => { - const post = new Post({ text: 'Hello' }).for(1) + new Post({ text: 'Hello' }).for(1) } - expect(errorModel).toThrow('The object referenced on for() method is not a valid Model.') + expect(errorModel).toThrow( + 'The object referenced on for() method is not a valid Model.' + ) }) test('it throws a error when for() when referenced object has not a valid id', () => { errorModel = () => { const user = new User({ name: 'Mary' }) - const post = new Post({ text: 'Hello' }).for(user) + new Post({ text: 'Hello' }).for(user) } - expect(errorModel).toThrow('The object referenced on for() method has an invalid id.') + expect(errorModel).toThrow( + 'The object referenced on for() method has an invalid id.' + ) }) test('it throws a error when a custom() parameter is not a valid Model or a string', () => { - errorModel = () => { - const post = new Post({ text: 'Hello' }).custom() + new Post({ text: 'Hello' }).custom() } - expect(errorModel).toThrow('The custom() method takes a minimum of one argument.') + expect(errorModel).toThrow( + 'The custom() method takes a minimum of one argument.' + ) errorModel = () => { const user = new User({ name: 'Mary' }) - const post = new Post({ text: 'Hello' }).custom(user, 'a-string', 42) + new Post({ text: 'Hello' }).custom(user, 'a-string', 42) + } + + expect(errorModel).toThrow( + 'Arguments to custom() must be strings or instances of Model.' + ) + }) + + test('it throws an error when CRUD and relationship operations are used in conjunction with custom()', () => { + errorModel = () => { + new Post({ text: 'Hello' }).custom('foo/bar').save() + } + + expect(errorModel).toThrow( + 'The save() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) + + errorModel = () => { + new Post({ id: 1 }).custom('foo/bar').delete() + } + + expect(errorModel).toThrow( + 'The delete() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) + + errorModel = () => { + const post = new Post({ id: 1 }) + post.comments().custom('foo/bar').attach({ + text: 'Awesome post!' + }) + } + + expect(errorModel).toThrow( + 'The attach() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) + + errorModel = () => { + const post = new Post({ id: 1 }) + post.comments().custom('foo/bar').sync({ + text: 'Awesome post!' + }) } - expect(errorModel).toThrow('Arguments to custom() must be strings or instances of Model.') + expect(errorModel).toThrow( + 'The sync() method cannot be used in conjunction with the custom() method. Use for() instead.' + ) }) test('save() method makes a PUT request to the correct URL on nested object thas was fetched with find() method', async () => { - axiosMock.onGet('http://localhost/posts/1/comments/1').reply(200, commentsResponse[0]) - axiosMock.onPut('http://localhost/posts/1/comments/1').reply(200, commentsResponse[0]) + axiosMock + .onGet('http://localhost/posts/1/comments/1') + .reply(200, commentsResponse[0]) + axiosMock + .onPut('http://localhost/posts/1/comments/1') + .reply(200, commentsResponse[0]) const post = new Post({ id: 1 }) const comment = await post.comments().find(1) @@ -977,4 +1041,49 @@ describe('Model methods', () => { comment.text = 'Hola!' await comment.save() }) + + test('config() method can change request config', async () => { + axiosMock.onGet('http://localhost/posts').reply((config) => { + expect(config.params).toEqual({ + foo: 'bar' + }) + + return [200, postsResponse] + }) + + const posts = await Post.config({ + params: { + foo: 'bar' + } + }).get() + + posts.forEach((post) => { + expect(post).toBeInstanceOf(Post) + expect(post.user).toBeInstanceOf(User) + post.relationships.tags.forEach((tag) => { + expect(tag).toBeInstanceOf(Tag) + }) + }) + }) + + test('config() method can merge request config recursively', async () => { + let post + + axiosMock.onAny().reply((config) => { + const _post = { ...post, foo: 'bar' } + + expect(config.data).toEqual(JSON.stringify(_post)) + + return [200, {}] + }) + + post = new Post({ id: 1, title: 'Cool!' }) + await post + .config({ + data: { + foo: 'bar' + } + }) + .save() + }) }) diff --git a/tests/setup.test.js b/tests/setup.test.js index 1423cdae..68b5d24d 100644 --- a/tests/setup.test.js +++ b/tests/setup.test.js @@ -1,10 +1,7 @@ import EmptyBaseModel from './dummy/models/EmptyBaseModel' - import Post from './dummy/models/Post' -import User from './dummy/models/User' describe('Setup models', () => { - let errorModel = {} test('it throws an error if $http property has not been set', () => { diff --git a/yarn.lock b/yarn.lock index 85502682..400b3d57 100644 --- a/yarn.lock +++ b/yarn.lock @@ -802,6 +802,22 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@eslint/eslintrc@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" + integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + lodash "^4.17.20" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@iarna/cli@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@iarna/cli/-/cli-1.2.0.tgz#0f7af5e851afe895104583c4ca07377a8094d641" @@ -1222,6 +1238,16 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@types/json-schema@^7.0.3": + version "7.0.6" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" + integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/minimist@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" @@ -1264,6 +1290,53 @@ dependencies: "@types/yargs-parser" "*" +"@typescript-eslint/experimental-utils@^4.0.1": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.0.tgz#5aa7b006736634f588a69ee343ca959cd09988df" + integrity sha512-6i6eAoiPlXMKRbXzvoQD5Yn9L7k9ezzGRvzC/x1V3650rUk3c3AOjQyGYyF9BDxQQDK2ElmKOZRD0CbtdkMzQQ== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/scope-manager" "4.14.0" + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/typescript-estree" "4.14.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + +"@typescript-eslint/scope-manager@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.0.tgz#55a4743095d684e1f7b7180c4bac2a0a3727f517" + integrity sha512-/J+LlRMdbPh4RdL4hfP1eCwHN5bAhFAGOTsvE6SxsrM/47XQiPSgF5MDgLyp/i9kbZV9Lx80DW0OpPkzL+uf8Q== + dependencies: + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/visitor-keys" "4.14.0" + +"@typescript-eslint/types@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.0.tgz#d8a8202d9b58831d6fd9cee2ba12f8a5a5dd44b6" + integrity sha512-VsQE4VvpldHrTFuVPY1ZnHn/Txw6cZGjL48e+iBxTi2ksa9DmebKjAeFmTVAYoSkTk7gjA7UqJ7pIsyifTsI4A== + +"@typescript-eslint/typescript-estree@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.0.tgz#4bcd67486e9acafc3d0c982b23a9ab8ac8911ed7" + integrity sha512-wRjZ5qLao+bvS2F7pX4qi2oLcOONIB+ru8RGBieDptq/SudYwshveORwCVU4/yMAd4GK7Fsf8Uq1tjV838erag== + dependencies: + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/visitor-keys" "4.14.0" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + +"@typescript-eslint/visitor-keys@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.0.tgz#b1090d9d2955b044b2ea2904a22496849acbdf54" + integrity sha512-MeHHzUyRI50DuiPgV9+LxcM52FCJFYjJiWHtXlbyC27b80mfOwKeiKI+MHOTEpcpfmoPFm/vvQS88bYIx6PZTA== + dependencies: + "@typescript-eslint/types" "4.14.0" + eslint-visitor-keys "^2.0.0" + JSONStream@^1.0.4, JSONStream@^1.3.4, JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -1290,10 +1363,10 @@ acorn-globals@^4.1.0: acorn "^6.0.1" acorn-walk "^6.0.1" -acorn-jsx@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" - integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== +acorn-jsx@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== acorn-walk@^6.0.1: version "6.2.0" @@ -1310,10 +1383,10 @@ acorn@^6.0.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== -acorn@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" - integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== agent-base@4, agent-base@^4.3.0: version "4.3.0" @@ -1356,7 +1429,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: +ajv@^6.10.0, ajv@^6.5.5: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== @@ -1366,6 +1439,26 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.0.3.tgz#13ae747eff125cafb230ac504b2406cf371eece2" + integrity sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ansi-align@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" @@ -1373,12 +1466,17 @@ ansi-align@^2.0.0: dependencies: string-width "^2.0.0" +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + ansi-escapes@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.1: +ansi-escapes@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== @@ -1510,6 +1608,17 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= +array-includes@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.2.tgz#a8db03e0b88c8c6aeddc49cb132f9bcab4ebf9c8" + integrity sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + get-intrinsic "^1.0.1" + is-string "^1.0.5" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -1520,6 +1629,15 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +array.prototype.flat@^1.2.3: + version "1.2.4" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -1552,6 +1670,11 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -1852,6 +1975,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + call-limit@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.1.tgz#ef15f2670db3f1992557e2d965abc459e6e358d4" @@ -1911,7 +2042,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.2, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1920,14 +2051,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -1936,11 +2059,6 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -2010,13 +2128,6 @@ cli-columns@^3.1.2: string-width "^2.0.0" strip-ansi "^3.0.1" -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - cli-table3@^0.5.0, cli-table3@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" @@ -2034,11 +2145,6 @@ cli-table@^0.3.1: dependencies: colors "1.0.3" -cli-width@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" - integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== - cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -2220,6 +2326,11 @@ console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control- resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + conventional-changelog-angular@^5.0.0: version "5.0.11" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" @@ -2334,7 +2445,7 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.0, cross-spawn@^6.0.5: +cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -2345,7 +2456,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0: +cross-spawn@^7.0.0, cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2416,7 +2527,7 @@ debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "2.1.2" -debug@^2.2.0, debug@^2.3.3: +debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2458,7 +2569,7 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@~0.1.3: +deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= @@ -2544,6 +2655,14 @@ dir-glob@^3.0.0, dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -2651,6 +2770,13 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + env-ci@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-5.0.2.tgz#48b6687f8af8cdf5e31b8fcf2987553d085249d9" @@ -2700,6 +2826,26 @@ es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5: string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" +es-abstract@^1.18.0-next.1: + version "1.18.0-next.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.2.tgz#088101a55f0541f595e7e057199e27ddc8f3a5c2" + integrity sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.2" + is-negative-zero "^2.0.1" + is-regex "^1.1.1" + object-inspect "^1.9.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.3" + string.prototype.trimstart "^1.0.3" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -2738,18 +2884,77 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-scope@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" - integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== +eslint-config-prettier@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" + integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== + +eslint-import-resolver-node@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" + integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-import@^2.22.1: + version "2.22.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" + integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw== + dependencies: + array-includes "^3.1.1" + array.prototype.flat "^1.2.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.4" + eslint-module-utils "^2.6.0" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.1" + read-pkg-up "^2.0.0" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + +eslint-plugin-jest@^24.1.3: + version "24.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.1.3.tgz#fa3db864f06c5623ff43485ca6c0e8fc5fe8ba0c" + integrity sha512-dNGGjzuEzCE3d5EPZQ/QGtmlMotqnYWD/QpCZ1UuZlrMAdhG5rldh0N0haCvhGnUkSeuORS5VNROwF9Hrgn3Lg== + dependencies: + "@typescript-eslint/experimental-utils" "^4.0.1" + +eslint-plugin-prettier@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" + integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-simple-import-sort@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8" + integrity sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw== + +eslint-scope@^5.0.0, eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: - esrecurse "^4.1.0" + esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" - integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== +eslint-utils@^2.0.0, eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== dependencies: eslint-visitor-keys "^1.1.0" @@ -2758,78 +2963,88 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" - integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== +eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" + integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== + +eslint@^7.18.0: + version "7.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.18.0.tgz#7fdcd2f3715a41fe6295a16234bd69aed2c75e67" + integrity sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ== dependencies: "@babel/code-frame" "^7.0.0" + "@eslint/eslintrc" "^0.3.0" ajv "^6.10.0" - chalk "^2.1.0" - cross-spawn "^6.0.5" + chalk "^4.0.0" + cross-spawn "^7.0.2" 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" + enquirer "^2.3.5" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.2.0" esutils "^2.0.2" - file-entry-cache "^5.0.1" + file-entry-cache "^6.0.0" functional-red-black-tree "^1.0.1" glob-parent "^5.0.0" globals "^12.1.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" + levn "^0.4.1" + lodash "^4.17.20" minimatch "^3.0.4" - mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.3" + optionator "^0.9.1" 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" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.4" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^6.1.2: - version "6.2.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" - integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== dependencies: - acorn "^7.1.1" - acorn-jsx "^5.2.0" - eslint-visitor-keys "^1.1.0" + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.1: +esquery@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== dependencies: estraverse "^5.1.0" -esrecurse@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" - integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: - estraverse "^4.1.0" + estraverse "^5.2.0" -estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -2839,6 +3054,11 @@ estraverse@^5.1.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== +estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -2940,15 +3160,6 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -2978,6 +3189,11 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-glob@^3.1.1: version "3.2.4" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" @@ -2995,7 +3211,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -3033,12 +3249,12 @@ figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" - integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== +file-entry-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.0.tgz#7921a89c391c6d93efec2169ac6bf300c527ea0a" + integrity sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA== dependencies: - flat-cache "^2.0.1" + flat-cache "^3.0.4" file-uri-to-path@1.0.0: version "1.0.0" @@ -3105,19 +3321,18 @@ find-versions@^3.0.0: dependencies: semver-regex "^2.0.0" -flat-cache@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" - integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: - flatted "^2.0.0" - rimraf "2.6.3" - write "1.0.3" + flatted "^3.1.0" + rimraf "^3.0.2" -flatted@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" - integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +flatted@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.0.tgz#a5d06b4a8b01e3a63771daa5cb7a1903e2e57067" + integrity sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA== flush-write-stream@^1.0.0: version "1.1.1" @@ -3289,6 +3504,15 @@ get-caller-file@^2.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.1, get-intrinsic@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49" + integrity sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -3390,6 +3614,18 @@ globby@^11.0.0: merge2 "^1.3.0" slash "^3.0.0" +globby@^11.0.1: + version "11.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" @@ -3418,9 +3654,9 @@ growly@^1.3.0: integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= handlebars@^4.7.6: - version "4.7.6" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" - integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: minimist "^1.2.5" neo-async "^2.6.0" @@ -3518,9 +3754,9 @@ hook-std@^2.0.0: integrity sha512-zZ6T5WcuBMIUVh49iPQS9t977t7C0l7OtHrpeMb5uk48JdflRX0NSFvCekfYNmGQETnLq9W/isMyHl69kxGi8g== hosted-git-info@^2.1.4, hosted-git-info@^2.7.1, hosted-git-info@^2.8.8: - version "2.8.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" - integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== hosted-git-info@^3.0.0: version "3.0.7" @@ -3608,7 +3844,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -3657,6 +3893,14 @@ import-fresh@^3.0.0, import-fresh@^3.1.0: parent-module "^1.0.0" resolve-from "^4.0.0" +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" @@ -3724,25 +3968,6 @@ init-package-json@^1.10.3: validate-npm-package-license "^3.0.1" validate-npm-package-name "^3.0.0" -inquirer@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" - integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== - dependencies: - ansi-escapes "^4.2.1" - 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.4.0" - rxjs "^6.5.3" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - into-stream@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-5.1.1.tgz#f9a20a348a11f3c13face22763f2d02e127f4db8" @@ -3814,6 +4039,11 @@ is-callable@^1.1.4, is-callable@^1.1.5: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== +is-callable@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" + integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== + is-ci@^1.0.10: version "1.2.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" @@ -3835,6 +4065,13 @@ is-cidr@^3.0.0: dependencies: cidr-regex "^2.0.10" +is-core-module@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3933,6 +4170,11 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" @@ -3996,6 +4238,13 @@ is-regex@^1.0.5: dependencies: has "^1.0.3" +is-regex@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" + integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== + dependencies: + has-symbols "^1.0.1" + is-retry-allowed@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" @@ -4011,6 +4260,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -4045,7 +4299,7 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -4562,6 +4816,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -4577,6 +4836,13 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" @@ -4673,7 +4939,15 @@ levenary@^1.1.1: dependencies: leven "^3.1.0" -levn@^0.3.0, levn@~0.3.0: +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= @@ -4957,10 +5231,10 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.4: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== loose-envify@^1.0.0: version "1.4.0" @@ -5118,6 +5392,11 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +merge@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-2.1.1.tgz#59ef4bf7e0b3e879186436e8481c06a6c162ca98" + integrity sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w== + micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -5271,7 +5550,7 @@ ms@2.1.2, ms@^2.0.0, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -mute-stream@0.0.8, mute-stream@~0.0.4: +mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== @@ -5710,6 +5989,11 @@ object-inspect@^1.7.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== +object-inspect@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== + object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -5737,6 +6021,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" @@ -5752,6 +6046,16 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +object.values@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.2.tgz#7a2015e06fcb0f546bd652486ce8583a4731c731" + integrity sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + has "^1.0.3" + once@^1.3.0, once@^1.3.1, once@^1.4.0, once@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -5771,7 +6075,7 @@ opener@^1.5.1: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -optionator@^0.8.1, optionator@^0.8.3: +optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -5783,6 +6087,18 @@ optionator@^0.8.1, optionator@^0.8.3: type-check "~0.3.2" word-wrap "~1.2.3" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -5805,7 +6121,7 @@ os-name@^3.1.0: macos-release "^2.2.0" windows-release "^3.1.0" -os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: +os-tmpdir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= @@ -6116,6 +6432,13 @@ pkg-conf@^2.1.0: find-up "^2.0.0" load-json-file "^4.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -6140,6 +6463,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -6150,6 +6478,18 @@ prepend-http@^1.0.1: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + pretty-format@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" @@ -6520,10 +6860,10 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" - integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== +regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== regexpu-core@^4.7.0: version "4.7.0" @@ -6633,6 +6973,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -6682,13 +7027,13 @@ resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.8. dependencies: path-parse "^1.0.6" -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== +resolve@^1.17.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" + is-core-module "^2.1.0" + path-parse "^1.0.6" ret@~0.1.10: version "0.1.15" @@ -6710,13 +7055,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -6724,16 +7062,18 @@ rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - run-parallel@^1.1.9: version "1.1.10" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" @@ -6746,13 +7086,6 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.5.3: - version "6.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" - integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== - dependencies: - tslib "^1.9.0" - safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" @@ -6863,7 +7196,7 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -6873,6 +7206,13 @@ semver@^7.1.2, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +semver@^7.2.1: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -6953,14 +7293,14 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" - integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== dependencies: - ansi-styles "^3.2.0" - astral-regex "^1.0.0" - is-fullwidth-code-point "^2.0.0" + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" slide@^1.1.6, slide@~1.1.3, slide@~1.1.6: version "1.1.6" @@ -7150,9 +7490,9 @@ sshpk@^1.7.0: tweetnacl "~0.14.0" ssri@^6.0.0, ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== dependencies: figgy-pudding "^3.5.1" @@ -7266,6 +7606,14 @@ string.prototype.trimend@^1.0.0: define-properties "^1.1.3" es-abstract "^1.17.5" +string.prototype.trimend@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b" + integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + string.prototype.trimleft@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" @@ -7292,6 +7640,14 @@ string.prototype.trimstart@^1.0.0: define-properties "^1.1.3" es-abstract "^1.17.5" +string.prototype.trimstart@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa" + integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -7366,10 +7722,10 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" - integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-json-comments@~2.0.1: version "2.0.1" @@ -7422,15 +7778,15 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table@^5.2.3: - version "5.4.6" - resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" - integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== +table@^6.0.4: + version "6.0.7" + resolved "https://registry.yarnpkg.com/table/-/table-6.0.7.tgz#e45897ffbcc1bcf9e8a87bf420f2c9e5a7a52a34" + integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== dependencies: - ajv "^6.10.2" - lodash "^4.17.14" - slice-ansi "^2.1.0" - string-width "^3.0.0" + ajv "^7.0.2" + lodash "^4.17.20" + slice-ansi "^4.0.0" + string-width "^4.2.0" tar@^4.4.10, tar@^4.4.12, tar@^4.4.13: version "4.4.13" @@ -7519,7 +7875,7 @@ through2@^3.0.0: inherits "^2.0.4" readable-stream "2 || 3" -through@2, "through@>=2.2.7 <3", through@^2.3.6: +through@2, "through@>=2.2.7 <3": version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -7534,13 +7890,6 @@ tiny-relative-date@^1.3.0: resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -7613,10 +7962,27 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -tslib@^1.9.0: - version "1.11.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" - integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsutils@^3.17.1: + version "3.19.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.19.1.tgz#d8566e0c51c82f32f9c25a4d367cd62409a547a9" + integrity sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw== + dependencies: + tslib "^1.8.1" tunnel-agent@^0.6.0: version "0.6.0" @@ -7630,6 +7996,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -7668,9 +8041,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= uglify-js@^3.1.4: - version "3.11.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.11.4.tgz#b47b7ae99d4bd1dca65b53aaa69caa0909e6fadf" - integrity sha512-FyYnoxVL1D6+jDGQpbK5jW6y/2JlVfRfEeQ67BPCUg5wfCjaKOpr2XeceE4QL+MkhxliLtf5EbrMDZgzpt2CNw== + version "3.13.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113" + integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw== uid-number@0.0.6: version "0.0.6" @@ -8002,7 +8375,7 @@ windows-release@^3.1.0: dependencies: execa "^1.0.0" -word-wrap@~1.2.3: +word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -8068,13 +8441,6 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.3: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" - integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== - dependencies: - mkdirp "^0.5.1" - ws@^5.2.0: version "5.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" @@ -8098,9 +8464,9 @@ xtend@~4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== y18n@^4.0.0: version "4.0.0"