Skip to content

Commit

Permalink
upgrade path-to-regex v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Nov 14, 2019
1 parent 1263dbb commit 894f9e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"lodash.merge": "^4.6.2",
"multer": "^1.4.2",
"ono": "^5.0.1",
"path-to-regexp": "^4.0.0",
"path-to-regexp": "^4.0.5",
"ts-log": "^2.1.4"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/framework/base.path.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as pathToRegexp from 'path-to-regexp';
import { compile } from 'path-to-regexp';
import { OpenAPIV3 } from './types';

interface ServerUrlVariables {
Expand Down Expand Up @@ -56,7 +56,7 @@ export default class BasePath {
}, []);

const allParamCombos = cartesian(...allParams);
const toPath = pathToRegexp.compile(this.path);
const toPath = compile(this.path);
const paths = new Set<string>();
for (const combo of allParamCombos) {
paths.add(toPath(combo));
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/openapi.metadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as pathToRegexp from 'path-to-regexp';
import { pathToRegexp } from 'path-to-regexp';
import * as _ from 'lodash';
import { OpenApiContext } from '../framework/openapi.context';
import { OpenApiRequest, OpenApiRequestHandler } from '../framework/types';
Expand Down

0 comments on commit 894f9e9

Please sign in to comment.