Skip to content

Commit

Permalink
Issue #334: Upgrade joi dependency to 13.7.0 for release of 2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
OldSneerJaw committed Sep 30, 2018
1 parent 6f87d01 commit 38955c6
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/joi/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13.6.0
13.7.0
148 changes: 130 additions & 18 deletions lib/joi/joi.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports =
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 5);
/******/ return __webpack_require__(__webpack_require__.s = 6);
/******/ })
/************************************************************************/
/******/ ([
Expand All @@ -97,7 +97,7 @@ module.exports =
const Assert = __webpack_require__(13);
const Crypto = __webpack_require__(14);
const Path = __webpack_require__(15);
const Util = __webpack_require__(6);
const Util = __webpack_require__(4);

const Escape = __webpack_require__(16);

Expand Down Expand Up @@ -1058,7 +1058,7 @@ exports.block = function () {
const Hoek = __webpack_require__(0);
const Settings = __webpack_require__(7);
const Ref = __webpack_require__(2);
const Errors = __webpack_require__(4);
const Errors = __webpack_require__(5);
let Alternatives = null; // Delay-loaded to prevent circular dependencies
let Cast = null;

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

/***/ }),
/* 4 */
/***/ (function(module, exports) {

module.exports = require("util");

/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

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


/***/ }),
/* 5 */
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand All @@ -2455,7 +2461,7 @@ internals.annotate = function (stripColorCodes) {
const Hoek = __webpack_require__(0);
const Any = __webpack_require__(1);
const Cast = __webpack_require__(3);
const Errors = __webpack_require__(4);
const Errors = __webpack_require__(5);
const Lazy = __webpack_require__(19);
const Ref = __webpack_require__(2);
const Settings = __webpack_require__(7);
Expand All @@ -2472,7 +2478,8 @@ const internals = {
func: __webpack_require__(23),
number: __webpack_require__(25),
object: __webpack_require__(11),
string: __webpack_require__(26)
string: __webpack_require__(26),
symbol: __webpack_require__(32)
};

internals.callWithDefaults = function (schema, args) {
Expand Down Expand Up @@ -2562,6 +2569,13 @@ internals.root = function () {
return internals.callWithDefaults.call(this, internals.string, args);
};

root.symbol = function (...args) {

Hoek.assert(args.length === 0, 'Joi.symbol() does not allow arguments.');

return internals.callWithDefaults.call(this, internals.symbol, args);
};

root.ref = function (...args) {

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

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

root.version = __webpack_require__(32).version;
root.version = __webpack_require__(33).version;

return root;
};
Expand All @@ -2889,12 +2903,6 @@ internals.root = function () {
module.exports = internals.root();


/***/ }),
/* 6 */
/***/ (function(module, exports) {

module.exports = require("util");

/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
Expand Down Expand Up @@ -3520,7 +3528,7 @@ module.exports = new internals.Date();
const Hoek = __webpack_require__(0);
const Topo = __webpack_require__(24);
const Any = __webpack_require__(1);
const Errors = __webpack_require__(4);
const Errors = __webpack_require__(5);
const Cast = __webpack_require__(3);


Expand Down Expand Up @@ -5026,6 +5034,10 @@ exports.errors = {
ref: 'references "{{ref}}" which is not a number',
ip: 'must be a valid ip address with a {{cidr}} CIDR',
ipVersion: 'must be a valid ip address of one of the following versions {{version}} with a {{cidr}} CIDR'
},
symbol: {
base: 'must be a symbol',
map: 'must be one of {{map}}'
}
};

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

// Load modules

const Joi = __webpack_require__(5);
const Joi = __webpack_require__(6);


// Declare internals
Expand Down Expand Up @@ -7373,7 +7385,7 @@ module.exports = internals.Ip;
// Load modules

const Punycode = __webpack_require__(31);
const Util = __webpack_require__(6);
const Util = __webpack_require__(4);

// Declare internals

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

/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


// Load modules

const Util = __webpack_require__(4);

const Any = __webpack_require__(1);
const Hoek = __webpack_require__(0);


// Declare internals

const internals = {};


internals.Map = class extends Map {

slice() {

return new internals.Map(this);
}

toString() {

return Util.inspect(this);
}
};


internals.Symbol = class extends Any {

constructor() {

super();
this._type = 'symbol';
this._inner.map = new internals.Map();
}

_base(value, state, options) {

if (options.convert) {
const lookup = this._inner.map.get(value);
if (lookup) {
value = lookup;
}

if (this._flags.allowOnly) {
return {
value,
errors: (typeof value === 'symbol') ? null : this.createError('symbol.map', { map: this._inner.map }, state, options)
};
}
}

return {
value,
errors: (typeof value === 'symbol') ? null : this.createError('symbol.base', null, state, options)
};
}

map(iterable) {

if (iterable && !iterable[Symbol.iterator] && typeof iterable === 'object') {
iterable = Object.entries(iterable);
}

Hoek.assert(iterable && iterable[Symbol.iterator], 'Iterable must be an iterable or object');
const obj = this.clone();

const symbols = [];
for (const entry of iterable) {
Hoek.assert(entry && entry[Symbol.iterator], 'Entry must be an iterable');
const [key, value] = entry;

Hoek.assert(typeof key !== 'object' && typeof key !== 'function' && typeof key !== 'symbol', 'Key must not be an object, function, or Symbol');
Hoek.assert(typeof value === 'symbol', 'Value must be a Symbol');
obj._inner.map.set(key, value);
symbols.push(value);
}

return obj.valid(...symbols);
}

describe() {

const description = super.describe();
description.map = new Map(this._inner.map);
return description;
}
};


module.exports = new internals.Symbol();


/***/ }),
/* 33 */
/***/ (function(module) {

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"};
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"};

/***/ })
/******/ ]);
/******/ ]);

0 comments on commit 38955c6

Please sign in to comment.