diff --git a/dist/index.js b/dist/index.js index 4f264d3ea..0d87e2478 100644 --- a/dist/index.js +++ b/dist/index.js @@ -64428,6 +64428,23 @@ internals.functions = { return condition ? then : otherwise; }, + length(item) { + + if (typeof item === 'string') { + return item.length; + } + + if (!item || typeof item !== 'object') { + return null; + } + + if (Array.isArray(item)) { + return item.length; + } + + return Object.keys(item).length; + }, + msg(code) { const [value, state, prefs, local, options] = this; @@ -131271,7 +131288,7 @@ module.exports = JSON.parse('{"assert":true,"node:assert":[">= 14.18 && < 15","> /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"joi","description":"Object schema validation","version":"17.5.0","repository":"git://github.com/sideway/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.0.0","@hapi/topo":"^5.0.0","@sideway/address":"^4.1.3","@sideway/formula":"^3.0.0","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"24.x.x","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause"}'); +module.exports = JSON.parse('{"name":"joi","description":"Object schema validation","version":"17.6.0","repository":"git://github.com/sideway/joi","main":"lib/index.js","types":"lib/index.d.ts","browser":"dist/joi-browser.min.js","files":["lib/**/*","dist/*"],"keywords":["schema","validation"],"dependencies":{"@hapi/hoek":"^9.0.0","@hapi/topo":"^5.0.0","@sideway/address":"^4.1.3","@sideway/formula":"^3.0.0","@sideway/pinpoint":"^2.0.0"},"devDependencies":{"@hapi/bourne":"2.x.x","@hapi/code":"8.x.x","@hapi/joi-legacy-test":"npm:@hapi/joi@15.x.x","@hapi/lab":"24.x.x","typescript":"4.3.x"},"scripts":{"prepublishOnly":"cd browser && npm install && npm run build","test":"lab -t 100 -a @hapi/code -L -Y","test-cov-html":"lab -r html -o coverage.html -a @hapi/code"},"license":"BSD-3-Clause"}'); /***/ }), diff --git a/package.json b/package.json index 9d0c39473..8cfd43138 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "deepmerge": "4.2.2", "escape-string-regexp": "4.0.0", "ignore": "5.2.0", - "joi": "17.5.0", + "joi": "17.6.0", "lodash": "4.17.21", "probot": "12.2.1", "regex-parser": "2.2.11", diff --git a/yarn.lock b/yarn.lock index 851ec04be..c117a2709 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3235,10 +3235,10 @@ jmespath@^0.15.0: resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= -joi@17.5.0, joi@^17.4.0: - version "17.5.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.5.0.tgz#7e66d0004b5045d971cf416a55fb61d33ac6e011" - integrity sha512-R7hR50COp7StzLnDi4ywOXHrBrgNXuUUfJWIR5lPY5Bm/pOD3jZaTwpluUXVLRWcoWZxkrHBBJ5hLxgnlehbdw== +joi@17.6.0, joi@^17.4.0: + version "17.6.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2" + integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== dependencies: "@hapi/hoek" "^9.0.0" "@hapi/topo" "^5.0.0"