Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(path-to-regexp): path-to-regexp 8.1.0 update #976

Merged
merged 6 commits into from
Sep 14, 2024

Conversation

frankkeefer
Copy link
Contributor

  • Change path-to-regexp 6.2.2 to 8.1.0
  • Update code to handled changes in path-to-regexp v6.x.x -> v8.x.x

const strict = !!req.app.enabled('strict routing');
const sensitive = !!req.app.enabled('case sensitive routing');
const pathOpts = {
sensitive,
strict,
};
const regexp = pathToRegexp(expressRoute, keys, pathOpts);
const regexpObj = pathToRegexp(expressRoute, pathOpts);
Copy link
Contributor

@cvchauhan cvchauhan Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove let keys = []; and keys = regexpObj.keys;
and directly use
const { regexpObj, keys } = pathToRegexp(expressRoute, pathOpts);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in requested changes.

  • removed let keys =[] and related uses
  • removed const regexp = regepObj.regexp; and related uses
    All current unit tests still pass locally

Copy link
Contributor

@cvchauhan cvchauhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove let keys = []; and keys = regexpObj.keys;
and directly use
const { regexpObj, keys } = pathToRegexp(expressRoute, pathOpts);

Copy link
Owner

@cdimascio cdimascio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you. this is great

@cdimascio cdimascio merged commit 70cce65 into cdimascio:master Sep 14, 2024
5 checks passed
@dogmatic69
Copy link

Please create a release 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants