Integrate new path-to-regexp with trailing optionals (#2644)
Fix #2497 Ref pillarjs/path-to-regexp#176
This commit is contained in:
@@ -23,8 +23,7 @@ class GithubPackageJsonVersion extends ConditionalGithubAuthService {
|
||||
static get route() {
|
||||
return {
|
||||
base: 'github/package-json/v',
|
||||
format: '([^/]+)/([^/]+)/?([^/]+)?',
|
||||
capture: ['user', 'repo', 'branch'],
|
||||
pattern: ':user/:repo/:branch*',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +37,8 @@ class GithubPackageJsonVersion extends ConditionalGithubAuthService {
|
||||
documentation,
|
||||
},
|
||||
{
|
||||
title: 'GitHub package.json version',
|
||||
pattern: ':user/:repo/:branch',
|
||||
title: 'GitHub package.json version (branch)',
|
||||
pattern: ':user/:repo/:branch*',
|
||||
namedParams: {
|
||||
user: 'IcedFrisby',
|
||||
repo: 'IcedFrisby',
|
||||
@@ -102,7 +101,7 @@ class DynamicGithubPackageJson extends ConditionalGithubAuthService {
|
||||
},
|
||||
{
|
||||
title: 'GitHub package.json dynamic',
|
||||
pattern: ':key/:user/:repo/:branch',
|
||||
pattern: ':key/:user/:repo/:branch*',
|
||||
namedParams: {
|
||||
key: 'keywords',
|
||||
user: 'developit',
|
||||
|
||||
Reference in New Issue
Block a user