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

@hapi/call

Package Overview
Dependencies
Maintainers
6
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/call - npm Package Compare versions

Comparing version 8.0.1 to 9.0.0

6

lib/index.js

@@ -41,3 +41,3 @@ 'use strict';

if (vhost !== '*') {
this.vhosts = this.vhosts || new Map();
this.vhosts = this.vhosts ?? new Map();
if (!this.vhosts.has(vhost)) {

@@ -53,3 +53,3 @@ this.vhosts.set(vhost, new Map());

const analysis = config.analysis || this.analyze(config.path);
const analysis = config.analysis ?? this.analyze(config.path);
const record = {

@@ -129,3 +129,3 @@ path: config.path,

if (value === null) {
return this.specials.badRequest || Boom.badRequest('Invalid request path');
return this.specials.badRequest ?? Boom.badRequest('Invalid request path');
}

@@ -132,0 +132,0 @@

@@ -41,3 +41,3 @@ 'use strict';

if (isLiteral) {
this._fulls = this._fulls || new Map();
this._fulls = this._fulls ?? new Map();
let literal = '/' + literals.join('/');

@@ -48,3 +48,3 @@ if (!record.settings.isCaseSensitive) {

Hoek.assert(!this._fulls.has(literal), 'New route', record.path, 'conflicts with existing', this._fulls.has(literal) && this._fulls.get(literal).record.path);
Hoek.assert(!this._fulls.has(literal), 'New route', record.path, 'conflicts with existing', this._fulls.get(literal)?.record.path);
this._fulls.set(literal, { segment: current, record });

@@ -56,3 +56,3 @@ }

this._literals = this._literals || new Map();
this._literals = this._literals ?? new Map();
const currentLiteral = record.settings.isCaseSensitive ? current.literal : current.literal.toLowerCase();

@@ -69,4 +69,4 @@ if (!this._literals.has(currentLiteral)) {

Hoek.assert(!this._wildcard, 'New route', record.path, 'conflicts with existing', this._wildcard && this._wildcard.record.path);
Hoek.assert(!this._param || !this._param._wildcard, 'New route', record.path, 'conflicts with existing', this._param && this._param._wildcard && this._param._wildcard.record.path);
Hoek.assert(!this._wildcard, 'New route', record.path, 'conflicts with existing', this._wildcard?.record.path);
Hoek.assert(!this._param || !this._param._wildcard, 'New route', record.path, 'conflicts with existing', this._param?._wildcard?.record.path);
this._wildcard = { segment: current, record };

@@ -78,3 +78,3 @@ }

this._mixed = this._mixed || [];
this._mixed = this._mixed ?? [];

@@ -89,3 +89,3 @@ let mixed = this._mixedLookup(current);

if (isEdge) {
Hoek.assert(!mixed.node._edge, 'New route', record.path, 'conflicts with existing', mixed.node._edge && mixed.node._edge.record.path);
Hoek.assert(!mixed.node._edge, 'New route', record.path, 'conflicts with existing', mixed.node._edge?.record.path);
mixed.node._edge = { segment: current, record };

@@ -101,10 +101,10 @@ }

this._param = this._param || new internals.Segment();
this._param = this._param ?? new internals.Segment();
if (isEdge) {
Hoek.assert(!this._param._edge, 'New route', record.path, 'conflicts with existing', this._param._edge && this._param._edge.record.path);
Hoek.assert(!this._param._edge, 'New route', record.path, 'conflicts with existing', this._param._edge?.record.path);
this._param._edge = { segment: current, record };
}
else {
Hoek.assert(!this._wildcard || !remaining[0].wildcard, 'New route', record.path, 'conflicts with existing', this._wildcard && this._wildcard.record.path);
Hoek.assert(!this._wildcard || !remaining[0].wildcard, 'New route', record.path, 'conflicts with existing', this._wildcard?.record.path);
this._param.add(remaining, record);

@@ -216,5 +216,3 @@ }

if (this._param) {
if (current ||
this._param._edge && this._param._edge.segment.empty) {
if (current || this._param._edge?.segment.empty) {
const record = internals.deeper(this._param, nextPath, remainder, [current], options);

@@ -221,0 +219,0 @@ if (record) {

@@ -1,3 +0,4 @@

Copyright (c) 2014-2020, Sideway Inc, and project contributors
Copyright (c) 2014, Walmart.
Copyright (c) 2014-2022, Project contributors
Copyright (c) 2014-2020, Sideway Inc
Copyright (c) 2014, Walmart.
All rights reserved.

@@ -4,0 +5,0 @@

{
"name": "@hapi/call",
"description": "HTTP Router",
"version": "8.0.1",
"version": "9.0.0",
"repository": "git://github.com/hapijs/call",

@@ -14,9 +14,15 @@ "main": "lib/index.js",

],
"eslintConfig": {
"extends": [
"plugin:@hapi/module"
]
},
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
"@hapi/boom": "^10.0.0",
"@hapi/hoek": "^10.0.0"
},
"devDependencies": {
"@hapi/code": "8.x.x",
"@hapi/lab": "23.x.x"
"@hapi/code": "^9.0.0",
"@hapi/eslint-plugin": "*",
"@hapi/lab": "^25.0.1"
},

@@ -23,0 +29,0 @@ "scripts": {

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