Build(deps): bump path-to-regexp from 5.0.0 to 6.2.0, run [Appveyor Bitbucket Circle GitHub GitLab ScrutinizerBuild] (#5684)
* Build(deps): bump path-to-regexp from 5.0.0 to 6.2.0 Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 5.0.0 to 6.2.0. - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](https://github.com/pillarjs/path-to-regexp/compare/v5.0.0...v6.2.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * deps: apply path-to-regexp breaking changes * fix: path-to-regexp types in frontend Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com> Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ad867ddc90
commit
d0b93b4103
@@ -329,7 +329,7 @@ describe('BaseService', function () {
|
||||
describe('ScoutCamp integration', function () {
|
||||
// TODO Strangly, without the useless escape the regexes do not match in Node 12.
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const expectedRouteRegex = /^\/foo\/([^\/]+?)(|\.svg|\.json)$/
|
||||
const expectedRouteRegex = /^\/foo(?:\/([^\/#\?]+?))(|\.svg|\.json)$/
|
||||
|
||||
let mockCamp
|
||||
let mockHandleRequest
|
||||
|
||||
@@ -91,15 +91,15 @@ export function constructPath({
|
||||
if (typeof token === 'string') {
|
||||
return token.trim()
|
||||
} else {
|
||||
const { delimiter, name, optional } = token
|
||||
const { prefix, name, modifier } = token
|
||||
const value = namedParams[name]
|
||||
if (value) {
|
||||
return `${delimiter}${value.trim()}`
|
||||
} else if (optional) {
|
||||
return `${prefix}${value.trim()}`
|
||||
} else if (modifier === '?' || modifier === '*') {
|
||||
return ''
|
||||
} else {
|
||||
isComplete = false
|
||||
return `${delimiter}:${name}`
|
||||
return `${prefix}:${name}`
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -221,14 +221,15 @@ export default function PathBuilder({
|
||||
tokenIndex: number,
|
||||
namedParamIndex: number
|
||||
): JSX.Element {
|
||||
const { delimiter, optional } = token
|
||||
const { prefix, modifier } = token
|
||||
const optional = modifier === '?' || modifier === '*'
|
||||
const name = `${token.name}`
|
||||
|
||||
const exampleValue = exampleParams[name] || '(not set)'
|
||||
|
||||
return (
|
||||
<React.Fragment key={token.name}>
|
||||
{renderLiteral(delimiter, tokenIndex, false)}
|
||||
{renderLiteral(prefix, tokenIndex, false)}
|
||||
<PathBuilderColumn pathContainsOnlyLiterals={false} withHorizPadding>
|
||||
<NamedParamLabelContainer>
|
||||
<BuilderLabel htmlFor={name}>{humanizeString(name)}</BuilderLabel>
|
||||
|
||||
@@ -21,19 +21,11 @@ export function removeRegexpFromPattern(pattern: string): string {
|
||||
if (typeof token === 'string') {
|
||||
return token
|
||||
} else {
|
||||
const { delimiter, optional, repeat, name, pattern } = token
|
||||
const { prefix, modifier, name, pattern } = token
|
||||
if (typeof name === 'number') {
|
||||
return `${delimiter}(${pattern})`
|
||||
return `${prefix}(${pattern})`
|
||||
} else {
|
||||
let modifier = ''
|
||||
if (optional && !repeat) {
|
||||
modifier = '?'
|
||||
} else if (!optional && repeat) {
|
||||
modifier = '+'
|
||||
} else if (optional && repeat) {
|
||||
modifier = '*'
|
||||
}
|
||||
return `${delimiter}:${name}${modifier}`
|
||||
return `${prefix}:${name}${modifier}`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -28028,9 +28028,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-5.0.0.tgz",
|
||||
"integrity": "sha512-VOQVA+0mivusQfaveeWlrW7ddXKuStHMTdovn/1epf7cEpUL4dpzGl7eq8ho96H9w90/q66yJLsqn84jSCfkmQ=="
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz",
|
||||
"integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg=="
|
||||
},
|
||||
"path-type": {
|
||||
"version": "2.0.0",
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"moment": "^2.29.1",
|
||||
"node-env-flag": "^0.1.0",
|
||||
"parse-link-header": "^1.0.1",
|
||||
"path-to-regexp": "^5.0.0",
|
||||
"path-to-regexp": "^6.2.0",
|
||||
"pretty-bytes": "^5.4.1",
|
||||
"priorityqueuejs": "^2.0.0",
|
||||
"prom-client": "^11.5.3",
|
||||
|
||||
@@ -49,7 +49,7 @@ module.exports = class GithubRPackageVersion extends (
|
||||
},
|
||||
{
|
||||
title: 'GitHub R package version (branch & subdirectory of monorepo)',
|
||||
pattern: ':user/:repo:/:branch',
|
||||
pattern: ':user/:repo/:branch',
|
||||
namedParams: { user: 'mixOmicsTeam', repo: 'mixOmics', branch: 'master' },
|
||||
queryParams: { filename: 'subdirectory/DESCRIPTION' },
|
||||
staticPreview: this.render({ version: '6.10.9', branch: 'master' }),
|
||||
|
||||
Reference in New Issue
Block a user