route-node
Advanced tools
Comparing version 1.10.0 to 1.11.0
@@ -0,1 +1,11 @@ | ||
<a name="1.11.0"></a> | ||
# [1.11.0](https://github.com/troch/route-node/compare/v1.10.0...v1.11.0) (2017-11-08) | ||
### Features | ||
* update path-parser to latest version ([0a47563](https://github.com/troch/route-node/commit/0a47563)) | ||
<a name="1.10.0"></a> | ||
@@ -2,0 +12,0 @@ # [1.10.0](https://github.com/troch/route-node/compare/v1.9.0...v1.10.0) (2017-10-15) |
@@ -278,3 +278,3 @@ define('RouteNode', function () { 'use strict'; | ||
if (!matched) { | ||
throw new Error('Could not parse path.'); | ||
throw new Error('Could not parse path \'' + str + '\''); | ||
} | ||
@@ -348,3 +348,3 @@ // Return tokens | ||
if (!path) throw new Error('Please supply a path'); | ||
if (!path) throw new Error('Missing path in Path constructor'); | ||
this.path = path; | ||
@@ -502,3 +502,8 @@ this.tokens = tokenise(path); | ||
return !exists(encodedParams[p]); | ||
})) throw new Error('Missing parameters'); | ||
})) { | ||
var missingParameters = this.urlParams.filter(function (p) { | ||
return !exists(encodedParams[p]); | ||
}); | ||
throw new Error('Cannot build path: \'' + this.path + '\' requires missing parameters { ' + missingParameters.join(', ') + ' }'); | ||
} | ||
@@ -514,3 +519,3 @@ // Check constraints | ||
if (!constraintsPassed) throw new Error('Some parameters are of invalid format'); | ||
if (!constraintsPassed) throw new Error('Some parameters of \'' + this.path + '\' are of invalid format'); | ||
} | ||
@@ -517,0 +522,0 @@ |
@@ -282,3 +282,3 @@ (function (global, factory) { | ||
if (!matched) { | ||
throw new Error('Could not parse path.'); | ||
throw new Error('Could not parse path \'' + str + '\''); | ||
} | ||
@@ -352,3 +352,3 @@ // Return tokens | ||
if (!path) throw new Error('Please supply a path'); | ||
if (!path) throw new Error('Missing path in Path constructor'); | ||
this.path = path; | ||
@@ -506,3 +506,8 @@ this.tokens = tokenise(path); | ||
return !exists(encodedParams[p]); | ||
})) throw new Error('Missing parameters'); | ||
})) { | ||
var missingParameters = this.urlParams.filter(function (p) { | ||
return !exists(encodedParams[p]); | ||
}); | ||
throw new Error('Cannot build path: \'' + this.path + '\' requires missing parameters { ' + missingParameters.join(', ') + ' }'); | ||
} | ||
@@ -518,3 +523,3 @@ // Check constraints | ||
if (!constraintsPassed) throw new Error('Some parameters are of invalid format'); | ||
if (!constraintsPassed) throw new Error('Some parameters of \'' + this.path + '\' are of invalid format'); | ||
} | ||
@@ -521,0 +526,0 @@ |
{ | ||
"name": "route-node", | ||
"version": "1.10.0", | ||
"version": "1.11.0", | ||
"description": "A package to create a tree of named routes", | ||
@@ -58,5 +58,5 @@ "main": "dist/commonjs/route-node.js", | ||
"dependencies": { | ||
"path-parser": "2.0.2", | ||
"path-parser": "2.1.0", | ||
"search-params": "~1.3.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
249881
2517
+ Addedpath-parser@2.1.0(transitive)
- Removedpath-parser@2.0.2(transitive)
Updatedpath-parser@2.1.0