Comparing version 17.6.0 to 17.6.1
@@ -29,3 +29,3 @@ 'use strict'; | ||
const settings = (options ? Hoek.shallow(options) : {}); | ||
const settings = (options ? Object.assign({}, options) : {}); // Shallow cloned | ||
@@ -32,0 +32,0 @@ if (settings.security === true) { |
@@ -81,3 +81,3 @@ 'use strict'; | ||
for (let event of events) { | ||
event = Hoek.shallow(event); | ||
event = Object.assign({}, event); // Shallow cloned | ||
Hoek.assert(!event.options.sandbox, 'Cannot specify sandbox option for route extension'); | ||
@@ -84,0 +84,0 @@ event.realm = route.realm; |
@@ -25,3 +25,3 @@ 'use strict'; | ||
const settings = request.route.settings.cache; | ||
const policy = settings && request._route._cache && (settings._statuses[response.statusCode] || (response.statusCode === 304 && settings._statuses['200'])); | ||
const policy = settings && request._route._cache && (settings._statuses.has(response.statusCode) || (response.statusCode === 304 && settings._statuses.has(200))); | ||
@@ -28,0 +28,0 @@ if (policy || |
@@ -42,3 +42,3 @@ 'use strict'; | ||
this.app = (options.app ? Hoek.shallow(options.app) : {}); // Place for application-specific state without conflicts with hapi, should not be used by plugins | ||
this.app = (options.app ? Object.assign({}, options.app) : {}); // Place for application-specific state without conflicts with hapi, should not be used by plugins (shallow cloned) | ||
this.headers = req.headers; | ||
@@ -55,3 +55,3 @@ this.info = internals.info(this._core, req); | ||
this.payload = null; | ||
this.plugins = (options.plugins ? Hoek.shallow(options.plugins) : {}); // Place for plugins to store state without conflicts with hapi, should be namespaced using plugin name | ||
this.plugins = (options.plugins ? Object.assign({}, options.plugins) : {}); // Place for plugins to store state without conflicts with hapi, should be namespaced using plugin name (shallow cloned) | ||
this.pre = {}; // Pre raw values | ||
@@ -58,0 +58,0 @@ this.preResponses = {}; // Pre response values |
@@ -127,3 +127,3 @@ 'use strict'; | ||
Hoek.assert(Hoek.isInteger(statusCode), 'Status code must be an integer'); | ||
Hoek.assert(Number.isSafeInteger(statusCode), 'Status code must be an integer'); | ||
@@ -130,0 +130,0 @@ this.statusCode = statusCode; |
@@ -179,3 +179,3 @@ 'use strict'; | ||
this.settings.cache._statuses = Hoek.mapToObject(this.settings.cache.statuses); | ||
this.settings.cache._statuses = new Set(this.settings.cache.statuses); | ||
this._cache = new Catbox.Policy({ expiresIn: this.settings.cache.expiresIn, expiresAt: this.settings.cache.expiresAt }); | ||
@@ -182,0 +182,0 @@ } |
@@ -236,3 +236,3 @@ 'use strict'; | ||
event = Hoek.shallow(event); | ||
event = Object.assign({}, event); // Shallow cloned | ||
event.realm = this.realm; | ||
@@ -278,3 +278,3 @@ const type = event.type; | ||
settings = Hoek.shallow(settings); // options can be reused | ||
settings = Object.assign({}, settings); // options can be reused (shallow cloned) | ||
delete settings.credentials; | ||
@@ -395,3 +395,3 @@ delete settings.artifacts; // Cannot appear without credentials | ||
else if (typeof item === 'function') { | ||
item = Hoek.shallow(item); | ||
item = Object.assign({}, item); // Shallow cloned | ||
} | ||
@@ -453,3 +453,3 @@ | ||
for (const method of config.method) { | ||
const settings = Hoek.shallow(config); | ||
const settings = Object.assign({}, config); // Shallow cloned | ||
settings.method = method; | ||
@@ -456,0 +456,0 @@ this._addRoute(settings, this); |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://hapijs.com", | ||
"version": "17.6.0", | ||
"version": "17.6.1", | ||
"repository": { | ||
@@ -19,3 +19,3 @@ "type": "git", | ||
"engines": { | ||
"node": ">=8.9.0" | ||
"node": ">=8.12.0" | ||
}, | ||
@@ -31,4 +31,4 @@ "dependencies": { | ||
"heavy": "6.x.x", | ||
"hoek": "5.x.x", | ||
"joi": "13.x.x", | ||
"hoek": "6.x.x", | ||
"joi": "14.x.x", | ||
"mimos": "4.x.x", | ||
@@ -47,3 +47,3 @@ "podium": "3.x.x", | ||
"inert": "5.x.x", | ||
"lab": "16.x.x", | ||
"lab": "17.x.x", | ||
"vision": "5.x.x", | ||
@@ -50,0 +50,0 @@ "wreck": "14.x.x" |
@@ -35,2 +35,3 @@ <img src="https://raw.github.com/hapijs/hapi/master/images/17.png" align="right"/> | ||
- The product development team at **Creative Artists Agency** | ||
- **[Chords](https://getonchords.com)** | ||
- **[First + Third](https://firstandthird.com)** | ||
@@ -37,0 +38,0 @@ |
Sorry, the diff of this file is not supported yet
44
168089
- Removedhoek@5.0.4(transitive)
- Removedjoi@13.7.0(transitive)
Updatedhoek@6.x.x
Updatedjoi@14.x.x