Revert "Changements dans les modules (nouvelle version Express, mysql, ..)"
This reverts commit bdab795506.
This commit is contained in:
10
node_modules/path-to-regexp/History.md
generated
vendored
10
node_modules/path-to-regexp/History.md
generated
vendored
@@ -1,3 +1,13 @@
|
||||
0.1.7 / 2015-07-28
|
||||
==================
|
||||
|
||||
* Fixed regression with escaped round brackets and matching groups.
|
||||
|
||||
0.1.6 / 2015-06-19
|
||||
==================
|
||||
|
||||
* Replace `index` feature by outputting all parameters, unnamed and named.
|
||||
|
||||
0.1.5 / 2015-05-08
|
||||
==================
|
||||
|
||||
|
||||
2
node_modules/path-to-regexp/Readme.md
generated
vendored
2
node_modules/path-to-regexp/Readme.md
generated
vendored
@@ -2,7 +2,7 @@
|
||||
|
||||
Turn an Express-style path string such as `/user/:name` into a regular expression.
|
||||
|
||||
**Note:** This is a legacy branch. You should upgrade to `1.x`. If you find you are stuck on this version, your code will need to take into account the `index` property on the keys.
|
||||
**Note:** This is a legacy branch. You should upgrade to `1.x`.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
14
node_modules/path-to-regexp/index.js
generated
vendored
14
node_modules/path-to-regexp/index.js
generated
vendored
@@ -91,7 +91,7 @@ function pathtoRegexp(path, keys, options) {
|
||||
var len = keys.length
|
||||
|
||||
while (len-- > keysOffset && keys[len].offset > index) {
|
||||
keys[len].offset += 3;
|
||||
keys[len].offset += 3; // Replacement length minus asterisk length.
|
||||
}
|
||||
|
||||
return '(.*)';
|
||||
@@ -99,6 +99,18 @@ function pathtoRegexp(path, keys, options) {
|
||||
|
||||
// This is a workaround for handling unnamed matching groups.
|
||||
while (m = MATCHING_GROUP_REGEXP.exec(path)) {
|
||||
var escapeCount = 0;
|
||||
var index = m.index;
|
||||
|
||||
while (path.charAt(--index) === '\\') {
|
||||
escapeCount++;
|
||||
}
|
||||
|
||||
// It's possible to escape the bracket.
|
||||
if (escapeCount % 2 === 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m.index) {
|
||||
keys.splice(keysOffset + i, 0, {
|
||||
name: name++, // Unnamed matching groups must be consistently linear.
|
||||
|
||||
2
node_modules/path-to-regexp/package.json
generated
vendored
2
node_modules/path-to-regexp/package.json
generated
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "path-to-regexp",
|
||||
"description": "Express style path to RegExp utility",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"files": [
|
||||
"index.js",
|
||||
"LICENSE"
|
||||
|
||||
Reference in New Issue
Block a user