Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

joi

Package Overview
Dependencies
Maintainers
6
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joi - npm Package Compare versions

Comparing version 17.8.2 to 17.8.3

2

lib/annotate.js
'use strict';
const Clone = require('@hapi/hoek/clone');
const Clone = require('@hapi/hoek/lib/clone');

@@ -5,0 +5,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const DeepEqual = require('@hapi/hoek/deepEqual');
const Merge = require('@hapi/hoek/merge');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');
const DeepEqual = require('@hapi/hoek/lib/deepEqual');
const Merge = require('@hapi/hoek/lib/merge');

@@ -8,0 +8,0 @@ const Cache = require('./cache');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');

@@ -6,0 +6,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const AssertError = require('@hapi/hoek/assertError');
const Assert = require('@hapi/hoek/lib/assert');
const AssertError = require('@hapi/hoek/lib/error');

@@ -6,0 +6,0 @@ const Pkg = require('../package.json');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');

@@ -6,0 +6,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');

@@ -6,0 +6,0 @@ const Cache = require('./cache');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');

@@ -6,0 +6,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');

@@ -6,0 +6,0 @@ const Template = require('./template');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const Reach = require('@hapi/hoek/reach');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');
const Reach = require('@hapi/hoek/lib/reach');

@@ -7,0 +7,0 @@ const Common = require('./common');

'use strict';
const Clone = require('@hapi/hoek/clone');
const Reach = require('@hapi/hoek/reach');
const Clone = require('@hapi/hoek/lib/clone');
const Reach = require('@hapi/hoek/lib/reach');

@@ -6,0 +6,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const EscapeHtml = require('@hapi/hoek/escapeHtml');
const Formula = require('@hapi/formula');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');
const EscapeHtml = require('@hapi/hoek/lib/escapeHtml');
const Formula = require('@sideway/formula');

@@ -8,0 +8,0 @@ const Common = require('./common');

'use strict';
const DeepEqual = require('@hapi/hoek/deepEqual');
const Pinpoint = require('@hapi/pinpoint');
const DeepEqual = require('@hapi/hoek/lib/deepEqual');
const Pinpoint = require('@sideway/pinpoint');

@@ -6,0 +6,0 @@ const Errors = require('./errors');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Merge = require('@hapi/hoek/merge');
const Assert = require('@hapi/hoek/lib/assert');
const Merge = require('@hapi/hoek/lib/merge');

@@ -6,0 +6,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Base = require('../base');

'use strict';
const Assert = require('@hapi/hoek/assert');
const DeepEqual = require('@hapi/hoek/deepEqual');
const Reach = require('@hapi/hoek/reach');
const Assert = require('@hapi/hoek/lib/assert');
const DeepEqual = require('@hapi/hoek/lib/deepEqual');
const Reach = require('@hapi/hoek/lib/reach');

@@ -7,0 +7,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Keys = require('./keys');

'use strict';
const ApplyToDefaults = require('@hapi/hoek/applyToDefaults');
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const ApplyToDefaults = require('@hapi/hoek/lib/applyToDefaults');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');
const Topo = require('@hapi/topo');

@@ -7,0 +7,0 @@

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const { isDomainValid, isEmailValid, ipRegex, uriRegex } = require('@hapi/address');
const EscapeRegex = require('@hapi/hoek/escapeRegex');
const Tlds = require('@hapi/tlds');
const Assert = require('@hapi/hoek/lib/assert');
const Domain = require('@sideway/address/lib/domain');
const Email = require('@sideway/address/lib/email');
const Ip = require('@sideway/address/lib/ip');
const EscapeRegex = require('@hapi/hoek/lib/escapeRegex');
const Tlds = require('@sideway/address/lib/tlds');
const Uri = require('@sideway/address/lib/uri');

@@ -13,3 +16,3 @@ const Any = require('./any');

const internals = {
tlds: Tlds.tlds instanceof Set ? { tlds: { allow: Tlds.tlds, deny: null } } : false, // $lab:coverage:ignore$
tlds: Tlds instanceof Set ? { tlds: { allow: Tlds, deny: null } } : false, // $lab:coverage:ignore$
base64Regex: {

@@ -29,3 +32,3 @@ // paddingRequired

hexRegex: /^[a-f0-9]+$/i,
ipRegex: ipRegex({ cidr: 'forbidden' }).regex,
ipRegex: Ip.regex({ cidr: 'forbidden' }).regex,
isoDurationRegex: /^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,

@@ -266,3 +269,3 @@

if (options) {
Common.assertOptions(options, ['allowFullyQualified', 'allowUnicode', 'allowUnderscore', 'maxDomainSegments', 'minDomainSegments', 'tlds']);
Common.assertOptions(options, ['allowFullyQualified', 'allowUnicode', 'maxDomainSegments', 'minDomainSegments', 'tlds']);
}

@@ -275,3 +278,3 @@

if (isDomainValid(value, address)) {
if (Domain.isValid(value, address)) {
return value;

@@ -300,3 +303,3 @@ }

for (const email of emails) {
if (!isEmailValid(email, address)) {
if (!Email.isValid(email, address)) {
invalids.push(email);

@@ -400,3 +403,3 @@ }

if (isDomainValid(value, { minDomainSegments: 1 }) ||
if (Domain.isValid(value, { minDomainSegments: 1 }) ||
internals.ipRegex.test(value)) {

@@ -423,3 +426,3 @@

const { cidr, versions, regex } = ipRegex(options);
const { cidr, versions, regex } = Ip.regex(options);
const version = options.version ? versions : undefined;

@@ -649,3 +652,3 @@ return this.$_addRule({ name: 'ip', args: { options: { cidr, version } }, regex });

const { regex, scheme } = uriRegex(options);
const { regex, scheme } = Uri.regex(options);
const domain = options.domain ? internals.addressOptions(options.domain) : null;

@@ -665,3 +668,3 @@ return this.$_addRule({ name: 'uri', args: { options }, regex, domain, scheme });

(!options.allowRelative || matched) &&
!isDomainValid(matched, domain)) {
!Domain.isValid(matched, domain)) {

@@ -784,3 +787,3 @@ return helpers.error('string.domain', { value: matched });

if (!allow) {
return { ...options, tlds: false };
return options;
}

@@ -806,3 +809,3 @@

for (const tld of set) {
Assert(isDomainValid(tld, { minDomainSegments: 1, maxDomainSegments: 1 }), `${source} must contain valid top level domain names`);
Assert(Domain.isValid(tld, { minDomainSegments: 1, maxDomainSegments: 1 }), `${source} must contain valid top level domain names`);
}

@@ -809,0 +812,0 @@ };

'use strict';
const Assert = require('@hapi/hoek/assert');
const Assert = require('@hapi/hoek/lib/assert');

@@ -5,0 +5,0 @@ const Any = require('./any');

'use strict';
const Assert = require('@hapi/hoek/assert');
const Clone = require('@hapi/hoek/clone');
const Ignore = require('@hapi/hoek/ignore');
const Reach = require('@hapi/hoek/reach');
const Assert = require('@hapi/hoek/lib/assert');
const Clone = require('@hapi/hoek/lib/clone');
const Ignore = require('@hapi/hoek/lib/ignore');
const Reach = require('@hapi/hoek/lib/reach');

@@ -8,0 +8,0 @@ const Common = require('./common');

'use strict';
const Assert = require('@hapi/hoek/assert');
const DeepEqual = require('@hapi/hoek/deepEqual');
const Assert = require('@hapi/hoek/lib/assert');
const DeepEqual = require('@hapi/hoek/lib/deepEqual');

@@ -6,0 +6,0 @@ const Common = require('./common');

{
"name": "joi",
"description": "Object schema validation",
"version": "17.8.2",
"version": "17.8.3",
"repository": "git://github.com/hapijs/joi",

@@ -18,14 +18,13 @@ "main": "lib/index.js",

"dependencies": {
"@hapi/hoek": "^11.0.2",
"@hapi/tlds": "^1.0.1",
"@hapi/topo": "^6.0.1",
"@hapi/address": "^5.1.0",
"@hapi/pinpoint": "^2.0.1",
"@hapi/formula": "^3.0.2"
"@hapi/hoek": "^9.0.0",
"@hapi/topo": "^5.0.0",
"@sideway/address": "^4.1.3",
"@sideway/formula": "^3.0.1",
"@sideway/pinpoint": "^2.0.0"
},
"devDependencies": {
"@hapi/bourne": "^3.0.0",
"@hapi/code": "^9.0.3",
"@hapi/bourne": "2.x.x",
"@hapi/code": "8.x.x",
"@hapi/joi-legacy-test": "npm:@hapi/joi@15.x.x",
"@hapi/lab": "^25.1.2",
"@hapi/lab": "^25.0.1",
"@types/node": "^14.18.24",

@@ -32,0 +31,0 @@ "typescript": "4.3.x"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc