Skip to content

Commit 38955c6

Browse files
committed
Issue #334: Upgrade joi dependency to 13.7.0 for release of 2.7.0
1 parent 6f87d01 commit 38955c6

File tree

2 files changed

+131
-19
lines changed

2 files changed

+131
-19
lines changed

lib/joi/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
13.6.0
1+
13.7.0

lib/joi/joi.bundle.js

Lines changed: 130 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports =
8282
/******/
8383
/******/
8484
/******/ // Load entry module and return exports
85-
/******/ return __webpack_require__(__webpack_require__.s = 5);
85+
/******/ return __webpack_require__(__webpack_require__.s = 6);
8686
/******/ })
8787
/************************************************************************/
8888
/******/ ([
@@ -97,7 +97,7 @@ module.exports =
9797
const Assert = __webpack_require__(13);
9898
const Crypto = __webpack_require__(14);
9999
const Path = __webpack_require__(15);
100-
const Util = __webpack_require__(6);
100+
const Util = __webpack_require__(4);
101101

102102
const Escape = __webpack_require__(16);
103103

@@ -1058,7 +1058,7 @@ exports.block = function () {
10581058
const Hoek = __webpack_require__(0);
10591059
const Settings = __webpack_require__(7);
10601060
const Ref = __webpack_require__(2);
1061-
const Errors = __webpack_require__(4);
1061+
const Errors = __webpack_require__(5);
10621062
let Alternatives = null; // Delay-loaded to prevent circular dependencies
10631063
let Cast = null;
10641064

@@ -2075,6 +2075,12 @@ exports.ref = function (id) {
20752075

20762076
/***/ }),
20772077
/* 4 */
2078+
/***/ (function(module, exports) {
2079+
2080+
module.exports = require("util");
2081+
2082+
/***/ }),
2083+
/* 5 */
20782084
/***/ (function(module, exports, __webpack_require__) {
20792085

20802086
"use strict";
@@ -2444,7 +2450,7 @@ internals.annotate = function (stripColorCodes) {
24442450

24452451

24462452
/***/ }),
2447-
/* 5 */
2453+
/* 6 */
24482454
/***/ (function(module, exports, __webpack_require__) {
24492455

24502456
"use strict";
@@ -2455,7 +2461,7 @@ internals.annotate = function (stripColorCodes) {
24552461
const Hoek = __webpack_require__(0);
24562462
const Any = __webpack_require__(1);
24572463
const Cast = __webpack_require__(3);
2458-
const Errors = __webpack_require__(4);
2464+
const Errors = __webpack_require__(5);
24592465
const Lazy = __webpack_require__(19);
24602466
const Ref = __webpack_require__(2);
24612467
const Settings = __webpack_require__(7);
@@ -2472,7 +2478,8 @@ const internals = {
24722478
func: __webpack_require__(23),
24732479
number: __webpack_require__(25),
24742480
object: __webpack_require__(11),
2475-
string: __webpack_require__(26)
2481+
string: __webpack_require__(26),
2482+
symbol: __webpack_require__(32)
24762483
};
24772484

24782485
internals.callWithDefaults = function (schema, args) {
@@ -2562,6 +2569,13 @@ internals.root = function () {
25622569
return internals.callWithDefaults.call(this, internals.string, args);
25632570
};
25642571

2572+
root.symbol = function (...args) {
2573+
2574+
Hoek.assert(args.length === 0, 'Joi.symbol() does not allow arguments.');
2575+
2576+
return internals.callWithDefaults.call(this, internals.symbol, args);
2577+
};
2578+
25652579
root.ref = function (...args) {
25662580

25672581
return Ref.create(...args);
@@ -2880,7 +2894,7 @@ internals.root = function () {
28802894

28812895
root.extensionsSchema = internals.array.items([internals.object, internals.func.arity(1)]).strict();
28822896

2883-
root.version = __webpack_require__(32).version;
2897+
root.version = __webpack_require__(33).version;
28842898

28852899
return root;
28862900
};
@@ -2889,12 +2903,6 @@ internals.root = function () {
28892903
module.exports = internals.root();
28902904

28912905

2892-
/***/ }),
2893-
/* 6 */
2894-
/***/ (function(module, exports) {
2895-
2896-
module.exports = require("util");
2897-
28982906
/***/ }),
28992907
/* 7 */
29002908
/***/ (function(module, exports, __webpack_require__) {
@@ -3520,7 +3528,7 @@ module.exports = new internals.Date();
35203528
const Hoek = __webpack_require__(0);
35213529
const Topo = __webpack_require__(24);
35223530
const Any = __webpack_require__(1);
3523-
const Errors = __webpack_require__(4);
3531+
const Errors = __webpack_require__(5);
35243532
const Cast = __webpack_require__(3);
35253533

35263534

@@ -5026,6 +5034,10 @@ exports.errors = {
50265034
ref: 'references "{{ref}}" which is not a number',
50275035
ip: 'must be a valid ip address with a {{cidr}} CIDR',
50285036
ipVersion: 'must be a valid ip address of one of the following versions {{version}} with a {{cidr}} CIDR'
5037+
},
5038+
symbol: {
5039+
base: 'must be a symbol',
5040+
map: 'must be one of {{map}}'
50295041
}
50305042
};
50315043

@@ -5039,7 +5051,7 @@ exports.errors = {
50395051

50405052
// Load modules
50415053

5042-
const Joi = __webpack_require__(5);
5054+
const Joi = __webpack_require__(6);
50435055

50445056

50455057
// Declare internals
@@ -7373,7 +7385,7 @@ module.exports = internals.Ip;
73737385
// Load modules
73747386

73757387
const Punycode = __webpack_require__(31);
7376-
const Util = __webpack_require__(6);
7388+
const Util = __webpack_require__(4);
73777389

73787390
// Declare internals
73797391

@@ -8807,9 +8819,109 @@ module.exports = require("punycode");
88078819

88088820
/***/ }),
88098821
/* 32 */
8822+
/***/ (function(module, exports, __webpack_require__) {
8823+
8824+
"use strict";
8825+
8826+
8827+
// Load modules
8828+
8829+
const Util = __webpack_require__(4);
8830+
8831+
const Any = __webpack_require__(1);
8832+
const Hoek = __webpack_require__(0);
8833+
8834+
8835+
// Declare internals
8836+
8837+
const internals = {};
8838+
8839+
8840+
internals.Map = class extends Map {
8841+
8842+
slice() {
8843+
8844+
return new internals.Map(this);
8845+
}
8846+
8847+
toString() {
8848+
8849+
return Util.inspect(this);
8850+
}
8851+
};
8852+
8853+
8854+
internals.Symbol = class extends Any {
8855+
8856+
constructor() {
8857+
8858+
super();
8859+
this._type = 'symbol';
8860+
this._inner.map = new internals.Map();
8861+
}
8862+
8863+
_base(value, state, options) {
8864+
8865+
if (options.convert) {
8866+
const lookup = this._inner.map.get(value);
8867+
if (lookup) {
8868+
value = lookup;
8869+
}
8870+
8871+
if (this._flags.allowOnly) {
8872+
return {
8873+
value,
8874+
errors: (typeof value === 'symbol') ? null : this.createError('symbol.map', { map: this._inner.map }, state, options)
8875+
};
8876+
}
8877+
}
8878+
8879+
return {
8880+
value,
8881+
errors: (typeof value === 'symbol') ? null : this.createError('symbol.base', null, state, options)
8882+
};
8883+
}
8884+
8885+
map(iterable) {
8886+
8887+
if (iterable && !iterable[Symbol.iterator] && typeof iterable === 'object') {
8888+
iterable = Object.entries(iterable);
8889+
}
8890+
8891+
Hoek.assert(iterable && iterable[Symbol.iterator], 'Iterable must be an iterable or object');
8892+
const obj = this.clone();
8893+
8894+
const symbols = [];
8895+
for (const entry of iterable) {
8896+
Hoek.assert(entry && entry[Symbol.iterator], 'Entry must be an iterable');
8897+
const [key, value] = entry;
8898+
8899+
Hoek.assert(typeof key !== 'object' && typeof key !== 'function' && typeof key !== 'symbol', 'Key must not be an object, function, or Symbol');
8900+
Hoek.assert(typeof value === 'symbol', 'Value must be a Symbol');
8901+
obj._inner.map.set(key, value);
8902+
symbols.push(value);
8903+
}
8904+
8905+
return obj.valid(...symbols);
8906+
}
8907+
8908+
describe() {
8909+
8910+
const description = super.describe();
8911+
description.map = new Map(this._inner.map);
8912+
return description;
8913+
}
8914+
};
8915+
8916+
8917+
module.exports = new internals.Symbol();
8918+
8919+
8920+
/***/ }),
8921+
/* 33 */
88108922
/***/ (function(module) {
88118923

8812-
module.exports = {"name":"joi","description":"Object schema validation","version":"13.6.0","homepage":"https://github.com/hapijs/joi","repository":"git://github.com/hapijs/joi","main":"lib/index.js","keywords":["hapi","schema","validation"],"engines":{"node":">=8.9.0"},"dependencies":{"hoek":"5.x.x","isemail":"3.x.x","topo":"3.x.x"},"devDependencies":{"code":"5.x.x","hapitoc":"1.x.x","lab":"15.x.x","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"scripts":{"build":"webpack","test":"lab -t 100 -a code -L","test-debug":"lab -a code","test-cov-html":"lab -r html -o coverage.html -a code","toc":"hapitoc","version":"npm run toc && git add API.md README.md"},"license":"BSD-3-Clause"};
8924+
module.exports = {"name":"joi","description":"Object schema validation","version":"13.7.0","homepage":"https://github.com/hapijs/joi","repository":"git://github.com/hapijs/joi","main":"lib/index.js","keywords":["hapi","schema","validation"],"engines":{"node":">=8.9.0"},"dependencies":{"hoek":"5.x.x","isemail":"3.x.x","topo":"3.x.x"},"devDependencies":{"code":"5.x.x","hapitoc":"1.x.x","lab":"15.x.x","webpack":"^4.16.5","webpack-cli":"^3.1.0"},"scripts":{"build":"webpack","test":"lab -t 100 -a code -L","test-debug":"lab -a code","test-cov-html":"lab -r html -o coverage.html -a code","toc":"hapitoc","version":"npm run toc && git add API.md README.md"},"license":"BSD-3-Clause"};
88138925

88148926
/***/ })
8815-
/******/ ]);
8927+
/******/ ]);

0 commit comments

Comments
 (0)