From d07a99efb01bbad1cec4db826eea304eb7be4d01 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 9 May 2021 21:02:22 +0000 Subject: [PATCH 1/2] chore(deps): update dependency codecov to v3.8.2 --- package.json | 2 +- yarn.lock | 60 +++++++++++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 033dc91..699b0e1 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "dependencies": {}, "devDependencies": { "babel-eslint": "10.1.0", - "codecov": "3.8.1", + "codecov": "3.8.2", "eslint": "7.12.1", "eslint-config-standard": "16.0.2", "eslint-plugin-import": "2.22.1", diff --git a/yarn.lock b/yarn.lock index 2271715..243fe3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -280,11 +280,6 @@ acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - agent-base@6: version "6.0.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.1.tgz#808007e4e5867decb0ab6ab2f928fbdb5a596db4" @@ -509,15 +504,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -codecov@3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.1.tgz#06fe026b75525ed1ce864d4a34f1010c52c51546" - integrity sha512-Qm7ltx1pzLPsliZY81jyaQ80dcNR4/JpcX0IHCIWrHBXgseySqbdbYfkdiXd7o/xmzQpGRVCKGYeTrHUpn6Dcw== +codecov@3.8.2: + version "3.8.2" + resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.2.tgz#ab24f18783998c39e809ea210af899f8dbcc790e" + integrity sha512-6w/kt/xvmPsWMfDFPE/T054txA9RTgcJEw36PNa6MYX+YV29jCHCRFXwbQ3QZBTOgnex1J2WP8bo2AT8TWWz9g== dependencies: argv "0.0.2" ignore-walk "3.0.3" - js-yaml "3.14.0" - teeny-request "6.0.1" + js-yaml "3.14.1" + teeny-request "7.0.1" urlgrey "0.4.4" color-convert@^1.9.0: @@ -1251,12 +1246,12 @@ http-proxy-agent@^4.0.0: agent-base "6" debug "4" -https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== dependencies: - agent-base "5" + agent-base "6" debug "4" ignore-walk@3.0.3: @@ -1550,7 +1545,15 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.14.0, js-yaml@^3.13.1: +js-yaml@3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^3.13.1: version "3.14.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== @@ -1710,7 +1713,7 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -node-fetch@^2.2.0: +node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -2596,16 +2599,16 @@ tape@^5.0.0: string.prototype.trim "^1.2.1" through "^2.3.8" -teeny-request@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-6.0.1.tgz#9b1f512cef152945827ba7e34f62523a4ce2c5b0" - integrity sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g== +teeny-request@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-7.0.1.tgz#bdd41fdffea5f8fbc0d29392cb47bec4f66b2b4c" + integrity sha512-sasJmQ37klOlplL4Ia/786M5YlOcoLGQyq2TE4WHSRupbAuDaQW0PfVxV4MtdBtRJ4ngzS+1qim8zP6Zp35qCw== dependencies: http-proxy-agent "^4.0.0" - https-proxy-agent "^4.0.0" - node-fetch "^2.2.0" + https-proxy-agent "^5.0.0" + node-fetch "^2.6.1" stream-events "^1.0.5" - uuid "^3.3.2" + uuid "^8.0.0" test-exclude@^6.0.0: version "6.0.0" @@ -2713,11 +2716,16 @@ util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -uuid@^3.3.2, uuid@^3.3.3: +uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^8.0.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache@^2.0.3: version "2.1.1" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" From da9d8ae9927faa51f6d4d451db8bfd5714999301 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Sun, 9 May 2021 21:02:37 +0000 Subject: [PATCH 2/2] [CodeFactor] Apply fixes to commit d07a99e [ci skip] [skip ci] --- lib/selectors.mjs | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/lib/selectors.mjs b/lib/selectors.mjs index 890a0db..a58ffbb 100644 --- a/lib/selectors.mjs +++ b/lib/selectors.mjs @@ -43,8 +43,10 @@ export class Selector extends Optionable { return false } - return !set.length ? false - : set.length === 1 ? set[0] + return !set.length +? false + : set.length === 1 +? set[0] : set } @@ -79,10 +81,14 @@ export class Selector extends Optionable { } crnt.push( - token.type === CssTerms.CLASS ? this._listContains(token.type, token.data) - : token.type === CssTerms.ATTR ? this._attr(token) - : token.type === CssTerms.PSEUDO_CLASS || token.type === CssTerms.PSEUDO_PSEUDO ? this._pseudo(token) - : token.type === CssTerms.STAR ? Boolean + token.type === CssTerms.CLASS +? this._listContains(token.type, token.data) + : token.type === CssTerms.ATTR +? this._attr(token) + : token.type === CssTerms.PSEUDO_CLASS || token.type === CssTerms.PSEUDO_PSEUDO +? this._pseudo(token) + : token.type === CssTerms.STAR +? Boolean : this._matches(token.type, token.data) ) } @@ -97,20 +103,24 @@ export class Selector extends Optionable { return (node) => { const val = this.options[type](node) const valArr = - Array.isArray(val) ? val - : val ? val.toString().split(/\s+/) + Array.isArray(val) +? val + : val +? val.toString().split(/\s+/) : [] return valArr.indexOf(data) >= 0 } } _attr (token) { - return token.data.lhs ? this._validAttr( + return token.data.lhs +? this._validAttr( this.options.attr, token.data.lhs, token.data.cmp, token.data.rhs - ) : this._validAttr(this.options.attr, token.data) + ) +: this._validAttr(this.options.attr, token.data) } _validAttr (fn, lhs, cmp, rhs) {